/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

@media print {
  .print-page-break { page-break-before: always; }
  body { background: white !important; }
  table { font-size: 11px; }
}

/* Hachures diagonales pour signaler une colonne hors-rotation (week-end,
 * jour férié). Lecture rapide même sans couleur — fonctionne en impression NB.
 * Appliqué sur l'en-tête (au-dessus du bg-gray-300) et sur les cellules. */
.off-day-stripe {
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0,
    transparent 3px,
    rgba(0, 0, 0, 0.06) 3px,
    rgba(0, 0, 0, 0.06) 4px
  );
}

/* Schedule drag & drop */
.schedule-drop-ok {
  outline: 2px solid #16a34a;
  outline-offset: -2px;
  background-color: rgba(22, 163, 74, 0.08) !important;
}
.schedule-drop-no {
  outline: 2px solid #dc2626;
  outline-offset: -2px;
  background-color: rgba(220, 38, 38, 0.06) !important;
}
[data-nurse-name][draggable="true"] {
  cursor: grab;
}
[data-nurse-name][draggable="true"]:active {
  cursor: grabbing;
}
@keyframes swap-flash {
  0%   { background-color: rgba(251, 191, 36, 0.45); }
  100% { background-color: transparent; }
}
.schedule-just-swapped {
  animation: swap-flash 1.8s ease-out;
}

/* Marqueur week-end persistant : bordure droite indigo sur dimanche pour
 * délimiter visuellement les semaines, indépendamment du fond de cellule
 * (qui peut être coloré pour les shifts). */
.weekend-end {
  border-right: 2px solid rgba(79, 70, 229, 0.35) !important;
}

/* Focus ring visible pour la navigation clavier (accessibilité). */
[data-nurse-name] a:focus-visible {
  outline: 2px solid rgb(79, 70, 229);
  outline-offset: -2px;
}

/* Ring jaune transitoire pour les cellules modifiées par un re-solve.
 * Persiste 6 secondes pour laisser à l'utilisateur le temps de scanner,
 * puis fade out. Réinitialisable via le bouton « Masquer les changements ». */
@keyframes resolve-fade {
  0%, 80% { box-shadow: inset 0 0 0 2px rgb(250 204 21); }
  100%    { box-shadow: inset 0 0 0 2px transparent; }
}
.resolve-changed {
  animation: resolve-fade 6s ease-out forwards;
}
