/* PharmaShift · console claire · composants.css
   Composants (§ 6 à § 15), repris tels quels ; puis, partagés par toutes les coquilles : le composant
   .rail (extrait du § 17, la barre basse sert aussi la PWA), .menu__titre (menu Compte), la pile des
   messages Django (.messages) et deux variantes (.ligne-etat--attention, .ligne-impaye--suspendue).
   Repris de design-proposals/03-console/systeme.css (branche design/refonte-6-directions ; variante claire 03b : valeurs claires
   seulement). */


/* 6. Boutons ---------------------------------------------------------------
   <button class="bouton bouton--principal">Publier</button>
   Variantes : --principal --secondaire --discret --lien --danger --suppr --icone
   Taille : --grand (48 px, 16 px : « Créer un compte gratuit » des pages publiques)
   Kiosque : .bt-bouton, variante de .bouton (même base, 72 px et 24 px, § 19).
   États : :hover (.est-survol), :focus-visible (.est-focus), :disabled ou
   aria-disabled="true", aria-busy="true" (libellé « …ement… » écrit par la vue).
   ------------------------------------------------------------------------- */

.bouton, .bt-bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--e-2);
  min-height: var(--cible);
  min-width: var(--cible);
  padding: 0 var(--e-4);
  border: var(--trait) solid transparent;
  border-radius: var(--r-6);
  background: var(--surface-2);
  color: var(--texte);
  font-size: var(--t-15);
  line-height: var(--l-15);
  font-weight: var(--g-moyen);
  text-align: center;
  text-decoration: none;
  max-width: 100%;   /* libellé long à 320 px ou texte agrandi : il passe à la ligne, jamais hors de l’écran */
  cursor: pointer;
  transition: background-color var(--duree) var(--courbe), border-color var(--duree) var(--courbe), color var(--duree) var(--courbe);
}
.bouton:has(> .icone:first-child) { padding-left: var(--e-3); }
.bouton.est-focus { outline: var(--focus-contour); outline-offset: 2px; box-shadow: var(--focus-halo); }

.bouton--principal { background: var(--accent); color: var(--sur-accent); }
.bouton--principal.est-survol { background: var(--accent-survol); }

.bouton--secondaire { background: var(--surface-2); border-color: var(--contour); }
.bouton--secondaire.est-survol { background: var(--surface-3); }

.bouton--discret { background: transparent; color: var(--texte); }
.bouton--discret.est-survol { background: var(--surface-2); }

.bouton--lien { background: transparent; color: var(--accent); padding-inline: var(--e-2); }
.bouton--lien.est-survol { text-decoration: underline; text-underline-offset: 3px; }

.bouton--danger { background: var(--danger); color: var(--sur-danger); }
.bouton--danger.est-survol { background: var(--danger-survol); }

/* Suppression discrète (pied d’inspecteur) ; le bouton plein --danger reste au <dialog> de confirmation */
.bouton--suppr { background: transparent; color: var(--danger); }
.bouton--suppr.est-survol { background: var(--fond-erreur); }

@media (hover: hover) {
  .bouton--principal:hover { background: var(--accent-survol); }
  .bouton--secondaire:hover { background: var(--surface-3); }
  .bouton--discret:hover { background: var(--surface-2); }
  .bouton--lien:hover { text-decoration: underline; text-underline-offset: 3px; }
  .bouton--danger:hover { background: var(--danger-survol); }
  .bouton--suppr:hover { background: var(--fond-erreur); }
}

/* Grand bouton d’appel (partiel public/composants/_bouton_inscription.html : tête de l’accueil,
   appel de Tarifs, sous le comparatif) ; la largeur reste à la page */
.bouton--grand { min-height: 3rem; font-size: var(--t-16); line-height: var(--l-16); }

.bouton--icone { padding: 0; width: var(--cible); }
.bouton--icone:has(> .icone:first-child) { padding: 0; }

:is(.bouton, .bt-bouton):is(:disabled, [aria-disabled="true"]) {
  background: transparent;
  border: var(--trait) dashed var(--contour);
  color: var(--texte-2);
  cursor: not-allowed;
}
.bouton[aria-busy="true"] { cursor: progress; }
.bouton[aria-busy="true"]::after { content: "…"; margin-left: -0.375rem; }   /* « Publication… » : aucun mouvement */

.boutons { display: flex; flex-wrap: wrap; gap: var(--e-2); align-items: center; }


/* 7. Champs ----------------------------------------------------------------
   <div class="champ [champ--erreur]">
     <label class="champ__label" for="x">Début</label>
     <input class="champ__saisie champ__saisie--mono" id="x" aria-describedby="x-aide">
     <p class="champ__aide" id="x-aide">Heure sur 24 h</p>
     <p class="champ__erreur" id="x-err"><svg …/>Message</p>
   </div>
   ------------------------------------------------------------------------- */

.champ { display: grid; gap: var(--e-1); align-content: start; min-width: 0; }
.champ__label {
  font-size: var(--t-14);
  line-height: var(--l-14);
  font-weight: var(--g-moyen);
  color: var(--texte);
}
.champ__label .facultatif { color: var(--texte-2); font-weight: var(--g-normal); }
.champ__saisie {
  width: 100%;
  min-height: var(--cible);
  padding: 0 var(--e-3);
  border: var(--trait) solid var(--contour);
  border-radius: var(--r-6);
  background: var(--champ-fond);
  color: var(--texte);
  font-size: var(--t-15);
  line-height: var(--l-15);
  transition: border-color var(--duree) var(--courbe);
}
.champ__saisie::placeholder { color: var(--texte-2); opacity: 1; }
@media (hover: hover) { .champ__saisie:hover { border-color: var(--texte-2); } }
.champ__saisie:focus-visible { border-color: var(--accent); outline-offset: 1px; }
.champ__saisie:disabled { border-style: dashed; color: var(--texte-2); background: transparent; }
.champ__saisie--mono { font-family: var(--police-mono); font-variant-numeric: tabular-nums; }
.champ__saisie--code {
  width: 8.5rem;
  font-family: var(--police-mono);
  font-size: var(--t-20);
  letter-spacing: .4em;
}
textarea.champ__saisie { min-height: 5.5rem; padding-block: var(--e-2); resize: vertical; }
select.champ__saisie {
  appearance: none;
  padding-right: var(--e-10);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--texte-2) 50%),
    linear-gradient(135deg, var(--texte-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
input[type="search"].champ__saisie { appearance: none; }
input[type="time"].champ__saisie::-webkit-calendar-picker-indicator { filter: none; opacity: .7; }

.champ__aide { font-size: var(--t-14); line-height: var(--l-14); color: var(--texte-2); }
.champ__erreur {
  display: flex;
  gap: var(--e-2);
  align-items: flex-start;
  font-size: var(--t-14);
  line-height: var(--l-14);
  color: var(--danger);
  font-weight: var(--g-moyen);
}
.champ__erreur .icone { width: 1rem; height: 1rem; margin-top: 2px; }
.champ--erreur .champ__saisie, .champ__saisie[aria-invalid="true"] {
  border-color: var(--danger);
  border-width: 2px;
  padding-inline: calc(var(--e-3) - 1px);
}

/* Groupe : cases et boutons radio */
.groupe { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 0; }
.groupe__legende { padding: 0; margin-bottom: var(--e-1); font-size: var(--t-14); line-height: var(--l-14); font-weight: var(--g-moyen); }
.groupe--ligne { display: flex; flex-wrap: wrap; column-gap: var(--e-4); }
.groupe--ligne .groupe__legende { flex-basis: 100%; }

.choix {
  display: inline-flex;
  align-items: center;
  gap: var(--e-3);
  min-height: var(--cible);
  cursor: pointer;
  font-size: var(--t-15);
}
.choix input { margin: 0; }

.case, .radio {
  appearance: none;
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  border: 2px solid var(--contour);
  background: var(--champ-fond);
  display: inline-grid;
  place-content: center;
  cursor: pointer;
  transition: background-color var(--duree) var(--courbe), border-color var(--duree) var(--courbe);
}
.case { border-radius: var(--r-1); }
.radio { border-radius: 50%; }
.case::after {
  content: "";
  width: .375rem;
  height: .7rem;
  border: solid var(--sur-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: 0;
}
.case:checked, .radio:checked { background: var(--accent); border-color: var(--accent); }
.case:checked::after { opacity: 1; }
.case:indeterminate { background: var(--accent); border-color: var(--accent); }
.case:indeterminate::after { width: .625rem; height: 0; border-width: 0 0 2px 0; transform: none; opacity: 1; }
.radio:checked { box-shadow: inset 0 0 0 3px var(--champ-fond); }
.case:disabled, .radio:disabled { border-style: dashed; cursor: not-allowed; }

/* Interrupteur : <label class="interrupteur"><input type="checkbox" role="switch">…</label> */
.interrupteur {
  display: inline-flex;
  align-items: center;
  gap: var(--e-3);
  min-height: var(--cible);
  cursor: pointer;
}
.interrupteur input {
  appearance: none;
  flex: none;
  position: relative;
  width: 2.75rem;
  height: 1.5rem;
  margin: 0;
  border: 2px solid var(--contour);
  border-radius: var(--r-pilule);
  background: var(--champ-fond);
  cursor: pointer;
  transition: background-color var(--duree) var(--courbe);
}
.interrupteur input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--texte-2);
  transition: transform var(--duree) var(--courbe);
}
.interrupteur input:checked { background: var(--accent); border-color: var(--accent); }
.interrupteur input:checked::after { transform: translateX(1.25rem); background: var(--sur-accent); }
/* Désactivé : contour pointillé, pastille pâle, libellé secondaire, comme .case et .choix désactivés */
.interrupteur:has(input:disabled) { color: var(--texte-2); cursor: not-allowed; }
.interrupteur input:disabled { border-style: dashed; background: transparent; cursor: not-allowed; }
.interrupteur input:disabled::after { background: var(--contour); }
.interrupteur { max-width: 100%; }
.interrupteur__etat { flex: none; font-family: var(--police-mono); font-size: var(--t-14); color: var(--texte-2); min-width: 6ch; }
.interrupteur input:not(:checked) ~ .interrupteur__etat .si-oui,
.interrupteur input:checked ~ .interrupteur__etat .si-non { display: none; }

/* Saisie d’un code à 4 chiffres (cases d’affichage : le code n’est jamais écrit dans le DOM) */
.cases-code { display: inline-flex; gap: var(--e-2); }
.cases-code__case {
  width: 2.75rem;
  height: 2.75rem;
  border: 2px solid var(--contour);
  border-radius: var(--r-6);
  display: grid;
  place-items: center;
  background: var(--champ-fond);
}
.cases-code__case.est-remplie::after {
  content: "";
  width: .75rem;
  height: .75rem;
  border-radius: 50%;
  background: var(--texte);
}
.cases-code__case.est-courante { border-color: var(--accent); }

.formulaire { display: grid; gap: var(--e-4); }
.formulaire__ligne { display: grid; gap: var(--e-3); grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); }
.formulaire__resume {
  display: grid;
  gap: var(--e-1);
  padding: var(--e-3) var(--e-4);
  border: 2px solid var(--danger);
  border-radius: var(--r-6);
  background: var(--fond-erreur);
}
.formulaire__resume a { display: inline-flex; align-items: center; min-height: var(--cible); color: var(--texte); }


