/* ==========================================================================
   Repère, appels de vigilance de la commune
   Jetons et composants nommés. Fichier unique, importé par tous les écrans,
   par les gabarits imprimables et par le site de présentation.
   Le prototype en contient une copie intégrale, recopiée telle quelle.

   Aucune bibliothèque, aucune police distante, aucune image distante.
   Thème clair uniquement.
   Conçu avec Local Booster, localbooster.site
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Jetons
   -------------------------------------------------------------------------- */

:root {

  /* --- Fonds ------------------------------------------------------------ */
  --fond-page:        #F4F4F2;  /* le bureau, gris papier très clair */
  --fond-carte:       #FFFFFF;
  --fond-doux:        #EDEDEA;  /* en-têtes de tableau, zones inactives */
  --fond-inactif:     #E4E4E0;
  --fond-redige:      #F4F1F8;  /* fond des blocs rédigés par le modèle */

  /* --- Encre ------------------------------------------------------------ */
  --encre:            #17171A;  /* texte courant, contraste 16,9 sur blanc */
  --encre-douce:      #45464C;  /* texte secondaire, contraste 9,1 */
  --encre-faible:     #63656C;  /* mentions, contraste 5,9 */
  --encre-inverse:    #FFFFFF;

  /* --- Traits ----------------------------------------------------------- */
  --trait:            #D6D6D1;
  --trait-fort:       #A9A9A3;
  --trait-encre:      #17171A;

  /* --- Accent : prune ---------------------------------------------------
     Ni le vert cyan de Local Booster, ni le bleu institutionnel de l'État,
     ni aucune des quatre couleurs de la vigilance.
     Contraste 8,3 sur blanc, donc utilisable en texte comme en aplat.     */
  --accent:           #5A4479;
  --accent-fonce:     #3E2E56;  /* survol, impression, texte sur voile */
  --accent-clair:     #DCD4E8;  /* bordures, filets */
  --accent-voile:     #F2EFF7;  /* fonds de bloc */

  /* --- Vigilance : propriété de Météo-France ----------------------------
     Ces quatre couleurs n'affichent QUE le niveau de vigilance en cours.
     Elles ne servent à rien d'autre dans l'outil.
     Elles ne portent jamais de texte : elles remplissent une pastille et un
     filet, le mot est toujours écrit en encre foncée sur fond clair.
     Valeurs approchées, voir 08-questions-ouvertes.md.                    */
  --vigilance-vert:   #2E9B4F;
  --vigilance-jaune:  #F2C500;
  --vigilance-orange: #EE8100;
  --vigilance-rouge:  #D3122A;

  /* --- États d'appel : couleurs propres, jamais celles de la vigilance ---
     Chaque état porte aussi un mot et une icône : aucun sens ne repose sur
     la seule couleur.                                                     */
  --etat-bien:            #1E4F73;  /* bleu ardoise,  contraste 8,7 */
  --etat-bien-voile:      #E8F0F6;
  --etat-aide:            #8C2A5B;  /* framboise,     contraste 8,1 */
  --etat-aide-voile:      #F9EBF2;
  --etat-muet:            #33383F;  /* n'a pas répondu, anthracite */
  --etat-muet-voile:      #E7E8EA;
  --etat-preciser:        #575F6B;  /* gris bleuté */
  --etat-preciser-voile:  #ECEEF1;
  --etat-attente:         #4A5260;  /* à appeler */
  --etat-oppose:          #63656C;

  /* --- Typographie ------------------------------------------------------
     Polices du système, aucune police distante.                          */
  --police: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --police-document: Georgia, "Iowan Old Style", "Times New Roman", Times, serif;

  --texte-xs:   0.8125rem;  /* 13 px, mentions et signature */
  --texte-s:    0.9375rem;  /* 15 px, tableaux denses */
  --texte-m:    1.0625rem;  /* 17 px, texte courant */
  --texte-l:    1.25rem;
  --texte-xl:   1.5rem;
  --titre-s:    1.375rem;
  --titre-m:    1.75rem;
  --titre-l:    2.25rem;

  --graisse-normale: 400;
  --graisse-appuyee: 600;
  --graisse-forte:   700;

  --interligne-serre: 1.25;
  --interligne:       1.55;
  --interligne-lu:    1.65;  /* blocs de lecture longue */

  /* --- Échelle de chiffres ----------------------------------------------
     Trois tailles seulement, toutes en chiffres de largeur fixe pour que
     les colonnes s'alignent et que les comptes se comparent d'un coup.   */
  --chiffre-heros:   4.5rem;   /* les trois chiffres de l'accueil */
  --chiffre-fort:    1.875rem; /* compteurs de section */
  --chiffre-courant: 1.0625rem;/* dans les listes et les tableaux */

  /* --- Espacements ------------------------------------------------------ */
  --e1: 4px;
  --e2: 8px;
  --e3: 12px;
  --e4: 16px;
  --e5: 24px;
  --e6: 32px;
  --e7: 48px;
  --e8: 64px;

  /* --- Rayons ----------------------------------------------------------- */
  --r-s: 4px;
  --r-m: 8px;
  --r-l: 14px;
  --r-plein: 999px;

  /* --- Ombres, très peu ------------------------------------------------- */
  --ombre-douce: 0 1px 2px rgba(23, 23, 26, 0.07),
                 0 2px 8px rgba(23, 23, 26, 0.05);

  /* --- Cibles tactiles --------------------------------------------------- */
  --cible: 44px;            /* minimum partout */
  --cible-dehors: 56px;     /* tournée et passages, téléphone, une main */

  /* --- Largeurs ---------------------------------------------------------- */
  --rail: 232px;
  --colonne: 1120px;
  --lecture: 68ch;
}

