/* =====================================================================
   HANAU FLEURS — Habillage de l'application
   Couleurs vives et repères visuels pour comprendre d'un coup d'œil.
   ===================================================================== */

:root {
  /* Couleurs principales */
  --violet:   #7c3aed;
  --rose:     #db2777;
  --fuchsia:  #c026d3;
  --bleu:     #2563eb;
  --cyan:     #06b6d4;
  --vert:     #16a34a;
  --vert-clair:#22c55e;
  --jaune:    #f59e0b;
  --orange:   #ea580c;
  --rouge:    #dc2626;

  /* ------------------------------------------------------------------
     LES FAMILLES DE COULEURS
     Chaque type de journée appartient à une famille, et une seule :
       BLEU   → journée travaillée conforme au planning
       VERT   → des heures en plus
       BRIQUE → des heures en moins
       ROUGE  → une absence
       VIOLET → l'école (apprentissage)
       AMBRE  → un jour férié
     ------------------------------------------------------------------ */
  --c-standard:#2563eb;   /* journée conforme au planning */
  --c-sup:     #16a34a;   /* heures en plus */
  --c-manque:  #c2410c;   /* heures en moins */
  --c-conforme:#2563eb;   /* journée conforme */
  --c-ferie:   #f59e0b;   /* jour férié */
  --c-ecole:   #7c3aed;   /* jour d'école */
  --c-absence: #dc2626;   /* absence */
  --c-dimanche:#db2777;   /* dimanche */
  --c-nuit:    #4338ca;   /* travail de nuit */

  --fond:      #f4f5fb;
  --carte:     #ffffff;
  --texte:     #17203a;
  --texte-doux:#5b6685;
  --bord:      #e3e7f3;
  --ombre:     0 2px 10px rgba(23, 32, 58, .07);
  --ombre-fort:0 12px 40px rgba(23, 32, 58, .18);
  --r:         16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  background: var(--fond);
  color: var(--texte);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0 0 12px; line-height: 1.25; }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p  { line-height: 1.55; }