/* 8. Tableaux et conteneur défilant ---------------------------------------
   <div class="defilant" role="region" aria-label="…" tabindex="0">
     <table class="tableau"> <caption>…</caption> <th scope="col"> … </table>
   </div>
   Nombres : <td class="num">. En-tête collant : thead th collent au haut de
   leur conteneur défilant (.defilant--haut fixe une hauteur).
   ------------------------------------------------------------------------- */

.tableau {
  width: 100%;
  font-size: var(--t-14);
  line-height: var(--l-14);
  font-variant-numeric: tabular-nums;
}
.tableau caption {
  text-align: left;
  padding: 0 0 var(--e-2);
  font-size: var(--t-14);
  color: var(--texte-2);
}
.tableau th, .tableau td {
  padding: var(--e-3);
  text-align: left;
  vertical-align: middle;
  border-bottom: var(--trait) solid var(--filet);
}
.tableau thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  color: var(--texte-2);
  font-weight: var(--g-moyen);
  white-space: nowrap;
  border-bottom-color: var(--contour);
}
.tableau tbody th { font-weight: var(--g-moyen); }
.tableau tbody tr:last-child > * { border-bottom: 0; }
.tableau .num {
  text-align: right;
  font-family: var(--police-mono);
  font-weight: var(--g-moyen);
  white-space: nowrap;
}
.tableau .actions { text-align: right; white-space: nowrap; padding-block: 0; }
.tableau--dense th, .tableau--dense td { padding: var(--e-2) var(--e-3); }
@media (hover: hover) { .tableau tbody tr:hover > * { background: var(--surface-2); } }
.tableau tr.est-choisi > * { background: var(--selection); }
.tableau tr.est-choisi > :first-child { box-shadow: inset 3px 0 0 var(--accent); }
.tableau__lien {
  display: flex;
  align-items: center;
  min-height: var(--cible);
  margin-block: calc(var(--e-3) * -1);
  color: var(--texte);
  text-decoration: none;
  font-weight: var(--g-moyen);
}
@media (hover: hover) { .tableau__lien:hover { text-decoration: underline; } }
.tableau--dense .tableau__lien { margin-block: calc(var(--e-2) * -1); }
.tableau__groupe th {
  background: var(--surface-2);
  color: var(--texte);
  font-weight: var(--g-fort);
  padding-block: var(--e-2);
}

/* Conteneur défilant. padding-top : le focus de la première rangée n’est pas rogné.
   --defilant-colle : largeur des colonnes collées à gauche (planning : 8.75rem) ; un
   élément ramené en vue (scrollIntoView, flèches de la grille) ne passe pas dessous. */
.defilant {
  position: relative;   /* les textes masqués (position absolue) des cellules hors champ restent dans le conteneur */
  overflow-x: auto;
  overscroll-behavior-x: contain;
  max-width: 100%;
  padding-top: var(--e-1);
  scroll-padding-inline-start: var(--defilant-colle, 0px);
}
.grille-defilant { --defilant-colle: 8.75rem; }   /* planning : colonne des noms collée (140 px) */
.defilant--haut { max-height: 22rem; overflow-y: auto; }
.defilant:focus-visible { outline-offset: 2px; }
/* Ombres de bord : un défilement horizontal restant se voit à droite (et à gauche,
   après les colonnes collées). --defilant-fond : fond du conteneur (surface par défaut). */
.defilant--ombres {
  background:
    linear-gradient(to right, var(--defilant-fond, var(--surface)) 40%, transparent) var(--defilant-colle, 0px) 0 / 2.5rem 100% no-repeat local,
    linear-gradient(to left, var(--defilant-fond, var(--surface)) 40%, transparent) 100% 0 / 2.5rem 100% no-repeat local,
    linear-gradient(to right, var(--ombre-couleur), transparent) var(--defilant-colle, 0px) 0 / .75rem 100% no-repeat scroll,
    linear-gradient(to left, var(--ombre-couleur), transparent) 100% 0 / .75rem 100% no-repeat scroll,
    var(--defilant-fond, var(--surface));
}
.defilant__indice {
  display: flex;
  align-items: center;
  gap: var(--e-1);
  font-size: var(--t-14);
  line-height: var(--l-14);
  color: var(--texte-2);
  padding-bottom: var(--e-2);
}
@media (min-width: 1024px) { .defilant__indice--mobile { display: none; } }


/* 9. Panneaux, cartes, fiches ---------------------------------------------- */

.panneau {
  background: var(--surface);
  border-radius: var(--r-8);
  box-shadow: 0 0 0 var(--trait) var(--bord-panneau);
  min-width: 0;
}
.panneau__entete {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--e-2) var(--e-3);
  min-height: 3rem;
  padding: var(--e-1) var(--e-2) var(--e-1) var(--e-4);
}
.panneau__titre {
  font-size: var(--t-15);
  line-height: var(--l-15);
  font-weight: var(--g-fort);
}
.panneau__titre .mono { color: var(--texte-2); font-weight: var(--g-moyen); }
.panneau__outils { margin-left: auto; display: flex; gap: var(--e-1); flex-wrap: wrap; }
.panneau__corps { padding: 0 var(--e-4) var(--e-4); }
.panneau__corps--plein { padding: 0; }
.panneau__pied {
  display: flex;
  align-items: center;
  gap: var(--e-2);
  min-height: var(--cible);
  padding: 0 var(--e-2) 0 var(--e-4);
  font-size: var(--t-14);
  color: var(--texte-2);
}

.carte {
  display: grid;
  align-content: start;
  gap: var(--e-1);
  padding: var(--e-3) var(--e-4);
  background: var(--surface);
  border-radius: var(--r-8);
  box-shadow: 0 0 0 var(--trait) var(--bord-panneau);
  min-width: 0;
}
.carte__titre { font-size: var(--t-15); line-height: var(--l-15); font-weight: var(--g-fort); }
.carte__ligne { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--e-1) var(--e-3); }
.carte__meta { font-size: var(--t-14); line-height: var(--l-14); color: var(--texte-2); }
a.carte { color: inherit; text-decoration: none; }
@media (hover: hover) { a.carte:hover { background: var(--surface-2); } }

/* Fiche : liste de définitions sur deux colonnes, chiffres en mono */
.fiche { display: grid; gap: 0; font-size: var(--t-14); line-height: var(--l-14); }
.fiche__ligne {
  display: grid;
  grid-template-columns: minmax(6.5rem, 34%) minmax(0, 1fr);
  gap: var(--e-3);
  padding: var(--e-2) 0;
  border-bottom: var(--trait) solid var(--filet);
}
.fiche__ligne:last-child { border-bottom: 0; }
.fiche dt { color: var(--texte-2); }
.fiche dd { color: var(--texte); min-width: 0; }
/* Ligne qui répond à la question de l’écran (tête de la PWA : « Aujourd’hui ») :
   valeur en mono 20 px, l’état écrit en Geist à la suite (.fiche__etat) */
.fiche__ligne--principale { align-items: baseline; }
.fiche__ligne--principale dd { font-size: var(--t-20); line-height: var(--l-20); }
.fiche__ligne--principale dd.mono, .fiche__ligne--principale dd .mono { font-weight: var(--g-fort); }
.fiche__etat { font-family: var(--police); font-size: var(--t-16); font-weight: var(--g-moyen); color: var(--accent); white-space: nowrap; }
.fiche__etat--neutre { color: var(--texte-2); }
@media (min-width: 1024px) {
  .fiche--colonnes { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: var(--e-4); }
  .fiche--colonnes .fiche__ligne { grid-template-columns: 1fr; gap: var(--e-1); border-bottom: 0; padding: 0; align-content: start; }
  /* Fiche signalétique posée sur un panneau (en-têtes de l’accueil et de Tarifs) */
  .fiche--panneau {
    gap: var(--e-6);
    padding: var(--e-5) var(--e-6);
    background: var(--surface);
    border-radius: var(--r-8);
    box-shadow: 0 0 0 var(--trait) var(--bord-panneau);
  }
  .fiche--panneau dd { font-size: var(--t-15); line-height: var(--l-15); }
}
.fiche--panneau dd { font-weight: var(--g-moyen); }

/* Prix en ligne dans une fiche : nom au-dessus, montant mono, note dessous
   <dd class="prix-court"><span class="prix-court__offre">Pro</span><span class="prix-court__montant">20 €</span>…</dd> */
.prix-court { display: grid; grid-template-columns: repeat(3, max-content); column-gap: var(--e-4); justify-content: start; }
.prix-court__offre { grid-row: 1; color: var(--texte-2); font-weight: var(--g-normal); }
.prix-court__montant {
  grid-row: 2;
  font-family: var(--police-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-20);
  line-height: var(--l-20);
  font-weight: var(--g-fort);
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.prix-court__note { grid-row: 3; grid-column: 1 / -1; color: var(--texte-2); font-weight: var(--g-normal); }
/* Forme en lignes (partiel public/composants/_prix_court.html, accueil et Tarifs) : ce que chaque
   prix achète (« Pro 20 € HT + comptes et appli des salariés, tâches »).
   <dd class="prix-court"><p class="prix-court__ligne"><span class="prix-court__offre">Pro</span>
     <span class="prix-court__montant">20 €<span class="prix-court__ht"> HT</span></span>
     <span class="prix-court__contenu">+ comptes et appli des salariés, tâches</span></p> …
     <p class="prix-court__note">HT / mois, par pharmacie · <a href="…">Tout comparer ›</a></p></dd>
   Sous 600 px, le contenu passe sous le prix (prix alignés en colonne par la largeur du nom) ;
   dès 600 px, trois colonnes alignées (offre, prix, contenu) par subgrid. */
.prix-court:has(> .prix-court__ligne) { display: grid; grid-template-columns: minmax(0, 1fr); row-gap: var(--e-2); }
.prix-court__ligne { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--e-2); }
.prix-court__ligne > * { grid-row: auto; }
.prix-court__ligne .prix-court__offre { min-width: 4.5rem; color: var(--texte); font-weight: var(--g-fort); }
.prix-court__ligne .prix-court__montant { font-size: var(--t-16); line-height: var(--l-16); }
.prix-court__ht { margin-left: 2px; font-family: var(--police); font-size: var(--t-14); font-weight: var(--g-moyen); color: var(--texte-2); }
.prix-court__contenu { flex-basis: 100%; color: var(--texte-2); font-weight: var(--g-normal); }
.prix-court:has(> .prix-court__ligne) > .prix-court__note { grid-row: auto; }
.prix-court__note a { display: inline-block; padding-block: var(--e-3); margin-block: calc(var(--e-3) * -1); }   /* cible de 44 px sans changer la ligne */
@media (min-width: 600px) {
  .prix-court:has(> .prix-court__ligne) { grid-template-columns: auto auto minmax(0, 1fr); column-gap: var(--e-4); row-gap: var(--e-1); }
  .prix-court__ligne { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; }
  .prix-court:has(> .prix-court__ligne) > .prix-court__note { grid-column: 1 / -1; margin-top: var(--e-1); }
}