/* --------------------------------------------------------------------------
   2. Assises
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fond-page);
  color: var(--encre);
  font-family: var(--police);
  font-size: var(--texte-m);
  line-height: var(--interligne);
}

h1, h2, h3, h4 { margin: 0 0 var(--e3); line-height: var(--interligne-serre); }
h1 { font-size: var(--titre-l); font-weight: var(--graisse-forte); letter-spacing: -0.015em; }
h2 { font-size: var(--titre-m); font-weight: var(--graisse-forte); letter-spacing: -0.01em; }
h3 { font-size: var(--titre-s); font-weight: var(--graisse-appuyee); }
h4 { font-size: var(--texte-l); font-weight: var(--graisse-appuyee); }
p  { margin: 0 0 var(--e4); }
ul, ol { margin: 0 0 var(--e4); padding-left: var(--e5); }
li { margin-bottom: var(--e2); }

a { color: var(--accent-fonce); text-underline-offset: 3px; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-s);
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden;
      clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* --------------------------------------------------------------------------
   3. Charpente : rail de navigation, colonne, carte
   -------------------------------------------------------------------------- */

.appli { display: flex; min-height: 100vh; align-items: stretch; }

.rail {
  width: var(--rail);
  flex: 0 0 var(--rail);
  background: var(--fond-carte);
  border-right: 1px solid var(--trait);
  padding: var(--e5) var(--e3);
  display: flex;
  flex-direction: column;
  gap: var(--e2);
}
.rail__marque {
  font-size: var(--texte-l);
  font-weight: var(--graisse-forte);
  letter-spacing: -0.01em;
  padding: 0 var(--e3) var(--e2);
}
.rail__sous-marque {
  font-size: var(--texte-xs);
  color: var(--encre-faible);
  padding: 0 var(--e3) var(--e4);
  line-height: 1.35;
}
.rail__lien {
  display: flex;
  align-items: center;
  gap: var(--e3);
  min-height: var(--cible);
  padding: var(--e2) var(--e3);
  border: 0;
  border-radius: var(--r-m);
  background: transparent;
  color: var(--encre-douce);
  font: inherit;
  font-size: var(--texte-s);
  text-align: left;
  width: 100%;
  cursor: pointer;
}
.rail__lien:hover { background: var(--fond-doux); color: var(--encre); }
.rail__lien[aria-current="page"] {
  background: var(--accent-voile);
  color: var(--accent-fonce);
  font-weight: var(--graisse-appuyee);
  box-shadow: inset 3px 0 0 var(--accent);
}
.rail__numero {
  font-variant-numeric: tabular-nums;
  color: var(--encre-faible);
  font-size: var(--texte-xs);
  width: 1.2em;
}

