﻿/* Le planning reste lâ€™espace principal : le panneau ne masque jamais les
   autres salariÃ©s (retour MOA 08/09/2026). */
.planning-correction-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: start;
}

.planning-correction-panel {
    position: sticky;
    top: var(--rh-space-3);
    max-height: calc(100vh - 2rem);
    padding: var(--rh-space-4);
    overflow-y: auto;
    border-left: 1px solid var(--rh-line);
    background: var(--rh-surface);
}

.correction-panel-head,
.correction-navigation,
.correction-actions,
.correction-editor .actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--rh-space-2);
    flex-wrap: wrap;
}

.correction-panel-head h2 { margin: 0; font-size: 1.15rem; }
.correction-filter { display: grid; gap: var(--rh-space-1); margin-top: var(--rh-space-3); color: var(--rh-muted); font-size: .7rem; font-weight: 700; }
.correction-filter select { width: 100%; }
.correction-filter-result { margin: var(--rh-space-2) 0; padding: var(--rh-space-2); font-size: .7rem; }
.correction-status { margin: var(--rh-space-3) 0; color: var(--rh-muted); font-size: .76rem; }
.correction-status.has-error { color: var(--rh-danger); }
/* Retour MOA du 12/09/2026 : l'attente d'enregistrement doit Ãªtre visible
   sur le bouton lui-mÃªme, mÃªme quand le panneau de statut est hors champ. */
.correction-totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--rh-space-2); }
.correction-totals > div { padding: var(--rh-space-2); border: 1px solid var(--rh-line); border-radius: var(--rh-radius-sm); background: var(--rh-surface-muted); }
.correction-totals span,
.correction-totals small,
.correction-totals strong { display: block; }
.correction-totals span,
.correction-totals small { color: var(--rh-muted); font-size: .65rem; }
.correction-totals .has-difference,
.correction-days .has-difference { border-color: var(--rh-warning-line); background: var(--rh-warning-soft); }
.correction-totals .is-balanced,
.correction-days .is-balanced { border-color: var(--rh-success-line); background: var(--rh-success-soft); }

.correction-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; margin: var(--rh-space-3) 0; }
.correction-days > div { min-width: 0; padding: 5px 2px; border: 1px solid var(--rh-line); border-radius: 4px; text-align: center; }
.correction-days span,
.correction-days small,
.correction-days strong { display: block; font-size: .62rem; }
.correction-navigation,
.correction-actions { margin-top: var(--rh-space-3); }
.correction-editor { margin-top: var(--rh-space-4); padding-top: var(--rh-space-3); border-top: 1px solid var(--rh-line); }
.correction-editor label { display: grid; gap: 3px; margin-bottom: var(--rh-space-2); color: var(--rh-muted); font-size: .7rem; font-weight: 700; }
.correction-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--rh-space-2); }
.correction-form-grid label:nth-child(2),
.correction-form-grid label:nth-child(3) { grid-column: 1 / -1; }
.correction-schedule-adjustment { margin-bottom: var(--rh-space-3); }
.correction-schedule-adjustment .section-hint { margin: var(--rh-space-2) 0 0; }

/* Ã‰diteur d'horaires Â« une ligne par jour Â» (maquette validÃ©e par la MOA le
   11/11/2026) : jour Ã  gauche, plages en ligne Ã  droite, ajout discret.
   Retour MOA du 12/11/2026 : la page dÃ©diÃ©e d'Ã©dition d'horaire
   (individual_schedule_edit) adopte le mÃªme gabarit â€” le scope couvre
   dÃ©sormais ses deux conteneurs. */
.schedule-days { display: grid; margin-top: var(--rh-space-2); border: 1px solid var(--rh-line); border-radius: 10px; overflow: hidden; }
.schedule-days .correction-schedule-day { display: grid; grid-template-columns: 2.6rem 1fr 1.8rem; align-items: center; gap: 6px; padding: 1px 10px; border-top: 1px solid var(--rh-line); font-size: .82rem; }
.schedule-days .correction-schedule-day:first-child { border-top: 0; }
.schedule-days .correction-schedule-day:nth-child(even) { background: color-mix(in srgb, var(--rh-line) 14%, transparent); }
.schedule-days .correction-schedule-day > strong { font-size: .78rem; color: var(--rh-muted); font-weight: 700; }
.schedule-days .correction-schedule-slots { display: flex; flex-wrap: wrap; align-items: center; align-content: center; gap: 2px 12px; min-width: 0; margin-top: 0; }
/* Retour MOA du 17/11/2026 (c) â€” Â« encore Ã  amÃ©liorer visuellement Â» : la
   plage reste un bloc insÃ©cable sur une seule ligne (Ã©tiquette TT et croix
   collÃ©s aux heures, aucun Ã©tirement ni retour Ã  la ligne interne), les
   plages multiples se rÃ©partissent en ligne. Les rÃ¨gles visent le mÃªme
   niveau que la rÃ¨gle globale des champs pour rester gagnantes. La bordure
   des heures reprend le filet lÃ©ger du gabarit validÃ© le 11/11 (la rÃ¨gle
   globale pose line-strong, trop dense).
   Retour MOA du 17/11/2026 (d-e) : la police est conservÃ©e et la hauteur
   des lignes s'y adapte franchement â€” interligne simple sur les heures,
   case et boutons rÃ©duits Ã  la hauteur du texte, marges au minimum. */