/* 10. Statuts, marqueurs, pastilles, écarts, compteurs -------------------- */
/* Jamais la couleur seule : chaque statut porte un mot et une forme.        */

.statut {
  display: inline-flex;
  align-items: center;
  gap: var(--e-1);
  min-height: 1.5rem;
  padding: 0 var(--e-2);
  border: var(--trait) solid currentColor;
  border-radius: var(--r-1);
  font-size: var(--t-14);
  line-height: var(--l-14);
  font-weight: var(--g-moyen);
  white-space: nowrap;
  color: var(--texte-2);
}
.statut .icone { width: 1rem; height: 1rem; }
.fiche dd .statut { white-space: normal; }   /* « Retard de paiement » passe à la ligne dans une fiche étroite (320 px, texte espacé) */
.statut--accent    { color: var(--accent); }
.statut--attention { color: var(--attention); }
.statut--succes    { color: var(--succes); }
.statut--danger    { color: var(--danger); }
.statut--plein     { background: var(--texte); border-color: var(--texte); color: var(--fond); }

/* Marqueurs de shift : texte mono expliqué par la légende permanente */
.marqueur {
  font-family: var(--police-mono);
  font-size: var(--t-14);
  font-weight: var(--g-fort);
  color: var(--texte-2);
  white-space: nowrap;
}
.marqueur--np { color: var(--accent); }
/* HS, une information : pastille blanche au filet gris, mot ambre « plus » (5,43:1) ; ni aplat ni contour ambre
   (réservés à l’action), ni fond teinté (qui se confondrait avec un poste rouge ou orange) */
.marqueur--hs { padding: 0 3px; border: var(--trait) solid var(--contour); border-radius: 3px; background: var(--surface); color: var(--plus); line-height: 1rem; }
/* « N à valider » (Couverture, Ma semaine), une action : encadré ambre pâle (4,93:1), un mot, pas un code */
.marqueur--attention { padding: 0 4px; border: var(--trait) solid var(--attention); border-radius: 3px; background: var(--fond-attention); color: var(--attention); font-family: var(--police); line-height: 1rem; }
/* Aplat d’action (trou, « à valider » du shift et des légendes) : ambre plein, mot écrit en blanc (5,43:1) */
.aplat, .shift--a-valider .shift__etat { padding: 0 4px; border-radius: 3px; background: var(--attention); color: var(--sur-accent); line-height: 1rem; }
.aplat { display: inline-flex; flex-wrap: wrap; align-items: center; column-gap: 3px; font-family: var(--police); font-weight: var(--g-fort); }
.marqueur .icone { display: inline-block; width: .875rem; height: .875rem; vertical-align: -1px; margin-right: 2px; }

/* Pastilles d’offre */
.offre {
  display: inline-flex;
  align-items: center;
  gap: var(--e-1);
  min-height: 1.5rem;
  padding: 0 var(--e-2);
  border-radius: var(--r-pilule);
  border: var(--trait) solid var(--contour);
  font-size: var(--t-14);
  line-height: var(--l-14);
  font-weight: var(--g-moyen);
  white-space: nowrap;
  color: var(--texte);
}
.offre--pro { border-color: var(--accent); color: var(--accent); }
.offre--premium { background: var(--texte); border-color: var(--texte); color: var(--fond); }
.offre--actuelle::before { content: "●"; font-size: .625rem; }

/* Écarts : planifié − contrat seulement (lexique). Signe et valeur toujours écrits ;
   couleur en redondance. Cause dessous, en Geist : <span class="ecart__cause">3 ABS</span>
   La même convention visuelle sert aux soldes signés en heures (dettes sur 90 j, écart pointé),
   qui gardent leur propre nom à l’écran ; un pourcentage s’écrit en .variation. */
.ecart { font-family: var(--police-mono); font-variant-numeric: tabular-nums; font-weight: var(--g-moyen); white-space: nowrap; }
.ecart--plus  { color: var(--plus); }
.ecart--moins { color: var(--moins); }
.ecart--egal  { color: var(--egal); }
.ecart__cause { display: block; font-family: var(--police); font-size: var(--t-14); line-height: var(--l-14); font-weight: var(--g-normal); color: var(--texte-2); white-space: normal; }

/* « Par rapport à l’habitude » (charge d’un jour, Couverture) : pourcentage signé, même
   convention de couleur que les écarts, mais jamais appelé « écart » : « +12 % » */
.variation { font-family: var(--police-mono); font-variant-numeric: tabular-nums; font-weight: var(--g-moyen); white-space: nowrap; }
.variation--plus  { color: var(--plus); }
.variation--moins { color: var(--moins); }

/* Compte : chiffre mono à côté d’une icône ou d’un libellé */
.compte {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 5px;
  border-radius: var(--r-pilule);
  background: var(--accent);
  color: var(--sur-accent);
  font-family: var(--police-mono);
  font-size: var(--t-14);
  line-height: 1;
  font-weight: var(--g-fort);
}
.compte--neutre { background: var(--surface-3); color: var(--texte); }

/* Publication d’une semaine : mot + date en mono, icône en redondance.
   <p class="publication publication--publiee"><svg i-succes/><span class="publication__mot">Publiée</span>
   <span class="publication__date">16/10 18:20</span></p> */
.publication {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  font-size: var(--t-14);
  line-height: var(--l-14);
  white-space: nowrap;
}
.publication .icone { width: 1rem; height: 1rem; }
.publication__mot { font-weight: var(--g-fort); }
.publication__date { font-family: var(--police-mono); font-variant-numeric: tabular-nums; color: var(--texte-2); font-weight: var(--g-moyen); }
.publication--publiee .icone { color: var(--succes); }
.publication--brouillon .icone, .publication--brouillon .publication__mot { color: var(--attention); }

/* État de charge d’un jour : mot écrit + flèche ; même convention que les écarts */
.etat-charge { display: inline-flex; align-items: center; gap: var(--e-1); font-family: var(--police); font-weight: var(--g-moyen); white-space: nowrap; }
.etat-charge .icone { width: 1rem; height: 1rem; }
.etat-charge--plus { color: var(--plus); }
.etat-charge--moins { color: var(--moins); }
.etat-charge--neutre { color: var(--texte-2); }
.habitude { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--e-1); }   /* « Par rapport à l’habitude » : couverture/_habitude.html (Couverture, volet jour du planning) */
.habitude .variation::after { content: "·"; content: "·" / ""; margin-left: var(--e-1); font-family: var(--police); color: var(--texte-2); }

/* Jauge de 6 px, décorative (la valeur est écrite à côté).
   Charge : planifié / moyenne de 0 à 150 %, trait vertical = moyenne (2/3). Stockage : .jauge--simple */
.jauge { position: relative; display: block; height: 6px; margin: var(--e-1) 0 6px; border-radius: 3px; background: var(--surface-3); }
.jauge__barre { position: absolute; inset: 0 auto 0 0; width: var(--part); border-radius: 3px; background: var(--texte-2); }
.jauge::after { content: ""; position: absolute; left: calc(200% / 3); top: -3px; bottom: -3px; width: 2px; border-radius: 1px; background: var(--texte); }
.jauge--plus .jauge__barre { background: var(--plus); }
.jauge--moins .jauge__barre { background: var(--moins); }
.jauge--vide { background: transparent; box-shadow: inset 0 0 0 1px var(--contour); }
.jauge--vide::after, .jauge--simple::after { content: none; }
.jauge--simple { margin: 0; }

/* Inclusion d’une fonction dans une offre : toujours écrite (« Inclus », « Non inclus ») */
.inclusion { display: inline-flex; align-items: center; gap: var(--e-2); min-height: var(--l-15); font-size: var(--t-14); font-weight: var(--g-moyen); white-space: nowrap; }
.inclusion .icone { width: 1rem; height: 1rem; }
.inclusion--non { color: var(--texte-2); font-weight: var(--g-normal); }
.inclusion--non::before { content: ""; flex: none; width: .625rem; height: 2px; margin-inline: 3px; border-radius: 1px; background: currentColor; }
/* « Inclus » et « Non inclus » sur la même ligne : la coche (16 px) et le tiret (2 px) donnent deux
   lignes de base différentes, « Non inclus » descendrait de 4 px */
:is(.offres, .offre-carte__table) .inclusion { vertical-align: top; }
.differe .inclusion--oui { color: var(--accent); font-weight: var(--g-fort); }


/* 11. Shift, case de planning, couverture, jour par poste, légende ---------
   <a class="shift" href="?shift=…" style="--poste:#b7fa96"
      aria-label="08:30–17:00, 7h30, V validé ; Léa Martin, préparateur, lundi 19 octobre">
     <span class="shift__horaire">08:30–17:00</span>
     <span class="shift__meta"><span class="duree">7h30</span> · <span class="marqueur">V</span> · <span class="marqueur">N</span></span>
   </a>
   Nom accessible : le texte visible d’abord (WCAG 2.5.3), puis salarié, poste et jour.
   Cible de 44 px au moins (2 × 18 + 2 × 3 + 2 × 1). Pavé teinté du poste, barre de 4 px (couleur saisie + filet
   foncé) ; sans poste, gris et barre en tirets. Seule l’action sort de la teinte : à valider sur blanc, aplat ambre.
   Chiffres et marqueurs en Geist Mono, mots et séparateurs « · » en Geist :
   « ABS · Congé payé » et « 7h30 · à valider » tiennent ainsi dans une colonne de 133 px.
   Aperçu non interactif (accueil) : <span class="shift">.
   ------------------------------------------------------------------------- */

.shift {
  position: relative;
  display: grid;
  align-content: center;
  gap: 0;
  width: 100%;
  min-height: var(--cible);
  padding: 3px var(--e-1) 3px calc(var(--trait-poste) + var(--e-2));   /* 109 px utiles dans une colonne de 133 */
  border: var(--trait) solid transparent;
  border-radius: var(--r-6);
  background: var(--poste-fond);
  color: var(--texte);
  --texte-2: var(--texte-2-teinte);
  font-family: var(--police);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-14);
  line-height: 1.125rem;
  font-weight: var(--g-moyen);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.shift__horaire, .shift .duree { font-family: var(--police-mono); font-variant-numeric: tabular-nums; }