.colonne {
  flex: 1 1 auto;
  min-width: 0;
  padding: var(--e6) var(--e6) var(--e5);
  max-width: calc(var(--colonne) + var(--e6) * 2);
  display: flex;
  flex-direction: column;
}
.colonne__corps { flex: 1 1 auto; }

.entete { margin-bottom: var(--e5); }
.entete__sur-titre {
  font-size: var(--texte-xs);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--encre-faible);
  font-weight: var(--graisse-appuyee);
  margin-bottom: var(--e2);
}
.entete__phrase { color: var(--encre-douce); max-width: var(--lecture); margin: 0; }

.carte {
  background: var(--fond-carte);
  border: 1px solid var(--trait);
  border-radius: var(--r-l);
  padding: var(--e5);
  margin-bottom: var(--e5);
}
.carte--serree { padding: var(--e4); }
.carte--nue { padding: 0; overflow: hidden; }
.carte__titre {
  font-size: var(--titre-s);
  font-weight: var(--graisse-appuyee);
  margin: 0 0 var(--e2);
}
.carte__note { color: var(--encre-faible); font-size: var(--texte-s); margin: 0; }

.grille-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--e5); }
.grille-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--e4); }
@media (max-width: 900px) {
  .grille-2, .grille-3 { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   4. Boutons
   -------------------------------------------------------------------------- */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--e2);
  min-height: var(--cible);
  padding: var(--e2) var(--e5);
  border-radius: var(--r-m);
  border: 1.5px solid var(--trait-fort);
  background: var(--fond-carte);
  color: var(--encre);
  font: inherit;
  font-weight: var(--graisse-appuyee);
  cursor: pointer;
  text-decoration: none;
}
.bouton:hover { background: var(--fond-doux); }
.bouton--principal {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--encre-inverse);
}
.bouton--principal:hover { background: var(--accent-fonce); border-color: var(--accent-fonce); }
.bouton--grand { min-height: 56px; font-size: var(--texte-l); padding: var(--e3) var(--e6); }
.bouton--discret {
  border-color: transparent;
  background: transparent;
  color: var(--accent-fonce);
  text-decoration: underline;
  padding-left: var(--e3);
  padding-right: var(--e3);
}
.bouton[disabled], .bouton[aria-disabled="true"] {
  background: var(--fond-inactif);
  border-color: var(--trait);
  color: var(--encre-faible);
  cursor: not-allowed;
}
.barre-boutons { display: flex; flex-wrap: wrap; gap: var(--e3); align-items: center; }

/* --------------------------------------------------------------------------
   5. Composant : bandeau de vigilance
   Le seul endroit de l'outil où les quatre couleurs de Météo-France servent.
   La couleur remplit une pastille et un filet, jamais un fond de texte.
   -------------------------------------------------------------------------- */

.bandeau-vigilance {
  display: flex;
  align-items: center;
  gap: var(--e4);
  background: var(--fond-carte);
  border: 1px solid var(--trait);
  border-left: 10px solid var(--trait-fort);
  border-radius: var(--r-l);
  padding: var(--e4) var(--e5);
  margin-bottom: var(--e5);
}
.bandeau-vigilance__pastille {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  border-radius: var(--r-s);
  background: var(--fond-inactif);
  border: 1px solid rgba(23, 23, 26, 0.25);
}
.bandeau-vigilance__mot {
  font-size: var(--titre-s);
  font-weight: var(--graisse-forte);
  line-height: 1.2;
}
.bandeau-vigilance__jour { color: var(--encre-douce); font-size: var(--texte-s); }
.bandeau-vigilance__source {
  margin-left: auto;
  text-align: right;
  color: var(--encre-faible);
  font-size: var(--texte-xs);
  max-width: 34ch;
  line-height: 1.4;
}
.bandeau-vigilance--vert   { border-left-color: var(--vigilance-vert); }
.bandeau-vigilance--vert   .bandeau-vigilance__pastille { background: var(--vigilance-vert); }
.bandeau-vigilance--jaune  { border-left-color: var(--vigilance-jaune); }
.bandeau-vigilance--jaune  .bandeau-vigilance__pastille { background: var(--vigilance-jaune); }
.bandeau-vigilance--orange { border-left-color: var(--vigilance-orange); }
.bandeau-vigilance--orange .bandeau-vigilance__pastille { background: var(--vigilance-orange); }
.bandeau-vigilance--rouge  { border-left-color: var(--vigilance-rouge); }
.bandeau-vigilance--rouge  .bandeau-vigilance__pastille { background: var(--vigilance-rouge); }
.bandeau-vigilance--inconnu { border-left-style: dashed; }
.bandeau-vigilance--inconnu .bandeau-vigilance__pastille {
  background: repeating-linear-gradient(45deg,
    var(--fond-inactif) 0 6px, var(--fond-doux) 6px 12px);
}

