/* 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: 4px; 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. */
.button.is-busy { opacity: .65; cursor: progress; }
.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-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 { opacity: .52; }
.is-correction-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"] { cursor: grab; }
.is-correction-mode .planning-assignment.is-dragging { cursor: grabbing; opacity: .25; }
.is-correction-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.has-invalid-overlap { outline: 2px solid var(--rh-danger); background: var(--rh-danger-soft); }
.assignment-time-zero { padding: 1px 4px; border-radius: 999px; background: var(--rh-surface); color: var(--rh-muted); font-size: .52rem; font-weight: 800; }
.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); }
.is-correction-mode .planning-slot.is-drop-target { outline: 3px dashed var(--rh-primary); outline-offset: -4px; background: var(--rh-primary-soft); }
/* 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; }

@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; }
}