.shift__type { font-weight: var(--g-moyen); }
span.shift { cursor: default; }   /* aperçu statique : ni survol ni pointeur */
.shift::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--trait-poste);
  border-radius: var(--r-6) 0 0 var(--r-6);
  background: var(--poste-barre);
  box-shadow: var(--poste-barre-ombre);
}
/* Sans poste : le gris, barre en tirets (rien d’attribué ; un poste blanc garde une barre pleine) */
.shift:not([style*="--poste"]) { --poste-fond: var(--surface-2); --poste-pale: var(--surface-2); --poste-trait: var(--contour); }
.shift:not([style*="--poste"])::before { background: repeating-linear-gradient(to bottom, var(--contour) 0 4px, transparent 4px 7px); box-shadow: none; }
/* Survol : contour à l’encre du poste ; choisi : contour cobalt de 2 px (un poste bleu ne passe pas pour une sélection) */
.shift.est-survol:not(.shift--a-valider) { border-color: var(--poste-trait); }
@media (hover: hover) {
  :is(a, button).shift:not(.shift--a-valider):hover { border-color: var(--poste-trait); }
}
.shift.est-choisi { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
:is(a, button).shift.est-choisi:is(:hover, .est-survol) { border-color: var(--accent); }
.shift.est-choisi:focus-visible { box-shadow: 0 0 0 1px var(--accent), var(--focus-halo); }
.shift__horaire { display: block; }
.shift__meta { display: block; color: var(--texte-2); }
.shift__meta .marqueur { font-weight: var(--g-fort); }
/* Poste écrit, en abréviation, quand il diffère du groupe ou hors regroupement par poste :
   « Pharm. », « Prép. », « Appr. », « Rayon. » (le nom complet est dans le nom accessible) */
.shift__poste { font-family: var(--police); font-weight: var(--g-moyen); color: var(--texte-2); }
/* Non prévu : teinte pâle du poste et contour pointillé ; absence : hachure neutre, barre creuse */
.shift--np { border: var(--trait) dashed var(--contour); background: var(--poste-pale); }
.shift--absence {
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--surface) 6px 12px);
  border-color: var(--filet);
}
@media (hover: hover) { :is(a, button).shift.shift--absence:hover { background: var(--surface-3); } }
.shift--absence::before { background: transparent; box-shadow: inset 0 0 0 1px var(--contour); }
.shift--absence .shift__horaire { color: var(--texte-2); }
.shift--absence .shift__meta { color: var(--texte); }
/* Shift passé non validé (oubli de pointage, non prévu) : contour pointillé attention,
   « à valider » écrit en fin de ligne 2, cause facultative en ligne 3. Hauteur libre.
   <span class="shift__meta"><span class="duree">7h30</span> · <span class="shift__etat"><svg i-attention/>à valider</span></span>
   <span class="shift__cause">sans départ</span> */
.shift--a-valider { border-style: dashed; border-color: var(--attention); background: var(--surface); }   /* sort de toute teinte */
.shift__etat { display: inline-flex; align-items: center; gap: 2px; font-family: var(--police); font-weight: var(--g-fort); color: var(--attention); }
.shift__etat .icone { width: .875rem; height: .875rem; }
.shift--a-valider .shift__etat .icone { position: absolute; top: 4px; right: 4px; color: var(--attention); }   /* drapeau ambre dans le coin : la ligne 2 tient dans 133 px */
.shift__cause { display: block; font-weight: var(--g-normal); color: var(--texte-2); }
.shifts { display: grid; gap: var(--e-1); }

/* Shift en lecture (PWA « Ma semaine », remplace .creneau) : carte teintée du poste, sans cible, horaire
   en mono 24 px, durée à droite, barre de poste à gauche ; méta, statut et note dessous (sur blanc).
   <div class="shift shift--lecture" style="--poste:…"><p class="shift__horaire">08:30–17:00</p>
     <p class="duree">7h30</p><p class="shift__meta">Préparateur · pause 1h00</p>
     [<div class="shift__note"><p class="shift__note-tete"><svg i-note/>Note</p><p>…</p></div>]</div> */
.shift--lecture {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: var(--e-1) var(--e-3);
  min-height: 0;
  padding: var(--e-3) var(--e-3) var(--e-3) calc(var(--trait-poste) + var(--e-3));
  border: 0;
  border-radius: var(--r-6);
  background: var(--poste-fond);
  cursor: auto;
  white-space: normal;
  font-size: inherit;
  line-height: inherit;
  font-weight: var(--g-normal);
}
.shift--lecture.shift--absence { background: repeating-linear-gradient(135deg, var(--surface-2) 0 6px, var(--surface) 6px 12px); }
.shift--lecture::before { border-radius: var(--r-6) 0 0 var(--r-6); }
.shift--lecture :is(.shift__note, .statut) { background: var(--surface); }
.shift--lecture .shift__horaire { font-size: var(--t-24); line-height: var(--l-24); font-weight: var(--g-moyen); letter-spacing: -0.01em; }
.shift--lecture > .duree { font-weight: var(--g-moyen); color: var(--texte-2); white-space: nowrap; }
.shift--lecture > :not(.shift__horaire, .duree) { grid-column: 1 / -1; }
.shift--lecture .shift__meta { font-size: var(--t-14); line-height: var(--l-14); }
.shift--lecture .shift__meta strong { color: var(--texte); font-weight: var(--g-moyen); }
.shift__note { display: grid; gap: 2px; margin-top: var(--e-1); padding: var(--e-2) var(--e-3); border-radius: var(--r-6); background: var(--surface-2); }
.shift__note-tete { display: inline-flex; align-items: center; gap: var(--e-1); font-size: var(--t-14); line-height: var(--l-14); font-weight: var(--g-moyen); color: var(--texte-2); }
.shift__note-tete .icone { width: 1rem; height: 1rem; }

/* Case vide : « + » toujours visible (rien ne se cache au survol), cible de 44 px */
.case-ajout {
  display: grid;
  place-items: center;
  min-height: var(--cible);
  border: var(--trait) dashed transparent;
  border-radius: var(--r-6);
  color: var(--contour);
  text-decoration: none;
}
.case-ajout .icone { width: 1rem; height: 1rem; }
@media (hover: hover) { .case-ajout:hover { border-color: var(--contour); background: var(--surface-2); color: var(--texte); } }
/* Case remplie (manager) : bande fine de 14 px sous les shifts, pour un autre shift ce jour (une coupure). Seule
   exception au « + » toujours visible, pour ne pas charger la grille : vide au repos, « + » au survol de la case,
   au focus et choisie (planning.css) ; toujours écrit sans survol (tactile) */
.case-ajout--fine { min-height: .875rem; margin-top: 2px; color: transparent; }
.case-ajout--fine .icone { width: .75rem; height: .75rem; }
.case-ajout--fine:focus-visible { color: var(--texte); outline-offset: -2px; }   /* contour dedans : ni le shift au-dessus ni le pied collé ne le coupent */
@media (hover: hover) { :where(td:hover) > .case-ajout--fine { border-color: var(--filet); color: var(--contour); } }
@media (hover: none) { .case-ajout--fine { color: var(--contour); } }

/* Case de planning hors contrat : hachurée, non cliquable (seul usage de la hachure) */
.case-hors-contrat {
  display: grid;
  place-items: center;
  min-height: var(--cible);
  border-radius: var(--r-6);
  background: repeating-linear-gradient(135deg, transparent 0 5px, var(--filet) 5px 6px);
  color: var(--texte-2);
  font-size: var(--t-14);
}
.repere {   /* « début contrat », « fin contrat », « désactivé » */
  display: inline-block;
  font-size: var(--t-14);
  line-height: var(--l-14);
  color: var(--texte-2);
  white-space: nowrap;
}

/* Couverture d’un poste sur un jour : un seul calcul sur toutes les surfaces.
   Union des plages des shifts du poste, absences exclues, pauses non placées ;
   nombre de personnes, amplitude, puis le trou s’il y en a un. Un shift non prévu
   ne donne que son arrivée (« NP 14:02 »), jamais la fin automatique de 20:00.
   <span class="couv [couv--aucun|couv--manque]">
     <span class="couv__nb">3<span class="visuellement-cache"> personnes,</span></span>
     <span class="couv__plage">08:30–19:30</span>
     [<span class="couv__trou"><span class="aplat"><svg class="icone" aria-hidden="true"><use href="#i-attention"/></svg>trou <span class="mono">12:30–13:30</span></span></span>]
   </span>
   Nombre en ligne 1, plage en ligne 2 quand la place manque, trou toujours dessous.
   Jour sans shift : .couv--aucun « 0 · Aucun » sur chaque poste (jamais de hachure). */
.couv {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 var(--e-1);
  min-height: 2rem;
  padding: var(--e-1) var(--e-2);
  font-family: var(--police-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-14);
  line-height: var(--l-14);
  font-weight: var(--g-moyen);
}
/* Étiquette de poste (Couverture, inspecteurs, effectif de Ma semaine) : un petit shift, fond teinté, barre et
   filet. Intitulé de groupe du planning : un titre, avec sa petite barre (planning.css). */
.couv__poste { display: inline-block; padding: 0 var(--e-2) 0 calc(var(--trait-poste) + 6px); border-radius: var(--r-1); background: var(--poste-fond); box-shadow: inset 3px 0 0 var(--poste-barre), inset 4px 0 0 var(--poste-trait); font-family: var(--police); color: var(--texte); font-weight: var(--g-moyen); }
.couv__nb { color: var(--texte); font-weight: var(--g-fort); white-space: nowrap; }
.couv__nb:has(~ .couv__plage)::after { content: "·"; content: "·" / ""; margin-left: var(--e-1); font-family: var(--police); font-weight: var(--g-moyen); color: var(--texte-2); }
.couv__poste + .couv__nb { margin-left: var(--e-2); }
.couv__plage { color: var(--texte-2); white-space: nowrap; }
.couv__plage .marqueur { margin-right: var(--e-1); }
/* Trou : une action, sur sa ligne, en aplat de la largeur de son texte ; le chiffre du poste reste à l’encre */
.couv__trou { flex-basis: 100%; margin-top: 2px; }
.couv__trou .mono { white-space: nowrap; font-weight: var(--g-fort); }
.couv .icone { width: 1rem; height: 1rem; align-self: center; flex: none; }
.couv--aucun .couv__nb, .couv--aucun .couv__plage { color: var(--texte-2); }
/* Présence d’un pharmacien (couverture/_presence.html) : « pharmacien prévu », manques en aplat comme un trou,
   pause à placer en texte d’attention, sur sa ligne */