/* --------------------------------------------------------------------------
   6. Composant : chiffre héros
   Trois par écran d'accueil au maximum. La phrase se lit avant le chiffre.
   -------------------------------------------------------------------------- */

.chiffre-heros {
  background: var(--fond-carte);
  border: 1px solid var(--trait);
  border-radius: var(--r-l);
  padding: var(--e5);
  display: flex;
  flex-direction: column;
  gap: var(--e1);
}
.chiffre-heros__phrase {
  font-size: var(--texte-m);
  font-weight: var(--graisse-appuyee);
  color: var(--encre-douce);
  order: 1;
}
.chiffre-heros__nombre {
  order: 2;
  font-size: var(--chiffre-heros);
  font-weight: var(--graisse-forte);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--encre);
}
.chiffre-heros__precision {
  order: 3;
  font-size: var(--texte-s);
  color: var(--encre-faible);
}
.chiffre-heros--attention { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.chiffre-heros--attention .chiffre-heros__nombre { color: var(--accent-fonce); }
.chiffre-heros--vide .chiffre-heros__nombre { color: var(--encre-faible); }

/* --------------------------------------------------------------------------
   7. Composant : étiquette d'état de rédaction
   Le mot « validé » n'apparaît qu'après une action humaine.
   -------------------------------------------------------------------------- */

.etiquette {
  display: inline-flex;
  align-items: center;
  gap: var(--e2);
  padding: var(--e1) var(--e3);
  border-radius: var(--r-plein);
  font-size: var(--texte-xs);
  font-weight: var(--graisse-appuyee);
  border: 1.5px solid var(--trait-fort);
  background: var(--fond-carte);
  color: var(--encre-douce);
  white-space: nowrap;
}
.etiquette__point {
  width: 8px; height: 8px; border-radius: var(--r-plein);
  background: currentColor; flex: 0 0 8px;
}
.etiquette--preparation { border-style: dashed; color: var(--encre-faible); }
.etiquette--relire   { border-color: var(--accent); color: var(--accent-fonce); background: var(--accent-voile); }
.etiquette--valide   { border-color: var(--etat-bien); background: var(--etat-bien); color: var(--encre-inverse); }
.etiquette--service  { border-color: var(--etat-bien); color: var(--etat-bien); background: var(--etat-bien-voile); }
.etiquette--echec    { border-color: var(--etat-muet); color: var(--etat-muet); background: var(--etat-muet-voile); }
.etiquette--vide     { border-style: dashed; color: var(--encre-faible); background: var(--fond-doux); }

/* --------------------------------------------------------------------------
   8. Composant : bloc « à relire »
   C'est ici, et seulement ici, que vit ce que le modèle a écrit.
   Fond teinté, filet d'accent à gauche : la frontière se voit à un mètre.
   -------------------------------------------------------------------------- */

.bloc-relire {
  background: var(--fond-redige);
  border: 1px solid var(--accent-clair);
  border-left: 5px solid var(--accent);
  border-radius: var(--r-m);
  padding: var(--e4) var(--e5);
  margin-bottom: var(--e4);
}
.bloc-relire__entete {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--e3);
  margin-bottom: var(--e3);
}
.bloc-relire__origine {
  font-size: var(--texte-xs);
  font-weight: var(--graisse-appuyee);
  color: var(--accent-fonce);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.bloc-relire__texte {
  font-size: var(--texte-m);
  line-height: var(--interligne-lu);
  max-width: var(--lecture);
  white-space: pre-wrap;
}
.bloc-relire__texte p:last-child { margin-bottom: 0; }
.bloc-relire--attente .bloc-relire__texte { color: var(--encre-faible); }
.bloc-relire--echec {
  border-left-color: var(--etat-muet);
  border-color: var(--trait-fort);
  background: var(--etat-muet-voile);
}

/* Apparition progressive du texte rédigé, sans écran figé.
   Simulation seule : le moteur réel remplacera le contenu du bloc.        */
.bloc-relire__texte[data-etat="ecrit"] { animation: apparait 320ms ease-out; }
@keyframes apparait { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .bloc-relire__texte[data-etat="ecrit"] { animation: none; }
  .attente-barre::after { animation: none; }
}

/* Attente honnête : une barre qui avance, jamais un écran gelé. */
.attente { display: flex; align-items: center; gap: var(--e3); color: var(--encre-douce); }
.attente-barre {
  position: relative; flex: 1 1 auto; height: 6px;
  background: var(--accent-clair); border-radius: var(--r-plein); overflow: hidden;
}
.attente-barre::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 40%;
  background: var(--accent); border-radius: var(--r-plein);
  animation: glisse 1.1s ease-in-out infinite;
}
@keyframes glisse { 0% { left: -40%; } 100% { left: 100%; } }