/* ---------------------------------------------------------------- */
/*  EN-TÊTE ET NAVIGATION                                            */
/* ---------------------------------------------------------------- */
.bandeau {
  background: linear-gradient(115deg, #7c3aed 0%, #c026d3 45%, #db2777 100%);
  color: #fff;
  padding: 14px 22px 0;
  box-shadow: var(--ombre);
  position: sticky; top: 0; z-index: 40;
}
.bandeau-haut { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.logo-titre { display: flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 700; }
.logo-rond {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.22);
  display: grid; place-items: center; font-size: 22px; flex: none;
}
.bandeau-haut .espace { flex: 1; }
.etat-sauvegarde {
  font-size: 12.5px; background: rgba(255,255,255,.18); padding: 5px 12px;
  border-radius: 999px; white-space: nowrap;
}
.etat-sauvegarde.erreur { background: #fecaca; color: #7f1d1d; font-weight: 600; }

.onglets { display: flex; gap: 4px; margin-top: 12px; overflow-x: auto; padding-bottom: 0; }
.onglets button {
  border: 0; background: rgba(255,255,255,.13); color: #fff;
  padding: 10px 16px; border-radius: 12px 12px 0 0; cursor: pointer;
  font-size: 14.5px; font-weight: 600; white-space: nowrap;
  display: flex; align-items: center; gap: 7px; font-family: inherit;
}
.onglets button:hover { background: rgba(255,255,255,.26); }
.onglets button.actif { background: var(--fond); color: var(--violet); }

main { padding: 22px; max-width: 1400px; margin: 0 auto; }

/* ---------------------------------------------------------------- */
/*  BLOCS DE BASE                                                    */
/* ---------------------------------------------------------------- */
.carte {
  background: var(--carte); border-radius: var(--r); padding: 18px 20px;
  box-shadow: var(--ombre); margin-bottom: 18px; border: 1px solid var(--bord);
}
.carte-titre { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.carte-titre h2 { margin: 0; }
.carte-titre .espace { flex: 1; }

.grille { display: grid; gap: 16px; }
.grille.c2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grille.c3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grille.c4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

.bouton {
  border: 0; border-radius: 11px; padding: 10px 16px; font-size: 14.5px; font-weight: 600;
  cursor: pointer; font-family: inherit; display: inline-flex; align-items: center; gap: 7px;
  background: var(--violet); color: #fff; transition: transform .08s, filter .15s;
}
.bouton:hover { filter: brightness(1.1); }
.bouton:active { transform: translateY(1px); }
.bouton.secondaire { background: #eef0fa; color: var(--violet); }
.bouton.douce      { background: #f1f5f9; color: var(--texte-doux); }
.bouton.verte      { background: var(--vert); }
.bouton.rose       { background: var(--rose); }
.bouton.orange     { background: var(--orange); }
.bouton.rouge      { background: var(--rouge); }
.bouton.petite     { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.bouton:disabled   { opacity: .45; cursor: not-allowed; }

input, select, textarea {
  font-family: inherit; font-size: 14.5px; padding: 9px 11px;
  border: 2px solid var(--bord); border-radius: 10px; background: #fff; color: var(--texte);
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); }
label { display: block; font-size: 13px; font-weight: 600; color: var(--texte-doux); margin-bottom: 5px; }
.champ { margin-bottom: 13px; }
.ligne-champs { display: flex; gap: 12px; flex-wrap: wrap; }
.ligne-champs > * { flex: 1; min-width: 150px; }

.pastille {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 11px;
  border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.pastille.sup      { background: #ede9fe; color: #5b21b6; }
.pastille.manque   { background: #fee2e2; color: #991b1b; }
.pastille.conforme { background: #dcfce7; color: #14532d; }
.pastille.ferie    { background: #fef3c7; color: #92400e; }
.pastille.ecole    { background: #e0f2fe; color: #075985; }
.pastille.absence  { background: #e2e8f0; color: #334155; }
.pastille.dimanche { background: #fce7f3; color: #9d174d; }
.pastille.nuit     { background: #e0e7ff; color: #3730a3; }
.pastille.neutre   { background: #f1f5f9; color: #475569; }
/* départ annoncé mais pas encore arrivé : un fait à voir, pas un défaut */
.pastille.depart   { background: #fff7ed; color: #9a3412; border: 1px solid #fdba74; }
/* arrivée signée mais pas encore commencée — le symétrique du départ :
   la fiche est complète, la personne ne compte pas encore dans l'effectif */
.pastille.arrivee  { background: #f0fdf4; color: #14532d; border: 1px solid #86efac; }

/* ---------------------------------------------------------------- */
/*  LE BOUTON MAJ DU BANDEAU                                         */
/*  Dans le bandeau violet : il doit se détacher sans crier. Fond
    translucide clair, comme l'état d'enregistrement à côté de lui,
    et il devient franc au survol.                                   */
/* ---------------------------------------------------------------- */
.bouton-maj {
  border: 1px solid rgba(255,255,255,.45); background: rgba(255,255,255,.18);
  color: #fff; font: inherit; font-size: 13.5px; font-weight: 700;
  padding: 6px 13px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  transition: background .15s;
}
.bouton-maj:hover    { background: rgba(255,255,255,.32); }
.bouton-maj:disabled { opacity: .6; cursor: progress; }
/* Une pastille quand des classeurs attendent dans le dossier : on ne
   clique pas un bouton pour savoir s'il a quelque chose à faire. */
.bouton-maj .compte {
  display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px;
  background: #fff; color: var(--violet); font-size: 12px;
}

/* ---------------------------------------------------------------- */
/*  MISE À JOUR : LA ZONE OÙ L'ON DÉPOSE LES FICHIERS DE LA PAIE     */
/*  Grande, et elle dit ce qu'elle fait. Un petit bouton « Parcourir »
    se cherche ; une cible de cette taille se vise d'un geste, y
    compris avec plusieurs fichiers tenus à la souris.               */
/* ---------------------------------------------------------------- */
.maj-depot {
  border: 3px dashed #c7d2fe; border-radius: 16px; background: #f8faff;
  padding: 26px 18px; text-align: center; cursor: pointer;
  transition: background .15s, border-color .15s;
}
.maj-depot:hover   { background: #eef2ff; border-color: #a5b4fc; }
.maj-depot.survol  { background: #e0e7ff; border-color: var(--violet); }

.lettre-cycle {
  display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 10px;
  font-weight: 800; font-size: 15px; color: #fff; flex: none;
}
.lettre-A { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.lettre-B { background: linear-gradient(135deg, #06b6d4, #2563eb); }
.lettre-C { background: linear-gradient(135deg, #22c55e, #15803d); }

.jeton-salarie {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px 5px 5px;
  border-radius: 999px; background: #f1f5f9; font-weight: 600; font-size: 14px;
}
.jeton-salarie .rond {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  font-size: 15px; color: #fff; flex: none;
}

/* ---------------------------------------------------------------- */
/*  TABLEAU DE BORD                                                  */
/* ---------------------------------------------------------------- */
.tuile-solde {
  border-radius: var(--r); padding: 16px 18px; color: #fff; position: relative; overflow: hidden;
  box-shadow: var(--ombre); cursor: pointer; transition: transform .12s;
}
.tuile-solde:hover { transform: translateY(-3px); }
.tuile-solde .prenom { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.tuile-solde .valeur { font-size: 33px; font-weight: 800; margin: 8px 0 2px; letter-spacing: -1px; }
.tuile-solde .sous   { font-size: 12.5px; opacity: .92; }
.tuile-solde .mode {
  position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 700;
  background: rgba(255,255,255,.24); padding: 3px 9px; border-radius: 999px;
}

.chiffre-cle { text-align: center; padding: 14px 10px; border-radius: 14px; background: #f8fafc; border: 1px solid var(--bord); }
.chiffre-cle .v { font-size: 27px; font-weight: 800; }
.chiffre-cle .l { font-size: 12.5px; color: var(--texte-doux); margin-top: 3px; }

.alerte {
  display: flex; gap: 11px; align-items: flex-start; padding: 11px 14px; border-radius: 12px;
  margin-bottom: 8px; font-size: 14px; border-left: 5px solid;
}
.alerte .ico { font-size: 17px; line-height: 1.2; }
.alerte.info      { background: #eff6ff; border-color: #3b82f6; color: #1e3a8a; }
.alerte.attention { background: #fffbeb; border-color: #f59e0b; color: #78350f; }
.alerte.danger    { background: #fef2f2; border-color: #dc2626; color: #7f1d1d; }
.alerte.succes    { background: #f0fdf4; border-color: #16a34a; color: #14532d; }

/* ---------------------------------------------------------------- */
/*  BARRE DE SEMAINE                                                 */
/* ---------------------------------------------------------------- */
.barre-semaine {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--bord); border-radius: var(--r);
  padding: 12px 16px; margin-bottom: 18px; box-shadow: var(--ombre);
}
.barre-semaine .titre-semaine { font-size: 17px; font-weight: 700; }
.barre-semaine .espace { flex: 1; }
.fleche {
  width: 38px; height: 38px; border-radius: 12px; border: 0; background: #eef0fa;
  color: var(--violet); font-size: 19px; cursor: pointer; font-weight: 700;
}
.fleche:hover { background: #ddd9fb; }

/* ---------------------------------------------------------------- */
/*  SAISIE DES HEURES                                                */
/* ---------------------------------------------------------------- */
.tableau-saisie { width: 100%; border-collapse: separate; border-spacing: 0 7px; }
.tableau-saisie th {
  font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--texte-doux);
  text-align: center; padding: 0 6px 4px; font-weight: 700;
}
.tableau-saisie th.gauche { text-align: left; }
.tableau-saisie td { background: #fff; padding: 8px 6px; vertical-align: middle; border-top: 2px solid var(--bord); border-bottom: 2px solid var(--bord); }
.tableau-saisie td:first-child { border-left: 2px solid var(--bord); border-radius: 12px 0 0 12px; padding-left: 12px; }
.tableau-saisie td:last-child  { border-right: 2px solid var(--bord); border-radius: 0 12px 12px 0; padding-right: 12px; }
.tableau-saisie tr.modifiee td { border-color: #ddd6fe; background: #faf8ff; }
.tableau-saisie tr.dimanche td { background: #fff5fa; }
.tableau-saisie tr.ferie td    { background: #fffbeb; }
.tableau-saisie tr.ecole td    { background: #f0f9ff; }
.tableau-saisie tr.absence td  { background: #f8fafc; }
.tableau-saisie tr.horsperiode td { opacity: .42; }

/* LA JOURNÉE DONT LES HORAIRES ONT CHANGÉ  (23/11/2026)
   Déclarées APRÈS dimanche / férié / école, et c'est voulu : un dimanche
   modifié doit ressortir comme modifié, pas comme un dimanche ordinaire.
   L'ancien `.modifiee` passait dessous et disparaissait là où il servait
   le plus. Les familles de couleur sont celles du 11/09 : vert = des
   heures en plus, brique = des heures en moins, violet = même total mais
   d'autres horaires.
   La BARRE DE GAUCHE compte autant que le fond : elle fait 6 px, elle
   survit à n'importe quel fond, et c'est elle qu'on voit en balayant la
   semaine du regard. */
.tableau-saisie tr.ecart-plus td        { background: #f0fdf4; border-color: #bbf7d0; }
.tableau-saisie tr.ecart-moins td       { background: #fff7ed; border-color: #fed7aa; }
.tableau-saisie tr.horaires-changes td  { background: #faf5ff; border-color: #e9d5ff; }
.tableau-saisie tr.ecart-plus td:first-child       { border-left: 6px solid #16a34a; }
.tableau-saisie tr.ecart-moins td:first-child      { border-left: 6px solid #c2410c; }
.tableau-saisie tr.horaires-changes td:first-child { border-left: 6px solid #7c3aed; }

.cell-jour { min-width: 128px; }
.cell-jour .nom { font-weight: 700; font-size: 15px; }
.cell-jour .date { font-size: 12px; color: var(--texte-doux); }

.horaire {
  width: 100%; min-width: 74px; text-align: center; font-size: 15.5px; font-weight: 600;
  padding: 9px 4px; border-radius: 10px; border: 2px solid var(--bord); background: #fff;
  cursor: pointer; font-family: inherit; color: var(--texte);
}
.horaire:hover { border-color: var(--violet); background: #faf8ff; }
.horaire.prevu    { color: #94a3b8; font-weight: 500; }
.horaire.modifie  { color: var(--violet); border-color: var(--violet); background: #f5f3ff; }
.horaire.vide     { color: #cbd5e1; }
.horaire.desactive{ opacity: .4; pointer-events: none; }

.ecart-jour { font-weight: 800; font-size: 15px; text-align: center; white-space: nowrap; }
.ecart-jour.plus  { color: var(--c-sup); }
.ecart-jour.moins { color: var(--c-manque); }
.ecart-jour.zero  { color: #a3b0c8; }

.bouton-note {
  border: 0; background: #f1f5f9; border-radius: 9px; padding: 7px 10px; cursor: pointer;
  font-size: 15px; line-height: 1;
}
.bouton-note.rempli { background: #ede9fe; }

.recap-semaine {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 16px;
}
.recap-case { border-radius: 13px; padding: 12px 14px; background: #f8fafc; border: 2px solid var(--bord); }
.recap-case .l { font-size: 12px; color: var(--texte-doux); font-weight: 600; }
.recap-case .v { font-size: 22px; font-weight: 800; margin-top: 3px; }
.recap-case.sup   { background: #f5f3ff; border-color: #ddd6fe; }
.recap-case.sup .v   { color: var(--c-sup); }
.recap-case.manque{ background: #fef2f2; border-color: #fecaca; }
.recap-case.manque .v{ color: var(--c-manque); }
.recap-case.solde { background: #ecfdf5; border-color: #a7f3d0; }
.recap-case.solde .v { color: var(--vert); }
.recap-case.solde.negatif .v { color: var(--c-manque); }

/* ---------------------------------------------------------------- */
/*  MOLETTE DE SÉLECTION D'HEURE                                     */
/* ---------------------------------------------------------------- */
.voile {
  position: fixed; inset: 0; background: rgba(23,32,58,.45); z-index: 100;
  display: grid; place-items: center; padding: 16px; backdrop-filter: blur(2px);
}
.molette-boite {
  background: #fff; border-radius: 20px; box-shadow: var(--ombre-fort);
  width: min(340px, 100%); overflow: hidden;
}
.molette-entete {
  background: linear-gradient(115deg, var(--violet), var(--rose)); color: #fff; padding: 14px 18px;
}
.molette-entete .t { font-weight: 700; font-size: 16px; }
.molette-entete .s { font-size: 12.5px; opacity: .9; margin-top: 2px; }
.molettes { display: flex; gap: 10px; padding: 14px 18px; justify-content: center; align-items: center; }
.molette {
  height: 186px; width: 92px; overflow-y: scroll; scroll-snap-type: y mandatory;
  border-radius: 14px; background: #f6f7fc; position: relative; scrollbar-width: none;
  border: 2px solid var(--bord);
}
.molette::-webkit-scrollbar { display: none; }
.molette .rembourrage { height: 62px; }
.molette .item {
  height: 62px; scroll-snap-align: center; display: grid; place-items: center;
  font-size: 25px; font-weight: 700; color: #b4bed3; cursor: pointer;
}
.molette .item.actif { color: var(--violet); font-size: 29px; }
.molette-sep { font-size: 27px; font-weight: 800; color: var(--violet); }
.molette-cadre {
  position: absolute; left: 0; right: 0; top: 62px; height: 62px; pointer-events: none;
  border-top: 2px solid var(--violet); border-bottom: 2px solid var(--violet); background: rgba(124,58,237,.06);
}
.molette-enveloppe { position: relative; }
.molette-clavier { padding: 0 18px 12px; display: flex; gap: 8px; align-items: center; }
.molette-clavier input { text-align: center; font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.molette-pied { display: flex; gap: 8px; padding: 12px 18px 16px; flex-wrap: wrap; }
.molette-pied .bouton { flex: 1; justify-content: center; }

/* ---------------------------------------------------------------- */
/*  FENÊTRES MODALES                                                 */
/* ---------------------------------------------------------------- */
.modale {
  background: #fff; border-radius: 20px; box-shadow: var(--ombre-fort);
  width: min(720px, 100%); max-height: 90vh; display: flex; flex-direction: column;
}
.modale-entete {
  background: linear-gradient(115deg, var(--violet), var(--fuchsia)); color: #fff;
  padding: 16px 22px; border-radius: 20px 20px 0 0; display: flex; align-items: center; gap: 12px;
}
.modale-entete h2 { margin: 0; font-size: 18px; }
.modale-entete .espace { flex: 1; }
.modale-entete .fermer {
  background: rgba(255,255,255,.2); border: 0; color: #fff; width: 32px; height: 32px;
  border-radius: 10px; cursor: pointer; font-size: 17px;
}
.modale-corps { padding: 20px 22px; overflow-y: auto; }
.modale-pied { padding: 14px 22px; border-top: 1px solid var(--bord); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------------------------------------------------------------- */
/*  PLANNING                                                         */
/* ---------------------------------------------------------------- */
.grille-planning { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.grille-planning th, .grille-planning td { border: 1px solid var(--bord); padding: 7px 8px; vertical-align: top; }
.grille-planning th { background: #f6f7fc; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--texte-doux); }
.grille-planning td.dim { background: #fff5fa; }
.grille-planning td.fer { background: #fffbeb; }
.grille-planning .creneau {
  border-radius: 8px; padding: 4px 8px; margin-bottom: 4px; color: #fff; font-weight: 600; font-size: 12.5px;
}
.grille-planning .creneau.abs { opacity: .55; text-decoration: line-through; }

.calendrier { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.calendrier .entete { text-align: center; font-size: 12px; font-weight: 700; color: var(--texte-doux); padding: 4px 0; }
.calendrier .case {
  min-height: 62px; border: 2px solid var(--bord); border-radius: 10px; padding: 5px 6px;
  background: #fff; cursor: pointer; font-size: 12px;
}
.calendrier .case:hover { border-color: var(--violet); }
.calendrier .case.hors  { opacity: .3; }
.calendrier .case.select{ border-color: var(--violet); background: #f5f3ff; }
.calendrier .case.ecole { background: #e0f2fe; border-color: #7dd3fc; }
.calendrier .case.ferie { background: #fef3c7; border-color: #fcd34d; }
.calendrier .case .num  { font-weight: 700; font-size: 13px; }

/* ---------------------------------------------------------------- */
/*  TABLEAUX GÉNÉRIQUES                                              */
/* ---------------------------------------------------------------- */
.tableau { width: 100%; border-collapse: collapse; font-size: 14px; }
.tableau th {
  text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--texte-doux); padding: 8px 10px; border-bottom: 2px solid var(--bord);
}
.tableau td { padding: 9px 10px; border-bottom: 1px solid var(--bord); }
.tableau tr:hover td { background: #fafbff; }
.tableau td.num, .tableau th.num { text-align: right; font-variant-numeric: tabular-nums; }
.defilement { overflow-x: auto; }

/* ---------------------------------------------------------------- */
/*  MESSAGE FLOTTANT                                                 */
/* ---------------------------------------------------------------- */
#messages { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; }
.message {
  background: #17203a; color: #fff; padding: 12px 20px; border-radius: 12px; margin-top: 8px;
  box-shadow: var(--ombre-fort); font-weight: 600; font-size: 14px;
  animation: monte .25s ease; display: flex; gap: 9px; align-items: center;
}
.message.succes { background: var(--vert); }
.message.erreur { background: var(--rouge); }
@keyframes monte { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- */
/*  AIDE                                                             */
/* ---------------------------------------------------------------- */
.aide {
  background: #eff6ff; border: 2px dashed #93c5fd; border-radius: 13px; padding: 12px 16px;
  font-size: 13.5px; color: #1e3a8a; margin-bottom: 16px; line-height: 1.55;
}
.aide b { color: #1e40af; }
.legende { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--texte-doux); }
.legende span { display: inline-flex; align-items: center; gap: 5px; }
.puce { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }

.vide-message { text-align: center; padding: 40px 20px; color: var(--texte-doux); }
.vide-message .ico { font-size: 44px; display: block; margin-bottom: 10px; }

/* ---------------------------------------------------------------- */
/*  ÉCRANS ÉTROITS                                                   */
/* ---------------------------------------------------------------- */
@media (max-width: 820px) {
  main { padding: 14px; }
  .carte { padding: 14px; }
  /* Sur téléphone, chaque journée devient une petite carte :
     le jour sur une ligne, les 4 horaires côte à côte, puis les totaux. */
  .tableau-saisie, .tableau-saisie tbody { display: block; width: 100%; }
  .tableau-saisie thead { display: none; }
  .tableau-saisie tr {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 5px;
    background: #fff; border: 2px solid var(--bord); border-radius: 14px;
    margin-bottom: 10px; padding: 9px;
  }
  .tableau-saisie td { display: block; border: 0 !important; border-radius: 0 !important; padding: 0; }
  .tableau-saisie td.cell-jour  { grid-column: 1 / -1; }
  .tableau-saisie td[colspan]   { grid-column: 1 / -1; }
  .tableau-saisie td.td-horaire { grid-column: span 1; }
  .tableau-saisie td.td-ecart   { grid-column: span 2; align-self: center; }
  .tableau-saisie td.td-infos   { grid-column: span 1; align-self: center; }
  .tableau-saisie td.td-actions { grid-column: span 1; align-self: center; }
  .tableau-saisie .horaire { min-width: 0; font-size: 15px; padding: 10px 2px; }
  .bandeau { padding: 12px 14px 0; }
  .onglets button { padding: 9px 12px; font-size: 13.5px; }
}

/* ---------------------------------------------------------------- */
/*  IMPRESSION — FEUILLE DE PRÉSENCE A4                              */
/* ---------------------------------------------------------------- */
.zone-impression { display: none; }

@media print {
  @page { size: A4 portrait; margin: 10mm 11mm; }
  body { background: #fff; font-size: 11pt; }
  .bandeau, .onglets, main, #messages, .voile, .sans-impression { display: none !important; }
  .zone-impression { display: block !important; }
  .feuille {
    page-break-after: always; break-after: page;
    font-family: "Segoe UI", system-ui, sans-serif; color: #000;
  }
  .feuille:last-child { page-break-after: auto; break-after: auto; }
}

/* Aperçu à l'écran de la feuille à imprimer */
.apercu-feuille {
  background: #fff; box-shadow: var(--ombre); border-radius: 8px; padding: 12mm;
  max-width: 210mm; margin: 0 auto 20px; border: 1px solid var(--bord);
}
.feuille-entete { display: flex; align-items: flex-start; gap: 16px; border-bottom: 3px solid #000; padding-bottom: 8px; margin-bottom: 10px; }
.feuille-entete .titre { font-size: 20pt; font-weight: 800; letter-spacing: -.5px; }
.feuille-entete .espace { flex: 1; }
.feuille-entete .societe { text-align: right; font-size: 9.5pt; line-height: 1.35; }
.feuille-infos { display: flex; gap: 18px; font-size: 11pt; margin-bottom: 10px; flex-wrap: wrap; }
.feuille-infos b { font-weight: 700; }
.feuille-table { width: 100%; border-collapse: collapse; }
.feuille-table th {
  border: 1.5px solid #000; padding: 4px 3px; font-size: 8.5pt; text-transform: uppercase;
  background: #f0f0f0; letter-spacing: .2px;
}
.feuille-table td { border: 1.5px solid #000; padding: 0; height: 15mm; vertical-align: top; }
.feuille-table td.jour { width: 26mm; padding: 3px 5px; }
.feuille-table td.jour .n { font-weight: 800; font-size: 10.5pt; }
.feuille-table td.jour .d { font-size: 8.5pt; color: #444; }
.feuille-table td.jour .m { font-size: 7.5pt; margin-top: 2px; font-weight: 700; }
.feuille-table td.heure { width: 22mm; text-align: center; }
.feuille-table td.heure .attendu { font-size: 8pt; color: #999; padding-top: 2px; display: block; }
.feuille-table td.note { padding: 3px 5px; font-size: 8pt; color: #666; }
.feuille-table tr.dim td { background: #fafafa; }
.feuille-pied { display: flex; gap: 20px; margin-top: 10px; font-size: 9.5pt; }
.feuille-pied .bloc { flex: 1; border: 1.5px solid #000; height: 24mm; padding: 3px 6px; }
.feuille-pied .bloc .t { font-weight: 700; font-size: 8.5pt; }
.feuille-total { border: 2px solid #000; padding: 5px 10px; font-size: 11pt; font-weight: 700; display: inline-block; margin-top: 8px; }

.modale-large { width: min(1080px, 100%); }

/* La molette prend le clavier dès que la souris passe devant */
.molette:focus { outline: none; border-color: var(--violet); background: #f3f0ff; }
.molette:focus .molette-cadre { background: rgba(124, 58, 237, .12); }

/* Un créneau qui s'écarte du planning type se repère au premier coup d'œil */
.grille-planning .creneau.hors-planning {
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .85);
  font-weight: 800;
}

/* Rappel de l'horaire réellement retenu dans la molette */
.molette-echo {
  margin: 0 18px 10px; padding: 8px 12px; border-radius: 10px;
  background: #ecfdf5; border: 2px solid #a7f3d0; color: #14532d;
  font-size: 14px; text-align: center;
}
.molette-echo b { font-size: 19px; letter-spacing: .5px; }

/* ================================================================== */
/*  LES FAMILLES DE COULEURS, APPLIQUÉES                              */
/* ================================================================== */

/* --- pastilles et repères --- */
.pastille.sup      { background: #dcfce7; color: #14532d; }   /* vert : heures en plus */
.pastille.manque   { background: #ffedd5; color: #7c2d12; }   /* brique : heures en moins */
.pastille.conforme { background: #dbeafe; color: #1e3a8a; }   /* bleu : conforme */
.pastille.absence  { background: #fee2e2; color: #991b1b; }   /* rouge : absence */
.pastille.ecole    { background: #ede9fe; color: #5b21b6; }   /* violet : école */
.pastille.ferie    { background: #fef3c7; color: #92400e; }   /* ambre : férié */

.ecart-jour.plus  { color: var(--c-sup); }
.ecart-jour.moins { color: var(--c-manque); }

.recap-case.sup    { background: #f0fdf4; border-color: #bbf7d0; }
.recap-case.sup .v { color: var(--c-sup); }
.recap-case.manque { background: #fff7ed; border-color: #fed7aa; }
.recap-case.manque .v { color: var(--c-manque); }

/* --- la saisie : un horaire modifié prend la couleur de son sens --- */
.horaire.modifie          { border-color: var(--c-standard); background: #eff6ff; color: #1e40af; }
.horaire.modifie-plus     { border-color: var(--c-sup);     background: #f0fdf4; color: #15803d; }
.horaire.modifie-moins    { border-color: var(--c-manque);  background: #fff7ed; color: #9a3412; }

/* --- le planning : cases pleines pour les journées sans magasin --- */
.grille-planning td.case-pleine {
  color: #fff; text-align: center; vertical-align: middle; font-weight: 700;
  font-size: 12.5px; line-height: 1.35; padding: 10px 6px;
}
.grille-planning td.case-pleine .ico { display: block; font-size: 19px; margin-bottom: 2px; }
.grille-planning td.case-pleine .det { font-weight: 500; font-size: 11px; opacity: .92; }
.grille-planning td.plein-ecole   { background: var(--c-ecole); }
.grille-planning td.plein-ferie   { background: var(--c-ferie); }
.grille-planning td.plein-absence { background: var(--c-absence); }

.grille-planning .creneau.sup    { background: var(--c-sup) !important; }
.grille-planning .creneau.manque { background: var(--c-manque) !important; }

.legende-familles { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--texte-doux); }
.legende-familles span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------------------------------------------------------------- */
/*  CALENDRIER DE REMPLACEMENT                                       */
/* ---------------------------------------------------------------- */
.cal-remplacement {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px; margin-top: 12px;
}
.cal-jour {
  border: 2px solid var(--bord); border-radius: 14px; background: #fff;
  overflow: hidden; display: flex; flex-direction: column;
}
.cal-jour.dim { background: #fff5fa; }
.cal-entete {
  background: #f6f7fc; padding: 7px 11px; font-size: 13.5px;
  display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--bord);
}
.cal-entete .cal-lettre {
  margin-left: auto; background: var(--violet); color: #fff; font-weight: 800;
  border-radius: 7px; padding: 1px 7px; font-size: 11.5px;
}
.cal-rien { padding: 14px 11px; color: #94a3b8; font-style: italic; font-size: 12.5px; text-align: center; }
.cal-demi { padding: 9px 11px; border-bottom: 1px dashed var(--bord); }
.cal-demi:last-child { border-bottom: 0; }
.cal-demi.matin { background: #fffdf5; }
.cal-demi.aprem { background: #f7fbff; }
.cal-demi.hors  { color: #94a3b8; font-size: 12px; font-style: italic; background: #fafafa; }
.cal-demi-titre { display: flex; align-items: center; font-size: 12.5px; font-weight: 700; }
.cal-demi-titre .cal-duree { margin-left: auto; color: var(--texte-doux); font-weight: 600; }
.cal-creneaux { font-size: 11.5px; color: var(--texte-doux); margin-bottom: 6px; }
.cal-choix { display: flex; flex-direction: column; gap: 4px; }
.cal-personne {
  display: flex; align-items: center; gap: 6px; width: 100%; cursor: pointer;
  border: 2px solid var(--bord); background: #fff; border-radius: 9px;
  padding: 3px 7px; font-family: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--texte); text-align: left;
}
.cal-personne:hover { filter: brightness(.97); }
.cal-personne.occupe { opacity: .45; }
.cal-personne.actif { box-shadow: 0 2px 8px rgba(23,32,58,.18); }
.cal-personne .pastille-rond {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; flex: none;
}
.cal-personne .cal-gain { margin-left: auto; font-size: 11.5px; opacity: .85; }
.cal-consequence {
  margin-top: 6px; padding: 5px 8px; background: #f8fafc; border-radius: 8px;
  font-size: 11.5px; color: var(--texte-doux);
}

/* =====================================================================
   PLANNING — le bleu alterne une ligne sur deux
   Le type de journée donne la famille de couleur ; la nuance ne sert
   qu'à suivre sa ligne du regard.
   ===================================================================== */
.grille-planning tbody tr.ligne-b > td:not(.case-pleine) { background: #f7f9ff; }
.grille-planning tbody tr.ligne-b > td.dim:not(.case-pleine) { background: #fff2f8; }
.grille-planning tbody tr.ligne-b > td.fer:not(.case-pleine) { background: #fff8e6; }

/* =====================================================================
   ASSISTANT DE REMPLACEMENT — les trois étapes, le planning normal,
   et l'état d'avancement
   ===================================================================== */
.cal-etapes {
  display: grid; gap: 7px; margin-bottom: 14px; padding: 12px 13px;
  background: #f5f3ff; border: 2px solid #ddd6fe; border-radius: 13px;
}
.cal-etape { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; line-height: 1.45; }
.cal-etape .num {
  flex: none; width: 22px; height: 22px; border-radius: 50%; background: #7c3aed;
  color: #fff; font-weight: 800; font-size: 12.5px; display: grid; place-items: center;
}

.cal-normal {
  margin: 0; padding: 7px 11px; background: #f8fafc;
  border-bottom: 1px dashed var(--bord); font-size: 11.5px;
}
.cal-normal-titre { font-weight: 700; color: var(--texte-doux); margin-bottom: 3px; }
.cal-normal-ligne { display: flex; gap: 6px; align-items: baseline; color: var(--texte-doux); }
.cal-normal-ligne .qui { font-weight: 600; min-width: 66px; }
.cal-normal-ligne .quand { flex: 1; }
.cal-normal-ligne.absent { color: #b91c1c; font-weight: 600; }
.cal-normal-ligne .tag {
  background: #fee2e2; color: #991b1b; border-radius: 6px; padding: 0 5px;
  font-size: 10px; font-weight: 800; text-transform: uppercase;
}

.cal-consigne { font-size: 11.5px; font-weight: 700; color: #5b21b6; margin-bottom: 4px; }
.cal-personne { flex-direction: column; align-items: stretch; gap: 1px; }
.cal-personne-haut { display: flex; align-items: center; gap: 6px; width: 100%; }
.cal-personne .cal-sous { font-size: 10.5px; font-weight: 500; opacity: .8; padding-left: 26px; }

.cal-etat {
  display: flex; gap: 9px; align-items: flex-start; margin-top: 14px;
  padding: 11px 13px; border-radius: 13px; font-size: 13px; line-height: 1.45;
  background: #fff7ed; border: 2px solid #fed7aa; color: #7c2d12;
}
.cal-etat.pret { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.cal-etat .ico { font-size: 17px; line-height: 1; }

/* ---------------------------------------------------------------------
   Remplacement : une journée où le magasin resterait SANS PERSONNE doit
   se voir de loin. Une journée où il reste déjà quelqu'un est un simple
   confort à améliorer, pas une urgence.
   --------------------------------------------------------------------- */
.cal-jour.critique { border-color: #fca5a5; box-shadow: 0 0 0 2px #fee2e2; }
.cal-jour.critique .cal-entete { background: #fef2f2; color: #991b1b; }
.cal-entete .cal-urgent {
  margin-left: 6px; background: #dc2626; color: #fff; border-radius: 7px;
  padding: 1px 6px; font-size: 10px; font-weight: 800; text-transform: uppercase;
}
.cal-entete .cal-resolu {
  margin-left: 6px; background: #dcfce7; color: #14532d; border-radius: 7px;
  padding: 1px 6px; font-size: 10px; font-weight: 800;
}
.cal-effectif {
  font-size: 11px; line-height: 1.35; border-radius: 8px;
  padding: 4px 7px; margin-bottom: 6px;
}
.cal-effectif.vide { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.cal-effectif.ok   { background: #f0fdf4; color: #14532d; border: 1px solid #bbf7d0; }
.cal-demi.sans-personne { background: #fff7f7; }
.cal-consigne.urgent { color: #b91c1c; }
.cal-personne.deconseille { border-style: dashed; opacity: .75; }
.cal-etat.alerte { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }

/* =====================================================================
   ÉCRAN « SCÉNARIOS » — étude d'une nouvelle organisation
   ---------------------------------------------------------------------
   L'agenda de la semaine : LE TEMPS DESCEND, les jours se suivent de
   gauche à droite. C'est la seule disposition qui fasse tenir les sept
   jours sur une page — un ruban horizontal par jour prenait sept fois
   la hauteur de l'écran et obligeait à défiler pour comparer deux
   journées.

   Chaque colonne est en position relative et sa hauteur est fixe
   (--sc-hauteur) ; les créneaux sont posés en pourcentage de
   l'amplitude horaire de la semaine, la même pour les sept jours :
   c'est ce qui permet de lire une ligne d'heure en travers.

   Les hachures rouges couvrent toute la largeur d'une colonne. Elles
   sont le SEUL signal d'alarme de l'écran : magasin ouvert, personne
   pour le tenir. Tout le reste est de l'information.
   ===================================================================== */

:root { --sc-hauteur: 430px; --sc-tete: 62px; }

.sc-barre { display: flex; gap: 6px; flex-wrap: wrap; }
.sc-onglet {
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 2px solid var(--bord); background: #fff; color: var(--texte);
  border-radius: 11px; padding: 8px 13px; font-size: 14px; font-weight: 600;
  font-family: inherit;
}
.sc-onglet:hover { border-color: #c7d2fe; background: #fafbff; }
.sc-onglet.actif { border-color: var(--violet); background: #f5f3ff; color: var(--violet); }
.sc-onglet.petit { padding: 5px 10px; font-size: 12.5px; border-radius: 9px; }
.sc-onglet.sc-alerte { border-color: #fca5a5; background: #fff7f7; }
.sc-pastille-trou { font-size: 12px; }
.sc-variante { display: flex; gap: 5px; }

/* --- les cartes de collaborateur --- */
.sc-personne {
  background: #fff; border: 1px solid var(--bord); border-left: 5px solid var(--bord);
  border-radius: 13px; padding: 12px 14px;
}
.sc-personne.sc-partie { opacity: .72; background: #f8fafc; border-left-color: #cbd5e1; }
.sc-personne-tete { display: flex; align-items: center; gap: 8px; }
.sc-personne-det { font-size: 12.5px; color: var(--texte-doux); margin-top: 5px; line-height: 1.5; }
.sc-rond {
  width: 26px; height: 26px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: 14px; color: #fff; flex: none;
}
.sc-rond.petit { width: 20px; height: 20px; font-size: 11px; }

/* --- la jauge du contrat : un mot ET une couleur, jamais la couleur seule --- */
.sc-jauge { margin-top: 9px; }
.sc-jauge-barre {
  position: relative; height: 9px; border-radius: 5px; background: #eef2f7; overflow: hidden;
}
.sc-jauge-plein { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; }
.sc-jauge-repere { position: absolute; left: 80%; top: 0; bottom: 0; width: 2px; background: #64748b; }
.sc-jauge.pile  .sc-jauge-plein { background: var(--c-standard); }
.sc-jauge.libre .sc-jauge-plein { background: #94a3b8; }
.sc-jauge.trop  .sc-jauge-plein { background: var(--c-manque); }
.sc-jauge-mot { font-size: 12.5px; margin-top: 4px; color: var(--texte-doux); }
.sc-jauge.trop .sc-jauge-mot { color: #9a3412; font-weight: 600; }

/* --- l'agenda de la semaine --- */
.sc-semaine-boite { overflow-x: auto; padding-bottom: 4px; }
.sc-semaine { display: flex; gap: 5px; min-width: 700px; }
.sc-col { flex: 1 1 0; min-width: 0; }
.sc-col-heures { flex: 0 0 34px; min-width: 34px; }

.sc-col-tete {
  height: var(--sc-tete); padding: 4px 5px 0; overflow: hidden;
  border-bottom: 1px solid var(--bord);
}
.sc-col-jour { display: flex; align-items: baseline; gap: 4px; font-size: 13px; }
.sc-col-jour b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-mini { font-size: 11px; }
.sc-mini.verte { color: var(--vert); }
.sc-col-ouv { font-size: 10.5px; color: var(--texte-doux); line-height: 1.3; margin-top: 1px; }
.sc-col-ecole { margin-top: 2px; min-height: 15px; }
.sc-tag-ecole {
  display: inline-block; font-size: 10px; font-weight: 700; border-radius: 5px;
  padding: 1px 4px; background: #ede9fe; color: #5b21b6; white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}

.sc-col-corps {
  position: relative; height: var(--sc-hauteur); background: #f8fafc;
  border-radius: 0 0 8px 8px;
}
.sc-col-heures .sc-col-corps { background: none; }
.sc-heure {
  position: absolute; right: 3px; transform: translateY(-50%);
  font-size: 10px; color: #94a3b8; font-weight: 600;
}
.sc-graduation { position: absolute; left: 0; right: 0; height: 1px; background: #eef2f7; }
.sc-ouvert-v { position: absolute; left: 0; right: 0; background: #e2ebfa; }

.sc-pistes { position: absolute; inset: 0; display: flex; gap: 2px; padding: 0 2px; }
.sc-piste-v { position: relative; flex: 1 1 0; min-width: 0; }
.sc-bloc-v {
  position: absolute; left: 0; right: 0; border-radius: 5px; border: 0; padding: 0;
  color: #fff; font-family: inherit; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
}
.sc-bloc-v.cliquable { cursor: pointer; }
.sc-bloc-v.cliquable:hover { filter: brightness(1.12); }
.sc-bloc-emoji { font-size: 13px; line-height: 1.1; }
.sc-bloc-h { font-size: 9.5px; font-weight: 700; opacity: .95; }

.sc-trou-v {
  position: absolute; left: 0; right: 0; border-radius: 4px;
  background: repeating-linear-gradient(45deg, rgba(220,38,38,.9) 0 5px, rgba(185,28,28,.9) 5px 10px);
  box-shadow: 0 0 0 1px #fff inset;
}

.sc-col.dimanche .sc-col-corps { background: #fdf5f9; }
.sc-col.a-trou .sc-col-tete { border-bottom-color: #fca5a5; }
.sc-col.a-trou .sc-col-jour b { color: #b91c1c; }

.sc-col-pied { padding: 6px 3px 5px; text-align: center; min-height: 30px; }
.sc-col-total { font-size: 12px; font-weight: 700; }
.sc-col-manque { font-size: 10.5px; color: #b91c1c; font-weight: 600; line-height: 1.3; }
.sc-col-bouton { width: 100%; margin-top: 4px; padding: 5px 4px; font-size: 11px; }
.sc-col-hors { font-size: 10px; color: var(--texte-doux); margin-top: 3px; cursor: help; }

.sc-legende { display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
              font-size: 12px; color: var(--texte-doux); margin-top: 14px; }
.sc-legende span { display: inline-flex; align-items: center; gap: 5px; }
.sc-puce { width: 13px; height: 13px; border-radius: 4px; display: inline-block; flex: none; }
.sc-puce-trou { background: repeating-linear-gradient(45deg, #dc2626 0 4px, #b91c1c 4px 8px); }
.sc-puce-ouvert { background: #e8eefc; border: 1px solid #cdd9f5; }
.sc-puce-manque { background: #fee2e2; border: 1px solid #fca5a5; }
.sc-puce-ecole { background: #ede9fe; border: 1px solid #c4b5fd; }

/* --- totaux --- */
.sc-tableau td, .sc-tableau th { white-space: nowrap; }
.sc-tableau tr.sc-total td { border-top: 2px solid var(--bord); background: #f8fafc; }
.sc-tableau tr.sc-ligne-ecole td { background: #faf8ff; }
.chiffre-cle.sc-rouge { background: #fef2f2; border-color: #fca5a5; }
.chiffre-cle.sc-rouge .v { color: #b91c1c; }
.chiffre-cle.sc-vert { background: #f0fdf4; border-color: #bbf7d0; }
.chiffre-cle.sc-vert .v { color: #15803d; }

/* --- « qui prend ce créneau ? » --- */
.sc-candidat {
  width: 100%; text-align: left; cursor: pointer; font-family: inherit;
  border: 2px solid var(--bord); background: #fff; border-radius: 12px; padding: 11px 13px;
}
.sc-candidat:hover { border-color: var(--violet); background: #faf8ff; }
.sc-candidat.au-dessus { border-color: #fed7aa; background: #fffbf7; }
.sc-candidat.ecole { opacity: .8; border-style: dashed; }
.sc-candidat-haut { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sc-candidat-det { font-size: 12.5px; color: var(--texte-doux); margin-top: 5px; line-height: 1.5; }
.sc-candidat-suite { font-size: 12.5px; color: #9a3412; font-weight: 600; margin-top: 5px; }

.sc-choix-sortie {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border: 1px solid var(--bord); border-radius: 10px; font-size: 14px;
}

/* --- « déplacer ce créneau » : les trois semaines d'un coup --- */
.sc-choix-grille {
  display: grid; grid-template-columns: 38px repeat(7, 1fr); gap: 5px; align-items: stretch;
}
.sc-choix-jour { font-size: 12px; font-weight: 700; text-align: center; color: var(--texte-doux); }
.sc-choix-lettre { display: flex; align-items: center; justify-content: center; }
.sc-choix-case {
  border: 2px solid var(--bord); background: #fff; border-radius: 10px;
  padding: 6px 4px; min-height: 62px; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
}
.sc-choix-case:hover:not(:disabled) { border-color: var(--violet); background: #faf8ff; }
.sc-choix-case:disabled { cursor: default; }
.sc-choix-case.ici { background: #f1f5f9; border-style: dashed; }
.sc-choix-case.manque { border-color: #fca5a5; background: #fff7f7; }
.sc-choix-case.ecole { background: #f6f3ff; border-color: #c4b5fd; }
.sc-choix-note { font-size: 10.5px; color: var(--texte-doux); line-height: 1.3; }
.sc-choix-case.manque .sc-choix-note { color: #b91c1c; font-weight: 600; }
.sc-choix-ecole { font-size: 10.5px; font-weight: 700; color: #5b21b6; }
.sc-choix-ici { font-size: 11px; font-weight: 700; color: var(--texte-doux); }

@media (max-width: 760px) {
  :root { --sc-hauteur: 360px; }
  .sc-bloc-h { display: none; }
  .sc-choix-grille { grid-template-columns: 30px repeat(7, 1fr); gap: 3px; }
  .sc-choix-case { min-height: 54px; padding: 4px 2px; }
}

/* ---------------------------------------------------------------------
   Séparation des journées (17/09/2026)
   Une simple nuance de fond ne suffisait pas : les sept jours se
   lisaient comme une seule surface. Chaque journée est donc une CARTE —
   un trait, un fond blanc, des coins arrondis — et la colonne des heures
   n'en est pas une, pour qu'elle ne se confonde pas avec un jour.
   --------------------------------------------------------------------- */
.sc-semaine { gap: 7px; }
.sc-semaine > .sc-col:not(.sc-col-heures) {
  border: 1px solid var(--bord); border-radius: 10px; background: #fff; overflow: hidden;
}
.sc-semaine > .sc-col.dimanche { border-color: #f9cfe2; }
.sc-semaine > .sc-col.a-trou { border-color: #fca5a5; box-shadow: 0 0 0 1px #fee2e2; }
.sc-col-tete { background: #f8fafc; }
.sc-col.dimanche .sc-col-tete { background: #fdf0f6; }
.sc-col.a-trou .sc-col-tete { background: #fff2f2; }
.sc-col-corps { border-radius: 0; }
.sc-col-pied { border-top: 1px solid var(--bord); padding-top: 5px; }

/* --- le cumul de la semaine, à côté de chaque prénom --- */
.sc-legende-equipe { margin-top: 12px; margin-bottom: 2px; gap: 10px; }
.sc-legende-qui {
  border: 1px solid var(--bord); border-radius: 999px; padding: 3px 10px 3px 7px;
  background: #fff; font-size: 12.5px; color: var(--texte);
}
.sc-legende-h { margin-left: 3px; font-variant-numeric: tabular-nums; }
.sc-legende-somme { background: #f1f5f9; font-weight: 600; }

/* --- le fantôme du glisser-déposer --- */
.sc-bloc-v.en-vol { opacity: .28; }
.sc-fantome {
  position: fixed; z-index: 400; border-radius: 6px; pointer-events: none;
  color: #fff; opacity: .92; box-shadow: 0 6px 20px rgba(23, 32, 58, .3);
  display: flex; align-items: center; justify-content: center;
  outline: 2px solid #fff;
}
.sc-fantome-mot {
  font-size: 11px; font-weight: 800; letter-spacing: .2px; white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35);
}

/* --- régler un créneau à la main --- */
.sc-reglage { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.sc-reglage-champ { display: flex; flex-direction: column; gap: 4px; }
.sc-reglage-champ label { font-size: 12px; font-weight: 700; color: var(--texte-doux); }
.sc-reglage-champ .horaire { min-width: 86px; font-size: 17px; padding: 8px 10px; }
.sc-reglage-duree {
  display: flex; flex-direction: column; justify-content: center;
  border: 2px dashed var(--bord); border-radius: 10px; padding: 6px 12px; min-width: 96px;
}
.sc-reglage-duree b { font-size: 17px; }
.sc-reglage-ecart { font-size: 11.5px; color: var(--texte-doux); }

.sc-note-variante {
  margin: 0 0 14px; font-size: 12.5px; color: var(--texte-doux);
  max-width: 88ch; line-height: 1.55;
}

/* ---------------------------------------------------------------------
   Une nuance de fond une colonne sur deux (17/09/2026)
   Même idée que le bleu alterné du planning : l'œil suit sa journée
   sans avoir à compter les traits. Les deux tons sont très proches —
   il s'agit de guider le regard, pas de dire quelque chose. Le dimanche
   et une journée en défaut gardent leur couleur, qui, elle, signifie.
   --------------------------------------------------------------------- */
.sc-col.jour-impair .sc-col-corps { background: #f8fafc; }
.sc-col.jour-pair   .sc-col-corps { background: #eef2f7; }
.sc-col.jour-impair .sc-col-tete  { background: #f8fafc; }
.sc-col.jour-pair   .sc-col-tete  { background: #e9eef5; }
.sc-col.dimanche .sc-col-corps { background: #fdf5f9; }
.sc-col.dimanche .sc-col-tete  { background: #fdf0f6; }
.sc-col.a-trou   .sc-col-tete  { background: #fff2f2; }

/* ---------------------------------------------------------------------
   Étirer un créneau à la souris
   Deux poignées de 8 px, en haut et en bas du bloc. Elles restent
   discrètes tant qu'on ne survole pas : sur un créneau de 30 minutes,
   deux barres visibles mangeraient tout le bloc.
   --------------------------------------------------------------------- */
.sc-poignee {
  position: absolute; left: 0; right: 0; height: 8px; cursor: ns-resize;
  z-index: 3; touch-action: none;
}
.sc-poignee.haut { top: 0; }
.sc-poignee.bas  { bottom: 0; }
.sc-poignee::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  width: 22px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .85);
  opacity: 0; transition: opacity .12s;
}
.sc-poignee.haut::after { top: 2px; }
.sc-poignee.bas::after  { bottom: 2px; }
.sc-bloc-v:hover .sc-poignee::after { opacity: .9; }
.sc-bloc-v.en-etirement { box-shadow: 0 0 0 2px #fff, 0 4px 14px rgba(23, 32, 58, .35); z-index: 5; }
.sc-bloc-v.en-etirement .sc-poignee::after { opacity: 1; }

.sc-flottante {
  position: fixed; z-index: 500; pointer-events: none; transform: translateX(-50%);
  background: #17203a; color: #fff; border-radius: 8px; padding: 5px 10px;
  box-shadow: 0 6px 18px rgba(23, 32, 58, .35);
}

/* ---------------------------------------------------------------------
   Comparer deux plannings côte à côte
   Deux colonnes dès que la fenêtre le permet, l'une sous l'autre sinon.
   Les agendas y sont resserrés : c'est la SEULE règle de l'écran qui
   change de taille, et elle ne s'applique qu'ici.
   --------------------------------------------------------------------- */
.sc-compare { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(560px, 1fr)); }
.sc-panneau { border: 1px solid var(--bord); border-radius: 14px; padding: 12px; background: #fcfdff; }
.sc-panneau-tete { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.sc-panneau-cote {
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px;
  background: #ede9fe; color: #5b21b6; border-radius: 999px; padding: 3px 10px; flex: none;
}
.sc-choix-planning {
  flex: 1; min-width: 0; font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 7px 10px; border: 2px solid var(--bord); border-radius: 10px; background: #fff;
  color: var(--texte);
}
.sc-panneau-chiffres { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.sc-panneau .sc-semaine { min-width: 520px; gap: 4px; }
.sc-panneau .sc-col-heures { flex: 0 0 28px; min-width: 28px; }
.sc-panneau .sc-col-corps { height: 330px; }
.sc-panneau .sc-col-tete { height: 56px; }
.sc-panneau .sc-bloc-h { display: none; }
.sc-panneau .sc-col-jour { font-size: 12px; }
.sc-panneau .sc-col-ouv { font-size: 9.5px; }
.sc-panneau .sc-legende-equipe { margin-top: 10px; }

@media (max-width: 600px) {
  .sc-compare { grid-template-columns: 1fr; }
}

/* =====================================================================
   LES PLANNINGS IMPRIMÉS (et donc le PDF)
   ---------------------------------------------------------------------
   Ces pages ne vivent que dans `#zone-impression`, masqué à l'écran et
   révélé par `@media print`. L'orientation paysage est posée par une
   règle `@page` injectée le temps de l'impression (voir
   `imprimerEnPaysage` dans vue-export.js) : une règle `@page` ne peut
   pas dépendre d'une classe, et les plannings en portrait sortiraient
   coupés.

   Les couleurs de fond doivent survivre à l'impression : sans
   `print-color-adjust: exact`, le navigateur les retire « pour
   économiser l'encre » et l'agenda sort entièrement blanc.
   ===================================================================== */

.pl-page {
  page-break-after: always; break-after: page;
  font-family: "Segoe UI", system-ui, sans-serif; color: #000;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.pl-page:last-child { page-break-after: auto; break-after: auto; }

.pl-entete {
  display: flex; align-items: flex-start; gap: 14px;
  border-bottom: 2.5px solid #000; padding-bottom: 4px; margin-bottom: 5px;
}
.pl-titre { font-size: 15pt; font-weight: 800; letter-spacing: -.3px; }
.pl-sous { font-size: 8.5pt; color: #444; margin-top: 1px; }
.pl-espace { flex: 1; }
.pl-societe { font-size: 10pt; font-weight: 700; text-align: right; }
.pl-pied { margin-top: 7px; font-size: 8pt; color: #555; }

/* Ces deux feuilles sont remises aux collaborateurs et affichées dans la
   boutique. On les lit debout, à un mètre : les caractères sont donc taillés
   pour être lus sur le papier, pas pour tenir le plus de choses possible. Et
   un jour sur deux est franchement teinté — une simple nuance disparaissait
   à l'impression. */

/* --- « votre présentation » : le tableau --- */
.pl-table { width: 100%; border-collapse: collapse; font-size: 9pt; }
/* Entête aux mots et aux couleurs du fichier de Yann : jours en gras sur
   blanc, « Totaux » sur le bleu clair B4C6E7. */
.pl-table th {
  border: 1px solid #000; background: #fff; padding: 4px 2px;
  font-size: 8pt; text-transform: uppercase; letter-spacing: .2px;
}
.pl-table th.pl-th-totaux { background: #b4c6e7; }
.pl-table td { border: 1px solid #555; padding: 3px 2px; text-align: center; }
.pl-table tr.pl-haut td { border-top: 1.5px solid #000; }
.pl-lettre { font-weight: 800; width: 22px; }
.pl-rouge { color: #f00; }
.pl-nom { font-weight: 800; text-align: left !important; padding: 0 5px !important; width: 105px; }
.pl-h { font-variant-numeric: tabular-nums; }
.pl-moment { font-size: 8pt; color: #333; white-space: nowrap; }
.pl-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-fort { font-weight: 800; }
.pl-table tr.pl-separation td { border: 0; height: 5px; }
/* La couleur des lignes appartient au cycle A / B / C : la journée se
   distingue donc au TRAIT — un filet noir là où elle se termine, et un
   entête teinté un jour sur deux. Quatorze colonnes d'horaires identiques ne
   se lisaient pas d'un coup d'œil. */
.pl-table th.pl-j-pair { background: #dce6f4; }
.pl-table th, .pl-table td.pl-fin-jour { border-right: 1.6px solid #1f2937; }

/* --- « présentation agenda » --- */
.pl-semaine { display: flex; gap: 5px; }
.pl-col {
  flex: 1 1 0; min-width: 0; border: 1.2px solid #334155; border-radius: 4px;
  overflow: hidden; background: #fff;
}
.pl-col.pl-pair { background: #e7edf5; }
.pl-col.pl-pair .pl-col-tete { background: #c6d4e6; }
.pl-col.pl-pair .pl-corps { background: #e7edf5; }
.pl-col.dim { border-color: #d76ba3; }
.pl-col.dim .pl-col-tete { background: #f6d6e6; }
.pl-col.dim .pl-corps { background: #fdf3f8; }
.pl-col-heures { flex: 0 0 34px; border: 0; background: none; }
.pl-col-tete {
  padding: 3px; background: #e2e8f0; border-bottom: 1.2px solid #334155;
  font-size: 9pt; text-align: center; overflow: hidden;
}
.pl-col-heures .pl-col-tete { background: none; border: 0; }
.pl-ouv { font-size: 6.5pt; font-weight: 600; color: #1f2937; line-height: 1.25; }
.pl-corps { position: relative; height: 148mm; background: #fff; }
.pl-col-heures .pl-corps { background: none; }
.pl-heure {
  position: absolute; right: 3px; transform: translateY(-50%);
  font-size: 8pt; color: #1f2937; font-weight: 700;
}
.pl-grad { position: absolute; left: 0; right: 0; height: .5px; background: #b6c2d1; }
/* translucide, sinon la bande « magasin ouvert » effacerait l'alternance
   des jours sur toute la hauteur utile */
.pl-ouvert { position: absolute; left: 0; right: 0; background: rgba(37, 99, 235, .10); }
.pl-pistes { position: absolute; inset: 0; display: flex; gap: 1.5px; padding: 0 1.5px; }
.pl-piste { position: relative; flex: 1 1 0; min-width: 0; }
.pl-bloc {
  position: absolute; left: 0; right: 0; border-radius: 3px; overflow: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: .8px solid rgba(0, 0, 0, .35); padding: 0 1px; text-align: center;
}
/* la couleur du texte est posée par le JS, calculée sur celle de la fiche */
.pl-bloc-nom { font-size: 9pt; font-weight: 800; line-height: 1.15; white-space: nowrap; }
.pl-bloc-h {
  display: flex; align-items: center; justify-content: center;
  font-size: 8pt; font-weight: 600; line-height: 1.15; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* créneau trop court pour deux lignes : le prénom et l'horaire côte à côte */
.pl-bloc-court { flex-direction: row; gap: 3px; }
.pl-bloc-court .pl-bloc-nom { font-size: 6.5pt; }
.pl-bloc-court .pl-bloc-h { font-size: 6pt; }

/* Trois personnes en même temps, c'est une colonne de onze millimètres ;
   quatre, de huit. Le texte se serre plutôt que de sortir coupé, et au plus
   serré les deux horaires passent l'un sous l'autre. */
.pl-col.pl-moyen .pl-bloc-nom { font-size: 8pt; }
.pl-col.pl-moyen .pl-bloc-h { font-size: 7pt; }
.pl-col.pl-serre .pl-bloc-nom { font-size: 7pt; }
.pl-col.pl-serre .pl-bloc-h { font-size: 6.5pt; }
/* En pleine page, c'est la largeur qui manque, jamais la hauteur : les deux
   horaires passent l'un sous l'autre plutôt que de rétrécir encore. */
.pl-col.pl-moyen .pl-bloc-h, .pl-col.pl-serre .pl-bloc-h {
  flex-direction: column; line-height: 1.05;
}
.pl-col.pl-moyen .pl-tiret, .pl-col.pl-serre .pl-tiret { display: none; }
.pl-col.pl-serre .pl-bloc-court .pl-bloc-h { display: none; }
.pl-trou {
  position: absolute; left: 0; right: 0;
  background: repeating-linear-gradient(45deg, #dc2626 0 3px, #b91c1c 3px 6px);
  border: .8px solid #fff;
}
.pl-legende { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 7px; font-size: 9pt; }
.pl-legende span { display: inline-flex; align-items: center; gap: 4px; }
.pl-puce { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }
.pl-puce-trou { background: repeating-linear-gradient(45deg, #dc2626 0 3px, #b91c1c 3px 6px); }
.pl-puce-ouvert { background: #e5ebf9; border: 1px solid #b9cdf0; }

/* --- les trois semaines sur une seule page A4 ---
   Chaque semaine garde son titre : en faisant défiler, on ne peut pas se
   tromper de semaine. Les corps sont plus courts, mais les textes NE
   rétrécissent plus autant — un agenda illisible ne vaut pas mieux qu'un
   agenda absent. La place vient d'ailleurs : plus de total sous les jours,
   plus d'horaires d'ouverture sous les noms, et une seule légende pour les
   trois semaines, en bas de page. */
.pl-bloc-semaine { margin-top: 3px; }
.pl-titre-semaine {
  font-size: 10pt; font-weight: 800; border-bottom: 1.2px solid #000;
  margin-bottom: 2px; padding-bottom: 1px;
}
.pl-semaine.pl-compact .pl-corps { height: 45mm; }
.pl-semaine.pl-compact .pl-col-tete { padding: 1px 2px; font-size: 8pt; }
.pl-semaine.pl-compact .pl-ouv { display: none; }
.pl-semaine.pl-compact .pl-bloc-nom { font-size: 7.5pt; }
.pl-semaine.pl-compact .pl-bloc-h { font-size: 6.5pt; }
.pl-semaine.pl-compact .pl-bloc-court .pl-bloc-nom { font-size: 6pt; }
.pl-semaine.pl-compact .pl-bloc-court .pl-bloc-h { font-size: 5.5pt; }
.pl-semaine.pl-compact .pl-col.pl-moyen .pl-bloc-nom { font-size: 6.5pt; }
/* trois semaines empilées : à trois personnes, la hauteur ne permet plus la
   troisième ligne — l'horaire revient sur une seule, plus petite */
.pl-semaine.pl-compact .pl-col.pl-moyen .pl-bloc-h { font-size: 6pt; flex-direction: row; }
.pl-semaine.pl-compact .pl-col.pl-moyen .pl-tiret { display: inline; }
.pl-semaine.pl-compact .pl-col.pl-serre .pl-bloc-nom { font-size: 6pt; }
.pl-semaine.pl-compact .pl-col.pl-serre .pl-bloc-h { font-size: 5.5pt; }
.pl-semaine.pl-compact .pl-heure { font-size: 7pt; }

/* =====================================================================
   CONNEXION ET JETON D'ÉCRITURE  (connexion.js)
   ---------------------------------------------------------------------
   Le voile couvre TOUT tant qu'on n'est pas identifié : laisser
   entrevoir les onglets derrière donnerait à croire qu'on peut cliquer
   ailleurs. Le bandeau, lui, est permanent — une information qui décide
   de ce qu'on a le droit de faire ne peut pas être une fenêtre qu'on
   ferme d'un clic.
   ===================================================================== */

.cx-voile {
  position: fixed; inset: 0; z-index: 4000;
  background: linear-gradient(140deg, #6d28d9, #be185d);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  overflow: auto;
}
.cx-boite {
  width: 100%; max-width: 430px; background: #fff; border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3); overflow: hidden;
}
.cx-entete { display: flex; gap: 12px; align-items: center; padding: 20px 22px 14px; }
.cx-logo { font-size: 30px; line-height: 1; }
.cx-entete h1 { margin: 0; font-size: 19px; letter-spacing: -.3px; }
.cx-entete p { margin: 3px 0 0; font-size: 13px; color: var(--texte-doux); line-height: 1.35; }
.cx-corps { padding: 4px 22px 22px; }

.cx-champ { display: block; margin-bottom: 13px; }
.cx-champ > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.cx-champ input {
  width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 15px;
  border: 1.5px solid #d7dcea; border-radius: 10px; background: #fbfcfe;
}
.cx-champ input:focus { outline: none; border-color: var(--violet); background: #fff; }
.cx-aide { display: block; font-size: 11.5px; color: var(--texte-doux); margin-top: 4px; line-height: 1.35; }

.cx-note {
  display: flex; gap: 8px; align-items: flex-start; margin-bottom: 15px;
  background: #f3f0ff; border: 1px solid #ddd6fe; border-radius: 10px;
  padding: 10px 12px; font-size: 12.5px; line-height: 1.4;
}
.cx-erreur {
  display: flex; gap: 7px; align-items: center; margin: 4px 0 10px;
  background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b;
  border-radius: 10px; padding: 9px 11px; font-size: 13px; font-weight: 600;
}
.cx-pied { margin-top: 6px; }
.cx-pied .bouton { width: 100%; padding: 11px; font-size: 15px; }

/* --- le bandeau permanent --- */
.cx-bandeau {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 7px 16px; font-size: 13px; font-weight: 600;
}
.cx-bandeau.modifie { background: #dcfce7; color: #166534; border-bottom: 1px solid #86efac; }
.cx-bandeau.consulte { background: #fef3c7; color: #92400e; border-bottom: 1px solid #fcd34d; }
.cx-bandeau .cx-espace { flex: 1; }
.cx-bandeau .cx-sous { font-weight: 500; opacity: .85; font-size: 12px; }
.cx-bandeau .cx-qui { font-weight: 700; opacity: .8; }

/* ---------------------------------------------------------------- */
/*  « C'EST VÉRIFIÉ » — relecture des journées                       */
/* ---------------------------------------------------------------- */

/* LE BOUTON DE LIGNE.
   Il est volontairement GRAND et porte un mot : une petite case à
   cocher au bout d'une ligne se rate, et surtout se coche par erreur —
   et la coche d'à côté n'est pas la bonne journée. */
.bouton-verif {
  border: 2px solid transparent; border-radius: 10px;
  padding: 9px 13px; min-width: 118px;
  font-family: inherit; font-size: 13.5px; font-weight: 700;
  cursor: pointer; white-space: nowrap; line-height: 1.1;
  transition: filter .15s, transform .08s;
}
.bouton-verif:hover  { filter: brightness(.96); }
.bouton-verif:active { transform: translateY(1px); }
.bouton-verif.afaire { background: #eef0fa; color: var(--violet);  border-color: #d9dcf0; }
.bouton-verif.fait   { background: #dcfce7; color: #166534;        border-color: #86efac; }
.bouton-verif.revoir { background: #fef3c7; color: #92400e;        border-color: #fcd34d; }
.verif-a-venir { color: #b4bcd0; font-size: 18px; }
.tableau-saisie td.td-verif { text-align: center; }

/* La ligne d'action de la semaine, juste au-dessus du tableau. */
.verif-semaine {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 11px 14px; margin: 0 0 14px;
  background: #f6f7fc; border: 2px solid var(--bord); border-radius: 12px;
}
.verif-semaine.complet { background: #f0fdf4; border-color: #bbf7d0; }
.verif-semaine .espace { flex: 1; }
.verif-semaine-texte { font-size: 14px; color: var(--texte-doux); }
.verif-semaine-texte b { color: var(--texte); }
.verif-revoir { color: #b45309; font-weight: 700; }

/* ------------------------------------------------------------------
   LA BARRE DE SUIVI.
   Collée sous l'en-tête — `--h-bandeau` est mesurée en JavaScript
   (`mesurerBandeau`), parce que la hauteur de l'en-tête change avec la
   largeur de la fenêtre : un nombre de pixels écrit ici chevaucherait
   les onglets une fois sur deux.
   ------------------------------------------------------------------ */
.suivi-verif {
  position: sticky; top: var(--h-bandeau, 104px); z-index: 30;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; margin: -6px 0 16px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(6px);
  border: 2px solid var(--bord); border-radius: 14px;
  box-shadow: var(--ombre);
}
.suivi-titre { font-size: 13px; font-weight: 800; color: var(--texte-doux); white-space: nowrap; }
.suivi-liste { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.suivi-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 2px solid var(--bord); background: #fff; border-radius: 999px;
  padding: 4px 12px 4px 4px; cursor: pointer; font-family: inherit;
  font-size: 13.5px; font-weight: 600; color: var(--texte);
}
.suivi-chip:hover { border-color: var(--violet); }
.suivi-chip .rond {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-size: 13px; color: #fff; flex: none;
}
.suivi-nom { white-space: nowrap; }
.suivi-barre {
  width: 62px; height: 8px; border-radius: 999px; background: #e6e9f4;
  overflow: hidden; flex: none;
}
.suivi-barre i { display: block; height: 100%; background: var(--violet); border-radius: 999px; }
.suivi-chiffre { font-size: 12.5px; font-weight: 700; color: var(--texte-doux); white-space: nowrap; }
.suivi-revoir  { font-size: 12px; font-weight: 700; color: #b45309; white-space: nowrap; }
.suivi-chip.complet { border-color: #86efac; background: #f0fdf4; }
.suivi-chip.complet .suivi-barre i { background: var(--vert); }
.suivi-chip.revoir  { border-color: #fcd34d; }

/* ---------------------------------------------------------------- */
/*  L'ICÔNE DE COMPTE, EN HAUT À DROITE                              */
/*  Se connecter et se déconnecter sans passer par les Réglages.     */
/* ---------------------------------------------------------------- */
.cx-compte {
  display: inline-flex; align-items: center; gap: 9px;
  border: 0; cursor: pointer; font-family: inherit; color: #fff;
  background: rgba(255,255,255,.18); border-radius: 999px;
  padding: 4px 13px 4px 4px; font-size: 13.5px; font-weight: 600;
}
.cx-compte:hover { background: rgba(255,255,255,.3); }
.cx-compte .cx-rond {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 14px; font-weight: 800;
  background: rgba(255,255,255,.3); position: relative;
}
/* La pastille dit d'un coup d'œil si l'on a la main sur le planning :
   verte on modifie, orange on consulte. */
.cx-compte .cx-etat {
  position: absolute; right: -1px; bottom: -1px;
  width: 11px; height: 11px; border-radius: 50%; border: 2px solid #a833c8;
}
.cx-compte.a-la-main   .cx-etat { background: #22c55e; }
.cx-compte.consultation .cx-etat { background: #f59e0b; }
.cx-compte .cx-nom { white-space: nowrap; }
.cx-compte .cx-chevron { opacity: .75; font-size: 11px; }

.cx-menu {
  position: fixed; z-index: 90; width: 268px;
  background: #fff; color: var(--texte);
  border-radius: 14px; box-shadow: var(--ombre-fort);
  border: 1px solid var(--bord); overflow: hidden;
}
.cx-menu-tete { padding: 13px 15px; border-bottom: 1px solid var(--bord); background: #f8f9fe; }
.cx-menu-tete .n { font-weight: 800; font-size: 15px; }
.cx-menu-tete .r { font-size: 12.5px; color: var(--texte-doux); margin-top: 2px; }
.cx-menu-etat {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 11px 15px; font-size: 12.5px; line-height: 1.4;
  border-bottom: 1px solid var(--bord);
}
.cx-menu-etat.main    { background: #f0fdf4; color: #166534; }
.cx-menu-etat.consult { background: #fffbeb; color: #92400e; }
.cx-menu button.item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 0; background: none; cursor: pointer; font-family: inherit;
  padding: 12px 15px; font-size: 14px; text-align: left; color: var(--texte);
}
.cx-menu button.item:hover { background: #f1f5f9; }
.cx-menu button.item.partir { color: var(--rouge); font-weight: 600; }
.cx-menu .sep { height: 1px; background: var(--bord); }

/* Le bandeau d'accès vit maintenant DANS l'en-tête, qui est collant :
   une information qui décide de ce qu'on a le droit de faire ne doit pas
   s'en aller dès qu'on fait défiler l'écran. */
.bandeau > .cx-bandeau { margin: -14px -22px 12px; border-radius: 0; }

/* ---------------------------------------------------------------- */
/*  FEUILLES À IMPRIMER — LES PAQUETS                                */
/*  Un paquet annonce ce qu'il contient et s'imprime d'un clic :     */
/*  pas de cases à cocher, pas de liste déroulante, pas de bouton    */
/*  « Imprimer » à aller chercher ailleurs sur l'écran.              */
/* ---------------------------------------------------------------- */
.choix-periode { display: flex; gap: 10px; flex-wrap: wrap; }
.choix-periode .periode {
  flex: 1 1 190px; text-align: left; cursor: pointer; font-family: inherit;
  border: 2px solid var(--bord); border-radius: 13px; background: #fff;
  padding: 12px 15px; display: flex; flex-direction: column; gap: 2px;
  transition: border-color .15s, background .15s;
}
.choix-periode .periode:hover { border-color: #c4b5fd; }
.choix-periode .periode.choisi { border-color: var(--violet); background: #f5f3ff; }
.choix-periode .p-nom  { font-size: 15px; font-weight: 800; color: var(--texte); }
.choix-periode .p-sous { font-size: 12.5px; color: var(--texte-doux); }

.paquet {
  display: flex; align-items: center; gap: 12px; width: 100%;
  border: 2px solid var(--bord); border-radius: 14px; background: #fff;
  padding: 12px 15px; cursor: pointer; font-family: inherit; text-align: left;
  transition: border-color .15s, box-shadow .15s, transform .08s;
}
.paquet:hover:not(:disabled) { border-color: var(--violet); box-shadow: var(--ombre); }
.paquet:active:not(:disabled) { transform: translateY(1px); }
.paquet:disabled { opacity: .45; cursor: not-allowed; }
.paquet .espace { flex: 1; }

/* Le paquet de toute l'équipe : c'est le geste de chaque vendredi,
   il porte le bouton le plus gros de l'écran. */
.paquet.grand {
  border-color: var(--violet); background: linear-gradient(115deg, #f5f3ff, #fdf4ff);
  padding: 16px 18px; margin-bottom: 4px;
}
.paquet .pq-avatars { display: flex; flex: none; }
.paquet .pq-avatars .pq-rond { margin-right: -9px; border: 2px solid #fff; }
.paquet .pq-rond {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 16px; color: #fff;
}
.paquet .pq-texte { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.paquet .pq-nom { font-size: 15.5px; font-weight: 800; color: var(--texte); }
.paquet.grand .pq-nom { font-size: 18px; }
.paquet .pq-detail {
  font-size: 12.5px; color: var(--texte-doux);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.paquet .pq-compte {
  font-size: 13px; font-weight: 700; color: var(--violet);
  background: #ede9fe; border-radius: 999px; padding: 5px 12px; white-space: nowrap;
}
.paquet .pq-action {
  font-size: 14px; font-weight: 700; color: #fff; background: var(--violet);
  border-radius: 10px; padding: 9px 14px; white-space: nowrap;
}
.paquet:not(.grand) .pq-action { background: #eef0fa; color: var(--violet); padding: 8px 11px; }

.pq-ou { margin: 16px 0 9px; font-size: 13px; font-weight: 700; color: var(--texte-doux); }
.pq-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }

/* L'aperçu est une VRAIE page A4 : ses colonnes sont en millimètres, sinon
   ce qu'on voit à l'écran ne serait pas ce qui sort de l'imprimante. Sur une
   fenêtre étroite elle ne rentre donc pas — on la fait défiler elle, plutôt
   que toute la page. (L'impression, elle, passe par #zone-impression et
   n'est pas concernée.) */
.apercu-feuille { overflow-x: auto; }

/* ---------------------------------------------------------------- */
/*  RÉCAPITULATIF POUR LA PAIE                                       */
/*  Un bloc par personne, en colonnes alignées : la paie se lit en   */
/*  balayant une colonne, pas en cherchant un chiffre dans du texte. */
/* ---------------------------------------------------------------- */
.recap-paie { display: grid; grid-template-columns: repeat(auto-fit, minmax(430px, 1fr)); gap: 14px; }
.rp-bloc { border: 2px solid var(--bord); border-radius: 14px; padding: 14px 16px; background: #fff; }
.rp-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.rp-tete .rond {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 17px; color: #fff;
}
.rp-tete .espace { flex: 1; }
.rp-nom { font-size: 17px; font-weight: 800; }
.rp-contrat { font-size: 12.5px; color: var(--texte-doux); }

.rp-groupe {
  font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px;
  color: var(--texte-doux); margin: 14px 0 5px; padding-bottom: 4px;
  border-bottom: 2px solid var(--bord);
}
.rp-ligne {
  display: grid; grid-template-columns: 1fr 62px 58px 78px;
  align-items: baseline; gap: 6px; padding: 4px 0; font-size: 13.5px;
  border-bottom: 1px solid #f1f3fa;
}
.rp-ligne.sous .rp-lib { padding-left: 14px; color: var(--texte-doux); }
.rp-ligne.total {
  font-weight: 800; border-top: 2px solid var(--bord); border-bottom: 0;
  margin-top: 3px; padding-top: 7px; font-size: 14.5px;
}
.rp-lib { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rp-precision { font-size: 11px; color: var(--texte-doux); line-height: 1.3; }
.rp-val  { text-align: right; font-variant-numeric: tabular-nums; }
.rp-cent { text-align: right; font-variant-numeric: tabular-nums; color: var(--texte-doux); font-size: 12.5px; }
.rp-sort { font-size: 11.5px; color: var(--violet); font-weight: 700; white-space: nowrap; }

/* ---------------------------------------------------------------- */
/*  MODIFIER UNE JOURNÉE DEPUIS LE PLANNING                          */
/* ---------------------------------------------------------------- */

/* Une case corrigeable le dit au survol, discrètement : le planning se
   lit bien plus souvent qu'il ne se corrige, et un écran qui clignote
   sous la souris fatigue avant de servir. */
.grille-planning td.modifiable { cursor: pointer; }
.grille-planning td.modifiable:hover { outline: 2px solid var(--violet); outline-offset: -2px; }

.fj-etiquettes { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.fj-horaires { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.fj-champ { display: flex; flex-direction: column; gap: 4px; }
.fj-champ label { margin: 0; }
.fj-champ .horaire { width: 100%; font-size: 17px; padding: 11px 8px; }

.fj-bilan {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin: 14px 0; padding: 11px 14px; border-radius: 12px;
  background: #f6f7fc; border: 2px solid var(--bord); font-size: 14px;
}
.fj-bilan .fj-sep { color: var(--bord); }

.fj-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.fj-verif {
  display: flex; align-items: center; gap: 10px; margin-top: 14px;
  padding-top: 12px; border-top: 2px solid var(--bord);
  font-size: 13px; color: var(--texte-doux); font-weight: 600;
}

/* Le plafond d'heures complémentaires de l'avenant, dépassé.
   Rouge brique — la famille du « il manque quelque chose » — et non
   l'ambre des fériés : ce n'est pas une information, c'est un écart. */
.rp-alerte {
  margin-top: 10px; padding: 8px 11px; border-radius: 10px;
  background: #fef2f2; border: 1px solid #fca5a5; color: #b91c1c;
  font-size: 12.5px; font-weight: 600; line-height: 1.35;
}

/* Les centièmes sous les heures.
   Yann lisait « 36h19 » dans l'application et « 36,3175 » sur la fiche de
   paie, et croyait à un écart : c'est le même nombre, 0,3175 h faisant
   19 minutes. Un comptage se LIT en h/min et se SAISIT en centièmes —
   afficher une seule des deux notations oblige à convertir de tête, et
   une conversion de tête est une erreur en attente. */
.cent {
  font-size: 11.5px; color: var(--texte-doux); font-weight: 600;
  margin-top: 1px; font-variant-numeric: tabular-nums;
}
.cent::before { content: '('; }
.cent::after  { content: ')'; }

/* Sur une tuile colorée, le gris des centièmes devient illisible :
   le texte y est blanc, et la nuance doit l'être aussi. */
.tuile-solde .cent { color: rgba(255,255,255,.78); }

/* Le bouton « ⋯ Plus » et le menu des onglets rares (07/10/2026).
   Il se distingue des vrais onglets sans crier : contour discret, pas de
   fond plein — c'est une porte vers ailleurs, pas une destination. */
.onglets button.plus { opacity: .85; border: 1px dashed rgba(255,255,255,.45); }
.onglets button.plus:hover { opacity: 1; background: rgba(255,255,255,.26); }
#menu-onglets button.item { align-items: flex-start; text-align: left; }
#menu-onglets button.item.actif { background: #f1f5f9; font-weight: 700; }
#menu-onglets .aide-item {
  font-size: 11.5px; color: var(--texte-doux); font-weight: 400;
  margin-top: 2px; line-height: 1.3;
}