.schedule-days .correction-schedule-slot { display: flex; flex-wrap: nowrap; width: fit-content; max-width: 100%; align-items: center; gap: 2px; line-height: 1.1; }
.schedule-days .correction-schedule-slot[data-schedule-slot] input[data-clock-input] { width: 36px; min-height: 0; padding: 0 2px; text-align: center; font-size: .78rem; line-height: 1; border-color: var(--rh-line); border-radius: var(--rh-radius-sm); background: var(--rh-surface); flex: none; }
.schedule-days .correction-schedule-sep { color: var(--rh-muted); flex: none; }
.schedule-days .correction-schedule-slot .schedule-remote-work { margin-left: 6px; white-space: nowrap; font-size: .72rem; color: var(--rh-primary); display: inline-flex; align-items: center; gap: 3px; flex: none; line-height: 1; }
.schedule-days .correction-schedule-slot .schedule-remote-work input { width: 13px; height: 13px; flex: none; }
.schedule-days .correction-schedule-remove { width: 16px; height: 16px; line-height: 14px; border: 0; background: none; color: var(--rh-danger); font-size: .95rem; cursor: pointer; padding: 0; margin-left: 4px; flex: none; }
.schedule-days .correction-schedule-empty { margin: 0; color: var(--rh-muted); font-size: .76rem; }
.schedule-days .correction-schedule-empty[title] { cursor: help; }
.schedule-days .correction-schedule-add { width: 18px; height: 18px; line-height: 16px; border-radius: 6px; border: 1px solid var(--rh-line); background: var(--rh-surface); color: var(--rh-primary); font-size: .9rem; cursor: pointer; padding: 0; }
.schedule-days .correction-schedule-add:hover { background: var(--rh-primary-soft); }
/* Rendu compact par jour : gabarit partagÃ© par les panneaux et la page
   dÃ©diÃ©e d'Ã©dition d'horaire. Les rÃ¨gles non scopÃ©es ci-dessous restent un
   filet pour tout rendu hors conteneur `.schedule-days`. */
.correction-schedule-day { padding: var(--rh-space-2) 0; border-top: 1px solid var(--rh-line); }
.correction-schedule-slots { display: grid; gap: var(--rh-space-2); margin-top: var(--rh-space-2); }
.correction-schedule-slot { display: grid; grid-template-columns: 1fr 1fr auto auto; align-items: end; gap: var(--rh-space-2); }
.correction-editor .correction-schedule-slot label { margin: 0; }
.correction-schedule-slot input { width: 100%; min-width: 0; }
.correction-schedule-slot .schedule-remote-work { align-self: center; white-space: nowrap; }
.correction-schedule-slot .schedule-remote-work input { width: auto; }
.correction-schedule-remove { margin-bottom: 1px; color: var(--rh-danger); }
.correction-schedule-empty { margin: var(--rh-space-2) 0 0; color: var(--rh-muted); font-size: .68rem; }
.correction-alerts { max-height: 9rem; overflow-y: auto; }
.correction-alerts .alert { margin: var(--rh-space-1) 0; padding: var(--rh-space-2); font-size: .68rem; }