.presence { font-family: var(--police); }
.presence__pause { flex-basis: 100%; margin-top: 2px; color: var(--attention); font-weight: var(--g-fort); }
/* Manque en aplat : texte en ligne, l’icône garde sa place devant le premier mot (jamais seule sur sa ligne) */
.presence .couv__trou .aplat { display: inline-block; max-width: 100%; }
.presence :is(.presence__pause, .aplat) > .icone { display: inline-block; margin-right: 3px; vertical-align: -3px; }
/* Case empilée (tableau postes × 7 jours) : nombre en mono 20 px, amplitude et trou dessous */
.couv--pile { display: grid; gap: 0; min-height: 0; padding: 0; }
.couv--pile .couv__nb { font-size: var(--t-20); line-height: var(--l-14); letter-spacing: -0.01em; }
.couv--pile .couv__nb::after { content: none; }
.couv--pile .couv__plage { line-height: var(--l-14); }

/* Couverture par jour, en liste (téléphone : Couverture, renvoi du planning ; partiel
   couverture/_jours.html, avec_charge=True sur Couverture). Chaque poste rend la même .couv :
   <ul class="jours"><li class="jours__item"><a class="jours__lien" href="?jour=…" [aria-current="date"]>
     <span class="jours__tete"><span class="jours__jour">sam. 24</span><span class="jours__planifie">30h30</span></span>
     <span class="jours__postes"><span class="jours__poste"><span class="couv__poste" style="--poste:…">Préparateur</span>
       <span class="couv">… nombre, plage, NP, trou …</span></span>…</span>
     [<span class="jours__charge">…</span>]</a></li></ul> */
.jours { list-style: none; margin: 0; padding: 0; }
.jours__item + .jours__item { box-shadow: inset 0 1px 0 var(--filet); }
.jours__lien {
  display: grid;
  gap: var(--e-1);
  min-height: var(--cible);
  padding: var(--e-3) var(--e-4);
  color: var(--texte);
  text-decoration: none;
}
@media (hover: hover) { .jours__lien:hover { background: var(--surface-2); } }
.jours__lien[aria-current] { box-shadow: inset 3px 0 0 var(--accent); }
.jours__tete { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--e-2); font-family: var(--police-mono); font-variant-numeric: tabular-nums; font-weight: var(--g-moyen); }
.jours__jour { font-weight: var(--g-fort); white-space: nowrap; }
.jours__auj, .jours__alerte { font-family: var(--police); font-size: var(--t-14); }
.jours__auj { color: var(--accent); }
.jours__alerte { display: inline-flex; align-items: center; gap: 2px; font-weight: var(--g-fort); color: var(--attention); }   /* « 2 à valider » */
.jours__alerte .icone { width: 1rem; height: 1rem; }
.jours__planifie { margin-left: auto; white-space: nowrap; }
.jours__postes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, max(7.25rem, (100% - var(--e-4)) / 2 - 1px)), 1fr)); gap: var(--e-1) var(--e-4); font-size: var(--t-14); line-height: var(--l-14); }   /* deux colonnes, une quand le texte grandit (7,25 rem par case) */
.jours__poste { display: flex; justify-content: space-between; gap: var(--e-2); min-width: 0; }
.jours__poste:has(> .couv) { display: grid; justify-content: stretch; align-content: start; gap: 0; }   /* la case reste sous le nom quand la voisine a un trou */
.jours__poste > .couv { min-height: 0; padding: 0; }
.jours__poste .couv__plage { white-space: normal; }
.jours__poste .couv__poste { justify-self: start; }
.jours__nb { font-family: var(--police-mono); font-variant-numeric: tabular-nums; font-weight: var(--g-fort); }
.jours__nb--zero { color: var(--texte-2); font-weight: var(--g-moyen); }
.jours__vide { font-size: var(--t-14); line-height: var(--l-14); color: var(--texte-2); }
.jours__charge { font-family: var(--police-mono); font-size: var(--t-14); line-height: var(--l-14); color: var(--texte-2); }

/* Jour par poste (partiel couverture/_jour_postes.html) : inspecteur jour de Couverture et
   du planning, effectif du jour et vue Équipe de la PWA. Une .couv par poste, puis une ligne
   par personne « nom · horaire · marqueurs ». Remplace .insp-poste, .insp-shift,
   .effectif__ligne et le tableau .equipe. Niveau de titre selon le contexte (h3 dans un inspecteur).
   <div class="jour-postes">
     <section class="jour-postes__poste" aria-labelledby="jp-prep">
       <h3 class="couv jour-postes__tete" id="jp-prep" style="--poste:#b7fa96"><span class="couv__poste">Préparateur</span>…</h3>
       <ul class="jour-postes__liste" role="list">
         <li class="jour-postes__ligne [est-moi] [jour-postes__ligne--abs]"><span class="jour-postes__nom">Thomas Petit</span>
           <span class="jour-postes__horaire">14:00–19:30 <span class="marqueur marqueur--hs">HS</span></span>
           [<span class="jour-postes__note">« Renfort de l’après-midi »</span>]</li>
       </ul></section></div> */
.jour-postes { display: grid; gap: var(--e-4); }
.jour-postes__poste { display: grid; gap: var(--e-1); min-width: 0; }
.jour-postes__tete { min-height: 0; padding: 0; letter-spacing: 0; }
.jour-postes__tete .couv__poste { font-weight: var(--g-fort); }
.jour-postes__liste { list-style: none; margin: 0; padding: 0; display: grid; }
.jour-postes__ligne {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 var(--e-3);
  padding: 6px var(--e-2) 6px var(--e-3);
  box-shadow: inset 2px 0 0 var(--filet);
  font-size: var(--t-14);
  line-height: var(--l-14);
}
.jour-postes__nom { flex: 1 1 8rem; min-width: 0; overflow-wrap: anywhere; font-weight: var(--g-moyen); color: var(--texte); }
.pwa .jour-postes__nom { flex-basis: 5rem; }   /* 16 px : l’horaire reste à droite du nom dès 320 px */
.jour-postes__horaire { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--e-2); font-family: var(--police-mono); font-variant-numeric: tabular-nums; font-weight: var(--g-moyen); color: var(--texte); white-space: nowrap; }
/* Deux shifts du même salarié le même jour : un <span> par plage, empilés à droite */
.jour-postes__horaire:not(:has(.marqueur)):has(> span + span) { display: inline-grid; justify-items: end; }
.jour-postes__note { flex-basis: 100%; color: var(--texte-2); }
.jour-postes__ligne--abs .jour-postes__horaire { font-family: var(--police); font-weight: var(--g-normal); color: var(--texte-2); }
.jour-postes__ligne.est-moi { background: var(--selection); box-shadow: inset 3px 0 0 var(--accent); }
.jour-postes__vide { padding-left: var(--e-3); font-size: var(--t-14); line-height: var(--l-14); color: var(--texte-2); }
/* Forme « prénoms » (partiel forme="prenoms", vue Moi de la PWA) : la couverture du poste, puis les
   prénoms sur une ligne séparés par « · » ; « moi » en gras ; un collègue absent : « Absent : Nadia » */
.jour-postes--prenoms { gap: var(--e-3); }
.jour-postes--prenoms .jour-postes__liste { display: flex; flex-wrap: wrap; padding-left: calc(var(--trait-poste) + var(--e-2)); }
.jour-postes--prenoms .jour-postes__ligne { display: block; padding: 0; background: none; box-shadow: none; }
.jour-postes--prenoms .jour-postes__ligne:not(:last-child)::after { content: "·"; content: "·" / ""; margin-inline: var(--e-2); color: var(--texte-2); }
.jour-postes--prenoms .jour-postes__nom { font-weight: var(--g-normal); }
.jour-postes--prenoms .est-moi .jour-postes__nom { font-weight: var(--g-fort); }
.jour-postes--prenoms .jour-postes__ligne--abs .jour-postes__horaire { display: inline; margin-right: var(--e-1); }

/* Légende des marqueurs (partiel components/_legende_marqueurs.html).
   .legende : V (+ cadenas) validé, HS heures sup, NP non prévu, N note, ABS absence ;
   PWA : V · N · É (événement), « Repos » écrit en toutes lettres. */
.legende {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e-1) var(--e-4);
  font-size: var(--t-14);
  line-height: var(--l-14);
  color: var(--texte-2);
}
.legende__item { display: inline-flex; gap: var(--e-2); align-items: center; }
.legende dt { display: inline-flex; align-items: center; gap: 2px; font-family: var(--police-mono); font-weight: var(--g-fort); color: var(--texte); white-space: nowrap; }
.legende dt .icone { width: .875rem; height: .875rem; }
.legende dt.marqueur--np { color: var(--accent); }
.legende dd { margin: 0; }
/* Légende de mots (« Planifié », « Par rapport à l’habitude ») : termes en Geist, pas en mono */
.legende--mots dt { font-family: var(--police); }
/* Échantillon d’une convention sans code : contour pointillé du shift à valider */
.legende__echantillon { display: inline-block; width: 1.25rem; height: .875rem; border: var(--trait) dashed var(--attention); border-radius: 3px; }
/* Légende courte, une ligne de 14 px sous la barre du planning :
   « V validé · HS heures sup · NP non prévu · N note · ABS absence · à valider · trou » */
.legende--ligne { gap: var(--e-1) 0; }
.legende--ligne .legende__item { gap: var(--e-1); }
.legende--ligne .legende__item:not(:last-child)::after { content: "·"; content: "·" / ""; margin: 0 var(--e-2) 0 var(--e-1); color: var(--texte-2); }
@media (max-width: 599.98px) {   /* téléphone : la légende tient sur plusieurs lignes, l’espace remplace le « · » qui finirait seul en bout de ligne */
  .legende--ligne { gap: var(--e-1) var(--e-4); }
  .legende--ligne .legende__item:not(:last-child)::after { content: none; }
}
/* Légende complète (inspecteur « Légende complète », 360 px) : terme (8.5rem) + définition ; texte agrandi, la
   définition passe sous le terme au lieu d’être coupée (flex-wrap ; 136 + 12 + 144 px tiennent dans les 320 px) */
.legende--panneau { display: grid; gap: 0; }
.legende--panneau .legende__item { display: flex; flex-wrap: wrap; column-gap: var(--e-3); align-items: baseline; padding-block: var(--e-1); }
.legende--panneau dt { flex: 0 0 8.5rem; flex-wrap: wrap; white-space: normal; }
.legende--panneau dd { flex: 1 1 9rem; min-width: 0; color: var(--texte); }