/* Ligne de confiance : ce qui est parti, ce qui n'est pas parti. */
.mention-confiance {
  display: flex;
  gap: var(--e2);
  align-items: flex-start;
  font-size: var(--texte-xs);
  color: var(--encre-faible);
  line-height: 1.45;
  margin-top: var(--e3);
  padding-top: var(--e3);
  border-top: 1px dotted var(--trait-fort);
}
.mention-confiance strong { color: var(--encre-douce); font-weight: var(--graisse-appuyee); }

/* --------------------------------------------------------------------------
   9. Composant : badge d'état proposé, badge d'état confirmé
   Creux contre plein. La différence se voit à un mètre.
   -------------------------------------------------------------------------- */

.badge-etat {
  display: inline-flex;
  align-items: center;
  gap: var(--e2);
  min-height: 34px;
  padding: var(--e1) var(--e3);
  border-radius: var(--r-m);
  font-size: var(--texte-s);
  font-weight: var(--graisse-appuyee);
  line-height: 1.2;
  white-space: nowrap;
}
.badge-etat .ico { width: 20px; height: 20px; flex: 0 0 20px; }

/* proposé : creux, filet interrompu, mention « à confirmer » */
.badge-etat--propose {
  background: var(--fond-carte);
  border: 2px dashed currentColor;
  color: var(--encre-douce);
}
.badge-etat--propose::after {
  content: "à confirmer";
  font-size: var(--texte-xs);
  font-weight: var(--graisse-normale);
  font-style: italic;
  opacity: 0.85;
}

/* confirmé : plein, encre inversée, filet continu */
.badge-etat--confirme {
  background: var(--etat-attente);
  border: 2px solid transparent;
  color: var(--encre-inverse);
}
.badge-etat--confirme.est-bien     { background: var(--etat-bien); }
.badge-etat--confirme.est-aide     { background: var(--etat-aide); }
.badge-etat--confirme.est-muet     { background: var(--etat-muet); }
.badge-etat--confirme.est-preciser { background: var(--etat-preciser); }
.badge-etat--propose.est-bien      { color: var(--etat-bien); }
.badge-etat--propose.est-aide      { color: var(--etat-aide); }
.badge-etat--propose.est-preciser  { color: var(--etat-preciser); }

/* fait établi, ni proposé ni confirmé : il vient du calcul */
.badge-etat--fait {
  background: var(--etat-muet-voile);
  border: 2px solid var(--etat-muet);
  color: var(--etat-muet);
}
.badge-etat--attente {
  background: var(--fond-carte);
  border: 2px solid var(--trait-fort);
  color: var(--etat-attente);
}

/* Valeur qui vient du fait ou du calcul : chiffres tabulaires, pas de fond. */
.valeur-etablie {
  font-variant-numeric: tabular-nums;
  font-weight: var(--graisse-appuyee);
  color: var(--encre);
}
.valeur-etablie--douce { font-weight: var(--graisse-normale); color: var(--encre-douce); }

/* --------------------------------------------------------------------------
   10. Composant : ligne de registre
   -------------------------------------------------------------------------- */