.is-correction-mode .planning-assignment.is-other-employee,
.is-manual-mode .planning-assignment.is-other-employee { opacity: .52; }
.is-correction-mode .planning-assignment.is-selected-employee,
.is-manual-mode .planning-assignment.is-selected-employee { z-index: 1; outline: 3px solid var(--rh-primary); opacity: 1; box-shadow: var(--rh-shadow-md); }
.is-correction-mode .planning-assignment[draggable="true"],
.is-manual-mode .planning-assignment[draggable="true"] { cursor: grab; }
.is-correction-mode .planning-assignment.is-dragging,
.is-manual-mode .planning-assignment.is-dragging { cursor: grabbing; opacity: .25; }
.is-correction-mode .planning-assignment.is-attention-requested,
.is-manual-mode .planning-assignment.is-attention-requested { animation: correction-attention .6s ease-in-out 3 alternate; }
.planning-assignment.is-time-zero { border-style: dashed; background: var(--rh-surface-muted); color: var(--rh-muted); }
.planning-assignment.is-remote-work { border-style: dashed; border-color: var(--rh-info); background: var(--rh-info-soft); }
.assignment-remote-work { color: var(--rh-info); font-size: .52rem; font-weight: 850; }
.planning-assignment.has-invalid-overlap { outline: 2px solid var(--rh-danger); background: var(--rh-danger-soft); }
.correction-time-zero { grid-column: 1 / -1; display: flex !important; grid-template-columns: auto 1fr; align-items: center; }
.is-correction-mode .planning-slot.is-gap-day,
.is-correction-mode .planning-day-headings .is-gap-day,
.is-correction-mode .planning-half-headings .is-gap-day { background: var(--rh-warning-soft); }
/* Retour MOA du 14/09/2026 : les cases acceptent le dÃ©pÃ´t dÃ¨s que la grille
   est Ã©ditable â€” le surlignage de la cible de dÃ©pÃ´t n'est plus limitÃ© au
   mode correction. */
.planning-slot.is-drop-target { outline: 3px dashed var(--rh-primary); outline-offset: -4px; background: var(--rh-primary-soft); }

/* Retour MOA du 14/09/2026 : retour flottant du glisser-dÃ©poser (succÃ¨s ou
   erreur), visible dans tous les modes et indÃ©pendant du panneau. */
.planning-toast { position: fixed; top: .75rem; left: 50%; transform: translateX(-50%); z-index: 60;
    max-width: min(92vw, 40rem); padding: .6rem .95rem; border-radius: 10px;
    background: var(--rh-ink); color: var(--rh-primary-ink); font-size: .8rem; font-weight: 600;
    box-shadow: var(--rh-shadow-md); }
.planning-toast-success { background: var(--rh-success); color: var(--rh-primary-ink); }
.planning-toast-error { background: var(--rh-danger); color: var(--rh-primary-ink); }
.planning-toast.is-leaving { opacity: 0; transition: opacity .35s ease; }
/* Retour MOA du 18/09/2026 : les tÃ¢ches vacantes compatibles avec la tÃ¢che
   en cours de glisser sont mises en Ã©vidence â€” le dÃ©pÃ´t les pourvoit. */
.planning-assignment.is-compatible-target { animation: vacancy-pulse 1.2s ease-in-out infinite alternate; }
.planning-assignment.is-compatible-merge-target { outline: 2px dashed var(--rh-primary); outline-offset: 1px; }
.planning-assignment.is-compatible-merge-target.is-drop-target { background: var(--rh-primary-soft); outline-style: solid; }

/* Retour MOA du 10/11/2026 : la grille de plages vit dans le formulaire du
   panneau manuel â€” le bloc permanent (manual-section, manual-schedule-summary)
   a Ã©tÃ© retirÃ© avec le doublon qu'il crÃ©ait. */
.manual-assignment-list { display: grid; gap: var(--rh-space-2); margin-top: var(--rh-space-2); }
.manual-assignment-list > div { display: flex; align-items: center; justify-content: space-between; gap: var(--rh-space-2); padding: var(--rh-space-2); border: 1px solid var(--rh-line); border-radius: var(--rh-radius-sm); }
.manual-assignment-list span,
.manual-assignment-list small { display: block; }
.manual-assignment-list small { color: var(--rh-muted); font-size: .67rem; }

@keyframes vacancy-pulse {
    from { outline: 2px dashed var(--rh-primary); outline-offset: 0; }
    to { outline: 3px dashed var(--rh-primary); outline-offset: -2px; box-shadow: 0 0 0 4px var(--rh-primary-line); }
}

@keyframes correction-attention { to { transform: translateY(-2px); box-shadow: 0 0 0 4px var(--rh-primary-line); } }

@media (max-width: 1180px) {
    .planning-correction-layout { grid-template-columns: 1fr; }
    .planning-correction-panel { position: static; grid-row: 1; max-height: none; border-bottom: 1px solid var(--rh-line); border-left: 0; }
}

@media (max-width: 460px) {
    .correction-schedule-slot { grid-template-columns: 1fr 1fr; }
    .correction-schedule-remove { grid-column: 1 / -1; justify-self: start; }
}