/* Validation d’un shift dans l’inspecteur : V · date · auteur, écart pointé, lien vers la validation */
.verrou { display: grid; gap: var(--e-2); justify-items: start; padding: var(--e-3) var(--e-4); border: var(--trait) solid var(--contour); border-radius: var(--r-8); background: var(--surface-2); }
.verrou__ligne { display: flex; align-items: center; gap: var(--e-2); font-family: var(--police-mono); font-variant-numeric: tabular-nums; font-size: var(--t-15); font-weight: var(--g-fort); }
.verrou__ligne .icone { color: var(--texte-2); }
.verrou__texte { font-size: var(--t-14); line-height: var(--l-14); color: var(--texte-2); }


/* 12. Ligne d’état, ligne d’impayé, toast ---------------------------------
   Jamais fermés automatiquement (sauf retours du kiosque, § 19). Fermeture à la main.
   Manager : .ligne-etat en bas de la zone principale. Public et PWA : .ligne-etat--encadree
   en tête du contenu, dans le flux. PWA : .toast-pwa collant réservé aux confirmations
   d’une action que l’on vient de faire (« Demande envoyée »).
   ------------------------------------------------------------------------- */

/* Ligne d’état : role="status", reste jusqu’à l’action suivante */
.ligne-etat {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 var(--e-3);
  min-height: var(--cible);
  padding: 0 var(--e-2) 0 var(--e-4);
  background: var(--surface);
  color: var(--texte);
  font-size: var(--t-14);
  line-height: var(--l-14);
}
.ligne-etat > .icone { color: var(--succes); }
.ligne-etat--info > .icone { color: var(--texte-2); }
.ligne-etat--erreur > .icone { color: var(--danger); }
.ligne-etat__texte { flex: 1 1 12rem; min-width: 0; padding-block: var(--e-2); }
.ligne-etat:empty { display: none; }
/* Encadrée, dans le flux, en tête du contenu, fermée à la main (public : « Vous avez été
   déconnecté. » ; PWA : « Bienvenue, Léa ! », message qui ne suit pas une action) */
.ligne-etat--encadree { margin-bottom: var(--e-4); border-radius: var(--r-6); box-shadow: 0 0 0 var(--trait) var(--contour); }
@media (max-width: 599.98px) {   /* « Fermer » reste sur la ligne du message, l’action passe dessous */
  .ligne-etat__texte { flex-basis: calc(100% - var(--cible) - 4rem); }   /* texte agrandi : place de l’icône et des écarts, « Fermer » jamais seul dessous */
  .ligne-etat > .ligne-etat__fermer { order: 2; }
  .ligne-etat > .ligne-etat__action { order: 3; margin: calc(var(--e-2) * -1) 0 0 var(--e-6); }
}

/* Ligne d’impayé : fixe dans la barre de contexte (managers seulement) */
.ligne-impaye {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--e-2) var(--e-3);
  padding: var(--e-2) var(--e-2) var(--e-2) var(--e-4);
  background: var(--fond-attention);
  box-shadow: inset 0 2px 0 var(--attention);
  color: var(--texte);
  font-size: var(--t-14);
  line-height: var(--l-14);
}
.ligne-impaye > .icone { color: var(--attention); }
.ligne-impaye__texte { flex: 1 1 18rem; min-width: 0; }
.ligne-impaye form { margin: 0; }

/* Toast : PWA seulement, confirmation d’action, au-dessus de la barre basse, jamais fermé seul */
.toast-pwa {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--e-3);
  padding: 0 0 0 var(--e-4);
  min-height: 3rem;
  border-radius: var(--r-8);
  background: var(--texte);
  color: var(--fond);
  font-size: var(--t-14);
  line-height: var(--l-14);
  font-weight: var(--g-moyen);
}
.toast-pwa .bouton { color: var(--fond); background: transparent; }
@media (hover: hover) { .toast-pwa .bouton:hover { background: color-mix(in srgb, var(--fond) 14%, transparent); } }
.toast-pwa .bouton:focus-visible { outline-color: var(--fond); }


/* 13. États vides et d’erreur ----------------------------------------------
   Seuls les états vides et les erreurs sont des phrases : elles disent quoi faire.
   ------------------------------------------------------------------------- */

.vide {
  display: grid;
  justify-items: start;
  gap: var(--e-2);
  padding: var(--e-6) var(--e-4);
  border: var(--trait) dashed var(--contour);
  border-radius: var(--r-8);
  color: var(--texte);
}
.vide__compte {
  display: flex;
  align-items: center;
  gap: var(--e-2);
  font-family: var(--police-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-20);
  line-height: var(--l-20);
  font-weight: var(--g-moyen);
}
.vide__texte { color: var(--texte-2); max-width: 40rem; }
.vide__actions { display: flex; flex-wrap: wrap; gap: var(--e-2); margin-top: var(--e-2); }
.vide__actions .bouton--lien { text-align: start; }   /* lien passé sur deux lignes (320 px) : aligné comme ses voisins */
.vide--verrou { border-style: solid; border-color: var(--contour); background: var(--surface); }
.vide--verrou .vide__compte .icone { color: var(--texte-2); }
.vide--erreur { border: 2px solid var(--danger); background: var(--fond-erreur); }
.vide--erreur .vide__compte .icone { color: var(--danger); }
.vide--erreur .vide__texte { color: var(--texte); }
.vide--compact { padding: var(--e-4); margin: 0 var(--e-4) var(--e-4); }

/* Mise en route : les 3 étapes de l’accueil, à l’infinitif, numérotées en mono */
.mise-en-route { display: grid; gap: var(--e-1); margin: var(--e-2) 0 0; padding: 0; list-style: none; counter-reset: etape; }
.mise-en-route li { display: flex; align-items: center; gap: var(--e-3); min-height: var(--cible); counter-increment: etape; }
.mise-en-route li::before {
  content: counter(etape);
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.75rem;
  height: 1.75rem;
  border: var(--trait) solid var(--contour);
  border-radius: 50%;
  font-family: var(--police-mono);
  font-size: var(--t-14);
  color: var(--texte-2);
}
.mise-en-route .mono { color: var(--texte-2); }


/* 14. Onglets, segments, puces, compteurs, menu ---------------------------- */

/* Onglets de navigation (liens) : <nav class="onglets"><a aria-current="page"> */
.onglets { display: flex; gap: var(--e-1); flex-wrap: wrap; }
.onglets__lien {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  min-height: var(--cible);
  padding: 0 var(--e-3);
  border-radius: var(--r-6);
  color: var(--texte-2);
  font-weight: var(--g-moyen);
  text-decoration: none;
  white-space: nowrap;
}
@media (hover: hover) { .onglets__lien:hover { color: var(--texte); background: var(--surface-2); } }
.onglets__lien[aria-current] { color: var(--texte); font-weight: var(--g-fort); }
.onglets__lien[aria-current]::after {
  content: "";
  position: absolute;
  left: var(--e-3); right: var(--e-3); bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* Segments : « Regrouper : Poste · Équipe · Aucun », « Shift · Absence » (liens GET ou radios) */
.segments { display: inline-flex; align-items: center; gap: var(--e-2); flex-wrap: wrap; }
.segments__label { font-size: var(--t-14); color: var(--texte-2); }
.segments__groupe {
  display: inline-flex;
  padding: 0;
  border: var(--trait) solid var(--contour);
  border-radius: var(--r-6);
  background: var(--surface);
  overflow: hidden;
}
.segments__option {
  display: inline-flex;
  align-items: center;
  min-height: var(--cible);
  min-width: var(--cible);
  justify-content: center;
  padding: 0 var(--e-3);
  color: var(--texte-2);
  font-size: var(--t-14);
  font-weight: var(--g-moyen);
  text-decoration: none;
  white-space: nowrap;
}
@media (hover: hover) { .segments__option:hover { color: var(--texte); background: var(--surface-2); } }
.segments__option[aria-current] { background: var(--selection); color: var(--texte); box-shadow: inset 0 -2px 0 var(--accent); font-weight: var(--g-fort); }
/* Le groupe coupe ce qui dépasse : le focus est tracé à l’intérieur de l’option */
.segments__option:focus-visible { outline-offset: -4px; box-shadow: none; }
/* Segments en radios dans un formulaire (« Ajouter à côté · Remplacer ») :
   <label class="segments__option"><input class="visuellement-cache" type="radio" name="mode">Remplacer</label> */
label.segments__option { cursor: pointer; }
.segments__option:has(> input:checked) { background: var(--selection); color: var(--texte); box-shadow: inset 0 -2px 0 var(--accent); font-weight: var(--g-fort); }
.segments__option:has(> input:focus-visible) { outline: var(--focus-contour); outline-offset: -4px; }

/* Puces de filtre : 44 px, l’état choisi porte une coche */
.puces { display: flex; flex-wrap: wrap; gap: var(--e-2); }
.puce {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  min-height: var(--cible);
  padding: 0 var(--e-4);
  border: var(--trait) solid var(--contour);
  border-radius: var(--r-pilule);
  background: transparent;
  color: var(--texte);
  font-size: var(--t-14);
  font-weight: var(--g-moyen);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}
@media (hover: hover) { .puce:hover { background: var(--surface-2); } }
.puce .mono { color: var(--texte-2); }
.puce[aria-current], .puce[aria-pressed="true"] { background: var(--selection); border-color: var(--accent); }
.puce .icone { display: none; width: 1rem; height: 1rem; }
.puce[aria-current] .icone, .puce[aria-pressed="true"] .icone { display: block; color: var(--accent); }

/* Compteur : bouton ou lien de 96 × 72 px, chiffre mono 32 px + libellé.
   --retard : carte encadrée d’ambre si non nul ; --a-traiter : chiffre ambre (à clôturer, congés, shifts) ; --kiosque : comptoir. */
.compteurs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--e-2); }
@media (min-width: 768px) { .compteurs { display: flex; flex-wrap: wrap; } }
.compteur {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 6rem;
  min-height: 4.5rem;
  padding: var(--e-2) var(--e-3);
  border: var(--trait) solid transparent;
  border-radius: var(--r-8);
  background: var(--surface);
  box-shadow: 0 0 0 var(--trait) var(--bord-panneau);
  color: var(--texte);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
@media (hover: hover) { .compteur:hover { background: var(--surface-2); } }
.compteur[aria-current], .compteur[aria-pressed="true"] { border-color: var(--accent); background: var(--selection); }
.compteur__nb {
  font-family: var(--police-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--t-32);
  line-height: var(--l-32);
  font-weight: var(--g-fort);
  letter-spacing: -0.02em;
}
.compteur__nb small { font-size: var(--t-20); color: var(--texte-2); font-weight: var(--g-moyen); }
.compteur__libelle { font-size: var(--t-14); line-height: var(--l-14); color: var(--texte-2); }
.compteur--retard { border-color: var(--attention); background: var(--fond-attention); }
.compteur:is(.compteur--retard, .compteur--a-traiter) .compteur__nb { color: var(--attention); }
.compteur--evolution .compteur__libelle::after { content: " · évolution"; }
.compteur__filtre { display: none; color: var(--texte-2); }
/* Pile : à partir de 1024 px, une ligne de 72 px par compteur, à côté de la liste qu’ils filtrent */
.compteurs--pile { grid-auto-rows: 1fr; }
@media (min-width: 1024px) {
  .compteurs--pile { display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: minmax(4.5rem, 1fr); gap: var(--e-2); }
  .compteurs--pile .compteur { grid-template-columns: 4.5rem minmax(0, 1fr) auto; align-items: center; column-gap: var(--e-3); padding: 0 var(--e-3); }
  .compteurs--pile .compteur__libelle { font-size: var(--t-15); line-height: var(--l-15); color: var(--texte); }
  .compteurs--pile .compteur__filtre { display: block; }
}
/* Comptoir du kiosque : une rangée de 4 tuiles d’au moins 104 px (2 × 2 sous 400 px, § 19),
   chiffre mono 40 px au-dessus du libellé de 24 px ; chiffres seulement, ni prénom ni poste.
   <nav class="compteurs compteurs--kiosque"><a class="compteur compteur--kiosque compteur--retard">
     <span class="compteur__nb">1</span><span class="compteur__libelle">En retard</span></a>…</nav> */
.compteurs--kiosque { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.25rem), 1fr)); gap: var(--e-3); }   /* 4 en rangée dès 630 px, sinon 2 × 2 */
.compteur--kiosque {
  align-content: start;
  gap: var(--e-1);
  min-width: var(--touche);
  min-height: var(--touche);
  padding: var(--e-3);
  border-color: var(--contour);
  box-shadow: none;
}
.compteur--kiosque.compteur--retard { border-color: var(--attention); }
.compteur--kiosque .compteur__nb { font-size: var(--t-40); line-height: var(--l-40); }
.compteur--kiosque .compteur__libelle { font-size: var(--t-24); line-height: var(--l-24); color: var(--texte); font-weight: var(--g-moyen); overflow-wrap: anywhere; }
.compteur__fleche { display: none; }
/* Comptoir en pile (paysage, dès 1024 px : .compteurs--kiosque.compteurs--pile) : une rangée de 104 px
   par compteur, même écart que le pavé, pour que chaque compteur s’aligne sur une rangée de touches ;
   chiffre dans une colonne de 48 px (2 chiffres), libellé, flèche. Même lecture que la pile de Couverture. */