.tableau { width: 100%; border-collapse: collapse; font-size: var(--texte-s); }
.tableau caption { text-align: left; padding: var(--e4) var(--e5); font-weight: var(--graisse-appuyee); }
.tableau th {
  text-align: left;
  font-size: var(--texte-xs);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--encre-douce);
  background: var(--fond-doux);
  padding: var(--e3) var(--e4);
  border-bottom: 1px solid var(--trait);
  white-space: nowrap;
}
.tableau td { padding: var(--e3) var(--e4); border-bottom: 1px solid var(--trait); vertical-align: top; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau .nombre { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

.ligne-registre { background: var(--fond-carte); }
.ligne-registre:hover { background: var(--accent-voile); }
.ligne-registre__nom { font-weight: var(--graisse-appuyee); color: var(--encre); }
.ligne-registre__origine { color: var(--encre-faible); font-size: var(--texte-xs); }
.ligne-registre--oppose { background: var(--fond-doux); color: var(--encre-faible); }
.ligne-registre--oppose .ligne-registre__nom { text-decoration: line-through; font-weight: var(--graisse-normale); }
.ligne-registre--incomplete { box-shadow: inset 4px 0 0 var(--accent); }

/* Proposition de rapprochement issue du fichier annuel : elle attend un geste. */
.ligne-rapprochee { background: var(--fond-redige); }
.ligne-rapprochee__classe {
  font-weight: var(--graisse-appuyee);
  color: var(--accent-fonce);
  display: block;
}
.ligne-rapprochee__motif {
  color: var(--encre-douce);
  font-size: var(--texte-xs);
  line-height: 1.45;
  display: block;
  margin-top: var(--e1);
}
.ligne-rapprochee__gestes { display: flex; gap: var(--e2); }
.ligne-rapprochee__gestes .bouton { min-height: 36px; padding: var(--e1) var(--e3); font-size: var(--texte-xs); }

/* --------------------------------------------------------------------------
   11. Composant : ligne de tournée
   Dessinée d'abord pour un téléphone tenu d'une main, dehors, au soleil.
   La mise en page d'ordinateur est un enrichissement, pas l'inverse.
   -------------------------------------------------------------------------- */

.liste-tournee { list-style: none; margin: 0; padding: 0; }

.ligne-tournee {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--e2) var(--e3);
  align-items: start;
  background: var(--fond-carte);
  border: 1px solid var(--trait);
  border-left: 8px solid var(--trait-fort);
  border-radius: var(--r-m);
  padding: var(--e4);
  margin-bottom: var(--e3);
  min-height: var(--cible-dehors);
}
.ligne-tournee__nom {
  font-size: var(--texte-l);
  font-weight: var(--graisse-forte);
  line-height: 1.25;
}
.ligne-tournee__faits {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--e1) var(--e4);
  font-size: var(--texte-s);
  color: var(--encre-douce);
  font-variant-numeric: tabular-nums;
}
.ligne-tournee__resume { grid-column: 1 / -1; }
.ligne-tournee__gestes { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--e2); }
.ligne-tournee__gestes .bouton { min-height: var(--cible-dehors); flex: 1 1 auto; }