@media (min-width: 1024px) {
  .compteurs--kiosque.compteurs--pile { grid-template-columns: minmax(0, 1fr); grid-auto-rows: var(--touche); gap: var(--e-3); }
  .compteurs--pile .compteur--kiosque { grid-template-columns: 3rem minmax(0, 1fr) auto; align-items: center; align-content: center; column-gap: var(--e-4); padding: 0 var(--e-5) 0 var(--e-6); }
  .compteurs--pile .compteur--kiosque .compteur__fleche { display: block; width: 2rem; height: 2rem; color: var(--texte-2); }
}

/* Menu déroulant : <details class="menu"><summary class="bouton …">Semaine<svg i-bas/></summary>
   <div class="menu__panneau [menu__panneau--gauche]"><a class="menu__item">…</a><hr class="menu__separe">
   <form class="menu__formulaire">…</form></div></details>
   Sans JavaScript, il s’ouvre et se ferme au clic. Script commun (static/js/console.js,
   une dizaine de lignes, voir la vitrine § 12) : un seul menu ouvert à la fois ; Échap
   ferme et rend le focus au <summary> ; le focus qui sort du menu ou un clic ailleurs ferme. */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu:not(.rail__compte) > summary .icone:last-child { width: 1rem; height: 1rem; transition: transform var(--duree) var(--courbe); }
.menu[open] > summary { background: var(--selection); border-color: var(--accent); }
.menu:not(.rail__compte)[open] > summary .icone:last-child { transform: rotate(180deg); }
.menu:not([open]) > .menu__panneau { display: none; }
.menu__panneau {
  position: absolute;
  z-index: 20;
  top: calc(100% + var(--e-1));
  right: 0;
  display: grid;
  min-width: 16rem;
  max-width: calc(100vw - 2 * var(--gouttiere));
  padding: var(--e-1);
  background: var(--surface);
  border: var(--trait) solid var(--contour);
  border-radius: var(--r-8);
  box-shadow: var(--ombre-flottant);
}
.menu__panneau--gauche { right: auto; left: 0; }
.menu__item {
  display: flex;
  align-items: center;
  gap: var(--e-3);
  width: 100%;
  min-height: var(--cible);
  padding: 0 var(--e-3);
  border: 0;
  border-radius: var(--r-6);
  background: none;
  color: var(--texte);
  font-size: var(--t-14);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
@media (hover: hover) { .menu__item:hover { background: var(--surface-2); } }
.menu__item .icone { color: var(--texte-2); }
.menu__meta { margin-left: auto; padding-left: var(--e-4); color: var(--texte-2); }
.menu__item--danger, .menu__item--danger .icone { color: var(--danger); }
.menu__separe { height: 0; margin: var(--e-1) var(--e-2); border: 0; border-top: var(--trait) solid var(--filet); }
/* Formulaire GET dans un menu (« Affichage ▾ » : Équipe, Tri, Appliquer ; « Aller à une date… ») */
.menu__formulaire { display: grid; gap: var(--e-3); padding: var(--e-2) var(--e-3) var(--e-3); }
.menu__formulaire .boutons { justify-content: flex-end; }


/* 15. Dialogue, feuille, étapes, inspecteur, historique, preuve, méthode --- */

/* Confirmation d’une perte réelle seulement : <dialog class="dialogue"> ouvert par showModal() */
.dialogue {
  width: min(28rem, calc(100% - 2 * var(--gouttiere)));
  padding: 0;
  border: var(--trait) solid var(--contour);
  border-radius: var(--r-8);
  background: var(--surface);
  color: var(--texte);
  box-shadow: var(--ombre-flottant);
}
.dialogue::backdrop { background: rgb(14 16 20 / .6); }
.dialogue__corps { display: grid; gap: var(--e-2); padding: var(--e-5) var(--e-5) var(--e-4); }
.dialogue__titre { font-size: var(--t-20); line-height: var(--l-20); }
.dialogue__texte { color: var(--texte-2); }
.dialogue__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--e-2);
  padding: var(--e-3) var(--e-4) var(--e-4);
}
.dialogue--apercu { position: static; display: block; margin: 0; box-shadow: none; }
/* Choix dans une liste (Console.choisir) : cases à cocher qui défilent, case désactivée grisée avec sa raison */
.dialogue__liste { max-height: min(45vh, 18rem); overflow-y: auto; padding-inline: 2px; }
.dialogue__liste[hidden] { display: none; }
.choix:has(input:disabled) { color: var(--texte-2); cursor: not-allowed; }
.choix__aide { display: block; font-size: var(--t-14); line-height: var(--l-14); color: var(--texte-2); }

/* Feuille : volet latéral (paysage) ou bas d’écran (portrait), <dialog> natif */
.feuille {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--surface);
  color: var(--texte);
  box-shadow: var(--ombre-flottant);
}
.feuille--droite { inset: 0 0 0 auto; width: min(35rem, 100%); height: 100dvh; max-height: none; border-radius: var(--r-8) 0 0 var(--r-8); }
.feuille--bas { inset: auto 0 0 0; width: 100%; max-width: none; border-radius: var(--r-8) var(--r-8) 0 0; }
.feuille::backdrop { background: rgb(14 16 20 / .6); }
.feuille__entete { display: flex; align-items: center; gap: var(--e-3); padding: var(--e-3) var(--e-3) var(--e-3) var(--e-5); }
.feuille__corps { padding: var(--e-4) var(--e-5); overflow: auto; }
.feuille__actions { display: flex; gap: var(--e-2); justify-content: flex-end; padding: var(--e-4) var(--e-5); }
.feuille--apercu { position: static; width: 100%; height: auto; box-shadow: none; border-radius: var(--r-8); }
.feuille:not([open]) { display: none; }   /* le display de .feuille ne doit pas rouvrir un <dialog> fermé */

/* Étapes numérotées : « 1 Code · 2 Photo · 3 Vérifier » ; faite en cobalt (le vert est
   réservé à « Clôturée » et au pointage enregistré) */
.etapes { display: flex; flex-wrap: wrap; gap: var(--e-1) var(--e-4); list-style: none; padding: 0; margin: 0; }
.etapes__item { display: inline-flex; align-items: center; gap: var(--e-2); color: var(--texte-2); font-weight: var(--g-moyen); }
.etapes__num {
  display: inline-grid;
  place-items: center;
  width: 1.75em;
  height: 1.75em;
  border: var(--trait) solid var(--contour);
  border-radius: 50%;
  font-family: var(--police-mono);
  font-size: .875em;
}
.etapes__item[aria-current="step"] { color: var(--texte); font-weight: var(--g-fort); }
.etapes__item[aria-current="step"] .etapes__num { background: var(--accent); border-color: var(--accent); color: var(--sur-accent); }
.etapes__item.est-faite { color: var(--texte); }
.etapes__item.est-faite .etapes__num { border-color: var(--accent); color: var(--accent); }

/* Inspecteur : détail et actions de la sélection, sans quitter l’écran (placement : § 17).
   En-tête : type (14), titre (20), rappel facultatif en mono (« Thomas Petit · 29h30 / 24h00 · +5h30 »). */
.inspecteur {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border-radius: var(--r-8);
  box-shadow: 0 0 0 var(--trait) var(--bord-panneau);
  overflow: hidden;
}
.inspecteur__entete {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0 var(--e-2);
  padding: var(--e-3) var(--e-2) var(--e-3) var(--e-4);
}
.inspecteur__type { grid-column: 1; font-size: var(--t-14); line-height: var(--l-14); color: var(--texte-2); }
.inspecteur__titre { grid-column: 1; font-size: var(--t-20); line-height: var(--l-20); }
.inspecteur__rappel { grid-column: 1; margin-top: 2px; font-family: var(--police-mono); font-variant-numeric: tabular-nums; font-size: var(--t-14); line-height: var(--l-14); font-weight: var(--g-moyen); color: var(--texte-2); }
.inspecteur__fermer { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
.inspecteur__corps {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--e-4) var(--e-4);
  display: grid;
  gap: var(--e-5);
  align-content: start;
  /* ombre de bord tant que le corps défile (couverture « local » qui la masque en fin de contenu) */
  background:
    linear-gradient(transparent, var(--surface) 70%) center bottom / 100% 2.5rem no-repeat local,
    linear-gradient(to top, var(--ombre-couleur), transparent) center bottom / 100% .75rem no-repeat scroll,
    var(--surface);
}
.inspecteur__section { display: grid; gap: var(--e-2); }
.inspecteur__section-titre { font-size: var(--t-14); line-height: var(--l-14); font-weight: var(--g-fort); color: var(--texte-2); }
.inspecteur__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--e-2);
  padding: var(--e-3) var(--e-4) var(--e-4);
  background: var(--surface);
}
.inspecteur__actions .a-droite { margin-left: auto; }
.inspecteur__raison { font-size: var(--t-14); line-height: var(--l-14); color: var(--texte-2); flex-basis: 100%; }
/* Retour « ‹ Couverture », « ‹ Planning » : visible seulement quand l’inspecteur est une page */
.inspecteur__retour { display: none; grid-column: 1 / -1; justify-self: start; margin-left: calc(var(--e-2) * -1); }
.inspecteur__corps:focus-visible { outline-offset: -2px; }
/* Corps sans contenu focalisable qui peut défiler (jour, légende) : la vue pose tabindex="0"
   role="region" aria-labelledby sur .inspecteur__corps (règle axe scrollable-region-focusable) */