.ligne-tournee--bien     { border-left-color: var(--etat-bien); }
.ligne-tournee--aide     { border-left-color: var(--etat-aide); background: var(--etat-aide-voile); }
.ligne-tournee--muet     { border-left-color: var(--etat-muet); }
.ligne-tournee--muet::before {
  content: ""; position: absolute; inset: 0 auto 0 -8px; width: 8px;
  background: repeating-linear-gradient(135deg,
    var(--etat-muet) 0 3px, var(--fond-carte) 3px 6px);
}
.ligne-tournee--preciser { border-left-color: var(--etat-preciser); border-left-style: dotted; }
.ligne-tournee--attente  { border-left-color: var(--trait-fort); }
.ligne-tournee--encours  { border-left-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.ligne-tournee--oppose   { background: var(--fond-doux); border-left-style: double; border-left-color: var(--etat-oppose); }
.ligne-tournee--oppose .ligne-tournee__nom { text-decoration: line-through; font-weight: var(--graisse-appuyee); color: var(--encre-faible); }

@media (min-width: 761px) {
  body:not(.vue-telephone) .ligne-tournee {
    grid-template-columns: 15rem 12rem 1fr auto;
    align-items: center;
    padding: var(--e3) var(--e4);
    min-height: var(--cible);
  }
  body:not(.vue-telephone) .ligne-tournee__nom { font-size: var(--texte-m); }
  body:not(.vue-telephone) .ligne-tournee__faits { grid-column: auto; flex-direction: column; gap: 0; font-size: var(--texte-xs); }
  body:not(.vue-telephone) .ligne-tournee__resume { grid-column: auto; font-size: var(--texte-s); }
  body:not(.vue-telephone) .ligne-tournee__gestes { grid-column: auto; }
  body:not(.vue-telephone) .ligne-tournee__gestes .bouton { min-height: var(--cible); flex: 0 0 auto; }
}

/* --------------------------------------------------------------------------
   12. Composant : carte de passage
   Écran de téléphone, dehors, une main. Tout est gros, rien n'est décoratif.
   -------------------------------------------------------------------------- */

.carte-passage {
  background: var(--fond-carte);
  border: 2px solid var(--encre);
  border-radius: var(--r-m);
  padding: var(--e4);
  margin-bottom: var(--e4);
}
.carte-passage__nom {
  font-size: var(--titre-s);
  font-weight: var(--graisse-forte);
  line-height: 1.2;
  margin-bottom: var(--e1);
}
.carte-passage__adresse {
  font-size: var(--texte-l);
  font-weight: var(--graisse-appuyee);
  color: var(--encre);
  margin-bottom: var(--e3);
}
.carte-passage__raison {
  font-size: var(--texte-m);
  color: var(--encre-douce);
  margin-bottom: var(--e3);
}
.carte-passage__porteur {
  display: flex; align-items: center; gap: var(--e2);
  font-size: var(--texte-s);
  padding: var(--e2) var(--e3);
  background: var(--fond-doux);
  border-radius: var(--r-s);
  margin-bottom: var(--e4);
}
.carte-passage__gestes { display: grid; gap: var(--e2); }
.carte-passage__gestes .bouton { min-height: var(--cible-dehors); font-size: var(--texte-m); }
.carte-passage--non-attribue { border-color: var(--accent); border-style: dashed; }
.carte-passage--non-attribue .carte-passage__porteur {
  background: var(--accent-voile);
  color: var(--accent-fonce);
  font-weight: var(--graisse-appuyee);
}
.carte-passage--encours { border-color: var(--accent); }
.carte-passage--fait { border-color: var(--trait); background: var(--fond-doux); }

.bandeau-secours {
  position: sticky; bottom: 0;
  background: var(--encre);
  color: var(--encre-inverse);
  padding: var(--e3) var(--e4);
  font-size: var(--texte-m);
  font-weight: var(--graisse-appuyee);
  text-align: center;
  border-radius: var(--r-m);
  margin-top: var(--e4);
}

/* --------------------------------------------------------------------------
   13. Composant : fiche de personne
   Ce que cette fiche n'affiche pas est un argument de vente.
   -------------------------------------------------------------------------- */

.fiche-personne { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--e5); }
@media (max-width: 900px) { .fiche-personne { grid-template-columns: 1fr; } }

.fiche-personne__identite {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--e3);
  padding-bottom: var(--e3); margin-bottom: var(--e4);
  border-bottom: 2px solid var(--encre);
}
.fiche-personne__nom { font-size: var(--titre-m); font-weight: var(--graisse-forte); }

.champ { display: grid; grid-template-columns: 13rem 1fr; gap: var(--e3);
         padding: var(--e3) 0; border-bottom: 1px solid var(--trait); }
.champ:last-child { border-bottom: 0; }
.champ__intitule { color: var(--encre-douce); font-size: var(--texte-s); }
.champ__valeur { font-weight: var(--graisse-appuyee); }
.champ__valeur--absent { font-weight: var(--graisse-normale); color: var(--encre-faible); font-style: italic; }
@media (max-width: 620px) { .champ { grid-template-columns: 1fr; gap: var(--e1); } }

.avertissement {
  border: 1.5px solid var(--trait-fort);
  border-left: 5px solid var(--encre);
  background: var(--fond-doux);
  border-radius: var(--r-m);
  padding: var(--e3) var(--e4);
  font-size: var(--texte-s);
  color: var(--encre-douce);
  margin-bottom: var(--e4);
}
.avertissement strong { color: var(--encre); }

.journal { list-style: none; margin: 0; padding: 0; }
.journal__ligne {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: var(--e3);
  padding: var(--e3) 0; border-bottom: 1px solid var(--trait);
  font-size: var(--texte-s);
}
.journal__date { color: var(--encre-douce); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   14. Composant : encart de règle, avec sa source et sa date
   -------------------------------------------------------------------------- */

.encart-regle {
  border: 1px solid var(--trait);
  border-radius: var(--r-m);
  padding: var(--e4);
  margin-bottom: var(--e4);
  background: var(--fond-carte);
}
.encart-regle__titre { font-weight: var(--graisse-appuyee); font-size: var(--texte-l); margin-bottom: var(--e2); }
.encart-regle__texte { max-width: var(--lecture); margin-bottom: var(--e3); }
.encart-regle__source {
  font-size: var(--texte-xs);
  color: var(--encre-faible);
  word-break: break-word;
  line-height: 1.45;
}
.encart-regle--a-confirmer { border-style: dashed; border-color: var(--accent); background: var(--accent-voile); }
.encart-regle--negatif { border-left: 5px solid var(--encre); }

.liste-negative { list-style: none; padding: 0; margin: 0; }
.liste-negative li {
  padding: var(--e3) 0 var(--e3) var(--e6);
  border-bottom: 1px solid var(--trait);
  position: relative;
  max-width: var(--lecture);
}
.liste-negative li::before {
  content: ""; position: absolute; left: var(--e3); top: 1.35em;
  width: 18px; height: 2px; background: var(--encre);
}
.liste-negative li:last-child { border-bottom: 0; }

/* --------------------------------------------------------------------------
   15. Composant : pied de signature
   Toujours au même endroit, toujours de la même taille, partout.
   Le nom et l'adresse du site, rien d'autre.
   -------------------------------------------------------------------------- */

.pied-signature {
  margin-top: var(--e7);
  padding-top: var(--e3);
  border-top: 1px solid var(--trait);
  font-size: var(--texte-xs);
  color: var(--encre-faible);
  letter-spacing: 0.02em;
}

/* --------------------------------------------------------------------------
   16. Icônes d'état, dessinées en trait, jamais seules porteuses de sens
   -------------------------------------------------------------------------- */

.ico { width: 22px; height: 22px; flex: 0 0 22px; display: inline-block; vertical-align: -0.2em; }
.ico--grande { width: 28px; height: 28px; flex-basis: 28px; }

/* --------------------------------------------------------------------------
   17. Bandeau de démonstration
   -------------------------------------------------------------------------- */

.bandeau-demo {
  background: var(--encre);
  color: var(--encre-inverse);
  font-size: var(--texte-xs);
  padding: var(--e2) var(--e4);
  text-align: center;
  letter-spacing: 0.03em;
}

/* --------------------------------------------------------------------------
   18. Vue téléphone forcée, pour les planches d'écran
   -------------------------------------------------------------------------- */

body.vue-telephone { background: var(--fond-page); }
body.vue-telephone .colonne { padding: var(--e4); max-width: 420px; }
body.vue-telephone .rail { display: none; }
body.vue-telephone h1 { font-size: var(--titre-m); }
body.vue-telephone .bandeau-vigilance { flex-wrap: wrap; padding: var(--e3) var(--e4); }
body.vue-telephone .bandeau-vigilance__source { margin-left: 0; text-align: left; max-width: none; }

/* --------------------------------------------------------------------------
   19. Impression, sur les écrans comme sur les gabarits
   -------------------------------------------------------------------------- */

@media print {
  :root {
    --fond-page: #FFFFFF;
    --fond-carte: #FFFFFF;
    --fond-doux: #FFFFFF;
    --fond-redige: #FFFFFF;
    --accent: #3E2E56;
    --encre: #000000;
    --encre-douce: #222222;
    --encre-faible: #444444;
    --trait: #999999;
  }
  body { font-size: 11pt; background: #FFFFFF; }
  .rail, .barre-boutons, .bouton, .bandeau-demo, .attente { display: none !important; }
  .carte, .encart-regle, .bloc-relire, .ligne-tournee, .carte-passage {
    border-color: #999999; box-shadow: none; break-inside: avoid;
  }
  .pied-signature { border-top: 1px solid #999999; }
  a { color: #000000; text-decoration: none; }
}