/* Encarts de l’inspecteur. Constat (shift à valider : ce qui manque, pointages, lien vers Heures) ;
   récapitulatif ou impact, collé au bouton qui valide (copie, semaine type, absence sur une période).
   <section class="constat"><p class="constat__ligne"><svg i-attention/>Départ non pointé · aucun total calculé</p>…</section>
   <section class="recap"><h3 class="inspecteur__section-titre">Récapitulatif</h3><p class="recap__titre">S43 → S44 · 44 shifts</p>
     <ul class="recap__liste" role="list"><li>…</li><li class="recap__note">…</li></ul></section> */
.constat, .recap { display: grid; gap: var(--e-2); justify-items: start; padding: var(--e-3) var(--e-4); border-radius: var(--r-8); }
.constat { border: var(--trait) dashed var(--attention); }
.constat__ligne { display: flex; align-items: center; gap: var(--e-2); color: var(--attention); font-weight: var(--g-fort); }
.recap { border: var(--trait) solid var(--contour); background: var(--surface-2); }
.recap__titre { font-family: var(--police-mono); font-variant-numeric: tabular-nums; font-size: var(--t-15); line-height: var(--l-15); font-weight: var(--g-fort); }
.recap__liste { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; font-size: var(--t-14); line-height: var(--l-14); }
.recap__liste .mono { font-weight: var(--g-moyen); }
.recap__note { color: var(--attention); }
.inspecteur__actions > .recap { flex-basis: 100%; margin-bottom: var(--e-1); max-height: 35vh; overflow-y: auto; }   /* pied collant : le formulaire garde sa place (1366 × 720) */

/* Historique horodaté (tâche, congé, shift) : heure en mono, puis l’événement
   (« Faite à la badgeuse · Léa Martin », « Créé · semaine type « Semaine standard » · Karim Benali ») */
.historique { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--e-1) var(--e-3); font-size: var(--t-14); line-height: var(--l-14); }
.historique li { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; }   /* dates de longueurs différentes (« 12/10/2026 », « 20/10 16:40 ») : textes alignés */
.historique .mono { color: var(--texte-2); white-space: nowrap; }

/* Photo de preuve : emplacement hachuré (role="img"), jamais une image inventée */
.preuve { display: grid; gap: var(--e-1); margin: 0; }
.preuve__image {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--e-1);
  min-height: 7rem;
  padding: var(--e-2);
  border-radius: var(--r-6);
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 8px, var(--surface) 8px 16px);
  box-shadow: inset 0 0 0 var(--trait) var(--filet);
  color: var(--texte-2);
  font-family: var(--police-mono);
  font-size: var(--t-14);
  line-height: var(--l-14);
  text-align: center;
}
.preuve__legende { font-size: var(--t-14); line-height: var(--l-14); color: var(--texte-2); }

/* Méthode d’un calcul : <details class="methode"> dont le résumé est un bouton-lien de 44 px ;
   ouvert, il prend toute la largeur et déplie une fiche */
.methode { flex: none; }
.methode > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--e-2);
  min-height: var(--cible);
  padding: 0 var(--e-3);
  border-radius: var(--r-6);
  color: var(--accent);
  font-weight: var(--g-moyen);
  cursor: pointer;
  list-style: none;
}
.methode > summary::-webkit-details-marker { display: none; }
@media (hover: hover) { .methode > summary:hover { background: var(--surface-2); } }
.methode > summary .icone { transition: transform var(--duree) var(--courbe); }
.methode[open] { flex-basis: 100%; }
.methode[open] > summary .icone { transform: rotate(180deg); }
.methode__fiche { max-width: 56rem; padding: 0 0 var(--e-3); }
.methode:not([open]) > .methode__fiche { display: none; }
.methode__fiche .fiche__ligne { grid-template-columns: 7rem minmax(0, 1fr); }


/* Navigation partagée -------------------------------------------------------
   Extrait du § 17 : le composant .rail sert au rail de l’ordinateur (app/_rail.html,
   placé par app.css) et à la barre basse (mobile/_barre_basse.html), partagée par
   app/base.html et la coquille PWA, qui ne charge pas app.css.
   ------------------------------------------------------------------------- */

/* Rail (barre basse sur téléphone) : libellés sur deux lignes au besoin, jamais de débordement
   (texte agrandi à 200 %) */
.rail {
  order: 2;
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: var(--surface);
  padding-bottom: env(safe-area-inset-bottom);
}
.rail__marque { display: none; }
.rail__liste {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rail__entree { flex: 1 1 auto; min-width: var(--cible); }   /* largeur du libellé d’abord : « Couverture » ne se coupe pas ; 44 px au moins */
.rail__entree--secondaire { display: none; }
.rail__lien {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: var(--barre-basse);
  padding: var(--e-1) 2px;
  color: var(--texte-2);
  font-size: var(--t-14);
  line-height: 1rem;
  font-weight: var(--g-moyen);
  letter-spacing: -0.01em;
  text-decoration: none;
  text-align: center;
}
@media (hover: hover) { .rail__lien:hover { color: var(--texte); background: var(--surface-2); } }
.rail__lien[aria-current] { color: var(--accent); font-weight: var(--g-fort); }
.rail__lien[aria-current]::before {
  content: "";
  position: absolute;
  top: 0;
  left: 25%;
  right: 25%;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: var(--accent);
}
.rail__icone { position: relative; display: block; }
.rail__icone .compte { position: absolute; top: -6px; left: calc(100% - 4px); }
.rail .compte { background: var(--signal); color: var(--sur-signal); box-shadow: 0 0 0 1.5px var(--attention); }
.rail__libelle { display: block; max-width: 100%; overflow-wrap: break-word; }   /* coupe un mot seulement s’il dépasse seul l’entrée */
/* Fonction réservée à une offre (Gratuit) : pastille texte « Pro » sous le libellé, nom accessible
   « Tâches, offre Pro ou Premium » */
.rail__offre { display: block; margin-top: 2px; font-size: var(--t-14); line-height: 1rem; font-weight: var(--g-fort); color: var(--accent); }

/* Barre basse au texte agrandi, sans couper un mot : 3 + 2 entrées sous 19 rem de large, puis 2 colonnes (5ᵉ entrée
   sur toute la largeur) sous 15 rem, où trois libellés de 4,6 rem (« Couverture », « Challenges » en 600) ne tiennent plus */
.pwa > .rail, .app > .rail--tel { container: barre / inline-size; }
@container barre (max-width: 19rem) { .rail__liste { flex-wrap: wrap; } .rail__entree { flex: 1 1 30%; } }
@container barre (max-width: 15rem) { .rail__entree { flex-basis: 40%; } }

/* Titre d’un panneau de menu (menu Compte : identifiant du compte) */
.menu__titre {
  padding: var(--e-2) var(--e-3) var(--e-1);
  font-size: var(--t-14);
  line-height: var(--l-14);
  font-weight: var(--g-fort);
  color: var(--texte-2);
  overflow-wrap: anywhere;
}

/* Messages Django (components/_messages.html, toutes les coquilles) : pile de lignes d’état
   encadrées en tête du contenu, fermées à la main, jamais seules. L’attention (warning) a son
   icône en ambre ; erreur et info gardent les variantes du § 12. */
.messages { display: grid; gap: var(--e-2); margin-bottom: var(--e-4); }
.messages > .ligne-etat--encadree { margin-bottom: 0; }
.ligne-etat--attention > .icone { color: var(--attention); }

/* Ligne d’impayé, fonctions payantes déjà suspendues (bandeau billing_alert_banner.html) : rouge */
.ligne-impaye--suspendue { background: var(--fond-erreur); box-shadow: inset 0 2px 0 var(--danger); }
.ligne-impaye--suspendue > .icone { color: var(--danger); }

/* « Changer mon mot de passe » (bureau et application, authenticate/_formulaire_mot_de_passe.html) : un panneau
   étroit ; l'aide de Django (liste des règles du mot de passe) garde ses puces */
.mot-de-passe { max-width: 32rem; }
.mot-de-passe > .panneau__corps { display: grid; gap: var(--e-4); padding-top: var(--e-4); }
.mot-de-passe__intro { font-size: var(--t-14); line-height: var(--l-14); color: var(--texte-2); }
.mot-de-passe .champ__aide ul { margin: 0; padding-left: 1.25rem; }

/* « Signaler un problème » (support/_champs_signaler.html) : volet du bureau (<dialog class="feuille feuille--droite
   signaler-volet">, formulaire en deux rangées : champs qui défilent, actions en bas) et page du téléphone
   (.signaler, mobile/signaler.html). La page d'origine, longue, passe à la ligne n'importe où. */
.signaler-volet__formulaire { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; }
.signaler-volet__titre { font-size: var(--t-20); line-height: var(--l-20); }
.signaler-volet__fermer { margin-left: auto; }
.signaler-volet .feuille__corps { align-content: start; }
.signaler { max-width: 40rem; }
.signaler > .panneau__corps { padding-top: var(--e-4); }
.signaler__fichier { min-height: var(--cible); padding: var(--e-2) var(--e-3); }
.signaler__fichier::file-selector-button {
  margin-right: var(--e-3);
  padding: var(--e-1) var(--e-3);
  border: var(--trait) solid var(--contour);
  border-radius: var(--r-6);
  background: var(--surface);
  color: var(--texte);
  font: inherit;
  cursor: pointer;
}
.signaler__joint { font-size: var(--t-14); line-height: var(--l-14); color: var(--texte-2); }
.signaler__page { overflow-wrap: anywhere; color: var(--texte); }
.signaler__merci { display: grid; gap: var(--e-4); justify-items: start; }
