/* Quaeroo — jetons de style et composants communs. Design 2026 (decision 0126), direction « M »
   validee par Manu le 2026-10-21 : base douce, palette « accent unique », Geist. */

/* ═══ JETONS ══════════════════════════════════════════════════════════════════════════════════
   LES VALEURS SONT CELLES DE LA MAQUETTE (`M/quaeroo-m.css`, retouchee a la main le 21/10 : en
   CLAIR, accent, focus, barre laterale active, barre courante et bulle valent le petrole #0F3D47 ;
   le SOMBRE reste tel quel). Les NOMS d'avant (decision 0098 : `--primaire`, `--succes`...) sont
   GARDES et pointent sur la nouvelle palette : un ecran qui les lit change sans etre touche.
   Ecarts voulus, pour l'accessibilite, tous deux hors de la maquette (qui ne s'en sert pas) :
   `--texte-faible` (4,5:1 sur toutes les surfaces) et `--bord-champ` (3:1 sur une surface, pour
   reconnaitre un champ de formulaire, WCAG 1.4.11).
   LE MODE SOMBRE : `data-theme="dark"` pose sur la racine (choix « Sombre »), ou le systeme quand
   rien n'est choisi (`data-theme="light"` le bloque : choix « Clair »). Le choix est pose AVANT le
   premier rendu par le script que le serveur injecte en tete de page (`services/livraison`).
   AUCUNE COULEUR EN DUR HORS DE CE BLOC : `tests/test_design_2026.py` le verifie. */
:root {
  --fond: #F4F4F0;
  --degrade: radial-gradient(60rem 34rem at -8% -12%, rgba(196, 232, 214, .80), rgba(196, 232, 214, 0) 62%),
    radial-gradient(52rem 30rem at 108% -8%, rgba(255, 222, 194, .72), rgba(255, 222, 194, 0) 60%),
    radial-gradient(64rem 40rem at 72% 112%, rgba(220, 212, 250, .70), rgba(220, 212, 250, 0) 62%);
  --surface: #FFFFFF; --surface-2: #F4F4F1; --surface-3: #EBEBE6;
  --bord: #E7E7E1; --bord-fort: #CFCFC8; --bord-champ: #8E8F94;
  --texte: #38393D; --texte-moyen: #4A4B50; --texte-doux: #66676C; --texte-faible: #66676C;
  --accent: #0F3D47; --accent-texte: #FFFFFF; --accent-survol: #0A2C34; --accent-pale: #E5ECEC;
  --lien: #38393D; --survol: rgba(56, 57, 61, .045); --focus: #0F3D47; --selection: #E8F3EB;
  --rail-fond: transparent; --rail-texte: #55565B; --rail-actif-fond: #0F3D47; --rail-actif-texte: #FFFFFF;
  /* Les cartes d'indicateur : 1 alerte pleine (terracotta), 2 vedette pleine (petrole), 3 et 4
     blanches a bord fin. */
  --c1-fond: #85361E; --c1-texte: #FFFFFF; --c1-doux: #EEE3E0; --c1-valeur: #FFFFFF; --c1-icone: #FFFFFF; --c1-bord: transparent;
  --c2-fond: #0F3D47; --c2-texte: #FFFFFF; --c2-doux: #DDE4E5; --c2-valeur: #FFFFFF; --c2-icone: #FFFFFF; --c2-bord: transparent;
  --c3-fond: #FFFFFF; --c3-texte: #38393D; --c3-doux: #5F6066; --c3-valeur: #38393D; --c3-icone: #38393D; --c3-bord: #D9DAD3;
  --c4-fond: #FFFFFF; --c4-texte: #38393D; --c4-doux: #5F6066; --c4-valeur: #38393D; --c4-icone: #38393D; --c4-bord: #D9DAD3;
  /* Les etats : paye (vert), echu (terracotta plein), envoye (bleu), brouillon (gris), partiel
     (violet). Pas de jaune. */
  --ok-fond: #E3F2E7; --ok-texte: #2D6A43;
  --alerte-fond: #85361E; --alerte-texte: #FFFFFF; --alerte-trait: #85361E;
  --attente-fond: #E2EEFC; --attente-texte: #28569C;
  --brouillon-fond: #EEEEEA; --brouillon-texte: #5A5B60;
  --partiel-fond: #ECE7FB; --partiel-texte: #4B3F86;
  /* LE FEU DE SANTE DES TIERS (decision 0145) : terracotta, ocre brule sobre (pas de jaune),
     sauge, gris. Texte sur fond pale : contraste AA en clair comme en sombre. */
  --feu-rouge: #85361E; --feu-rouge-pale: #F6ECE8;
  --feu-ocre: #8A5300; --feu-ocre-pale: #F6EDDF;
  --feu-vert: #3E6A4D; --feu-vert-pale: #E6EFE8;
  --feu-gris: #5F6066; --feu-gris-pale: #EEEEEA;
  /* Le graphique : barres, mois en cours, mois prevus (seuls a porter des hachures), bulle. */
  --barre: #DADBD4; --barre-courante: #0F3D47; --barre-future: rgba(56, 57, 61, .34);
  --bulle-fond: #0F3D47; --bulle-texte: #FFFFFF;
  --ombre: 0 1px 2px rgba(40, 40, 30, .04), 0 8px 24px -12px rgba(40, 40, 30, .10);
  --ombre-menu: 0 2px 6px rgba(30, 30, 25, .06), 0 24px 48px -16px rgba(30, 30, 25, .22);
  --ombre-bouton: 0 8px 20px -10px rgba(56, 57, 61, .6);
  --voile: rgba(10, 12, 16, .4); --voile-tiroir: rgba(10, 12, 16, .62);
  /* Le PAPIER : un document ou un courriel montre tel qu'il sera imprime ou recu, blanc dans les deux modes. */
  --papier: #FFFFFF;
  --logo-filtre: none;
  /* Ce qui pose sur une photographie ou sur le petrole plein : toujours clair, dans les deux modes. */
  --sur-sombre: #FFFFFF; --sur-sombre-doux: rgba(255, 255, 255, .5); --sur-sombre-survol: rgba(255, 255, 255, .12);
  --voile-photo: rgba(12, 17, 24, .28); --voile-photo-bas: rgba(12, 17, 24, .52); --voile-credit: rgba(12, 17, 24, .72);
  --ombre-defile: rgba(16, 24, 40, .18);

  /* LES NOMS D'AVANT (decision 0098), sur la nouvelle palette. */
  --primaire: var(--accent); --primaire-survol: var(--accent-survol); --primaire-clair: var(--accent-survol);
  --primaire-pale: var(--accent-pale); --sur-primaire: var(--accent-texte);
  --marque: #66676C;
  --info-pale: #EDF1F1;
  --succes: #2D6A43; --succes-pale: #E3F2E7;
  --alerte: #85361E; --alerte-pale: #F6ECE8;
  --danger: #85361E; --danger-pale: #F3E4DF;
  --signal: var(--alerte-trait);
  --anneau: 0 0 0 3px rgba(15, 61, 71, .22);
  --ombre-forte: var(--ombre-menu);

  /* Formes, typographie, mouvement (maquette). */
  --rayon: 28px; --rayon-indic: 30px; --rayon-menu: 24px; --rayon-s: 14px; --rayon-xs: 10px;
  --rayon-carte: 28px;
  --police-systeme: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --police: "Geist", var(--police-systeme);
  --g-texte: 450; --g-fort: 450; --g-titre: 300; --trait: 1.5;
  --h1-taille: clamp(34px, 3.4vw, 50px); --h1-taille-mobile: 32px; --h1-approche: -.035em;
  --valeur-taille: clamp(34px, 3.1vw, 48px); --valeur-taille-2: clamp(34px, 3.2vw, 52px);
  --valeur-taille-3: 34px; --valeur-taille-mobile: 28px; --valeur-approche: -.04em;
  --barre-rayon: 999px; --barre-l: 30px;
  --hachures: repeating-linear-gradient(135deg, var(--barre-future) 0 1.5px, transparent 1.5px 7px);
  --grille: linear-gradient(to bottom, var(--bord) 1px, transparent 1px);
  --d1: 120ms; --d2: 180ms; --d3: 240ms; --d-barres: 600ms; --pas: 35ms;
  --courbe: cubic-bezier(.2, .7, .2, 1); --courbe-sortie: cubic-bezier(.16, 1, .3, 1);
  --duree: var(--d1);
  --hauteur-barre: 66px;
  --largeur-rail: 248px;
  --mobile-fond: var(--accent); --mobile-texte: var(--accent-texte);
  --mobile-actif-fond: var(--accent-texte); --mobile-actif-texte: var(--accent);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --feu-rouge: #F2A486; --feu-rouge-pale: #3A2A24;
    --feu-ocre: #E2B36E; --feu-ocre-pale: #382E20;
    --feu-vert: #A7CDB1; --feu-vert-pale: #22302A;
    --feu-gris: #B9BAB5; --feu-gris-pale: #2D2E31;
    --fond: #141518;
    --degrade: radial-gradient(60rem 34rem at -8% -12%, rgba(104, 150, 128, .16), rgba(104, 150, 128, 0) 62%),
      radial-gradient(52rem 30rem at 108% -8%, rgba(170, 130, 100, .13), rgba(170, 130, 100, 0) 60%),
      radial-gradient(64rem 40rem at 72% 112%, rgba(130, 118, 180, .14), rgba(130, 118, 180, 0) 62%);
    --surface: #1C1D21; --surface-2: #24252A; --surface-3: #2D2E34;
    --bord: #2C2D33; --bord-fort: #43444B; --bord-champ: #74757C;
    --texte: #ECECE8; --texte-moyen: #CFD0D3; --texte-doux: #A9AAAF; --texte-faible: #9A9BA0;
    --accent: #ECECE8; --accent-texte: #1C1D21; --accent-survol: #FFFFFF; --accent-pale: #2B2D32;
    --lien: #ECECE8; --survol: rgba(236, 236, 232, .05); --focus: #ECECE8; --selection: #1F2C25;
    --rail-texte: #B4B5BA; --rail-actif-fond: #ECECE8; --rail-actif-texte: #1C1D21;
    --c1-fond: #8A3A22; --c1-doux: #EFE3E0;
    --c2-fond: #155461; --c2-doux: #DEE7E9;
    --c3-fond: #1C1D21; --c3-texte: #ECECE8; --c3-doux: #A9AAAF; --c3-valeur: #ECECE8; --c3-icone: #ECECE8; --c3-bord: #3A3B42;
    --c4-fond: #1C1D21; --c4-texte: #ECECE8; --c4-doux: #A9AAAF; --c4-valeur: #ECECE8; --c4-icone: #ECECE8; --c4-bord: #3A3B42;
    --ok-fond: #1F3328; --ok-texte: #A1DCB5;
    --alerte-fond: #8A3A22; --alerte-trait: #F2A486;
    --attente-fond: #1D2A3E; --attente-texte: #A3C6F4;
    --brouillon-fond: #2A2B30; --brouillon-texte: #BBBCC0;
    --partiel-fond: #28253A; --partiel-texte: #CFC6F5;
    --barre: #3A3B42; --barre-courante: #ECECE8; --barre-future: rgba(236, 236, 232, .30);
    --bulle-fond: #ECECE8; --bulle-texte: #1C1D21;
    --ombre: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 28px -14px rgba(0, 0, 0, .5);
    --ombre-menu: 0 2px 6px rgba(0, 0, 0, .3), 0 24px 48px -16px rgba(0, 0, 0, .6);
    --ombre-bouton: none;
    --logo-filtre: brightness(1.75);
    --ombre-defile: rgba(0, 0, 0, .45);
    --marque: #A9AAAF; --info-pale: #23272B;
    --succes: #A1DCB5; --succes-pale: #1F3328;
    --alerte: #F2A486; --alerte-pale: #3A2A24;
    --danger: #F2A486; --danger-pale: #43291F;
    --anneau: 0 0 0 3px rgba(236, 236, 232, .28);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --feu-rouge: #F2A486; --feu-rouge-pale: #3A2A24;
  --feu-ocre: #E2B36E; --feu-ocre-pale: #382E20;
  --feu-vert: #A7CDB1; --feu-vert-pale: #22302A;
  --feu-gris: #B9BAB5; --feu-gris-pale: #2D2E31;
  --fond: #141518;
  --degrade: radial-gradient(60rem 34rem at -8% -12%, rgba(104, 150, 128, .16), rgba(104, 150, 128, 0) 62%),
    radial-gradient(52rem 30rem at 108% -8%, rgba(170, 130, 100, .13), rgba(170, 130, 100, 0) 60%),
    radial-gradient(64rem 40rem at 72% 112%, rgba(130, 118, 180, .14), rgba(130, 118, 180, 0) 62%);
  --surface: #1C1D21; --surface-2: #24252A; --surface-3: #2D2E34;
  --bord: #2C2D33; --bord-fort: #43444B; --bord-champ: #74757C;
  --texte: #ECECE8; --texte-moyen: #CFD0D3; --texte-doux: #A9AAAF; --texte-faible: #9A9BA0;
  --accent: #ECECE8; --accent-texte: #1C1D21; --accent-survol: #FFFFFF; --accent-pale: #2B2D32;
  --lien: #ECECE8; --survol: rgba(236, 236, 232, .05); --focus: #ECECE8; --selection: #1F2C25;
  --rail-texte: #B4B5BA; --rail-actif-fond: #ECECE8; --rail-actif-texte: #1C1D21;
  --c1-fond: #8A3A22; --c1-doux: #EFE3E0;
  --c2-fond: #155461; --c2-doux: #DEE7E9;
  --c3-fond: #1C1D21; --c3-texte: #ECECE8; --c3-doux: #A9AAAF; --c3-valeur: #ECECE8; --c3-icone: #ECECE8; --c3-bord: #3A3B42;
  --c4-fond: #1C1D21; --c4-texte: #ECECE8; --c4-doux: #A9AAAF; --c4-valeur: #ECECE8; --c4-icone: #ECECE8; --c4-bord: #3A3B42;
  --ok-fond: #1F3328; --ok-texte: #A1DCB5;
  --alerte-fond: #8A3A22; --alerte-trait: #F2A486;
  --attente-fond: #1D2A3E; --attente-texte: #A3C6F4;
  --brouillon-fond: #2A2B30; --brouillon-texte: #BBBCC0;
  --partiel-fond: #28253A; --partiel-texte: #CFC6F5;
  --barre: #3A3B42; --barre-courante: #ECECE8; --barre-future: rgba(236, 236, 232, .30);
  --bulle-fond: #ECECE8; --bulle-texte: #1C1D21;
  --ombre: 0 1px 2px rgba(0, 0, 0, .25), 0 10px 28px -14px rgba(0, 0, 0, .5);
  --ombre-menu: 0 2px 6px rgba(0, 0, 0, .3), 0 24px 48px -16px rgba(0, 0, 0, .6);
  --ombre-bouton: none;
  --logo-filtre: brightness(1.75);
  --ombre-defile: rgba(0, 0, 0, .45);
  --marque: #A9AAAF; --info-pale: #23272B;
  --succes: #A1DCB5; --succes-pale: #1F3328;
  --alerte: #F2A486; --alerte-pale: #3A2A24;
  --danger: #F2A486; --danger-pale: #43291F;
  --anneau: 0 0 0 3px rgba(236, 236, 232, .28);
  color-scheme: dark;
}

/* Geist (licence OFL, `polices/OFL-geist.txt`), servie par l'instance : deux graisses fixes, 300 pour
   les titres et les grands montants, 450 pour tout le reste (la maquette n'en a pas d'autre ; un
   gras demande se dessine en 450, `font-synthesis: none`). Sous-ensemble latin etendu, espaces fines
   francaises ajoutees (U+202F, U+2009, U+2007 : la fonte source ne les a pas). `swap` : le texte
   s'affiche tout de suite dans la police du systeme. Sur une connexion lente ou economique,
   `.leger` est pose avant le premier rendu et rien n'est telecharge.
   L'adresse porte l'EMPREINTE du fichier (12 caracteres du SHA-256, comme `services/livraison`) :
   le serveur ne reecrit pas les adresses d'une feuille de style, et un fichier sans `?v=` serait
   revalide a chaque page. `test_design_2026.py` verifie que l'empreinte est celle du fichier. */
@font-face {
  font-family: "Geist"; font-style: normal; font-weight: 100 380; font-display: swap;
  src: url("../polices/geist-300.woff2?v=8dfd72efff2b") format("woff2");
}
@font-face {
  font-family: "Geist"; font-style: normal; font-weight: 381 900; font-display: swap;
  src: url("../polices/geist-450.woff2?v=3925066296a7") format("woff2");
}
.leger { --police: var(--police-systeme); }

* { box-sizing: border-box; }
/* Doit rester en tete : toute classe posant un display battrait cet attribut sinon,
   et l'on corrigerait ensuite composant par composant au lieu d'une fois pour toutes. */
[hidden] { display: none !important; }
body {
  margin: 0; background: var(--fond); color: var(--texte);
  font-family: var(--police); font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primaire); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .4rem; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 1.4rem; } h2 { font-size: 1.05rem; } h3 { font-size: .9rem; }
p { margin: 0 0 .6rem; }

/* ── Bandeau de demonstration ─────────────────────────────────────── */
.bandeau-maquette, .bandeau-demo {
  background: var(--accent); color: var(--accent-texte); font-size: 12px;
  padding: 6px 16px; text-align: center; letter-spacing: .02em;
}
.bandeau-maquette strong, .bandeau-demo strong { color: inherit; }

/* ── Bandeau de mise a jour ───────────────────────────────────────── */
/* En BAS et non en haut : le haut porte deja le bandeau de demonstration et la barre de
   navigation, et un troisieme bandeau qui pousse la page vers le bas deplacerait ce que la
   personne est en train de viser. Fixe, au-dessus du reste, mais il n'occupe pas la largeur
   entiere : il ne bloque pas la lecture, il se ferme, et il ne recharge rien tout seul. */
.bandeau-maj {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 60;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; max-width: calc(100% - 32px);
  background: var(--surface); color: var(--texte);
  border: 1px solid var(--bord); border-radius: 10px; box-shadow: var(--ombre-forte);
  padding: 10px 14px; font-size: 13px;
}
.bandeau-maj strong { font-weight: 600; }
.bandeau-maj .bouton { white-space: nowrap; }
/* LE TEXTE NE SE LAISSE PLUS ECRASER PAR LES BOUTONS. Le bandeau etait un `flex` SANS repli :
   les deux boutons portent `white-space: nowrap` et gardaient donc leur largeur entiere, pendant
   que la phrase se comprimait jusqu'a UN MOT PAR LIGNE. Constate sur un telephone le
   2026-10-01 -- le bandeau faisait toute la hauteur de l'ecran pour trois phrases.
   Une base de 240 px decide du repli : des que la phrase et les boutons ne tiennent plus
   ensemble, les boutons passent dessous et la phrase reprend toute la largeur. `min-width: 0`
   parce qu'un element flexible refuse par defaut de descendre sous la largeur de son plus long
   mot, ce qui ferait deborder le bandeau sur un ecran etroit. */
.bandeau-maj > span { flex: 1 1 240px; min-width: 0; }
.bandeau-maj .boutons { margin-left: auto; }
@media print { .bandeau-maj { display: none !important; } }
/* SUR UN TELEPHONE, IL PREND LA LARGEUR. Ailleurs il est volontairement etroit -- « il n'occupe
   pas la largeur entiere, il ne bloque pas la lecture » -- et cette intention se retourne contre
   elle sous 620 px : un `position: fixed` sans largeur se reduit a son contenu, et le bandeau
   devenait une colonne de 250 px haute de 155 px au milieu de l'ecran. Mesure du 2026-10-01 sur
   un ecran de 500 px. Etale sur toute la largeur, il tient en deux lignes au bas de l'ecran,
   ou on l'attend. */
@media screen and (max-width: 620px) {
  .bandeau-maj {
    left: 12px; right: 12px; bottom: 12px; transform: none; max-width: none;
  }
}

/* ── Ossature ─────────────────────────────────────────────────────── */
/* `minmax(0, 1fr)` et non `1fr` : une piste `1fr` a pour minimum implicite `auto`, donc la
   largeur MINIMALE de son contenu. Un tableau large y pousse la piste au-dela de la fenetre, et
   c'est toute la page qui se met a defiler lateralement -- en-tete et barre d'outils compris.
   Mesure du 2026-09-29 : la piste resolvait a 1180px dans une fenetre de 1280, soit 1412px de
   grille, sur six ecrans (factures, achats, catalogue, stock, collaborateurs, fonctions). Le
   `overflow-x: auto` de `.tableau-defile` ne suffit pas : il borne le tableau, pas la piste. */
.appli { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: calc(100vh - 29px); }
.rail {
  background: var(--surface); border-right: 1px solid var(--bord);
  padding: 18px 12px; display: flex; flex-direction: column; gap: 2px;
}
.rail .marque {
  font-weight: 700; font-size: 1.05rem; letter-spacing: .08em;
  color: var(--primaire); padding: 4px 10px 16px;
}
.rail .groupe {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--texte-faible); padding: 14px 10px 5px; font-weight: 600;
}
.rail a {
  display: flex; align-items: center; gap: 9px; padding: 7px 10px;
  border-radius: var(--rayon-s); color: var(--texte-doux); font-weight: 500;
}
.rail a:hover { background: var(--surface-2); text-decoration: none; color: var(--texte); }
.rail a.actif { background: var(--primaire-pale); color: var(--primaire); font-weight: 600; }
.rail svg { width: 16px; height: 16px; flex: 0 0 16px; }

.principal { padding: 22px 26px 60px; max-width: 1180px; }
.entete {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.entete .sous-titre { color: var(--texte-doux); margin: 0; }

/* ── Composants ───────────────────────────────────────────────────── */
.carte {
  background: var(--surface); border: 1px solid var(--bord);
  border-radius: var(--rayon); box-shadow: var(--ombre); padding: 16px;
}
/* `minmax(0, 1fr)` des la grille NUE : sans piste declaree, la colonne implicite vaut `auto`,
   donc elle se laisse pousser par le plus large de ses enfants. */
.grille { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
/* `min(100%, N)` et non `N` : un `minmax(260px, 1fr)` impose 260 px a chaque colonne, meme quand
   la fenetre n'en fait pas 300. La grille deborde alors, et avec elle toute la page -- constate
   le 2026-09-29 sur le tableau de bord a 390 px, qui s'etalait sur 606. Avec `min(100%, N)`, la
   colonne se replie au lieu de pousser. Les reglages de repli plus bas restent : ils choisissent
   un NOMBRE de colonnes, celui-ci empeche seulement le debordement. */
.grille.c2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grille.c3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.grille.c4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 175px), 1fr)); }

.indicateur .libelle { color: var(--texte-doux); font-size: 12px; margin-bottom: 4px; }
.indicateur .valeur { font-size: 1.55rem; font-weight: 650; letter-spacing: -.02em; }
.indicateur .detail { font-size: 12px; color: var(--texte-faible); margin-top: 2px; }

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--texte-faible); font-weight: 600; padding: 9px 12px;
  border-bottom: 1px solid var(--bord); background: var(--surface-2);
}
tbody td { padding: 10px 12px; border-bottom: 1px solid var(--bord); }
tbody tr:hover { background: var(--surface-2); }
td.nombre, th.nombre { text-align: right; font-variant-numeric: tabular-nums; }
.tableau-cadre {
  background: var(--surface); border: 1px solid var(--bord);
  border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre);
}
.tableau-defile { overflow-x: auto; }

/* LA COLONNE D'ACTIONS RESTE VISIBLE QUAND LE TABLEAU DEFILE. Un tableau large se defile de
   gauche a droite ; les boutons vivent a droite, donc ils disparaissent -- et sur une liste haute
   de deux mille pixels, personne ne redescend chercher la barre de defilement. Signale sur
   l'ecran des collaborateurs le 2026-09-29, ou « Dossier » et « Modifier » etaient coupes net.
   La regle ne vaut qu'au-dessus de 620 px : en dessous, `tableau()` replie ses lignes en fiches
   et il n'y a plus de colonne a retenir. */
@media (min-width: 621px) {
  .tableau-defile th:last-child:empty,
  .tableau-defile td:last-child:has(.boutons) {
    position: sticky; right: 0; z-index: 1;
    background: var(--surface);
    box-shadow: -8px 0 8px -8px var(--ombre-defile);
  }
  .tableau-defile th:last-child:empty { background: var(--surface-2); }
  .tableau-defile tbody tr:hover td:last-child:has(.boutons) { background: var(--surface-2); }
  /* LE MENU « … » OUVERT PASSE AU-DESSUS DES LIGNES SUIVANTES (recette de Manu du 2026-10-23) : la
     cellule collante de chaque ligne forme son propre empilement (z-index 1), et celle de la ligne
     d'apres, plus loin dans le document, recouvrait la liste ouverte. On eleve la cellule qui
     porte le menu ouvert, et elle seule. */
  .tableau-defile td:last-child:has(.menu-actions-liste:not([hidden])) { z-index: 75; }
}

.etiquette {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
}
.etiquette.neutre  { background: var(--surface-2); color: var(--texte-doux); }
.etiquette.info    { background: var(--primaire-pale); color: var(--primaire); }
.etiquette.succes  { background: var(--succes-pale); color: var(--succes); }
.etiquette.alerte  { background: var(--alerte-pale); color: var(--alerte); }
.etiquette.danger  { background: var(--danger-pale); color: var(--danger); }

.bouton {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px;
  border-radius: var(--rayon-s); border: 1px solid var(--bord-fort);
  background: var(--surface); color: var(--texte); font-weight: 600; font-size: 13px;
  cursor: pointer; font-family: inherit;
}
.bouton:hover { background: var(--surface-2); text-decoration: none; }
.bouton.primaire { background: var(--primaire); border-color: var(--primaire); color: var(--sur-primaire); }
.bouton.primaire:hover { background: var(--primaire-clair); }
/* LE BOUTON QUI DETRUIT SE DISTINGUE DE CELUI QUI NE DETRUIT PAS (2026-10-01). La charte n'en
   avait aucun : « Supprimer » et « Modifier » etaient deux boutons rigoureusement identiques,
   cote a cote, sur la facture et le devis. Le jeton `--danger` existait deja pour les etiquettes,
   les lignes et les notifications -- il manquait a la seule commande qui perd quelque chose.
   PAS UN APLAT ROUGE : il entrerait en concurrence avec l'action principale de l'ecran, qui est
   presque toujours celle qu'on veut. Le contour et le texte suffisent a faire hesiter. */
/* LE MARQUEUR DE CHAMP OBLIGATOIRE. Il porte la couleur d'alerte et non celle de l'intitule :
   de la meme teinte, il se lit comme une coquille de frappe plutot que comme une indication.
   Il est `aria-hidden` dans le gabarit -- le controle porte deja `required`, que les lecteurs
   d'ecran annoncent eux-memes, et le dire deux fois dont une en « etoile » n'aide personne. */
/* ── Le guide de demarrage, sur l'accueil (2026-10-01) ────────────────────────────────────────
   Il doit se lire d'un coup d'oeil par quelqu'un qui ouvre le produit pour la premiere fois :
   une etape par ligne, ce qu'elle apporte sous son titre, et un seul geste a droite. Rien de
   repliable, rien a decouvrir : ce qui se cache derriere un chevron n'est pas lu le premier jour.
   La jauge DOUBLE le compteur chiffre au lieu de le remplacer. Une barre seule se lit « a peu
   pres a moitie » ; le chiffre dit « 2 sur 6 », ce qui est la seule phrase qui renseigne. */
.demarrage-compteur { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.demarrage-chiffre { font-size: 13px; font-weight: 600; color: var(--texte-doux); }
.demarrage-jauge {
  display: block; width: 132px; height: 6px; border-radius: 3px;
  background: var(--surface-2); overflow: hidden;
}
.demarrage-jauge i { display: block; height: 100%; background: var(--primaire); border-radius: 3px; }
.demarrage-groupe { font-size: 12px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--texte-faible); margin: 18px 0 8px; }
.demarrage-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.demarrage-etape {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--bord); border-radius: var(--rayon-s); background: var(--surface);
}
/* UNE ETAPE FAITE S'EFFACE SANS DISPARAITRE. Elle reste lisible -- on doit pouvoir verifier ce
   qu'on a deja regle -- mais elle cesse d'attirer l'oeil, qui n'a a se poser que sur ce qui
   reste. */
.demarrage-etape.faite { background: var(--surface-2); border-color: transparent; }
.demarrage-etape.faite .demarrage-texte strong { color: var(--texte-doux); font-weight: 600; }
.demarrage-puce {
  flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--bord); color: var(--sur-primaire); font-size: 12px; line-height: 1;
}
.demarrage-etape.faite .demarrage-puce { background: var(--primaire); border-color: var(--primaire); }
.demarrage-texte { flex: 1 1 auto; min-width: 0; }
.demarrage-texte strong { display: block; font-size: 14px; }
.demarrage-texte p { margin: 3px 0 0; font-size: 12.5px; color: var(--texte-doux); line-height: 1.35; }
/* Sous le seuil telephone, le geste passe SOUS son explication plutot que de la comprimer : un
   bouton « Y aller » colle au bord droit laisse quarante caracteres par ligne au texte qui le
   justifie, et c'est ce texte qui decide si on y va. */
@media screen and (max-width: 620px) {
  /* SEUL LE GESTE PASSE A LA LIGNE. La pastille et le titre restent cote a cote -- c'est la
     pastille qui dit « fait » d'un coup d'oeil, et elle ne dit plus rien posee seule au-dessus
     d'un titre. Vu a l'ecran le 2026-10-01 : `flex: 1 1 100%` sur le texte renvoyait la pastille
     sur sa propre ligne. C'est au BOUTON de prendre toute la largeur, pas au texte. */
  .demarrage-etape { flex-wrap: wrap; }
  /* BASE ZERO, ET NON `auto`. Avec `flex: 1 1 auto`, la base d'un element est la largeur de son
     CONTENU : le paragraphe d'explication reclamait plus que la place restante et se jetait sur
     sa propre ligne, laissant la pastille seule au-dessus du titre. Mesure du 2026-10-01 a
     500 px : pastille en y=402, texte en y=436, tous deux en x=44. Avec une base nulle, le texte
     prend ce qui reste a cote de la pastille au lieu de le reclamer. */
  .demarrage-texte { flex: 1 1 0; }
  .demarrage-etape .bouton, .demarrage-etape .etiquette {
    flex: 1 1 100%; margin-left: 34px; margin-top: 2px;
  }
  /* `max-width: max-content` RETIRE : il annulait le repli qu'on venait de demander. Le repli
     d'une ligne flexible se decide sur la taille HYPOTHETIQUE de l'element, laquelle est deja
     bornee par `max-width` -- le bouton tenait donc sur la ligne et n'allait jamais dessous.
     Mesure du 2026-10-01 a 500 px : l'etiquette « Fait », qui n'a pas de borne, se repliait ;
     le bouton « Y aller », qui en avait une, restait a droite. Pleine largeur, donc, ce qui est
     de toute facon la bonne cible pour un pouce. */
  .demarrage-etape .bouton { justify-content: center; }
  .demarrage-compteur { align-items: flex-start; }
}

.champ label .requis { color: var(--danger); font-weight: 600; }
.bouton.danger { border-color: var(--danger); color: var(--danger); }
.bouton.danger:hover { background: var(--danger-pale); border-color: var(--danger); }
.bouton svg { width: 15px; height: 15px; }

.champ { display: flex; flex-direction: column; gap: 5px; margin-bottom: 13px; }
.champ label { font-size: 12.5px; font-weight: 600; color: var(--texte-doux); }
.champ input, .champ select, .champ textarea {
  padding: 8px 11px; border: 1px solid var(--bord-fort); border-radius: var(--rayon-s);
  font-family: inherit; font-size: 13.5px; background: var(--surface); color: var(--texte);
}
.champ input:focus, .champ select:focus, .champ textarea:focus {
  outline: 2px solid var(--primaire-pale); border-color: var(--primaire); outline-offset: 0;
}
/* UN CHAMP QU'ON NE PEUT PAS SAISIR LE DIT, et il le dit AVANT qu'on essaie. Un champ en
   lecture seule dessine comme les autres se lit comme un champ ordinaire : on clique, on tape,
   rien ne se passe, et on cherche la panne. Le premier cas est le montant remboursé d'une
   dépense en devise étrangère, que le serveur calcule (décision 0042) — mais la règle vaut pour
   tout champ qui porte `readonly`, aujourd'hui comme demain.
   Le curseur change AUSSI : la couleur seule ne suffit pas à qui distingue mal les gris. */
.champ input[readonly], .champ textarea[readonly] {
  background: var(--fond); color: var(--texte-doux); cursor: not-allowed;
}
.champ .aide { font-size: 11.5px; color: var(--texte-faible); }

.note {
  border-left: 3px solid var(--primaire); background: var(--primaire-pale);
  padding: 10px 13px; border-radius: 0 var(--rayon-s) var(--rayon-s) 0; font-size: 13px;
}
.note.alerte { border-color: var(--alerte); background: var(--alerte-pale); }
.note.danger { border-color: var(--danger); background: var(--danger-pale); }
.note .titre { font-weight: 650; margin-bottom: 2px; }

.vide { text-align: center; padding: 40px 20px; color: var(--texte-faible); }

/* ─── Ajouts apres la premiere serie d'ecrans ───────────────────────
   Chacune de ces classes comble un manque signale independamment par plusieurs
   personnes ayant construit un ecran. Elles etaient toutes contournees par un
   detournement de `.grille` ou par un element nu : ce n'est pas un confort. */

/* Pile verticale. Detournee jusqu'ici en `.grille` sans modificateur. */
.pile { display: flex; flex-direction: column; gap: 14px; }
.pile.serre { gap: 8px; }

/* Barre d'outils : recherche, filtres et boutons sur une ligne. */
.barre { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.barre .champ { margin-bottom: 0; }
.barre .pousse { margin-left: auto; }

/* Groupe de boutons, jusqu'ici separes par une simple espace. */
.boutons { display: flex; flex-wrap: wrap; gap: 8px; }

/* Texte secondaire autonome : `.sous-titre`, `.aide` et `.detail` sont tous
   scopes a un parent, donc inutilisables ailleurs. */
.doux   { color: var(--texte-doux); }
.faible { color: var(--texte-faible); font-size: 12.5px; }

/* Champs de largeur reglable : `.champ input` s'etire sinon a tout le conteneur. */
.champ.court input, .champ.court select { max-width: 190px; }
.champ.etroit input, .champ.etroit select { max-width: 110px; }
td .champ { margin-bottom: 0; }
td input, td select { width: 100%; }

/* Code postal et ville sur UNE ligne (decision 0062) : le code postal etroit, la ville large. Une
   grille et non deux `.court` : la ligne garde sa largeur dans une colonne de `.grille c2` comme
   dans un formulaire plein ecran, et tient a 390 px -- cinq chiffres n'ont pas besoin de plus. */
.ligne-ville { display: grid; grid-template-columns: minmax(5.5rem, 7.5rem) minmax(0, 1fr); gap: 0 12px; align-items: start; }
.note.separation-cp { margin: -6px 0 13px; padding: 7px 11px; font-size: 12.5px; }
.note.separation-cp .bouton { margin-left: 6px; }

/* Ligne de tableau en alerte, et ligne de total. Le retard d'une facture est
   l'information la plus importante de l'ecran : elle merite mieux qu'une pastille. */
tbody tr.danger { background: var(--danger-pale); }
tbody tr.danger:hover { background: var(--danger-pale); }
tbody tr.total td, tfoot td {
  border-top: 2px solid var(--bord-fort); border-bottom: 0;
  font-weight: 650; background: var(--surface-2);
}
tbody tr.total:hover td { background: var(--surface-2); }

/* Surface secondaire : une carte dans une carte etait blanc sur blanc. */
.sous-carte {
  background: var(--surface-2); border: 1px solid var(--bord);
  border-radius: var(--rayon-s); padding: 11px;
}

/* Controle segmente, jusqu'ici imite en detournant `.bouton.primaire`. */
/* `flex-wrap: wrap` : un onglet dont le libelle porte une liste d'annees (« Comparaison avec
   2025, 2024, 2023 ») fait 400 px a lui seul et poussait toute la page sur un telephone. */
.segments { display: inline-flex; flex-wrap: wrap; max-width: 100%; background: var(--surface-2);
            padding: 3px; border-radius: var(--rayon-s); gap: 3px; }
.segments button {
  border: 0; background: transparent; padding: 6px 13px; border-radius: 4px;
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--texte-doux); cursor: pointer;
}
.segments button.actif { background: var(--surface); color: var(--primaire); box-shadow: var(--ombre); }

/* Deplacement de cartes : sans retour visuel, on ne sait pas si l'on a saisi la carte. */
.deplacable { cursor: grab; }
.deplacable:active { cursor: grabbing; }
.en-vol { opacity: .45; }
.depot-actif { outline: 2px dashed var(--primaire); outline-offset: 3px; background: var(--primaire-pale); }

ul, ol { margin: 0 0 .6rem; padding-left: 1.15rem; }
li { margin-bottom: .2rem; }

/* ── Barre haute de la plateforme ───────────────────────────────────── */
/* La coquille multi-applications : marque, lanceur d'applications, entreprise courante,
   utilisateur. Le rail de gauche ne porte plus que l'application courante. */
.barre-haute {
  height: 50px; display: flex; align-items: center; gap: 14px; padding: 0 16px;
  background: var(--surface); border-bottom: 1px solid var(--bord); position: relative; z-index: 20;
}
.barre-haute .marque { font-weight: 600; letter-spacing: .2em; color: var(--marque); font-size: 13px; text-decoration: none; }
.marque { display: inline-flex; align-items: center; gap: 8px; }
.marque-icone { width: 26px; height: 26px; display: block; }
/* Les images de marque portent un numero de version dans leur URL : sans lui, un navigateur qui
   a deja vu l'ancien dessin continue de le servir, et la nouvelle identite n'arrive jamais chez
   celui qui regarde. A incrementer a chaque changement du trace.
   Le mot est le trace fourni par 1FOPRESTA, pas du texte : on le dimensionne par sa hauteur, la
   largeur suit. Si le fichier manque, le texte de remplacement prend sa place et la marque reste
   lisible. */
.marque-mot { height: 13px; width: auto; display: block; }
.public .marque-icone, .connexion .marque-icone { width: 34px; height: 34px; }
.public .marque-mot, .connexion .marque-mot { height: 16px; }
.barre-haute .espace { flex: 1; }
 .entreprise { position: relative; }
 .entreprise-bouton {
  display: inline-flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: var(--rayon-s);
  border: 1px solid transparent; background: transparent; font: inherit; font-weight: 600; color: var(--texte); cursor: pointer;
}
 .entreprise-bouton:hover, .entreprise-bouton[aria-expanded="true"] {
  background: var(--surface-2); border-color: var(--bord);
}








.entreprise-bouton span:not(.pays) { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.entreprise-bouton small { font-weight: 500; color: var(--texte-faible); font-size: 11px; }
.pays { display: inline-grid; place-items: center; width: 26px; height: 20px; border-radius: 3px; background: var(--primaire-pale); color: var(--primaire); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--primaire); color: var(--sur-primaire); font-size: 11px; font-weight: 700; }
/* Le lien de retour d'une fiche ouverte en pleine page. Celui du rail a ses propres regles ;
   celui-ci vit dans le contenu, au-dessus du titre, et doit rester lisible et cliquable. */
.principal > .retour { display: inline-block; margin-bottom: 10px; font-size: 13px; font-weight: 600;
  color: var(--texte-doux); text-decoration: none; }
.principal > .retour:hover { color: var(--primaire); }


.appli { min-height: calc(100vh - 29px - 50px); }

/* ── Accueil : tuiles d'applications ───────────────────────────────── */
.tuiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tuile {
  display: block; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon);
  box-shadow: var(--ombre); padding: 16px; color: var(--texte); text-decoration: none; min-height: 130px;
}
.tuile:hover { border-color: var(--primaire-clair); text-decoration: none; box-shadow: var(--ombre-forte); }
.tuile .initiale { width: 34px; height: 34px; border-radius: 8px; background: var(--primaire-pale); color: var(--primaire); display: grid; place-items: center; font-weight: 700; margin-bottom: 10px; }
.tuile h3 { margin: 0 0 4px; font-size: .95rem; }
.tuile p { margin: 0; color: var(--texte-doux); font-size: 12.5px; line-height: 1.45; }
.tuile.indisponible { background: var(--surface-2); box-shadow: none; }
.tuile.indisponible .initiale { background: var(--bord); color: var(--texte-doux); }
.tuile .mention { display: inline-block; margin-top: 8px; font-size: 11px; color: var(--texte-faible); }

/* Bouton desactive : un devis bloque par le prix plancher ne s'envoie pas. */
.bouton:disabled, .bouton[disabled] { opacity: .45; cursor: not-allowed; }


/* ─── Produit : ce que la maquette n'avait pas ─────────────────────── */

/* Boite de dialogue native, pour les saisies courtes (reglement, mouvement, nouvelle societe). */
/* Une boite ne depasse JAMAIS la fenetre. Un formulaire long poussait sinon ses boutons hors de
   l'ecran : la boite grandissait, la page derriere ne defilait pas, et « Enregistrer » devenait
   inatteignable. L'entete et le pied restent visibles, seul le corps defile. */
dialog.boite { border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-forte); padding: 0; width: min(560px, 94vw); max-height: 92vh; }
dialog.boite::backdrop { background: var(--voile); }
dialog.boite form { display: flex; flex-direction: column; max-height: 92vh; }
dialog.boite .boite-entete { padding: 14px 18px; border-bottom: 1px solid var(--bord); display: flex; align-items: center; justify-content: space-between; flex: 0 0 auto; }
dialog.boite .boite-entete h2 { margin: 0; }
dialog.boite .boite-corps { padding: 16px 18px; overflow-y: auto; flex: 1 1 auto; }
dialog.boite .boite-pied { padding: 12px 18px; border-top: 1px solid var(--bord); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); flex: 0 0 auto; }
.fermer { border: 0; background: transparent; font-size: 20px; line-height: 1; cursor: pointer; color: var(--texte-faible); }

/* Message furtif en bas d'ecran. */
.furtif { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--accent); color: var(--accent-texte); padding: 10px 16px; border-radius: var(--rayon-s); box-shadow: var(--ombre-forte); z-index: 50; font-size: 13px; max-width: 90vw; }
.furtif.danger { background: var(--danger); }
.furtif.succes { background: var(--succes); }

/* Erreur de formulaire. */
.erreur { color: var(--danger); font-size: 12.5px; }
/* UNE ERREUR NE S'AFFICHE QU'APRES UN GESTE (decision 0143) : `:user-invalid` ne vaut qu'une fois le
   champ touche puis quitte, ou apres une tentative d'envoi. `:invalid` seul marquait en terracotta
   des champs requis encore vides a l'ouverture d'un dialogue (debut et fin d'une declaration
   d'heures). */
.champ input:user-invalid, .champ select:user-invalid, .champ textarea:user-invalid { border-color: var(--danger); }

/* Pipeline : colonnes. */
.colonnes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; align-items: start; }
.colonne { background: var(--surface-2); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 10px; min-height: 120px; }
.colonne h3 { display: flex; justify-content: space-between; padding: 4px 6px 8px; }
.colonne .indicateur { padding: 11px 12px; margin-bottom: 8px; }
.colonne .indicateur .valeur { font-size: 1.15rem; }
.colonne .carte { padding: 11px 12px; margin-bottom: 8px; }
.colonne .carte .titre { font-weight: 600; }
.colonne .carte .societe { color: var(--texte-doux); font-size: 12.5px; }
.colonne .carte .montant { font-variant-numeric: tabular-nums; margin-top: 4px; }

/* Menu utilisateur, a droite de la barre haute. */
.utilisateur { position: relative; }
.utilisateur-bouton { border: 0; background: transparent; padding: 0; cursor: pointer; }
.utilisateur-menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre-forte); padding: 6px; z-index: 30; }
.utilisateur-menu .faible { padding: 6px 10px 2px; font-size: 11px; }
.utilisateur-menu a, .utilisateur-menu button { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--rayon-s); color: var(--texte); font: inherit; font-weight: 500; border: 0; background: transparent; cursor: pointer; }
.utilisateur-menu a:hover, .utilisateur-menu button:hover { background: var(--surface-2); text-decoration: none; }

/* Aide, a gauche du compte dans la barre haute. Volontairement PAS dans le rail : le rail porte
   la navigation metier de l'application ouverte, et une entree de plus y entrerait en
   concurrence avec les ecrans que la personne est venue utiliser. Elle se range donc avec ce qui
   n'est pas du metier -- le parametrage, la langue, la deconnexion.
   Le poids du texte est celui du lanceur et de l'entreprise : c'est la meme barre, et un lien
   plus leger que ses voisins se lirait comme une note de bas de page. */
.aide-lien {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: var(--rayon-s);
  border: 1px solid transparent; background: transparent; color: var(--texte-doux);
  font-weight: 600; font-size: 13px; text-decoration: none; white-space: nowrap;
}
.aide-lien:hover { background: var(--surface-2); border-color: var(--bord); color: var(--texte); text-decoration: none; }
.aide-lien svg { width: 18px; height: 18px; flex: 0 0 auto; }
.aide-lien[aria-current="page"] { color: var(--primaire); background: var(--primaire-pale); }

/* ── Pages d'aide ────────────────────────────────────────────────────
   Du texte, et rien d'autre : l'aide se lit, elle ne se manipule pas. La largeur est donc bornee
   -- une ligne de 160 caracteres sur un grand moniteur ne se suit pas d'une ligne a l'autre --
   et la borne est en `ch` pour suivre la taille de police du lecteur plutot que le pixel. */
/* `scroll-margin-top` : une cible d'ancre ne se colle pas sous la barre haute, qui est collante
   sur tablette et telephone -- sans cette marge, le titre vise passerait dessous. */
.aide-sommaire, .aide-section { max-width: 80ch; scroll-margin-top: 62px; }
.aide-sommaire {
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon);
  box-shadow: var(--ombre); padding: 14px 18px; margin: 14px 0;
}
.aide-sommaire h2 { margin: 0 0 8px; font-size: 1rem; }
.aide-sommaire ol { margin: 0; padding-left: 1.3rem; }
.aide-sommaire li { margin-bottom: .3rem; }
.aide-section {
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon);
  box-shadow: var(--ombre); padding: 16px 18px; margin-bottom: 14px;
}
.aide-section h2 { margin: 0 0 6px; }
.aide-section h3 { margin: 14px 0 4px; font-size: .9rem; color: var(--texte-doux); }
.aide-section p { margin: 0 0 .2rem; line-height: 1.55; }
.aide-section ol, .aide-section ul { margin: 0; padding-left: 1.3rem; }
.aide-section li { margin-bottom: .35rem; line-height: 1.5; }
.aide-mention {
  display: inline-block; margin: 2px 0 8px; padding: 3px 9px; border-radius: 999px;
  background: var(--surface-2); color: var(--texte-doux); font-size: 12.5px;
}
.aide-retour { margin-top: 12px; font-size: 12.5px; }

/* Fiche a droite d'une liste. */
.deux-tiers { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 14px; align-items: start; }

@media (max-width: 900px) { .deux-tiers { grid-template-columns: 1fr; } }
tbody tr.selectionnable { cursor: pointer; }
tbody tr.selectionnee { background: var(--primaire-pale); }

/* Definition (libelle / valeur). */
.definition { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 13.5px; }
.definition dt { color: var(--texte-doux); }
.definition dd { margin: 0; }

/* Page publique et connexion. */
.public { max-width: 980px; margin: 0 auto; padding: 40px 20px 80px; }
.public .marque { font-weight: 600; letter-spacing: .2em; color: var(--marque); font-size: 15px; }
.connexion { max-width: 400px; margin: 60px auto; }
.code-demo { font-size: 1.6rem; letter-spacing: .2em; font-weight: 700; text-align: center; padding: 8px; }

/* Barre de chiffre d'affaires mensuel. */
.barres { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; align-items: end; height: 140px; padding-top: 8px; }
.barres .barre-mois { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.barres .barre-mois i { display: block; width: 100%; background: var(--primaire); border-radius: 3px 3px 0 0; min-height: 2px; }
.barres .barre-mois i.negatif { background: var(--danger); }
/* Un intitule de mois porte son annee (« oct. 25 ») : douze mois glissants sont a cheval sur deux
   annees, et « oct. » seul n'en designe aucune. Sur un ecran large l'intitule tient sur une
   ligne ; plus bas, il se coupe en deux (voir le bloc telephone) plutot que de se faire tronquer,
   car « sept. 2 » serait lu comme une date. */
.barres .barre-mois small { font-size: 10.5px; color: var(--texte-faible); white-space: nowrap; }

/* Le document remis au client (devis, facture, avoir) N'EST PLUS MIS EN FORME ICI : il l'est par
   `css/document.css`, que le gabarit serveur `app/gabarits/document.html` inscrit dans la page.
   La raison est qu'il n'y a plus qu'un seul rendu du document, cote serveur, et qu'il sert a la
   fois l'apercu a l'ecran, le PDF telecharge et le PDF joint au courriel. Laisser ici la moitie
   de sa mise en forme rouvrirait l'ecart qu'on vient de fermer : le client recevrait autre chose
   que ce que l'utilisateur a vu. */
@media print {
  .barre-haute, .rail, .bandeau-demo, .entete, .pas-imprimable { display: none !important; }
  .appli { display: block; min-height: 0; }
  .principal { padding: 0; max-width: none; }
  body { background: var(--surface); }
}

/* Recherche transverse dans la barre haute. Le panneau se pose sous le champ et flotte : il ne
   doit jamais pousser la page, sinon la barre saute a chaque frappe. */










/* Bouton d'appoint, pose dans une ligne de texte : il ne doit pas peser autant qu'une action. */
.bouton.petit { padding: 3px 9px; font-size: 12px; }

/* ── Petits ecrans : telephone et tablette ──────────────────────────────
   Le partenaire a choisi un site qui s'adapte plutot qu'une application a installer : les memes
   ecrans doivent donc tenir sur un telephone de 390 px. Deux seuils, et rien au-dessus :
     900 px, tablette : le rail devient un tiroir, les indicateurs passent a deux colonnes,
              les cibles tactiles montent a 40 px ;
     620 px, telephone : les tableaux deviennent des fiches empilees, la recherche se replie
              derriere une loupe, une colonne partout, la boite de dialogue prend l'ecran.
   Les deux requetes portent `screen` : une feuille A4 mesure 794 px a l'impression et
   declencherait sinon la mise en page tablette sur le papier.
   Ce bloc est en fin de feuille a dessein : plusieurs regles de base qu'il doit couvrir
   (`.tableau-defile`, `.recherche-globale`) sont de meme poids et l'emporteraient sinon. */

/* Elements que la coquille pose pour les petits ecrans. Sans ce repli, ils s'afficheraient sur
   un ecran de bureau ou ils n'ont rien a faire. */
.menu-bouton, .rail-tete, .voile { display: none; }

/* Largeur des boites larges. Elle etait posee en style en ligne par `dialogue()`, et un style en
   ligne bat toute classe : la boite ne pouvait plus etre elargie a l'ecran sur un telephone. */
dialog.boite.large { width: min(860px, 96vw); }

@media screen and (max-width: 767px) {
  /* Le rail passe en tiroir. Rabattu en barre horizontale defilante, il faisait perdre l'entree
     courante des la cinquieme entree ; les applications en ont jusqu'a neuf. Le tiroir garde la
     liste entiere et l'entree courante marquee. */
  /* `minmax(0, 1fr)` ici AUSSI. La regle de large ecran avait ete corrigee le 2026-09-29, pas
     celle-ci : entre 621 et 900 px -- une tablette en portrait -- la piste se laissait encore
     pousser a 1076 px dans une fenetre de 834, et cinq ecrans defilaient lateralement. Le mode
     fiches ne rattrape rien, il ne s'ouvre qu'a 620. Un cote traite, son jumeau oublie. */
  .appli { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: fixed; top: 0; left: 0; bottom: 0; width: 272px; max-width: 86vw; z-index: 60;
    overflow-y: auto; transform: translateX(-100%); transition: transform .18s ease-out;
    box-shadow: var(--ombre-forte);
  }
  .rail.ouvert { transform: none; }
  .rail a { min-height: 44px; }
  .rail-tete { display: flex; justify-content: flex-end; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid var(--bord); }
  .voile { display: block; position: fixed; inset: 0; background: var(--voile); z-index: 55; }
  body.tiroir-ouvert { overflow: hidden; }

  .menu-bouton {
    display: inline-grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px;
    margin-left: -6px; border: 0; border-radius: var(--rayon-s); background: transparent;
    color: var(--texte-doux); cursor: pointer;
  }
  .menu-bouton:hover, .menu-bouton[aria-expanded="true"] { background: var(--surface-2); color: var(--texte); }
  .menu-bouton svg { width: 22px; height: 22px; }

  /* La barre haute reste accrochee en haut : le tiroir est le seul acces a la navigation, il ne
     doit pas obliger a remonter toute une liste de factures. */
  .barre-haute { position: sticky; top: 0; gap: 10px; }
  /* Le regime fiscal sort de la barre : il tient dans l'ecran de parametrage, pas ici. */
  .entreprise-bouton small { display: none; }
  /* Sans min-width, un champ de recherche garde sa largeur naturelle (une vingtaine de
     caracteres) et pousse l'avatar hors de la barre. */
  
  

  .principal { padding: 16px 16px 48px; }
  /* Quatre indicateurs sur une tablette donnent quatre colonnes ecrasees. */
  .grille.c3, .grille.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Au doigt, rien sous 40 px de haut, et une barre de boutons se replie au lieu de deborder. */
  .bouton { min-height: 40px; }
  .segments { display: flex; flex-wrap: wrap; }
  .segments button { min-height: 40px; }
  .fermer { min-width: 40px; min-height: 40px; }
   .utilisateur-menu a, .utilisateur-menu button { padding: 11px 10px; }
  .aide-lien { min-height: 40px; }
}

@media screen and (max-width: 767px) and (prefers-reduced-motion: reduce) {
  .rail { transition: none; }
}

@media screen and (max-width: 620px) {
  /* Barre haute d'un telephone : la marque, le tiroir, la recherche repliee, le pays et l'avatar.
     Le nom de l'application et celui de l'entreprise sortent : le premier est repete en tete du
     tiroir, le second ne change pas en cours de session. */
  .barre-haute { gap: 8px; padding: 0 10px; }
   .entreprise-bouton span:not(.pays) { display: none; }
  /* Le mot « Aide » sort, l'icone reste : la barre porte deja la marque, le tiroir, la loupe, le
     pays et l'avatar sur 390 px. Le nom du lien survit dans son `aria-label`, pose par
     `lienAide` -- un bouton reduit a son dessin n'a plus de nom du tout sans lui. */
  .aide-mot { display: none; }
  .aide-lien { padding: 8px; }
  
  .entreprise-bouton { padding: 6px 2px; }
  /* Le menu des applications s'ancre sur la barre et non sur son bouton : ancre au bouton, large
     de 240 px, il sortait de l'ecran par la droite. */
  
  

  /* Recherche transverse : repliee derriere une loupe, elle se deplie en seconde ligne posee
     par-dessus le contenu. Elle ne pousse pas la page, sinon la barre sauterait a chaque frappe.
     Les 54 px sous lesquels tombent les resultats sont la hauteur du champ (42) et les deux
     ecarts de 6 px : deplacer l'un sans l'autre superpose le panneau et le champ. */
  
  
  
  
  
  
  

  .principal { padding: 14px 12px 48px; }
  h1 { font-size: 1.25rem; }
  /* `minmax(0, 1fr)` et non `1fr` : une colonne `1fr` ne descend pas sous la largeur minimale de
     son contenu (l'option la plus longue d'une liste), et la page debordait (index.html, 390 px). */
  .grille.c2, .grille.c3, .grille.c4 { grid-template-columns: minmax(0, 1fr); }

  /* MAIS PAS LA RANGEE D'INDICATEURS : elle reste a DEUX colonnes sur un telephone.
     Mesure du 2026-10-01, sur l'ecran Factures, hauteurs relevees dans le navigateur : quatre
     indicateurs de 116 px empiles font 506 px, et la carte de recherche repliee 384 px. Avec le
     bandeau, la barre haute, l'en-tete et les onglets, il fallait defiler 1 067 px AVANT LA
     PREMIERE FACTURE -- sur un ecran de telephone qui en montre environ 700. L'ecran des factures
     s'ouvrait donc sur AUCUNE facture.
     Deux colonnes ramenent les indicateurs a 246 px : la liste remonte de 260 px, et le premier
     document entre dans le premier ecran. Un indicateur porte un libelle court et un nombre -- il
     n'a jamais eu besoin de toute la largeur.
     `:has()` ET NON UNE CLASSE DE PLUS : la rangee est reconnue a ce qu'elle CONTIENT, donc un
     ecran qui pose des indicateurs demain en herite sans que personne y pense. Un navigateur qui
     ne connait pas `:has()` ignore la regle et retombe sur une colonne -- l'etat d'avant, jamais
     une mise en page cassee. */
  .grille:has(> .indicateur) { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  /* Tableaux en fiches empilees. Douze colonnes ne se lisent pas sur 390 px, et un defilement
     horizontal cache les colonnes de droite sans dire qu'elles existent. Une ligne devient un
     bloc ou chaque valeur porte l'intitule de sa colonne, que `tableau()` a pose dans
     data-intitule. Seuls les tableaux marques `fiches` se replient : l'editeur de lignes d'un
     document est une grille de saisie, elle se defile mieux qu'elle ne s'empile. */
  .fiches { overflow-x: visible; }
  .fiches table, .fiches tbody, .fiches tfoot, .fiches tr { display: block; }
  .fiches thead { display: none; }
  .fiches tr { padding: 10px 12px; border-bottom: 1px solid var(--bord); }
  .fiches tr:last-child { border-bottom: 0; }
  .fiches td { display: flex; gap: 10px; align-items: baseline; padding: 3px 0; border-bottom: 0; }
  /* Une colonne sans valeur pour cette ligne ne laisse pas un intitule seul. */
  .fiches td:empty { display: none; }
  .fiches td:not([data-intitule=""])::before {
    content: attr(data-intitule); flex: 0 0 38%;
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
    color: var(--texte-faible);
  }
  .fiches .cellule { flex: 1 1 auto; min-width: 0; text-align: right; overflow-wrap: anywhere; }
  .fiches tr.total, .fiches tfoot tr { background: var(--surface-2); font-weight: 650; }
  .fiches tr.total td, .fiches tfoot td { border-top: 0; background: transparent; }

  /* Formulaires : un champ par ligne, et une largeur reglee pour un ecran large ne tient plus. */
  .barre > .champ { width: 100%; }
  .champ.court input, .champ.court select, .champ.etroit input, .champ.etroit select { max-width: none; }
  /* 16 px : en dessous, Safari sur iPhone agrandit la page a la prise de focus et ne la reduit
     jamais. La hauteur de 40 px est la cible tactile. */
  .champ input, .champ select, .champ textarea { font-size: 16px; min-height: 40px; }
  .definition { grid-template-columns: 1fr; gap: 0; }
  .definition dt { margin-top: 10px; }
  .definition dt:first-of-type { margin-top: 0; }

  /* La boite de dialogue prend l'ecran. `dvh` suit la barre d'adresse du telephone, qui se
     retracte au defilement : avec `vh` seul, le pied de la boite passe sous cette barre. */
  dialog.boite, dialog.boite.large {
    inset: 0; margin: 0; width: 100vw; max-width: 100vw; border: 0; border-radius: 0;
    height: 100vh; height: 100dvh; max-height: 100vh; max-height: 100dvh;
  }
  dialog.boite form { height: 100%; max-height: 100vh; max-height: 100dvh; }
  dialog.boite .boite-corps { padding: 14px; }
  dialog.boite .boite-pied { padding: 10px 14px; }
  dialog.boite .boite-pied .bouton { flex: 1 1 auto; justify-content: center; }

  /* Ecrans publics : ce sont les premiers vus par un prospect. `.connexion` n'avait aucune marge
     laterale, la carte touchait les deux bords. */
  .public { padding: 20px 14px 56px; }
  .connexion { margin: 24px 12px; }

  /* Douze mois cote a cote : sans min-width, les etiquettes imposent leur largeur et le graphe
     deborde la carte. */
  .barres { gap: 3px; }
  .barres .barre-mois { min-width: 0; }
  .barres .barre-mois small { font-size: 9px; max-width: 100%; white-space: normal; line-height: 1.15; text-align: center; }
}

/* Sous 360 px (petits Android), le mot de la marque ne tient plus dans la barre haute : le
   symbole seul reste, et il mene toujours a l'accueil. */
@media screen and (max-width: 360px) {
  .barre-haute .marque-mot { display: none; }
}

/* Drapeau du pays dans la barre haute, a la place de la pastille de deux lettres (demande de
   1FOPRESTA du 28 septembre 2026). Meme encombrement que la pastille : la barre garde sa mise en
   page selon que le pays declare un drapeau ou non. Le filet interieur detache du fond de la barre
   les drapeaux dont une bande est claire ou blanche. */
.pays-drapeau {
  flex: 0 0 auto; width: 26px; height: 20px; border-radius: 3px; object-fit: cover;
  border: 1px solid var(--bord-fort);
}

/* ─── Relances separees par nature (demande de 1FOPRESTA du 2026-09-28) ──────
   Deux ajouts seulement : le reste de l'ecran se fait avec `.segments`, `.note`,
   `.sous-carte` et `.etiquette`, qui existaient deja. */

/* Compte porte par un onglet de `.segments`. Sans surface propre, le nombre se confond
   avec le libelle et l'onglet se lit comme « Relances de devis 4 jours ». */
.segments button .compte-onglet {
  display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px;
  border-radius: 999px; background: var(--surface); color: var(--texte-doux);
  font-size: 11.5px; font-variant-numeric: tabular-nums;
}
.segments button.actif .compte-onglet { background: var(--primaire-pale); color: var(--primaire); }

/* Ligne d'un document qui ne sera PAS relance. Elle reste dans la liste -- la retirer
   laisserait croire que la facture est reglee -- mais elle ne doit pas se lire comme du
   travail a faire. D'ou l'effacement, et non une couleur d'alerte. */
tbody tr.exclue { opacity: .62; }
tbody tr.exclue:hover { opacity: 1; }

/* ── Comparaison des exercices : graphe a deux series, et ecart sous le montant ──────────
   Ajoute le 2026-09-28 avec la comparaison sur trois exercices anterieurs. Les couleurs sont
   celles des jetons du haut de cette feuille : le bleu de la marque pour l'exercice en cours, le
   gris du logo pour le precedent. Les deux se distinguent aussi en niveaux de gris, et chaque
   barre porte son intitule : un graphe se lit sans la couleur, ou ne se lit pas.
   La hauteur du corps est fixee en pixels, et non en pourcentage : une hauteur en pourcentage
   dans un element etire par le flex ne se resout pas partout, et les barres disparaissaient. */
.graphe-exercices { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; padding-top: 8px; }
.graphe-exercices .mois { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.graphe-exercices .corps {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 2px; width: 100%; height: 132px;
}
.graphe-exercices .corps i {
  display: block; flex: 1 1 0; min-width: 2px; min-height: 2px;
  background: var(--primaire); border-radius: 3px 3px 0 0;
}
.graphe-exercices .corps i.anterieur { background: var(--marque); }
.graphe-exercices .corps i.negatif { background: var(--danger); }
/* Un mois sans donnees n'est pas une barre a zero : sa place reste tenue, vide, et seul un
   pointille au sol dit qu'elle existe. Une barre de 2 px aurait ete lue comme un chiffre nul. */
.graphe-exercices .corps .absent {
  flex: 1 1 0; min-width: 2px; height: 100%;
  border-bottom: 2px dotted var(--bord-fort);
}
.graphe-exercices small { font-size: 10.5px; color: var(--texte-faible); white-space: nowrap; }
.graphe-legende { display: flex; flex-wrap: wrap; gap: 14px; padding-top: 10px; font-size: 12px; color: var(--texte-doux); }
.graphe-legende span { display: inline-flex; align-items: center; gap: 6px; }
.graphe-legende i { width: 10px; height: 10px; border-radius: 2px; background: var(--primaire); }
.graphe-legende i.anterieur { background: var(--marque); }

/* L'ecart tient sous le montant de l'exercice compare : quatre exercices avec chacun ses deux
   colonnes d'ecart ne tenaient sur aucun ecran. */
.ecart-mois { display: block; font-size: 11.5px; color: var(--texte-faible); }

/* Petits ecrans. Vingt-quatre barres sur 360 px ne se lisent pas : le graphe garde sa largeur
   utile et se defile, plutot que de se tasser jusqu'a ne plus rien montrer. Le tableau, lui, se
   replie tout seul en fiches empilees comme les autres (classe `fiches` posee par `tableau()`). */
@media screen and (max-width: 900px) {
  .graphe-exercices { gap: 4px; }
}
@media screen and (max-width: 620px) {
  .graphe-defile { overflow-x: auto; }
  .graphe-exercices { min-width: 560px; gap: 3px; }
  .graphe-exercices .corps { height: 112px; }
}

/* ── Recherche sur les listes de documents et brouillon de courriel (2026-09-28) ─────────── */

/* La carte de recherche des devis et des factures. Les champs y perdent leur marge basse : dans
   une grille, cette marge decale la derniere ligne de boutons par rapport aux champs qu'elle
   accompagne, et la carte se lit de travers. Les boutons s'alignent sur le bas des controles,
   la ou tombe leur ligne de saisie. */
.recherche-documents .champ { margin-bottom: 0; }
.recherche-documents .grille { align-items: end; }
/* La periode se saisit en deux champs cote a cote : `court` les borne a 190 px, ce qui laisse au
   nom du client la largeur dont il a besoin. Sous le seuil telephone la grille se replie seule. */
.recherche-documents .champ.court input { width: 100%; }

/* Le corps d'un courriel avant envoi. Quatre lignes (le defaut de `champ`) montrent le « Bonjour »
   et rien d'autre : on relit mal ce qu'on ne voit pas, et c'est precisement le geste que cette
   boite existe pour permettre. La hauteur reste bornee, la boite se defile deja. */
.courriel-brouillon textarea { min-height: 220px; }

/* ── Dossier d'un collaborateur : postes, valideurs, pièces (2026-09-28) ─────────────────── */

/* Trois listes dans une même boîte. Le titre d'une section doit se distinguer du titre de la
   boîte sans crier : `h3` seul héritait de la taille des titres de carte et les deux niveaux se
   confondaient. Le filet du haut sépare les sections mieux qu'une marge, qui se replie sur elle-
   même entre deux blocs voisins. */
.dossier-rh section { padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--bord); }
.dossier-rh section:first-child { padding-top: 0; margin-top: 0; border-top: 0; }
.dossier-rh h3 { font-size: 13.5px; font-weight: 650; margin: 0 0 8px; }

/* Une ligne du dossier : ce qu'elle décrit à gauche, ce qu'on en fait à droite. `items-start` et
   non `center` : quand le libellé passe sur deux lignes, un centrage vertical décale les boutons
   vers le bas et la liste perd son alignement. */
.ligne-dossier {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--bord); border-radius: var(--rayon-s);
  background: var(--surface-2);
}
.ligne-dossier .boutons { flex-shrink: 0; align-items: center; }
/* Sous le seuil téléphone la ligne se replie : les boutons sous le libellé plutôt qu'écrasés à
   côté de lui sur 60 px de large. */
@media screen and (max-width: 560px) {
  .ligne-dossier { flex-direction: column; }
}

/* Un intertitre dans un formulaire long (les coordonnées de paiement d'une fiche du personnel).
   Il se distingue des libellés de champ, qui sont en 12,5 px gris : sans cela, l'utilisateur ne
   voit pas où commence une nouvelle partie du formulaire. */
.sous-titre-formulaire {
  font-size: 13.5px; font-weight: 650; margin: 18px 0 2px;
  padding-top: 14px; border-top: 1px solid var(--bord);
}

/* ── Liste cherchable, pour les listes longues (2026-09-28) ────────────────────────────────
   Le menu d'un <select> natif est dessine par le systeme, hors du document : rien ici ne peut
   en borner la hauteur, et passe une douzaine d'entrees il depasse la fenetre. Au-dela du seuil,
   `champ()` rend donc ce cadre. Les regles ci-dessous ne s'appliquent qu'apres l'armement du
   composant (`[data-pret]`, pose par le JavaScript) : sans lui, le <select> natif reste visible
   et le champ garde le comportement d'hier au lieu de devenir inutilisable. */
.cherchable { position: relative; display: block; }
.cherchable .cherchable-saisie, .cherchable .cherchable-panneau { display: none; }
.cherchable select { width: 100%; }
.cherchable[data-pret] .cherchable-saisie { display: block; width: 100%; }
/* Le <select> garde la boite du champ au lieu d'etre replie sur un pixel : c'est lui qui porte
   la valeur et le `name`, et un controle `required` sans boite fait refuser la soumission par le
   navigateur sans rien montrer a personne. Invisible et hors d'atteinte du pointeur, il reste
   focalisable, donc la bulle de validation se pose bien sous le champ que l'on voit. */
.cherchable[data-pret] select { position: absolute; inset: 0; opacity: 0; pointer-events: none; }
/* `position: fixed` : le champ peut vivre dans une boite de dialogue ou dans un tableau qui
   defile, et un panneau en `absolute` y serait rogne. Le JavaScript mesure la place reellement
   disponible et pose lui-meme `top` ou `bottom`, `left`, la largeur et la hauteur maximale.
   `:not([hidden])` est indispensable : une classe qui poserait un `display` battrait l'attribut,
   et le panneau resterait ouvert pour toujours. */
.cherchable-panneau {
  position: fixed; z-index: 45; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--surface); border: 1px solid var(--bord-fort); border-radius: var(--rayon-s);
  box-shadow: var(--ombre-forte); padding: 4px;
}
.cherchable[data-pret] .cherchable-panneau:not([hidden]) { display: block; }
.cherchable-entree { padding: 7px 9px; border-radius: var(--rayon-s); font-size: 13.5px; cursor: pointer; }
.cherchable-entree:hover { background: var(--surface-2); }
/* L'entree parcourue au clavier et l'entree choisie ne se disent pas de la meme facon : la
   premiere se deplace sous les fleches, la seconde est la valeur du champ. */
.cherchable-entree.actif { background: var(--primaire-pale); }
.cherchable-entree[aria-selected="true"] { font-weight: 650; }
.cherchable-rien { padding: 10px 9px; color: var(--texte-faible); font-size: 12.5px; }
/* La ligne seconde d'une entree distante (decision 0121) : ville, identifiant. */
.cherchable-detail { display: block; color: var(--texte-faible); font-size: 12px; font-weight: 400; margin-top: 1px; }

@media screen and (max-width: 620px) {
  /* Au doigt, une entree se vise : la hauteur des cibles passe a 40 px, et la taille de police a
     16 px pour la meme raison que les autres champs — en dessous, le telephone zoome la page. */
  .cherchable-entree { padding: 10px 12px; font-size: 15px; }
  .cherchable-rien { font-size: 13.5px; }
}

/* ── Numéros de série sur la ligne d'un document (demande de 1FOPRESTA du 2026-09-28) ─────────
   Le bloc de saisie tient dans la cellule de désignation de l'éditeur de lignes, comme la période
   de service : ajouter une colonne au tableau décalerait le pied des totaux, qui compte les
   colonnes. Le filet à gauche le détache de la désignation sans ouvrir une seconde carte à
   l'intérieur d'une cellule. */
.serie-ligne {
  margin-top: 8px; padding: 6px 0 2px 10px;
  border-left: 2px solid var(--bord-fort);
}
.serie-entete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12.5px; }
/* Une case par unité vendue, sur une grille qui se replie : à quantité 12, douze champs sur une
   ligne ne se saisissent pas, et douze champs empilés font défiler la facture entière. Les cases
   gardent une largeur fixe pour que le numéro de l'unité 3 tombe toujours au même endroit. */
.serie-cases { display: flex; flex-wrap: wrap; gap: 8px; }
.serie-cases label { display: flex; flex-direction: column; gap: 3px; }
.serie-cases label span { font-size: 11px; color: var(--texte-faible); }
.serie-cases input {
  width: 150px; padding: 6px 9px; font-size: 13px;
  border: 1px solid var(--bord-fort); border-radius: var(--rayon-s); background: var(--surface);
}
.serie-cases input:focus { outline: none; border-color: var(--primaire); }

/* Barre de filtres du catalogue : le titre de l'onglet, la recherche, la catégorie, puis le compte
   repoussé à droite. Les champs y perdent leur marge basse (comme dans `.barre`) et le titre
   s'aligne sur la ligne de saisie plutôt que sur le haut des étiquettes. */
.filtres-catalogue { align-items: flex-end; }
.filtres-catalogue h2 { align-self: center; }

/* ── Référentiel de fonctions : la matrice « qui peut quoi » (décision 0016) ───────────────── */

/* Vingt-six droits en lignes, une colonne par fonction. Le tableau se DÉFILE horizontalement
   (`.tableau-defile` sans `fiches`) : replié en fiches, chaque droit deviendrait un bloc et la
   matrice cesserait d'être une matrice -- or c'est précisément la lecture d'un coup d'œil qui est
   demandée. La première colonne reste collée au bord gauche pendant le défilement : sans elle, on
   lit une colonne de marques sans savoir de quel droit il s'agit. */
.matrice-droits { font-size: 13px; }
.matrice-droits th:first-child, .matrice-droits td:first-child {
  position: sticky; left: 0; background: var(--surface); z-index: 1;
  border-right: 1px solid var(--bord);
}
.matrice-droits thead th { vertical-align: bottom; }
/* Le nom d'une fonction ne se coupe pas en deux : une colonne de marques sous un nom illisible
   n'apprend rien. */
.matrice-droits thead th.nombre { white-space: nowrap; }

/* Le domaine du catalogue, en travers du tableau. Il sépare les six groupes mieux qu'une marge,
   qui se replierait entre deux lignes voisines. */
.matrice-droits tr.groupe-droits td {
  background: var(--surface-2); font-weight: 650; font-size: 12px;
  text-transform: uppercase; letter-spacing: .04em; color: var(--texte-doux);
  position: static;
}

/* Le droit accordé. Une pastille et non une coche dessinée par une police : le glyphe manque sur
   certains systèmes et laisse alors une case vide, c'est-à-dire l'inverse de ce qu'elle dit.
   L'intitulé pour les lecteurs d'écran est porté par `aria-label`, la couleur seule ne disant
   rien à qui ne la voit pas. */
.coche {
  display: inline-block; width: 11px; height: 11px; border-radius: 3px;
  background: var(--succes); vertical-align: middle;
}

/* Les droits d'une fonction, dans sa boîte de saisie : un groupe du catalogue par bloc, deux
   colonnes de cases quand la largeur le permet. Une liste de vingt-six cases à la file se
   parcourt mal, et on y coche la ligne d'à côté. */
.cases-droits {
  border: 1px solid var(--bord); border-radius: var(--rayon-s);
  padding: 8px 12px 2px; margin: 0 0 10px;
}
.cases-droits legend {
  font-size: 12px; font-weight: 650; color: var(--texte-doux);
  text-transform: uppercase; letter-spacing: .04em; padding: 0 4px;
}
/* La grille est sur ce div et non sur le fieldset : la legende d'un fieldset est dessinee hors du
   flux par le navigateur et ne se range pas dans une grille. */
.cases-droits .cases { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.cases-droits .champ { margin-bottom: 4px; }
@media screen and (max-width: 560px) {
  .cases-droits .cases { grid-template-columns: 1fr; }
}

/* ── Calendrier des absences (1FOPRESTA, 2026-09-30) ──────────────────────────────────────────
   « prévoir l'affichage d'un calendrier avec la superposition des congés et absences des
   collaborateurs ».

   UNE CASE PAR JOUR, ET NON UNE BARRE POSITIONNÉE. Une barre absolue par absence se calcule en
   pourcentage de la largeur du mois, et elle se décale d'un demi-jour dès que la première colonne
   n'a pas exactement la largeur prévue — sur un téléphone, en zoom, ou avec un nom long. Une case
   par jour, dans un tableau, ne peut pas se décaler : c'est la grille qui tient l'alignement, et
   le jour lu sous la souris est le jour de l'absence. Une absence longue devient une suite de
   cases voisines, ce qui se lit pareil et ne ment jamais.

   Ce tableau NE PORTE PAS la classe `fiches` : trente et une colonnes ne se replient pas en
   fiches empilées, elles se défilent. C'est le même choix que l'éditeur de lignes d'un document. */
.calendrier { overflow-x: auto; }
.calendrier table { border-collapse: collapse; width: auto; min-width: 100%; }
.calendrier th, .calendrier td { border: 1px solid var(--bord); padding: 0; }
.calendrier th.cal-qui, .calendrier td.cal-qui {
  padding: 4px 10px; text-align: left; white-space: nowrap;
  /* La colonne des noms reste visible quand on défile le mois : sans elle, les cases du 28 ne
     disent plus de qui elles parlent. */
  position: sticky; left: 0; z-index: 1; background: var(--surface);
}
.calendrier thead th.cal-qui { background: var(--surface-2); }
.calendrier td.cal-qui .poste { display: block; font-size: 11.5px; color: var(--texte-faible); }
.calendrier th.cal-tete {
  width: 24px; min-width: 24px; font-size: 11px; font-weight: 600; color: var(--texte-doux);
  background: var(--surface-2); text-align: center; padding: 3px 0;
}
.calendrier th.cal-tete small { display: block; font-size: 9.5px; color: var(--texte-faible); font-weight: 400; }
.calendrier th.cal-tete.fin-semaine, .calendrier td.cal-case.fin-semaine { background: var(--surface-2); }
.calendrier th.cal-tete.aujourdhui { color: var(--primaire); box-shadow: inset 0 -2px 0 var(--primaire); }
.calendrier td.cal-case { height: 26px; text-align: center; font-size: 10px; color: var(--texte-doux); }

/* La nature donne la couleur, le statut donne la MATIÈRE : un congé accepté est plein, un congé
   demandé est hachuré. Les deux ne se lisent pas pareil quand on cherche qui sera là la semaine
   prochaine, et les confondre ferait planifier sur du sable. La couleur seule ne suffirait pas --
   elle ne dit rien à qui ne la distingue pas — d'où la matière ET l'infobulle portée par chaque
   case. */
.calendrier td.cal-case.posee { border-color: var(--bord-fort); }
.calendrier td.payes { background: var(--primaire-pale); }
.calendrier td.maladie { background: var(--alerte-pale); }
.calendrier td.sans_solde { background: var(--surface-2); }
.calendrier td.exceptionnel { background: var(--succes-pale); }
.calendrier td.cal-case.demande {
  background-image: repeating-linear-gradient(45deg,
    var(--barre-future) 0 2px, transparent 2px 5px);
}
/* Le dépassement du mois affiché : une absence qui commence avant ou finit après ne s'arrête pas
   au bord, et le bord le dit. Sans cette marque, un congé de trois semaines se lirait comme un
   congé d'une semaine — c'est le cas des congés longs, celui qu'on oublie. */
.calendrier td.cal-case.avant { border-left: 3px double var(--texte-doux); }
.calendrier td.cal-case.apres { border-right: 3px double var(--texte-doux); }

.cal-legende { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 10px 0 0; font-size: 12px; color: var(--texte-doux); }
.cal-legende span.pastille {
  display: inline-block; width: 12px; height: 12px; border: 1px solid var(--bord-fort);
  border-radius: 3px; vertical-align: -2px; margin-right: 5px;
}
.cal-legende span.pastille.hachuree {
  background-image: repeating-linear-gradient(45deg,
    var(--barre-future) 0 2px, transparent 2px 5px);
}
.cal-mois { display: flex; gap: 8px; align-items: center; }
.cal-mois .nom { font-weight: 600; min-width: 9.5rem; text-align: center; text-transform: capitalize; }
/* Les pastilles de la légende portent les mêmes couleurs que les cases, mais elles vivent HORS du
   tableau : les règles ci-dessus sont volontairement portées par `.calendrier td`, sinon un `td`
   d'un autre tableau qui porterait par hasard la classe « maladie » changerait de couleur. */
.cal-legende .pastille.payes { background: var(--primaire-pale); }
.cal-legende .pastille.maladie { background: var(--alerte-pale); }
.cal-legende .pastille.sans_solde { background: var(--surface-2); }
.cal-legende .pastille.exceptionnel { background: var(--succes-pale); }

/* LA COLONNE DU PRODUIT NE SE LAISSE PLUS ECRASER (audit d'ergonomie du 2026-09-30).

   Le tableau est en disposition automatique, et toutes les autres colonnes portent une largeur
   FIXE en pixels : quantite, unite, prix, remise, puis les colonnes de montants. Quand leur somme
   approche la largeur disponible, la seule colonne sans largeur fixe -- celle du produit -- est
   la seule que le navigateur peut retrecir, et il la retrecit jusqu'a son minimum. Le `width: 38%`
   pose sur son en-tete n'est qu'une indication, et elle perd contre des pixels.

   Resultat mesure sur l'ecran de creation d'un devis : la liste deroulante affichait « Sais » pour
   « Saisie libre », et le champ en dessous « Desigr » pour « Designation ». Sur l'ecran qui porte
   la demonstration du produit, et sur sa toute premiere ligne.

   Une largeur MINIMALE plutot qu'une largeur fixe : la colonne garde le droit de s'etendre quand
   la place existe, et le tableau defile horizontalement quand elle manque -- `.tableau-defile`
   est deja la pour cela. Rien n'est coupe dans aucun des deux cas. */
.lignes-document th:first-child,
.lignes-document td:first-child { min-width: 190px; }

/* LA MARQUE AVEC LE NOM DU PAYS SOUS LE MOT (demande du 2026-10-01).

   Le petit drapeau pose a cote de la marque a disparu : il repetait en vignette ce que le degrade
   de la marque dit desormais dans le dessin lui-meme (`/api/instance/marque.svg`).

   Le bloc de droite est une colonne CENTREE : le nom du pays se cale sous le milieu du mot, quelle
   que soit la longueur du nom -- « Congo-Brazzaville » et « Gabon » tombent tous les deux au bon
   endroit sans qu'on ait rien a regler.

   `align-items: flex-start` sur la rangee, et non `center` : le mot doit s'aligner sur le HAUT du
   symbole. Centre, il descendait et la deuxieme ligne poussait l'ensemble vers le bas de la barre.

   L'echelle du symbole n'est PAS augmentee ici : elle vient de `.public .marque-icone`, et ce
   bloc-ci ne touche qu'a l'agencement. Deux endroits qui dimensionnent le meme dessin finiraient
   par se contredire. */
.marque-pays { align-items: flex-start; gap: 12px; }
.marque-bloc { display: flex; flex-direction: column; align-items: center; gap: 5px; }
/* L'ESPACEMENT DES LETTRES SE REMET A ZERO ICI, ET CE N'EST PAS DE LA COSMETIQUE. `.public
   .marque` pose `letter-spacing: .2em` -- pour le TEXTE DE REMPLACEMENT du mot, quand le dessin
   ne charge pas. Le nom du pays, lui, en heritait : « C o n g o - B r a z z a v i l l e ».
   Vu a l'ecran avant d'etre livre. Le poids et la couleur se reposent pour la meme raison. */
.marque-pays-nom {
  font-size: 13px; color: var(--texte-doux); line-height: 1.1;
  letter-spacing: normal; font-weight: 400;
}

/* Sous 620 px, le nom du pays passe sous la marque entiere plutot que de retrecir le mot : une
   barre qui se comprime finit par couper le nom du pays, et c'est justement ce qu'on vient
   d'ajouter. */
@media screen and (max-width: 620px) {
  .marque-pays-nom { font-size: 12px; }
}

/* La mention qui dit qu'une famille de resultats est tronquee (2026-10-01). Discrete, sous la
   derniere ligne : elle informe celui qui ne trouve pas, sans peser sur celui qui a trouve. */


/* ── Le back-office se distingue de l'application d'une entreprise (2026-10-12) ─────────────────
   Demande de Manu : avec la meme barre et les memes couleurs, on croyait etre DANS une entreprise.
   La coquille du back-office (`body.back-office`, posee par `poserOssature`) a donc sa barre haute
   sombre, un liseré ambre, la mention « Back-office » et le nom de l'INSTANCE, et un rail ou
   l'entree courante est marquee de la meme couleur d'accent. Aucune couleur d'un pays ni d'une
   entreprise : le back-office est generique, il sert la maison.
   CONTRASTES (WCAG AA, texte normal >= 4,5:1), anthracite depuis la decision 0126 : blanc sur
   #38393D ~ 11:1 ; #38393D sur la pastille blanche ~ 11:1 ; #D9DAD3 sur #38393D ~ 8:1.

   FINITION DU 2026-10-12 (revue Chrome a 1568 et 390 px). TOUT CE BLOC EST SOUS `.back-office` :
   l'application d'une entreprise ne change pas d'un pixel. Ce qu'il corrige :
   - texte gris clair trop petit : `--texte-faible` passe de #8a94a1 (3,0:1 sur blanc, refuse AA)
     a #5b6572 (5,9:1 sur blanc, 5,2:1 sur --surface-2), et le texte secondaire monte a 13-14 px ;
   - zone utile plafonnee a 1180 px sur un ecran de 1568 : elle va jusqu'a 1440 px, centree ;
   - tableau qui deborde sans le dire : ombre au bord qui cache quelque chose (classes posees par
     `marquerDefilement`), premiere colonne figee ;
   - une barre haute qui passait sur trois lignes a 390 px : marqueur court, `nowrap`, nom
     d'instance tronque ;
   - cibles tactiles de 44 px sous 900 px, focus visible partout. */
.back-office {
  /* Design 2026 (decision 0126) : plus d'ambre (pas de jaune) ; bandeau et accents ANTHRACITE, la
     mention « Console d'administration » en pastille claire. */
  --bo-fond: #38393D;
  --bo-fond-2: #4A4B50;
  --bo-texte: #FFFFFF;
  --bo-doux: #D9DAD3;
  --bo-accent: #38393D;
  --bo-accent-pale: #EBEBE6;
  --bo-accent-texte: #38393D;
  --bo-pastille: #FFFFFF;
  --bo-bord: #3a4a60;
}
:root[data-theme="dark"] .back-office { --bo-fond: #2D2E34; --bo-fond-2: #3A3B42; --bo-accent: #A9AAAF; --bo-accent-pale: #2D2E34; --bo-accent-texte: #ECECE8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .back-office { --bo-fond: #2D2E34; --bo-fond-2: #3A3B42; --bo-accent: #A9AAAF; --bo-accent-pale: #2D2E34; --bo-accent-texte: #ECECE8; } }
.back-office .barre-haute {
  background: var(--bo-fond); color: var(--bo-texte);
  border-bottom: 0; box-shadow: inset 0 -3px 0 var(--bo-accent);
}
.back-office .barre-haute .marque-mot { filter: brightness(0) invert(1); }
.back-office .barre-haute > .aide-lien,
.back-office .barre-haute > .bo-espace,
.back-office .barre-haute > .menu-bouton { color: var(--bo-texte); }
.back-office .barre-haute > .aide-lien:hover,
.back-office .barre-haute > .bo-espace:hover,
.back-office .barre-haute > .menu-bouton:hover {
  background: var(--bo-fond-2); border-color: var(--bo-fond-2); color: var(--bo-texte);
}
.back-office .avatar { background: var(--bo-accent); color: var(--bo-fond); }
.back-office-titre {
  flex: 0 0 auto; display: inline-block; padding: 3px 9px; border-radius: var(--rayon-s);
  background: var(--bo-accent); color: var(--bo-fond); white-space: nowrap;
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
/* Le nom de l'instance prend ce qui reste, et pas plus : tronque par des points de suspension,
   lisible en entier dans son infobulle. `min-width: 0` sans quoi un element flexible refuse de
   descendre sous la largeur de son texte et pousse la barre hors de l'ecran. */
.back-office-instance { flex: 0 1 auto; min-width: 0; max-width: 320px; text-align: right; line-height: 1.2; }
.back-office-instance strong {
  display: block; font-size: 13.5px; color: var(--bo-texte);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.back-office .barre-haute .espace { min-width: 0; }
.bo-espace {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; flex: 0 0 auto;
  border: 1px solid var(--sur-sombre-doux); border-radius: var(--rayon-s); background: transparent;
  font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer;
}
.bo-espace svg { width: 17px; height: 17px; flex: 0 0 auto; }
.back-office .rail { border-right: 3px solid var(--bo-accent); }
.back-office .rail a.actif {
  background: var(--bo-accent-pale); color: var(--bo-accent-texte);
  box-shadow: inset 3px 0 0 var(--bo-accent);
}
.back-office .rail .groupe { color: var(--texte-doux); font-size: 11.5px; }
.back-office .rail a { color: var(--texte); }

/* Focus visible, partout : clavier ou lecteur d'ecran doivent savoir ou ils sont. */
.back-office :focus-visible { outline: 2px solid var(--primaire); outline-offset: 2px; }
.back-office .barre-haute :focus-visible { outline-color: var(--bo-accent); }

/* ── Mise en page ────────────────────────────────────────────────────────────────────────── */
.back-office .principal { max-width: 1440px; width: 100%; margin: 0 auto; }
.back-office .entete { margin-bottom: 14px; }
.back-office .entete .sous-titre { font-size: 14px; color: var(--texte-doux); max-width: 80ch; }
.back-office .carte + .carte, .back-office .tableau-cadre + h2 { margin-top: 0; }
.back-office .carte > h2, .back-office .carte > .barre > h2 { font-size: 1.1rem; }
.back-office .doux { color: var(--texte-doux); font-size: 14px; }
.back-office .faible { color: var(--texte-faible); font-size: 13px; }
.back-office .indicateur .libelle { font-size: 13px; color: var(--texte-doux); }
.back-office .indicateur .detail { font-size: 13px; color: var(--texte-faible); }
.back-office .champ .aide { font-size: 12.5px; color: var(--texte-faible); }
.back-office .champ label { font-size: 13px; }
.back-office .etiquette { font-size: 12px; }
.back-office .note { font-size: 14px; }

.back-office .fiche-instance { font-size: 14px; gap: 8px 16px; grid-template-columns: minmax(150px, 220px) 1fr; }
.back-office .fiche-instance dd { overflow-wrap: anywhere; }
.back-office .fiche-instance dt { color: var(--texte-doux); }
@media (max-width: 620px) { .back-office .fiche-instance { grid-template-columns: 1fr; gap: 0; } .back-office .fiche-instance dd { margin-bottom: 4px; font-weight: 500; } }

/* Le texte qui explique une zone, replie (`explication()` dans quaeroo.js). */
.explication { margin: 0 0 10px; font-size: 14px; color: var(--texte-doux); }
.explication summary {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600;
  color: var(--primaire); list-style: none; min-height: 28px;
}
.explication summary::-webkit-details-marker { display: none; }
.explication summary::before { content: "+"; font-weight: 700; width: 12px; text-align: center; }
.explication[open] summary::before { content: "−"; }
.explication > div { padding: 4px 0 0 18px; max-width: 90ch; }

/* ── Tableaux ────────────────────────────────────────────────────────────────────────────── */
.back-office table { font-size: 14px; }
.back-office thead th { font-size: 12px; color: var(--texte-doux); white-space: nowrap; }
.back-office tbody td { vertical-align: top; }
.back-office .tableau-cadre { position: relative; }
/* Une date tient sur UNE ligne : « 12/10/2026 16:04 » coupe en quatre ne se lit plus. */
.back-office .date-heure { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (min-width: 621px) {
  /* La premiere colonne -- le sujet de la ligne -- reste en place quand le tableau defile. */
  .back-office .tableau-defile th:first-child,
  .back-office .tableau-defile td:first-child {
    position: sticky; left: 0; z-index: 1; background: var(--surface);
  }
  .back-office .tableau-defile th:first-child { background: var(--surface-2); z-index: 2; }
  .back-office .tableau-defile tbody tr:hover td:first-child { background: var(--surface-2); }
  .back-office .tableau-defile tbody tr.danger td:first-child { background: var(--danger-pale); }
  .back-office .defile-a-gauche .tableau-defile th:first-child,
  .back-office .defile-a-gauche .tableau-defile td:first-child { box-shadow: 8px 0 8px -8px var(--ombre-defile); }
  /* L'ombre du bord droit : il reste des colonnes a voir. */
  .back-office .tableau-cadre::after {
    content: ""; position: absolute; top: 0; right: 0; bottom: 0; width: 18px; pointer-events: none;
    background: linear-gradient(90deg, transparent, var(--ombre-defile));
    opacity: 0; transition: opacity .15s; border-radius: 0 var(--rayon) var(--rayon) 0; z-index: 3;
  }
  .back-office .tableau-cadre.defile-a-droite::after { opacity: 1; }
}

/* ── Boutons ─────────────────────────────────────────────────────────────────────────────── */
.back-office .bouton { font-size: 13.5px; }
.back-office .bouton.petit { font-size: 13px; padding: 5px 10px; }
.back-office .bouton:disabled, .back-office .bouton[disabled] {
  opacity: 1; background: var(--surface-2); color: var(--texte-faible); border-color: var(--bord);
}
/* Tertiaire : un geste d'appoint, sans cadre, qui ne dispute rien au geste principal. */
.back-office .bouton.tertiaire { border-color: transparent; background: transparent; color: var(--primaire); }
.back-office .bouton.tertiaire:hover { background: var(--primaire-pale); }
.back-office .bouton.icone { padding: 7px; justify-content: center; min-width: 36px; }
.back-office .bouton.icone svg { width: 18px; height: 18px; }
.back-office .bouton.danger.plein { background: var(--danger); border-color: var(--danger); color: var(--alerte-texte); }
.back-office .bouton.danger.plein:hover { background: var(--alerte-fond); }

/* Les actions d'une ligne : un groupe ALIGNE, jamais une colonne de boutons empiles. */
.back-office .actions-ligne { flex-wrap: nowrap; align-items: center; gap: 6px; justify-content: flex-end; }
.back-office .actions-ligne > .bouton { white-space: nowrap; }
.menu-actions { position: relative; display: inline-flex; }
.menu-actions-liste {
  position: fixed; z-index: 70; min-width: 210px; max-width: calc(100vw - 16px);
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon);
  box-shadow: var(--ombre-forte); padding: 6px; display: flex; flex-direction: column; gap: 2px;
}
.menu-actions-liste[hidden] { display: none; }
/* Les entrees d'un menu « … » sont des lignes de menu, pas des boutons a bordure, PARTOUT (le
   style n'etait pose que dans le back-office : recette de Manu du 22/10 sur une note de frais). */
.menu-actions-liste .bouton, .menu-actions-liste > button {
  display: flex; width: 100%; justify-content: flex-start; border: 0; background: transparent; box-shadow: none;
  padding: 9px 10px; font: inherit; font-weight: 500; color: var(--texte); white-space: nowrap; min-height: 40px;
  border-radius: 12px; cursor: pointer; text-align: left;
}
.menu-actions-liste .bouton:hover, .menu-actions-liste > button:hover,
.menu-actions-liste .bouton:focus-visible, .menu-actions-liste > button:focus-visible { background: var(--surface-2); }
.menu-actions-liste .bouton.danger, .menu-actions-liste > button.danger { color: var(--danger); }
.menu-actions-liste .bouton.danger:hover, .menu-actions-liste > button.danger:hover { background: var(--danger-pale); }

/* ── Barre de recherche d'une liste : champ et bouton sur UNE ligne, a toutes les largeurs ── */
.recherche-liste { display: flex; align-items: stretch; gap: 6px; flex: 0 1 380px; min-width: 0; }
.recherche-liste input {
  flex: 1 1 auto; min-width: 0; padding: 8px 11px; border: 1px solid var(--bord-fort);
  border-radius: var(--rayon-s); font: inherit; font-size: 14px; background: var(--surface); color: var(--texte);
}
.recherche-liste input:focus { outline: 2px solid var(--primaire-pale); border-color: var(--primaire); }
.recherche-liste .bouton { flex: 0 0 auto; }
.recherche-liste .bouton svg { width: 16px; height: 16px; }
/* Une barre d'en-tete de carte : titre a gauche, outils a droite, qui passent dessous sans se
   decaler quand la place manque. */
.back-office .barre { align-items: center; row-gap: 10px; }
.back-office .barre > h2 { margin: 0; flex: 1 1 auto; }

/* ── Offres et modules : une ligne par entreprise (retour de Manu du 2026-10-12) ──────────────
   PLUS DE MATRICE. La matrice entreprises x applications defilait lateralement des dix
   applications, meme a 2000 px. La liste ne depend plus du nombre d'applications : un resume, les
   seules pastilles d'attention, la jauge de lecture, et « Gérer ». La grille de la ligne se regle
   sur la largeur de la LISTE (requete de conteneur), pas sur celle de la fenetre : le rail
   lateral change la place disponible, et c'est elle qui compte. */
.pastille-module {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; min-height: 30px; max-width: 100%;
  border-radius: 999px; border: 1px solid var(--bord); background: var(--surface); text-align: left;
  font: inherit; font-size: 12.5px; font-weight: 600; line-height: 1.3; color: var(--texte-doux); cursor: pointer;
}
.pastille-module i { width: 8px; height: 8px; border-radius: 50%; background: var(--bord-fort); flex: 0 0 auto; }
button.pastille-module:hover { border-color: var(--primaire); }
.pastille-module.actif { background: var(--succes-pale); border-color: var(--succes); color: var(--succes); }
.pastille-module.actif i { background: var(--succes); }
.pastille-module.bientot { background: var(--alerte-pale); border-color: var(--alerte); color: var(--alerte); }
.pastille-module.bientot i { background: var(--alerte); }
.pastille-module.expire { background: var(--danger-pale); border-color: var(--danger); color: var(--danger); }
.pastille-module.expire i { background: var(--danger); }
.pastille-module.neutre { color: var(--texte); border-color: var(--bord-fort); }
.pastille-module.neutre i { background: var(--texte-doux); }
.pastille-module.inactif { border-style: dashed; color: var(--texte-doux); background: transparent; }
.pastille-module.legende { cursor: default; white-space: nowrap; }
.legende-modules { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin: 2px 0 6px; }
.legende-modules .pastille-module { min-height: 24px; padding: 1px 8px; font-size: 12px; }

.filtres-modules { gap: 10px 14px; margin-bottom: 10px; }
.filtres-modules .compte { font-weight: 500; opacity: .85; font-variant-numeric: tabular-nums; }
.filtres-modules .mot-court { display: none; }
.filtre-application { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--texte-doux); flex-wrap: wrap; }
.filtre-application select {
  min-height: 36px; max-width: 100%; padding: 6px 10px; font: inherit; color: var(--texte);
  border: 1px solid var(--bord-fort); border-radius: var(--rayon-s); background: var(--surface);
}
@media (max-width: 560px) {
  .filtres-modules .mot-long { display: none; }
  .filtres-modules .mot-court { display: inline; }
  .back-office .filtres-modules .barre-segmentee button { padding: 6px 8px; }
  .filtre-application { width: 100%; }
  .filtre-application select { flex: 1 1 160px; }
}

.liste-modules { list-style: none; margin: 4px 0 0; padding: 0; container: liste-modules / inline-size; }
.ligne-module {
  display: grid; gap: 8px 16px; align-items: start; padding: 12px 0; border-top: 1px solid var(--bord);
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "identite actions" "resume resume" "attention attention" "lecture lecture";
}
.ligne-module > * { min-width: 0; }
.lm-identite { grid-area: identite; overflow-wrap: anywhere; }
.lm-identite .etiquette { margin-left: 4px; }
.lm-identite .faible { font-size: 12.5px; margin-top: 2px; }
.lm-resume { grid-area: resume; display: grid; gap: 5px; font-size: 13px; color: var(--texte-doux); }
.lm-barre { display: flex; gap: 2px; height: 6px; max-width: 220px; border-radius: 999px; overflow: hidden; background: var(--surface-2); }
.lm-barre i { display: block; flex: 1 1 0; min-width: 4px; }
.lm-barre i.actif { background: var(--succes); }
.lm-barre i.bientot { background: var(--alerte); }
.lm-barre i.expire { background: var(--danger); }
.lm-barre i.inactif { background: var(--bord-fort); }
.lm-attention { grid-area: attention; list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lm-attention > li { max-width: 100%; }
.lm-attention > li.faible { font-size: 13px; }
.lm-inactives { font-size: 13px; color: var(--texte-doux); overflow-wrap: anywhere; }
.lm-inactives summary { cursor: pointer; color: var(--texte-doux); font-weight: 600; }
.lm-inactives summary:hover { color: var(--primaire); }
.lm-inactives details[open] summary { margin-bottom: 2px; }
.lm-lecture {
  grid-area: lecture; display: grid; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--texte-doux);
  grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "libelle texte" "jauge jauge";
}
.lm-lecture-libelle { grid-area: libelle; font-size: 12px; }
.lm-lecture-texte { grid-area: texte; }
.lm-jauge { grid-area: jauge; max-width: 220px; display: block; height: 6px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--bord); overflow: hidden; }
.lm-jauge.sans-quota { border-style: dashed; background: transparent; }
.lm-jauge i { display: block; height: 100%; background: var(--primaire); }
.lm-lecture.bientot .lm-jauge i { background: var(--alerte); }
.lm-lecture.expire .lm-jauge i { background: var(--danger); }
.lm-lecture.bientot .lm-lecture-texte { color: var(--alerte); font-weight: 600; }
.lm-lecture.expire .lm-lecture-texte { color: var(--danger); font-weight: 600; }
.lm-lecture-texte { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lm-actions { grid-area: actions; justify-self: end; }
@container liste-modules (min-width: 640px) {
  .ligne-module {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
    grid-template-areas: "identite resume actions" "attention attention lecture";
  }
  .lm-lecture { grid-template-columns: minmax(0, 1fr); grid-template-areas: "libelle" "texte" "jauge"; gap: 3px; }
}
@container liste-modules (min-width: 980px) {
  .ligne-module {
    grid-template-columns: minmax(170px, 1.15fr) minmax(150px, .85fr) minmax(0, 2fr) minmax(130px, .8fr) auto;
    grid-template-areas: "identite resume attention lecture actions";
    align-items: center;
  }
}

/* Le panneau « Gérer » : toutes les applications de l'entreprise, une par ligne. */
.panneau-entreprise .boite-corps h3 { margin: 18px 0 8px; font-size: 14px; }
.pa-resume { display: grid; gap: 6px; }
.pa-resume .lm-resume { grid-area: auto; }
.panneau-entreprise .lm-lecture { margin-bottom: 6px; }
.panneau-applications { list-style: none; margin: 0; padding: 0; border: 1px solid var(--bord); border-radius: var(--rayon); }
.pa-ligne {
  display: grid; gap: 4px 12px; padding: 10px 12px; border-top: 1px solid var(--bord);
  grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "tete actions" "details actions" "echeance echeance";
}
.pa-ligne:first-child { border-top: 0; }
.pa-ligne > * { min-width: 0; }
.pa-ligne.en-avant { background: var(--primaire-pale); }
.pa-tete { grid-area: tete; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.pa-details { grid-area: details; font-size: 12.5px; overflow-wrap: anywhere; }
.pa-actions { grid-area: actions; align-self: center; flex-wrap: nowrap; }
.pa-echeance { grid-area: echeance; padding-top: 6px; }
.pa-rangee { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end; }
.pa-rangee > .champ { flex: 1 1 200px; margin-bottom: 0; }
@media (max-width: 520px) {
  .pa-ligne { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tete" "details" "actions" "echeance"; }
  .pa-actions { flex-wrap: wrap; }
}

/* ── Aucun defilement lateral des 1024 px (retour de Manu du 2026-10-12) ────────────────────
   Un ecran d'ordinateur qui cache des colonnes n'a pas ete concu pour sa largeur. Au-dessus de
   1024 px, un tableau du back-office se resserre au lieu de defiler : les intitules passent a la
   ligne, une valeur longue (adresse, reference) se coupe ou elle peut, les gestes d'une ligne
   s'empilent si la place manque. `tests/banc-back-office.mjs` (regle 12) le mesure sur toutes les
   rubriques ; seul un tableau marque `data-defilement-autorise` y echappe. */
@media (min-width: 1024px) {
  .back-office .tableau-defile:not([data-defilement-autorise] *) thead th { white-space: normal; overflow-wrap: normal; }
  .back-office .tableau-defile:not([data-defilement-autorise] *) tbody td { overflow-wrap: anywhere; }
  .back-office .tableau-defile:not([data-defilement-autorise] *) .actions-ligne { flex-wrap: wrap; }
  .back-office .tableau-defile:not([data-defilement-autorise] *) .date-heure,
  .back-office .tableau-defile:not([data-defilement-autorise] *) td .etiquette { white-space: normal; }
}
/* Entre 1024 et 1440 px, le rail laisse 700 a 1150 px : les cellules se serrent un peu. */
@media (min-width: 1024px) and (max-width: 1439px) {
  .back-office .tableau-defile:not([data-defilement-autorise] *) thead th,
  .back-office .tableau-defile:not([data-defilement-autorise] *) tbody td { padding-left: 6px; padding-right: 6px; }
  .back-office .tableau-defile:not([data-defilement-autorise] *) table { font-size: 13px; }
  .back-office .tableau-defile:not([data-defilement-autorise] *) .actions-ligne > .bouton { padding-left: 10px; padding-right: 10px; }
}

/* ── Journal des actes ───────────────────────────────────────────────────────────────────── */
.journal-details { margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--texte-doux); }
.journal-details li { margin: 0; overflow-wrap: anywhere; }
.journal-details details summary { cursor: pointer; color: var(--primaire); font-weight: 600; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; font-size: 13.5px; color: var(--texte-doux); }

/* ── Revue mobile du 2026-10-12 (Chrome a 390 px) : trois composants de `quaeroo.js` ──────────
   LA BARRE SEGMENTEE (`barreSegmentee`) tient sur UNE ligne a toute largeur : ses boutons se
   partagent la place, aucun ne passe sous l'autre. L'etat actif est plein (fond primaire, texte
   blanc, 9:1) : le blanc sur gris clair de `.segments` se lisait mal en plein jour. Sa specificite
   bat la grille que `.segments` prend sous 620 px. */
.back-office .segments.barre-segmentee { display: inline-flex; flex-wrap: nowrap; width: auto; max-width: 100%; }
.back-office .barre > .barre-segmentee { flex: 0 0 auto; }   /* la rangee passe a la ligne, la barre ne se rogne pas */
.back-office .barre-segmentee button {
  flex: 1 0 auto; min-height: 36px; padding: 6px 14px; white-space: nowrap; color: var(--texte);
}
.back-office .barre-segmentee button[aria-pressed="true"] { background: var(--primaire); color: var(--sur-primaire); box-shadow: none; }
.back-office .barre-segmentee button[aria-pressed="false"]:hover { background: var(--surface); }
/* LES FILTRES REPLIABLES (`panneauFiltres`) : sous 768 px, un bouton « Filtres (n actifs) » ;
   au-dessus, la rangee de champs, compacte, sans bouton. */
.filtres-bascule { display: none; }
.filtres-bascule svg { width: 16px; height: 16px; flex: 0 0 auto; }
.back-office .filtres-panneau .barre { gap: 8px 10px; }
.back-office .filtres-panneau .barre > .champ { flex: 0 1 auto; min-width: 128px; }
@media (max-width: 767px) {
  .filtres-bascule { display: inline-flex; align-items: center; gap: 8px; }
  .filtres-repliables:not(.ouvert) > .filtres-panneau { display: none; }
  .filtres-repliables.ouvert > .filtres-panneau {
    margin-top: 10px; padding: 12px; border: 1px solid var(--bord); border-radius: var(--rayon);
    background: var(--surface-2);
  }
  .filtres-repliables { margin-bottom: 10px; }
  .back-office .filtres-panneau .barre > .champ { flex: 1 1 100%; width: 100%; }
}
/* LA RANGEE D'INDICATEURS (`rangeeIndicateurs`) : chaque ligne se remplit, la derniere s'etire. */
.rangee-indicateurs { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; }
.rangee-indicateurs > .indicateur { flex: 1 1 130px; min-width: 0; margin: 0; }
@media (max-width: 620px) {
  .rangee-indicateurs { gap: 10px; }
  .rangee-indicateurs > .indicateur { flex-basis: 100px; }
}

/* ── Telephone et tablette ───────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .back-office .bouton, .back-office .bo-espace, .back-office .aide-lien,
  .back-office .recherche-liste input, .back-office .segments button { min-height: 44px; }
  .back-office .bouton.icone { min-width: 44px; }
  .back-office button.pastille-module, .back-office .lm-inactives summary,
  .back-office .filtre-application select { min-height: 44px; }
  .back-office .lm-inactives summary { display: flex; align-items: center; }
  .menu-actions-liste .bouton, .menu-actions-liste > button { min-height: 44px; }
}
@media (max-width: 760px) {
  .bo-espace span { display: none; }
  .bo-espace { padding: 8px; }
  .back-office-instance { max-width: 40vw; }
}
@media (max-width: 620px) {
  .back-office .barre-haute { gap: 8px; }
  .back-office-titre { padding: 2px 6px; font-size: 11px; letter-spacing: .04em; }
  .back-office-instance strong { font-size: 12.5px; }
  .back-office .mot-bouton { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .recherche-liste { flex: 1 1 100%; }
  .back-office .barre > .recherche-liste, .back-office .barre > .boutons { width: 100%; }
  .back-office .barre > .segments, .back-office .segments { display: grid; width: 100%; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); }
  .back-office .segments button { padding: 6px 8px; }
  /* Sur un telephone, la barre prend la largeur et ses boutons se la partagent ; un libelle trop
     long passe sur deux lignes DANS son bouton plutot que de pousser la barre hors de l'ecran. */
  .back-office .barre > .barre-segmentee, .back-office .segments.barre-segmentee { display: flex; width: 100%; }
  .back-office .barre-segmentee button { flex: 1 1 0; min-width: min-content; padding: 6px 6px; white-space: normal; line-height: 1.2; font-size: 12.5px; }
  /* LES FICHES EMPILENT LE LIBELLE AU-DESSUS DE SA VALEUR. Le libelle a gauche et la valeur
     calee a droite laissaient un vide au milieu et coupaient les valeurs longues en colonnes
     etroites (fiche « L'instance », tableaux en mode carte). Empile, tout se lit de gauche a
     droite, d'un seul mouvement d'oeil. */
  .back-office .fiches td { display: block; padding: 4px 0; }
  .back-office .fiches td:empty { display: none; }
  .back-office .fiches td:not([data-intitule=""])::before {
    display: block; flex: none; margin-bottom: 1px; font-size: 11.5px; color: var(--texte-doux);
  }
  .back-office .fiches .cellule { display: block; text-align: left; }
  .back-office .fiches td.nombre { text-align: left; }
  .back-office .fiches tr { padding: 12px 14px; }
  .back-office .fiches td:has(.actions-ligne) { padding-top: 8px; }
  .back-office .fiches td:has(.actions-ligne)::before { display: none; }   /* les boutons se nomment eux-memes */
  .back-office .fiches .actions-ligne { justify-content: flex-start; flex-wrap: wrap; }
  .back-office .grille:has(> .indicateur) { gap: 10px; }
  .back-office .indicateur { padding: 12px; }
  .back-office .indicateur .valeur { font-size: 1.35rem; }
  .back-office .explication > div { padding-left: 0; }
}
@media (max-width: 480px) {
  .back-office .barre-haute .marque-mot { display: none; }
}

/* L'HABILLAGE DU PAYS (demande du 2026-10-12).

   LE FOND DE LA CONNEXION. Une photographie fournie par le pays, sous un VOILE sombre : la carte
   reste blanche et opaque, donc le formulaire garde exactement le contraste qu'il avait. Le voile
   sert le reste -- l'ombre de la carte et la lisibilite du credit. La couleur unie posee sous
   l'image est le repli : elle se voit pendant le chargement, et a la place d'une image absente.
   Aucun fond sans habillage : un pays qui n'en declare pas garde l'ecran d'avant.

   LE CREDIT, en bas, sur une pastille SOMBRE ET OPAQUE a 72 % : le texte blanc garde plus de 7:1
   meme sur la partie la plus claire d'une photographie (blanc sur le pire composite #525659),
   au-dessus du seuil AA de 4,5:1 pour un petit texte. Il est dans le flux et non en position
   fixe : sur un telephone, un credit fixe recouvrait le bas de la carte. */
.fond-connexion {
  position: fixed; inset: 0; z-index: 0;
  background-size: cover; background-position: center; background-repeat: no-repeat;
}
.fond-connexion::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--voile-photo) 0%, var(--voile-photo-bas) 100%);
}
/* LA CARTE DE CONNEXION EST CENTREE DANS LA PAGE, AVEC OU SANS FOND (demande de Manu du
   2026-10-12). Elle ne l'etait que par `margin: 60px auto` -- et sous 620 px la regle mobile
   `margin: 24px 12px` retirait le `auto` : entre 424 et 620 px de large, la carte de 400 px restait
   collee a gauche. La page de connexion pose donc toujours `.connexion-page` : une colonne flexible
   haute d'un ecran, ou la carte prend `margin: auto` -- centree dans les deux sens, et poussee vers
   le haut seulement quand l'ecran est trop court pour elle. Le fond photographique n'ajoute plus
   que sa superposition. */
.connexion-page {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; padding: 0 16px;
}
.connexion-page .connexion { margin: auto; width: 100%; padding: 40px 0 16px; }
.connexion-habillee { position: relative; z-index: 1; }
/* LA MARQUE ET LA MENTION D'ORIGINE SONT CENTREES DANS LA CARTE ; le titre, le texte, les champs
   et le lien de retour restent a gauche. La marque est UN groupe -- symbole, mot, et nom du pays
   centre sous le mot quand le pays l'affiche -- centre comme un tout, quelle que soit la longueur
   du nom (« Congo-Brazzaville », « République démocratique du Congo », ou aucun). */
.carte-marque { display: flex; justify-content: center; margin-bottom: 14px; }
.carte-marque .marque-pays { align-items: center; }
/* Connexion au back-office (exploitation*.html) : la page dit que c'est la console. */
.bandeau-console { margin: -4px 0 14px; padding: 6px 12px; border-radius: 999px; text-align: center;
  background: var(--primaire-pale); color: var(--primaire); font-weight: 600; font-size: 13px;
  letter-spacing: .02em; }
.carte-marque .marque-pays-nom { text-align: center; }
.connexion-habillee .carte { box-shadow: var(--ombre-menu); }
.credit-fond {
  align-self: flex-end; margin: 8px 0 12px; max-width: 100%;
  font-size: 11.5px; line-height: 1.35; color: var(--sur-sombre);
  background: var(--voile-credit); padding: 4px 9px; border-radius: var(--rayon-s);
}
.credit-fond a { color: var(--sur-sombre); text-decoration: underline; text-underline-offset: 2px; }

/* LA MENTION D'ORIGINE : une pastille sobre, le drapeau du pays et la phrase du pays. Texte fonce
   sur surface claire (contraste du texte courant). Le drapeau porte un liseré : la bande blanche
   du drapeau francais disparaissait sur le fond blanc de la carte. */
.mention-origine {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 4px 0 16px; padding: 5px 12px 5px 7px;
  font-size: 13.5px; font-weight: 600; color: var(--texte); line-height: 1.2;
  background: var(--surface); border: 1px solid var(--bord); border-radius: 999px;
}
.mention-origine-drapeau {
  width: 22px; height: auto; display: block; flex: 0 0 auto;
  border-radius: 2px; box-shadow: 0 0 0 1px var(--bord-fort);
}
.carte .mention-carte { display: flex; width: fit-content; margin: 18px auto 0; }
/* En pied d'application : discrete, sans pastille, elle ne doit rien disputer au travail. */
.pied-appli {
  display: flex; margin: 40px 0 0; padding: 0; border: 0; background: none;
  font-size: 12px; font-weight: 400; color: var(--texte-doux);
}
.pied-appli .mention-origine-drapeau { width: 16px; }
@media print { .pied-appli { display: none; } }

/* ── Bulletin lu → fiche du collaborateur (décision 0067) ─────────────────────────────────────
   Une ligne par champ : la case, le champ, la fiche telle qu'elle est, la valeur lue. Un champ
   DIFFERENT se met en évidence (bord et fond d'alerte) : sa case est décochée, et c'est lui qu'il
   faut relire. Sous 640 px, les deux valeurs passent sous le champ, chacune avec son intitulé. */
.comparaison { display: grid; gap: 4px; margin: 6px 0 10px; }
.comparaison-ligne {
  display: grid; grid-template-columns: 24px minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px; align-items: start; padding: 8px 10px; border: 1px solid var(--bord);
  border-radius: var(--rayon-s); background: var(--surface); cursor: pointer;
}
.comparaison-ligne.entete { border: 0; background: none; padding-top: 0; padding-bottom: 0;
  color: var(--texte-doux); font-size: .85em; cursor: default; }
.comparaison-ligne.etat-different { border-color: var(--alerte); border-left-width: 4px;
  background: var(--alerte-pale); }
.comparaison-ligne.etat-identique { color: var(--texte-doux); cursor: default; }
.comparaison-ligne input { margin-top: 3px; }
.comparaison-champ { font-weight: 600; overflow-wrap: anywhere; }
.comparaison-champ .etiquette { margin-left: 4px; font-weight: 500; }
.comparaison-valeur { overflow-wrap: anywhere; }
.rattachement .champ { max-width: 520px; }
@media (max-width: 640px) {
  .comparaison-ligne { grid-template-columns: 24px minmax(0, 1fr); }
  .comparaison-ligne.entete { display: none; }
  .comparaison-valeur { grid-column: 2; }
  .comparaison-valeur::before { content: attr(data-intitule) " : "; color: var(--texte-doux);
    font-size: .85em; }
}

/* ── Pendant qu'un document est lu (decision 0078, `suivreLecture` dans quaeroo.js) ──────────
   Sobre : la carte du produit, l'anneau de la couleur primaire, trois etapes. Aucune barre de
   pourcentage (on ne connait pas la duree a l'avance). Que des jetons de couleur : le jour ou le
   produit aura un theme sombre, ce bloc le suivra sans etre repris. */
.visuellement-cache { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.lecture-suivi { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--bord);
  border-left: 3px solid var(--primaire); border-radius: var(--rayon); background: var(--surface);
  box-shadow: var(--ombre); }
.lecture-suivi-tete { display: flex; align-items: center; gap: 10px; }
.lecture-suivi-tete strong { flex: 1; min-width: 0; }
.lecture-anneau { width: 22px; height: 22px; flex: none; color: var(--primaire);
  animation: lecture-tourne 1.1s linear infinite; }
@keyframes lecture-tourne { to { transform: rotate(360deg); } }
.lecture-temps { font-variant-numeric: tabular-nums; color: var(--texte-doux); font-size: 13px;
  padding: 2px 8px; border-radius: 999px; background: var(--primaire-pale); }
.lecture-etapes { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.lecture-etape { display: flex; align-items: flex-start; gap: 9px; color: var(--texte-faible);
  font-size: 14px; line-height: 1.35; }
.lecture-etape.en-cours { color: var(--texte); font-weight: 600; }
.lecture-etape.en-cours .faible { font-weight: 400; }
.lecture-etape.faite { color: var(--texte-doux); }
.lecture-puce { width: 18px; height: 18px; flex: none; margin-top: 1px; border-radius: 50%;
  border: 2px solid var(--bord-fort); display: inline-flex; align-items: center;
  justify-content: center; box-sizing: border-box; }
.lecture-puce svg { width: 12px; height: 12px; }
.lecture-etape.faite .lecture-puce { border-color: var(--succes); background: var(--succes);
  color: var(--surface); }
.lecture-etape.en-cours .lecture-puce { border-color: var(--primaire);
  box-shadow: 0 0 0 3px var(--primaire-pale); animation: lecture-pouls 1.6s ease-in-out infinite; }
@keyframes lecture-pouls { 50% { opacity: .55; } }
.lecture-patience { margin: 10px 0 0; font-size: 13px; color: var(--texte-doux); }
[aria-busy="true"] { cursor: progress; }
@media (prefers-reduced-motion: reduce) {
  .lecture-anneau, .lecture-etape.en-cours .lecture-puce { animation: none; }
}
@media (max-width: 620px) {
  .lecture-suivi { padding: 10px 12px; }
  .lecture-etape { font-size: 13.5px; }
}

/* Ce qu'un document lu propose a la fiche (decisions 0067 et 0079, `comparaisonFiche`) : la case
   dit ce qu'elle fait, l'ancienne valeur se barre quand on la remplace, le recapitulatif suit. */
.comparaison-action { display: block; font-weight: 400; font-size: 12.5px; color: var(--texte-doux);
  margin-top: 2px; }
.comparaison-ligne.remplace .ancienne { text-decoration: line-through; color: var(--texte-faible); }
.comparaison-ligne.remplace .nouvelle { font-weight: 600; }
.recapitulatif-fiche { margin-top: 8px; }
.recap-liste { margin: 4px 0 0; padding-left: 18px; }
.recap-liste li { overflow-wrap: anywhere; }

/* ── Tableaux : tri, export, colonnes courtes (decision 0098, audit L4) ──────────────────────── */
th[aria-sort] { padding: 0; white-space: normal; }
button.tri {
  display: inline-flex; align-items: center; gap: 4px; width: 100%; min-height: 40px; padding: 11px 14px;
  border: 0; background: none; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit;
  text-align: inherit; cursor: pointer;
}
th.nombre button.tri { justify-content: flex-end; }
button.tri:hover { color: var(--texte); }
.tri-sens { width: 14px; height: 14px; flex: none; opacity: .45; }
th[aria-sort="ascending"] .tri-sens path:last-child, th[aria-sort="descending"] .tri-sens path:first-child { opacity: 0; }
th[aria-sort="ascending"], th[aria-sort="descending"] { color: var(--primaire); }
th[aria-sort="ascending"] .tri-sens, th[aria-sort="descending"] .tri-sens { opacity: 1; }
.tableau-outils { display: flex; justify-content: flex-end; padding: 6px 10px; border-top: 1px solid var(--bord); background: var(--surface); }
.tableau-outils .ico { width: 15px; height: 15px; }
td.td-court { white-space: nowrap; }
@media (max-width: 620px) {
  .fiches thead { display: none; }
  .tableau-outils { justify-content: stretch; } .tableau-outils .bouton { width: 100%; }
  td.td-court { white-space: normal; }
}
@media print { .tableau-outils, .tri-sens { display: none !important; } }
tbody td { padding: 12px 12px; }
thead th, button.tri { padding-left: 12px; padding-right: 12px; }
tr.selectionnable { cursor: pointer; }
tr.selectionnable:focus-visible { outline: 2px solid var(--primaire); outline-offset: -2px; }
/* Le back-office tient sans defilement des 1024 px (revue du 2026-10-12) : ses colonnes courtes
   gardent le droit de passer a la ligne. */
.back-office td.td-court { white-space: normal; }
.back-office button.tri { padding-left: 6px; padding-right: 6px; }
.back-office th[aria-sort="none"] .tri-sens { display: none; }
.back-office button.tri { padding: 0; min-height: 0; display: inline; }
.back-office th[aria-sort] { padding: 9px 12px; }
/* Un montant d'indicateur ne pousse jamais sa carte hors de l'ecran (390 px, six chiffres et la
   devise) : il se reduit avec la largeur, puis passe a la ligne entre les milliers. */
.indicateur { min-width: 0; }
.indicateur .valeur { font-size: clamp(1.15rem, 4.2vw + .2rem, 1.6rem); overflow-wrap: anywhere; }
/* ── La paie lue, decision 0088 : parcours du lot, carte d'un bulletin, constats classes ───── */
.parcours-etapes { list-style: none; margin: 0 0 16px; padding: 0; display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.parcours-etapes li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px;
  border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--surface); min-width: 0; }
.parcours-etapes li > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.parcours-etapes small { color: var(--texte-doux); }
.parcours-etapes .numero { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); color: var(--texte-doux); font-weight: 600; font-size: .85rem; }
.parcours-etapes .numero svg { width: 15px; height: 15px; }
.parcours-etapes li.faite .numero { background: var(--succes-pale); color: var(--succes); }
.parcours-etapes li.courante { border-color: var(--primaire); box-shadow: 0 0 0 1px var(--primaire) inset; }
.parcours-etapes li.courante .numero { background: var(--primaire); color: var(--sur-primaire); }
@media (max-width: 760px) { .parcours-etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .parcours-etapes { grid-template-columns: 1fr; } }

.carte-bulletin { margin-bottom: 12px; }
.carte-bulletin > header { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.carte-bulletin > header p { margin: 2px 0 0; }
.totaux-bulletin { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px;
  margin: 10px 0; }
.totaux-bulletin > div { background: var(--surface-2); border-radius: var(--rayon-s); padding: 8px 10px; min-width: 0; }
.totaux-bulletin dt { font-size: .8rem; color: var(--texte-doux); }
.totaux-bulletin dd { margin: 2px 0 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.actions-carte { margin-top: 12px; }

ul.constats { margin: 6px 0 10px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
ul.constats .constat { padding: 8px 10px; border-radius: var(--rayon-s); background: var(--surface-2);
  border-left: 3px solid var(--bord-fort); overflow-wrap: anywhere; }
ul.constats .constat.bloquant { background: var(--danger-pale); border-left-color: var(--danger); }
ul.constats .constat.a_verifier { background: var(--attente-fond); border-left-color: var(--attente-texte); }
ul.constats .constat.information { background: var(--primaire-pale); border-left-color: var(--primaire); }
ul.constats.remarques .constat { border-left-color: var(--texte-faible); }
ul.constats.resolus .constat { opacity: .75; text-decoration: none; }
ul.constats .constat .bouton { margin-left: 6px; }
.constats-titre { margin: 8px 0 2px; }
.badge-constats.danger { border-color: var(--danger); color: var(--danger); }
.badge-constats.alerte { border-color: var(--alerte); color: var(--alerte); }
/* Decision 0128 : « a verifier » et remarques d'un bulletin non valide, le bleu d'attente ; le
   terracotta reste au seul incoherent. */
.badge-constats.attente { border-color: var(--attente-texte); color: var(--attente-texte); background: var(--attente-fond); }

ul.suivi-bulletin { margin: 4px 0; padding-left: 18px; }
ul.suivi-bulletin li { margin-bottom: 6px; }
ul.suivi-bulletin .changements { margin: 4px 0; padding-left: 16px; color: var(--texte-doux); }

.ajustement.avec-piece { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; }
.ajustement-piece iframe { width: 100%; height: 70vh; border: 1px solid var(--bord); border-radius: var(--rayon-s); }
@media (max-width: 900px) { .ajustement.avec-piece { grid-template-columns: 1fr; }
  .ajustement-piece iframe { height: 50vh; } }
.ligne-rubrique { display: grid; grid-template-columns: minmax(0, 1fr) 130px auto; gap: 6px; margin-bottom: 6px; }
textarea.message-gestionnaire { width: 100%; font-family: inherit; }
.depot-lot { margin: 10px 0; flex-wrap: wrap; }
.depot-lot input[type=file] { max-width: 100%; }
input.valeur-proposee { outline: 2px solid var(--alerte); outline-offset: 1px; }

/* ═══ ONGLETS D'UNE PAGE (decision 0108) ════════════════════════════════════════════════════════
   `ongletsPage()` et `panneauOnglet()` (quaeroo.js). Une ligne qui defile sur un telephone, le
   souligne de l'onglet ouvert, une pastille de compte, un point d'alerte discret (`repere`). */
.onglets-cadre { position: relative; margin: 14px 0; }
.onglets-cadre::before, .onglets-cadre::after { content: ""; position: absolute; top: 0; bottom: 1px; width: 36px;
  pointer-events: none; opacity: 0; transition: opacity .15s; z-index: 1; }
.onglets-cadre::before { left: 0; background: linear-gradient(to right, var(--fond), transparent); }
.onglets-cadre::after { right: 0; background: linear-gradient(to left, var(--fond), transparent); }
.onglets-cadre.suite-gauche::before, .onglets-cadre.suite-droite::after { opacity: 1; }
.onglets-page { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0;
  border-bottom: 1px solid var(--bord); }
.onglets-page::-webkit-scrollbar { display: none; }
.onglets-page [role=tab] { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center;
  gap: 6px; border: 0; background: none; padding: 10px 12px; font: inherit; color: var(--texte-doux);
  border-bottom: 2px solid transparent; cursor: pointer; min-height: 44px; border-radius: var(--rayon-xs) var(--rayon-xs) 0 0; }
.onglets-page [role=tab]:hover { color: var(--texte); background: var(--surface-2); }
.onglets-page [role=tab][aria-selected="true"] { color: var(--primaire); border-bottom-color: var(--primaire);
  font-weight: 600; }
.onglets-page .compte { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--alerte-pale); color: var(--alerte); font-size: 12px; text-align: center; }
.onglets-page .repere-onglet { width: 8px; height: 8px; border-radius: 50%; background: var(--alerte);
  box-shadow: 0 0 0 2px var(--surface); }
.panneau-onglet { animation: panneau-onglet-entree .18s ease-out; }
.panneau-onglet:focus { outline: none; }
@keyframes panneau-onglet-entree { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .panneau-onglet { animation: none; } }

/* Groupe d'entrees dans la barre laterale d'une entreprise (le parametrage, decision 0109). */
.rail-groupe { padding: 10px 10px 2px 12px; font-size: 11px; font-weight: 650; letter-spacing: .05em;
  text-transform: uppercase; color: var(--texte-faible); }

/* Le « ? » d'une aide longue repliee (`replierAidesLongues`, decision 0110). */
.aide-bascule { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-left: 6px; padding: 0;
  border: 1px solid var(--bord-champ); border-radius: 50%; background: var(--surface); color: var(--texte-doux);
  font: 600 12px/1 var(--police); cursor: pointer; vertical-align: 1px; position: relative; }
.aide-bascule::before { content: ""; position: absolute; inset: -12px; }
.aide-bascule[aria-expanded="true"] { background: var(--primaire-pale); color: var(--primaire); border-color: var(--primaire); }
.champ > .aide[data-repliee] { margin-top: 4px; padding: 8px 10px; border-radius: var(--rayon-xs); background: var(--surface-2); }

/* Nouveautes (decision 0113) : la pastille du lien Aide, et celle du panneau d'aide. */
.aide-lien { position: relative; }
.pastille-aide { position: absolute; top: 7px; left: 19px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--signal); box-shadow: 0 0 0 2px var(--surface); }
.pastille-nouveau { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; font-size: 11.5px;
  font-weight: 700; line-height: 18px; background: var(--signal); color: var(--surface); text-transform: uppercase; letter-spacing: .03em; }
/* ── COURRIER ENTRANT : la boite de reception (decision 0107) ─────────────────────────────────
   Liste compacte a gauche (environ 80 px par message simple : trois lignes d'une ligne chacune),
   panneau de lecture a droite ; sous 900 px, la liste seule et le panneau en plein ecran. Les
   couleurs d'etiquette de boite viennent d'une palette fermee (`COULEURS` du serveur). */
.boite-reception { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 16px; align-items: start; }
.boite-reception.sans-panneau { grid-template-columns: minmax(0, 1fr); }
.br-outils { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 10px; }
.br-boites { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.br-boite { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font: inherit; font-size: .84rem;
  border: 1px solid var(--bord-fort); background: var(--surface); color: var(--texte-moyen); cursor: pointer; }
.br-boite:hover { border-color: var(--texte-doux); }
.br-boite[aria-pressed="true"] { background: var(--primaire-pale); border-color: var(--primaire); color: var(--primaire); font-weight: 600; }
.br-boite:focus-visible { outline: none; box-shadow: var(--anneau); }
.br-liste { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--bord);
  border-radius: var(--rayon); overflow: hidden; }
.br-ligne { display: grid; grid-template-columns: 22px minmax(0, 1fr) 4.5rem 20.5rem; column-gap: 10px; padding: 9px 12px;
  border-bottom: 1px solid var(--bord); cursor: pointer; align-items: center; }
.br-ligne:last-child { border-bottom: 0; }
.br-ligne:hover { background: var(--surface-2); }
.br-ligne.courante { background: var(--primaire-pale); box-shadow: inset 3px 0 0 var(--primaire); }
.br-ligne:focus-visible { outline: 2px solid var(--primaire); outline-offset: -2px; }
.br-ligne input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--primaire); }
.br-corps { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.br-tete { display: flex; gap: 8px; align-items: center; min-width: 0; }
.br-qui { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.br-qui.adresse { font-weight: 400; color: var(--texte-doux); }
.br-quand { justify-self: end; align-self: start; color: var(--texte-faible); font-size: .8rem; white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 2px; }
.br-sujet { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.br-sujet strong { font-weight: 600; }
.br-sujet .vide { color: var(--texte-faible); font-style: italic; }
.br-sujet .br-extrait { color: var(--texte-doux); }
.br-infos { display: flex; gap: 6px; align-items: center; min-width: 0; overflow: hidden; white-space: nowrap; font-size: .8rem; color: var(--texte-moyen); }
.br-infos > * { flex: 0 0 auto; }
.br-infos .br-detection { flex: 0 1 auto; min-width: 9rem; overflow: hidden; text-overflow: ellipsis; }
.br-detection strong { color: var(--texte); }
.br-piece { display: inline-flex; align-items: center; gap: 4px; max-width: 15rem; padding: 1px 8px; border-radius: 999px;
  border: 1px solid var(--bord-fort); background: var(--surface); font-size: .78rem; color: var(--texte-moyen); text-decoration: none; }
.br-piece span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-piece .ico { width: 13px; height: 13px; flex: 0 0 auto; }
.br-ignores { font: inherit; font-size: .78rem; color: var(--texte-faible); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline dotted; }
.br-ignores-detail { grid-column: 2 / -1; font-size: .8rem; color: var(--texte-doux); padding: 4px 0 2px; }
.br-droite { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.br-droite .actions-ligne { flex-wrap: nowrap; }
.br-droite .bouton { padding-top: 5px; padding-bottom: 5px; }
.etiquette-boite { display: inline-flex; align-items: center; gap: 5px; font-size: .72rem; padding: 0 7px; border-radius: 999px;
  background: var(--surface-2); color: var(--texte-moyen); border: 1px solid var(--bord); white-space: nowrap; flex: 0 0 auto; }
.etiquette-boite::before, .br-boite[data-couleur]::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--texte-faible); }
.br-boite:not([data-couleur])::before { content: none; }
.br-panneau { position: sticky; top: 12px; background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon);
  padding: 18px 20px; max-height: calc(100vh - 110px); overflow: auto; }
.br-panneau h2 { margin: 0 0 4px; font-size: 1.1rem; overflow-wrap: anywhere; }
.br-panneau .br-infos { white-space: normal; flex-wrap: wrap; overflow: visible; }
.br-panneau .corps-message { white-space: pre-wrap; overflow-wrap: anywhere; padding: 10px 12px; border: 1px solid var(--bord);
  border-radius: var(--rayon-s); background: var(--surface-2); max-height: 40vh; overflow: auto; }
.br-panneau .apercu-piece { width: 100%; height: 46vh; border: 1px solid var(--bord); border-radius: var(--rayon-s); margin-top: 8px; }
.br-panneau .fermer-panneau { display: none; }
.br-proposition { margin-top: 12px; }
.br-proposition dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 6px 0; }
.br-proposition dt { color: var(--texte-doux); font-size: .86rem; }
.br-proposition dd { margin: 0; overflow-wrap: anywhere; }
.lu-sur-document { font-size: .74rem; color: var(--primaire); background: var(--primaire-pale); border-radius: 999px; padding: 0 6px; margin-left: 6px; }
.br-selection { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--bord-fort); border-radius: var(--rayon-s); padding: 8px 12px;
  box-shadow: var(--ombre-forte); margin-top: 10px; }
.br-squelette { height: 58px; margin: 8px 12px; border-radius: var(--rayon-s); background: var(--surface-2); list-style: none; }
.br-aide { margin-bottom: 12px; }
.br-aide summary { cursor: pointer; color: var(--texte-moyen); }
/* Panneau ouvert : les gestes vivent dans le panneau, la liste se lit sans boutons. */
.boite-reception.panneau-ouvert .br-ligne .br-droite .actions-ligne { display: none; }
.boite-reception.panneau-ouvert .br-ligne { grid-template-columns: 22px minmax(0, 1fr) 4.5rem 0; }
/* Un selecteur hors formulaire (niveau d'acces, filtre) habille comme les champs du produit. */
.selecteur { min-height: 36px; padding: 6px 30px 6px 10px; border: 1px solid var(--bord-champ, var(--bord-fort)); border-radius: var(--rayon-s);
  font: inherit; font-size: .88rem; background: var(--surface); color: var(--texte); cursor: pointer;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23646d79' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.selecteur:hover { border-color: var(--texte-doux); }
.selecteur:focus { outline: none; border-color: var(--primaire); box-shadow: var(--anneau); }
.acces-admins { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.acces-admins li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.avertissement-fraude { border-left: 4px solid var(--danger); }
.matrice-acces td, .matrice-acces th { text-align: center; }
.matrice-acces td:first-child, .matrice-acces th:first-child { text-align: left; }
@media (max-width: 900px) {
  .boite-reception { grid-template-columns: minmax(0, 1fr); }
  .br-panneau { position: fixed; inset: 0; z-index: 60; border-radius: 0; max-height: none; padding: 16px; }
  .br-panneau .fermer-panneau { display: inline-flex; }
  .boite-reception:not(.panneau-ouvert) .br-panneau { display: none; }
  .br-ligne { grid-template-columns: 22px minmax(0, 1fr) auto; row-gap: 6px; }
  .br-droite { grid-column: 2 / -1; justify-content: flex-start; }
  .br-boites { margin-left: 0; }
  /* Sur un telephone, la ligne des pieces passe a la ligne au lieu de tronquer le type en « R. ». */
  .br-infos { flex-wrap: wrap; white-space: normal; row-gap: 4px; }
  .br-infos .br-detection { white-space: normal; }
  .selecteur { min-height: 44px; font-size: 16px; }
}
@media (prefers-reduced-motion: no-preference) { .br-squelette { animation: br-pulse 1.4s ease-in-out infinite; } }
@keyframes br-pulse { 50% { opacity: .55; } }
/* Recette du courrier du 2026-10-21 (decision 0125) : bandeau des messages sans piece, exemplaires,
   liens courts, ligne qui s'efface apres un geste, annonce qui entre. Mouvement en transform et
   opacite seulement, 160 a 200 ms ; rien ne bouge sous `prefers-reduced-motion`. */
.br-bandeau { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 7px 12px; margin: 0 0 10px;
  border: 1px solid var(--bord); border-radius: var(--rayon-s); background: var(--surface); color: var(--texte-moyen); font-size: .86rem; }
.br-bandeau .bouton { margin-left: auto; }
.br-exemplaires { color: var(--texte-doux); }
.br-panneau .corps-message a.lien-court { color: var(--primaire); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
.br-apercu-liste { list-style: none; margin: 10px 0 0; padding: 0; max-height: 46vh; overflow: auto; border: 1px solid var(--bord); border-radius: var(--rayon-s); }
.br-apercu-liste li + li { border-top: 1px solid var(--bord); }
.br-apercu-liste label { display: grid; grid-template-columns: 18px minmax(0, 12rem) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 10px; font-size: .86rem; cursor: pointer; }
.br-apercu-liste input { margin: 0; accent-color: var(--primaire); }
.br-apercu-qui { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-apercu-sujet { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--texte-moyen); }
.br-ligne { transition: opacity 160ms ease, transform 160ms ease; }
.br-ligne.sortante { opacity: 0; transform: translateX(8px); pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .furtif { animation: furtif-entree 200ms ease-out; }
}
@keyframes furtif-entree { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (max-width: 900px) {
  .br-apercu-liste label { grid-template-columns: 18px minmax(0, 1fr) auto; }
  .br-apercu-sujet { grid-column: 2 / -1; }
}

/* Le panneau d'un message a plusieurs pieces : une ligne par piece (correctif du 2026-10-18). */
.br-multi { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--bord); border-radius: var(--rayon-s); background: var(--surface); }
.br-multi-ligne { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--bord); }
.br-multi-ligne:last-child { border-bottom: 0; }
.br-multi-ligne input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primaire); }
.br-multi-corps { min-width: 0; overflow-wrap: anywhere; font-size: .88rem; }
@media (max-width: 900px) { .br-multi-ligne { grid-template-columns: 20px minmax(0, 1fr); } .br-multi-ligne .boutons { grid-column: 2; } }

/* Menu du compte (decision 0125) : une separation avant « Se deconnecter ». */
.utilisateur-separation { border: 0; border-top: 1px solid var(--bord); margin: 6px 4px; }
.utilisateur-qui span + span { color: var(--texte-faible); font-size: 12px; }

/* ═══ DESIGN 2026 (decision 0126, maquette « M » validee par Manu le 2026-10-21) ════════════════
   Cette section vient EN DERNIER et l'emporte a specificite egale : les ecrans
   heritent du nouveau style sans etre touches. Elle remplace la refonte de la decision 0098 (meme
   place, memes classes). Valeurs de la maquette : rayons 28/30/24/14 px, pilules, boutons-icones
   ronds a contour fin, Geist 300 pour les titres et les grands montants, 450 pour le reste.
   MOUVEMENT : transform et opacity SEULEMENT (une couleur ne s'anime pas : un voile `::after` de
   `currentColor` monte en opacite au survol). Tout se coupe sous `.sobre` (mouvement reduit,
   economie de donnees, 2G, sonde de fluidite) et sous `.leger` (connexion lente). */

/* ── Base ─────────────────────────────────────────────────────────────────────────────────── */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--police); font-weight: var(--g-texte); font-size: 14px; line-height: 1.45;
  color: var(--texte); background-color: var(--fond); font-synthesis: none;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
/* Le degrade pastel, fixe sous tout le reste : il ne se repeint pas au defilement. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: var(--degrade); }
button, input, select, textarea { font: inherit; color: inherit; }
b, strong, th { font-weight: var(--g-fort); }
h1, h2, h3 { font-weight: var(--g-fort); letter-spacing: 0; }
h1 { font-size: 28px; font-weight: var(--g-titre); letter-spacing: -.02em; line-height: 1.15; }
h2 { font-size: 16px; line-height: 1.3; }
h3 { font-size: 14.5px; line-height: 1.35; }
a { color: var(--primaire); }
a:hover { color: var(--primaire); text-decoration: underline; text-underline-offset: 2px; }
/* Un lien DANS UN TEXTE se souligne : en sombre, l'accent a la couleur du texte, et la couleur
   seule ne doit jamais distinguer un lien (WCAG 1.4.1). */
p a:not(.bouton), dd a:not(.bouton), .note a:not(.bouton), .aide a:not(.bouton),
.faible a:not(.bouton), .doux a:not(.bouton), .aide-section li a {
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px;
}
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--selection); color: var(--texte); }
.chiffre, .num, td.nombre, th.nombre { font-variant-numeric: tabular-nums lining-nums; }
.evitement {
  position: absolute; left: 12px; top: -80px; z-index: 100; padding: 8px 14px;
  background: var(--accent); color: var(--accent-texte); border-radius: 999px;
}
.evitement:focus { top: 12px; color: var(--accent-texte); }
kbd {
  font: inherit; font-size: 11.5px; line-height: 1.3; white-space: nowrap; padding: 3px 8px; border-radius: 999px;
  background: var(--surface-2); color: var(--texte-doux); border: 1px solid var(--bord);
}
.ico { width: 20px; height: 20px; flex: 0 0 auto; stroke-width: var(--trait); }
.ico.p { width: 16px; height: 16px; }
.doux { color: var(--texte-doux); }
.faible { color: var(--texte-faible); }

/* ── Ossature : la grille ─────────────────────────────────────────────────────────────────── */
.coquille .appli { display: grid; grid-template-columns: var(--largeur-rail) minmax(0, 1fr); min-height: 100vh; background: none; }
.coquille-colonne { min-width: 0; display: flex; flex-direction: column; }

/* ── Ossature : la barre laterale ─────────────────────────────────────────────────────────── */
.coquille .rail {
  position: sticky; top: 0; align-self: start; height: 100vh; height: 100dvh; z-index: 20;
  display: flex; flex-direction: column; gap: 6px; padding: 18px 14px; overflow: visible;
  background: var(--rail-fond); color: var(--rail-texte); border: 0;
}
.coquille .rail-tete {
  flex: 0 0 auto; display: flex; align-items: center; gap: 10px; height: auto;
  padding: 4px 6px 14px; margin: 0; border: 0;
}
.rail-tete > .marque { flex: 1 1 auto; min-width: 0; padding: 6px 8px; }
.rail-tete [data-fermer-menu] { display: none; }
.rail-tete .rail-replier { margin-left: auto; }
.rail-entreprise { position: relative; flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 4px; }
.rail-entreprise-lien { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0;
  border-radius: 14px; color: var(--texte); text-decoration: none; }
.rail-entreprise-lien:hover { text-decoration: none; color: var(--texte); }
.rail-entreprise-icone { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 14px; object-fit: cover;
  border: 1px solid var(--bord); background: var(--surface); }
.rail-entreprise-icone.initiale { display: grid; place-items: center; background: var(--rail-actif-fond); color: var(--rail-actif-texte);
  border: 0; font-weight: var(--g-fort); font-size: 15px; }
.rail-entreprise-icone[hidden] { display: none; }
.rail-entreprise-texte { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.rail-entreprise-texte strong { font-weight: var(--g-fort); color: var(--texte); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-entreprise-texte small { color: var(--texte-doux); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-entreprise-choix { position: relative; isolation: isolate; flex: 0 0 28px; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 50%;
  background: none; color: var(--texte-doux); cursor: pointer; display: grid; place-items: center; }
.rail-entreprise-choix .ico { width: 16px; height: 16px; }
.rail-defile { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0;
  margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; scrollbar-color: var(--bord-fort) transparent; }
.rail-haut, .coquille .rail-bas { display: flex; flex-direction: column; gap: 2px; }
.coquille .rail-bas { flex: 0 0 auto; margin: 0; padding: 10px 0 0; border-top: 1px solid var(--bord-fort); }
.coquille .rail-rubrique + .rail-rubrique { margin-top: 2px; }
/* Une rubrique : pilule de 42 px, icone de 20 px au trait de 1,5. Le survol est un voile. */
.coquille .rail a.rubrique {
  position: relative; isolation: isolate; display: flex; align-items: center; gap: 12px; min-height: 42px; height: 42px;
  padding: 0 14px; border-radius: 999px; color: inherit; font-weight: var(--g-texte); font-size: 14px;
  text-decoration: none; transition: none; background: none;
}
.coquille .rail a.rubrique::before {
  content: ""; position: absolute; inset: 0; left: 0; top: 0; bottom: 0; width: auto; border-radius: inherit;
  background: currentColor; opacity: 0; z-index: -1; transition: opacity var(--d1) var(--courbe);
}
.coquille .rail a.rubrique:hover { text-decoration: none; color: inherit; background: none; }
.coquille .rail a.rubrique:hover::before { opacity: .07; }
.coquille .rail a.rubrique.actif { background: var(--rail-actif-fond); color: var(--rail-actif-texte); font-weight: var(--g-texte); }
.coquille .rail a.rubrique.actif::before { display: none; }
.coquille .rail .ico { width: 20px; height: 20px; flex: 0 0 20px; }
.coquille .rail a.rubrique > span:not(.pastille-n) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Le nombre de la rubrique (messages a trier) : pastille pleine. */
.pastille-n {
  margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 11.5px;
  font-weight: var(--g-fort); display: inline-grid; place-items: center; background: var(--rail-actif-fond);
  color: var(--rail-actif-texte); font-variant-numeric: tabular-nums;
}
.coquille .rail a.rubrique.actif .pastille-n { background: var(--rail-actif-texte); color: var(--rail-actif-fond); }
/* Les ecrans de la rubrique ouverte, sous elle : pilules plus petites, l'ecran ouvert en blanc. */
.coquille .rail-entrees { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 8px 22px; padding: 0; border: 0; }
.coquille .rail a.rail-entree {
  position: relative; isolation: isolate; display: flex; align-items: center; min-height: 36px; padding: 0 14px; gap: 8px;
  border-radius: 999px; color: var(--texte-doux); font-weight: var(--g-texte); font-size: 13.5px; text-decoration: none;
  margin: 0; box-shadow: none; background: none;
}
.coquille .rail a.rail-entree::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; z-index: -1; transition: opacity var(--d1) var(--courbe); }
.coquille .rail a.rail-entree:hover { color: var(--texte); text-decoration: none; background: none; }
.coquille .rail a.rail-entree:hover::before { opacity: .04; }
.coquille .rail a.rail-entree.actif { background: var(--surface); color: var(--texte); box-shadow: inset 0 0 0 1px var(--bord); margin: 0; padding: 0 14px; border-radius: 999px; font-weight: var(--g-fort); }
.coquille .rail a.rail-entree.actif::before { display: none; }
.rail-appli, .rail-groupe, .coquille .rail .groupe {
  padding: 10px 14px 4px; font-size: 12px; font-weight: var(--g-texte); letter-spacing: 0; text-transform: none; color: var(--texte-doux);
}
.rail-section-pied { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--bord); }
.rail-section-pied .rail-entrees { margin-left: 8px; }
.coquille .rail .pied-appli, .coquille .rail-bas .pied-appli {
  display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px 4px; border: 0; background: none; border-radius: 0;
  font-size: 11.5px; line-height: 1.3; font-weight: var(--g-texte); color: var(--texte-doux); text-wrap: balance;
}
.coquille .rail .pied-appli .mention-origine-drapeau { width: 16px; margin: 0; border-radius: 2px; }
.rail-marque { padding: 6px 14px; }
.rail-marque .marque { display: inline-flex; align-items: center; gap: 8px; opacity: 1; }
.rail-marque .marque-icone { width: 22px; height: 22px; filter: var(--logo-filtre); }
.rail-marque .marque-mot { height: 13px; width: auto; filter: var(--logo-filtre); }
.rail-deplier { display: none !important; }

/* La barre ETROITE (84 px), en option, memorisee (`quaeroo.barre-laterale`) : les rubriques en
   ronds de 48 px, le nom en bulle au survol et au focus, le nombre en pastille sur le rond. */
@media screen and (min-width: 768px) {
  body.coquille.rail-replie { --largeur-rail: 84px; }
  body.rail-replie .rail { align-items: center; padding: 18px 12px; animation: entree var(--d2) var(--courbe-sortie) both; }
  body.rail-replie .rail-tete { flex-direction: column; padding: 0 0 10px; gap: 12px; }
  body.rail-replie .rail-tete .rail-replier { display: inline-grid; margin-left: 0; }
  body.rail-replie .rail-replier .ico { transform: scaleX(-1); }
  body.rail-replie .rail-entreprise { flex: 0 0 auto; }
  body.rail-replie .rail-entreprise-texte, body.rail-replie .rail-entreprise-choix,
  body.rail-replie .rail-entrees, body.rail-replie .rail-appli, body.rail-replie .rail-groupe,
  body.rail-replie .rail .groupe, body.rail-replie .rail-section-pied, body.rail-replie .rail-bas .pied-appli,
  body.rail-replie .rail-marque .marque-mot, body.rail-replie .rail-tete > .marque .marque-mot { display: none; }
  body.rail-replie .rail-entreprise-icone { width: 46px; height: 46px; flex-basis: 46px; border-radius: 16px; }
  body.rail-replie .rail-defile { overflow: visible; margin: 0; padding: 0; }
  body.rail-replie .rail-haut { align-items: center; gap: 6px; }
  body.rail-replie .rail a.rubrique { width: 48px; height: 48px; min-height: 48px; padding: 0; justify-content: center; border-radius: 50%; }
  body.rail-replie .rail a.rubrique > span:not(.pastille-n) {
    position: absolute; left: calc(100% + 14px); top: 50%; z-index: 5; padding: 6px 12px; border-radius: 999px;
    background: var(--accent); color: var(--accent-texte); font-size: 13px; white-space: nowrap; overflow: visible;
    pointer-events: none; opacity: 0; transform: translate(-4px, -50%);
    transition: opacity var(--d1) var(--courbe), transform var(--d1) var(--courbe);
  }
  body.rail-replie .rail a.rubrique:hover > span:not(.pastille-n),
  body.rail-replie .rail a.rubrique:focus-visible > span:not(.pastille-n) { opacity: 1; transform: translate(0, -50%); }
  body.rail-replie .rail a.rubrique .pastille-n {
    position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; font-size: 10.5px;
    box-shadow: 0 0 0 2px var(--fond);
  }
  body.rail-replie .rail-bas { align-items: center; width: 100%; }
  body.rail-replie .rail-marque { padding: 6px 0; }
}

/* ── Ossature : la barre haute ────────────────────────────────────────────────────────────── */
.coquille .barre-haute {
  position: relative; top: auto; z-index: 30; display: flex; align-items: center; gap: 10px;
  height: auto; padding: 16px 32px 6px; background: none; border: 0; box-shadow: none;
}
.coquille .menu-bouton { display: none; }
.marque-barre { display: none; }
.barre-haute .espace { flex: 1; }
.palette-ouvrir {
  position: relative; isolation: isolate; flex: 0 1 440px; max-width: 440px; min-width: 0; display: flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 8px 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--bord);
  color: var(--texte-doux); font-size: 14px; text-align: left; cursor: text; transition: none;
}
.palette-ouvrir:hover { background: var(--surface); border-color: var(--bord-fort); }
.palette-ouvrir .ico { width: 20px; height: 20px; }
.palette-indice { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Le bouton-icone : rond de 44 px, contour fin, voile au survol, leger enfoncement au clic. */
.bouton-icone, .coquille .barre-haute .aide-lien {
  position: relative; isolation: isolate; display: inline-grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px;
  min-height: 44px; padding: 0; border-radius: 50%; border: 1px solid var(--bord-fort); background: transparent;
  color: var(--texte); cursor: pointer; transition: transform var(--d1) var(--courbe); text-decoration: none;
}
.bouton-icone::after, .coquille .barre-haute .aide-lien::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; z-index: -1;
  transition: opacity var(--d1) var(--courbe);
}
.bouton-icone:hover, .coquille .barre-haute .aide-lien:hover { background: transparent; color: var(--texte); border-color: var(--bord-fort); text-decoration: none; }
.bouton-icone:hover::after, .coquille .barre-haute .aide-lien:hover::after { opacity: .08; }
.bouton-icone:active, .coquille .barre-haute .aide-lien:active { transform: scale(.96); }
.bouton-icone.petit, .rail-replier, .rail-tete [data-fermer-menu] { flex: 0 0 36px; width: 36px; height: 36px; min-height: 36px; }
.bouton-icone .ico, .coquille .barre-haute .aide-lien svg { width: 20px; height: 20px; stroke-width: var(--trait); }
.bouton-icone[hidden] { display: none; }
.coquille .barre-haute .aide-lien .aide-mot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.coquille .barre-haute .aide-lien[aria-current="page"] { background: var(--selection); }
/* Le point qui dit « il y a du nouveau » : sur le bord haut du rond, cercle de la couleur d'alerte. */
.notifications-pastille, .pastille-aide {
  position: absolute; top: 9px; right: 10px; left: auto; width: 8px; height: 8px; border-radius: 50%;
  background: var(--alerte-trait); box-shadow: 0 0 0 2px var(--fond);
}
.theme-bascule .ico-soleil { display: none; }
:root[data-theme="dark"] .theme-bascule .ico-lune { display: none; }
:root[data-theme="dark"] .theme-bascule .ico-soleil { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-bascule .ico-lune { display: none; }
  :root:not([data-theme="light"]) .theme-bascule .ico-soleil { display: block; }
}
.coquille .entreprise-bouton { cursor: default; gap: 10px; padding: 4px 6px; }
.coquille .entreprise-bouton strong { font-size: 14px; font-weight: var(--g-fort); }
.coquille .entreprise-bouton small { font-size: 12px; color: var(--texte-doux); }
.entreprise-logo { height: 28px; width: auto; max-width: 84px; object-fit: contain; display: block; }
.coquille .entreprise-bouton > span { text-align: right; }

/* ── Le compte : l'avatar et son menu ─────────────────────────────────────────────────────── */
.utilisateur { position: relative; }
.utilisateur-bouton { border: 0; background: transparent; padding: 0; cursor: pointer; border-radius: 50%; }
.avatar, .coquille .avatar {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-size: 14px;
  font-weight: var(--g-fort); letter-spacing: .02em; background: var(--selection); color: var(--texte);
  border: 1px solid var(--bord-fort);
}
.avatar.grand { width: 48px; height: 48px; font-size: 16px; flex: none; }
/* LA PHOTO D'UNE PERSONNE (decision 0156), dans n'importe quel rond (avatar, me-avatar,
   fiche-r-avatar, cal-avatar) : elle remplit le rond, qui garde sa taille. Elle apparait en fondu
   et leger zoom (opacity et transform seulement), coupe quand on demande moins de mouvement,
   en connexion economique, ou sur un appareil lent (`.sobre`, `.leger`). */
.a-photo { overflow: hidden; padding: 0; background: var(--surface-2); }
.a-photo > .avatar-photo { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit;
  opacity: 0; transform: scale(.92); transition: opacity .32s ease-out, transform .42s ease-out; }
.a-photo > .avatar-photo.charge { opacity: 1; transform: none; }
.sobre .a-photo > .avatar-photo, .leger .a-photo > .avatar-photo { transition: none; }
@media (prefers-reduced-motion: reduce) { .a-photo > .avatar-photo { transition: none; transform: none; } }
.utilisateur-menu, .coquille .utilisateur-menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 40; width: 328px; min-width: 0; max-width: calc(100vw - 24px);
  padding: 8px; border-radius: var(--rayon-menu); background: var(--surface); border: 1px solid var(--bord);
  box-shadow: var(--ombre-menu); transform-origin: top right;
  animation: menu-entree var(--d2) var(--courbe-sortie) both;
}
.utilisateur-menu.se-ferme, .notifications-panneau.se-ferme { animation: menu-sortie var(--d2) var(--courbe) both; }
@keyframes menu-entree { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
@keyframes menu-sortie { to { opacity: 0; transform: scale(.96) translateY(-4px); } }
.utilisateur-qui { display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 12px 12px 14px; margin-bottom: 6px;
  border-bottom: 1px solid var(--bord); line-height: 1.35; }
.utilisateur-qui > div { display: flex; flex-direction: column; min-width: 0; }
.utilisateur-qui strong { font-weight: var(--g-fort); font-size: 15px; }
.utilisateur-qui span:not(.avatar) { color: var(--texte-doux); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.utilisateur-menu .m-item, .coquille .utilisateur-menu .m-item {
  position: relative; isolation: isolate; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; height: 44px;
  padding: 0 12px; border: 0; background: none; border-radius: 14px; text-align: left; text-decoration: none;
  color: var(--texte); font-weight: var(--g-texte); cursor: pointer;
}
.utilisateur-menu .m-item::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; z-index: -1; transition: opacity var(--d1) var(--courbe); }
.utilisateur-menu .m-item:hover { background: none; text-decoration: none; color: var(--texte); }
.utilisateur-menu .m-item:hover::after { opacity: .06; }
.m-valeur { margin-left: auto; color: var(--texte-doux); display: flex; align-items: center; gap: 4px; }
.m-valeur .ico { transition: transform var(--d2) var(--courbe); }
[aria-expanded="true"] > .m-valeur .ico { transform: rotate(90deg); }
.m-langues { display: flex; flex-direction: column; gap: 2px; padding: 0 0 4px 32px; }
.utilisateur-menu .m-langues .m-item { height: 38px; min-height: 38px; }
.m-langues .m-item[aria-checked="true"] { color: var(--texte); }
.m-langues .m-item[aria-checked="true"]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.m-langues .m-item[aria-checked="false"] { color: var(--texte-doux); padding-left: 30px; }
.m-theme { padding: 6px 12px 10px; }
.m-theme-titre { display: flex; align-items: center; gap: 12px; height: 36px; }
.segment {
  position: relative; display: grid; grid-template-columns: repeat(3, 1fr); padding: 4px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--bord); margin-top: 4px;
}
.segment button {
  position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 6px; height: 36px;
  border: 0; background: none; border-radius: 999px; cursor: pointer; color: var(--texte-doux); font-size: 13px; padding: 0 4px;
}
.segment button[aria-checked="true"] { color: var(--accent-texte); }
.segment .curseur {
  position: absolute; top: 4px; left: 4px; bottom: 4px; width: calc((100% - 8px) / 3); border-radius: 999px;
  background: var(--accent); transform: translateX(calc(var(--pos, 0) * 100%)); transition: transform var(--d3) var(--courbe-sortie);
}
.utilisateur-separation, .m-sep { height: 1px; border: 0; background: var(--bord); margin: 6px 4px; }

/* ── Notifications ────────────────────────────────────────────────────────────────────────── */
.notifications { position: relative; }
.notifications-panneau {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 50; width: min(380px, calc(100vw - 24px));
  max-height: 70vh; overflow-y: auto; padding: 8px; background: var(--surface); border: 1px solid var(--bord);
  border-radius: var(--rayon-menu); box-shadow: var(--ombre-menu); transform-origin: top right;
  animation: menu-entree var(--d2) var(--courbe-sortie) both;
}
.notifications-tete { padding: 10px 12px 8px; }
.notifications-liste { display: grid; gap: 2px; }
.notifications-vide { padding: 16px 12px 18px; color: var(--texte-doux); }
.notification {
  position: relative; isolation: isolate; display: grid; gap: 1px; padding: 10px 12px; border-radius: 14px; color: var(--texte);
  border: 0; text-decoration: none;
}
.notification::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; z-index: -1; transition: opacity var(--d1) var(--courbe); }
.notification:hover { color: var(--texte); text-decoration: none; background: none; }
.notification:hover::after { opacity: .06; }
.notification .a-faire-etat { font-size: 12px; color: var(--texte-doux); }
.notification.ton-erreur .a-faire-etat { color: var(--alerte-trait); }
.notification .a-faire-nombre { font-size: 14px; font-weight: var(--g-fort); }
.notification .a-faire-detail { font-size: 12.5px; color: var(--texte-doux); }

/* ── Contenu ──────────────────────────────────────────────────────────────────────────────── */
.coquille .principal { padding: 10px 32px 48px; max-width: 1440px; width: 100%; }
.coquille .principal:focus { outline: none; }
.fil-ariane { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 13px; color: var(--texte-doux); }
.fil-ariane a { color: var(--texte-doux); text-decoration: none; }
.fil-ariane a:hover { color: var(--texte); }
.coquille .entete { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 14px 0 26px; flex-wrap: wrap; }
.coquille .entete h1 { margin: 0; font-weight: var(--g-titre); font-size: var(--h1-taille); letter-spacing: var(--h1-approche); line-height: 1.04; }
.coquille .entete h1 em { font-style: normal; color: var(--texte-doux); }
.coquille .entete .sous-titre { margin: 10px 0 0; color: var(--texte-doux); font-size: 15px; }
.boutons { display: flex; flex-wrap: wrap; gap: 10px; }
.titre-section { font-weight: var(--g-fort); font-size: 15px; margin: 0 0 14px; display: flex; align-items: center; gap: 10px; }

/* ── Palette de commandes ─────────────────────────────────────────────────────────────────── */
dialog.palette {
  width: min(640px, calc(100vw - 24px)); max-width: none; max-height: min(72vh, 640px); margin: 10vh auto auto;
  padding: 0; border: 1px solid var(--bord); border-radius: var(--rayon-menu); box-shadow: var(--ombre-menu);
  color: var(--texte); background: var(--surface); overflow: hidden;
}
dialog.palette[open] { display: flex; flex-direction: column; animation: menu-entree var(--d2) var(--courbe-sortie) both; }
dialog.palette::backdrop, dialog.boite::backdrop { background: var(--voile); }
.palette-champ { display: flex; align-items: center; gap: 10px; height: 58px; padding: 0 10px 0 18px; border-bottom: 1px solid var(--bord); }
.palette-champ > .ico { color: var(--texte-doux); }
.palette-champ input { flex: 1 1 auto; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; font-size: 16px; color: var(--texte); }
.palette-fermer { border: 0; background: none; padding: 0 6px; min-height: 44px; cursor: pointer; color: var(--texte-doux); }
.palette-liste { flex: 1 1 auto; overflow-y: auto; padding: 4px 8px 10px; overscroll-behavior: contain; }
.palette-groupe { padding: 12px 12px 4px; font-size: 12px; font-weight: var(--g-texte); letter-spacing: 0; text-transform: none; color: var(--texte-doux); }
.palette-liste [role="option"] { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 12px; border-radius: 14px; color: var(--texte); text-decoration: none; }
.palette-liste [role="option"] > .ico { color: var(--texte-doux); }
.palette-liste [aria-selected="true"] { background: var(--selection); }
.palette-liste [aria-selected="true"] strong, .palette-liste [aria-selected="true"] > .ico { color: var(--texte); }
.palette-texte { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.palette-texte strong { font-weight: var(--g-fort); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-texte small { font-size: 12.5px; color: var(--texte-doux); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-type { flex: none; padding: 1px 9px; font-size: 11.5px; color: var(--texte-doux); border: 1px solid var(--bord); border-radius: 999px; }
.palette-vide, .palette-note { padding: 18px 12px; color: var(--texte-doux); }
.palette-note { padding: 4px 12px 8px; font-size: 12.5px; }
.palette-pied { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 10px 18px; border-top: 1px solid var(--bord); background: var(--surface-2); font-size: 12px; color: var(--texte-doux); }
.palette-pied kbd { margin-right: 2px; }

/* ── Barre du bas (telephone) ─────────────────────────────────────────────────────────────── */
.barre-mobile { display: none; }

/* ── Cartes ───────────────────────────────────────────────────────────────────────────────── */
.carte, .tuile, .aide-sommaire, .aide-section {
  background: var(--surface); border: 1px solid transparent; border-radius: var(--rayon-carte); padding: 24px; box-shadow: var(--ombre);
}
.carte > h2:first-child, .carte > .barre:first-child > h2 { margin-bottom: 14px; }
.carte-tete { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.carte-tete h2 { margin: 0; font-size: 16px; font-weight: var(--g-fort); }
.pousse { margin-left: auto; }
.sous-carte { background: var(--surface-2); border: 1px solid var(--bord); border-radius: 18px; padding: 14px; }
/* Les indicateurs d'un ecran (`indicateur()`) : le montant d'abord, en grand et leger, puis ce
   qu'il mesure (maquette, Factures). */
.carte.indicateur { display: flex; flex-direction: column; padding: 18px 22px; min-width: 0; }
.indicateur .valeur {
  order: 1; font-weight: var(--g-titre); font-size: var(--valeur-taille-3); letter-spacing: var(--valeur-approche); line-height: 1;
  font-variant-numeric: tabular-nums lining-nums; overflow-wrap: anywhere;
}
.indicateur .valeur .u { font-size: .5em; letter-spacing: 0; margin-left: .12em; vertical-align: .62em; }
/* Le bandeau de demonstration : une pilule discrete au-dessus du titre, plus une barre pleine. */
.coquille .bandeau-demo { margin: 6px 32px 0; padding: 8px 16px; border-radius: 999px; background: var(--surface); color: var(--texte-doux);
  box-shadow: inset 0 0 0 1px var(--bord); font-size: 12.5px; letter-spacing: 0; text-align: left; }
.coquille .bandeau-demo strong { color: var(--texte); }
@media screen and (max-width: 900px) { .coquille .bandeau-demo { margin: 6px 16px 0; border-radius: 18px; } }
.indicateur .libelle { order: 2; margin: 8px 0 0; color: var(--texte-doux); font-size: 13px; }
.indicateur .detail { order: 3; margin-top: 2px; font-size: 12.5px; color: var(--texte-doux); }
.rond { width: 40px; height: 40px; border-radius: 50%; border: 1px solid currentColor; display: grid; place-items: center; flex: none; opacity: .9; }
.rond .ico { width: 16px; height: 16px; transition: transform var(--d2) var(--courbe-sortie); }
.lien-rond { color: var(--texte); text-decoration: none; }
.lien-rond:hover { color: var(--texte); text-decoration: none; }
.lien-rond:hover .rond .ico { transform: translate(2px, -2px); }
.entree { animation: entree var(--d3) var(--courbe-sortie) both; animation-delay: calc(var(--i, 0) * var(--pas)); }
@keyframes entree { from { opacity: 0; transform: translateY(10px); } }

/* ── Tableaux ─────────────────────────────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left; font-weight: var(--g-fort); font-size: 12px; letter-spacing: .01em; text-transform: none;
  color: var(--texte-doux); padding: 12px 14px; border-bottom: 1px solid var(--bord); background: transparent; white-space: nowrap;
}
tbody td { padding: 11px 14px; height: 42px; border-bottom: 1px solid var(--bord); }
tbody tr:hover { background: var(--survol); }
tbody tr:last-child td { border-bottom: 0; }
.tableau-cadre {
  background: var(--surface); border: 1px solid transparent; border-radius: var(--rayon-carte); overflow: hidden; box-shadow: var(--ombre);
}
.tableau-cadre th:first-child, .tableau-cadre td:first-child { padding-left: 22px; }
.tableau-cadre th:last-child, .tableau-cadre td:last-child { padding-right: 16px; }
tbody tr.total td, tfoot td { font-weight: var(--g-fort); border-top: 1px solid var(--bord-fort); border-bottom: 0; height: 46px; background: transparent; }
tbody tr.total:hover td { background: transparent; }
tbody tr.danger { background: transparent; }
tbody tr.danger:hover { background: var(--survol); }
tbody tr.selectionnee { background: var(--selection); }
@media (min-width: 621px) {
  .tableau-defile th:last-child:empty, .tableau-defile td:last-child:has(.boutons) {
    background: var(--surface); box-shadow: -8px 0 8px -8px var(--ombre-defile);
  }
  .tableau-defile th:last-child:empty { background: var(--surface); }
  .tableau-defile tbody tr:hover td:last-child:has(.boutons) { background: var(--surface); }
}
.tableau-outils { display: flex; justify-content: flex-end; align-items: center; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--bord); background: transparent; color: var(--texte-doux); font-size: 13px; }
.tableau-outils .ico { width: 16px; height: 16px; }

/* ── Etiquettes : pilules de 24 px, point de couleur, texte toujours ecrit ────────────────── */
.etiquette {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: var(--g-fort); white-space: nowrap; line-height: 1; vertical-align: middle;
}
.etiquette::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.etiquette.neutre { background: var(--brouillon-fond); color: var(--brouillon-texte); }
.etiquette.info { background: var(--attente-fond); color: var(--attente-texte); }
.etiquette.succes { background: var(--ok-fond); color: var(--ok-texte); }
/* « En attente », « À valider » : un etat neutre, en bleu « attente » (recette du 21/10). L'orange et
   le terracotta sont reserves aux alertes : retard, rejet, echec (`.danger`, plein). */
.etiquette.alerte { background: var(--attente-fond); color: var(--attente-texte); }
.etiquette.danger { background: var(--alerte-fond); color: var(--alerte-texte); }
.etiquette.partiel { background: var(--partiel-fond); color: var(--partiel-texte); }

/* ── Boutons : pilules de 44 px ; principal plein, secondaire blanc borde ─────────────────── */
.bouton {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; height: auto; padding: 0 20px; border-radius: 999px; border: 1px solid var(--bord-fort);
  background: var(--surface); color: var(--texte); font-weight: var(--g-fort); font-size: 14px; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform var(--d1) var(--courbe);
}
.bouton::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; z-index: -1; transition: opacity var(--d1) var(--courbe); }
.bouton:hover { background: var(--surface); border-color: var(--bord-fort); color: var(--texte); text-decoration: none; }
.bouton:hover::after { opacity: .08; }
.bouton:active { transform: scale(.96); }
.bouton.primaire { background: var(--accent); color: var(--accent-texte); border-color: var(--accent); box-shadow: var(--ombre-bouton); }
.bouton.primaire:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); }
.bouton.primaire:hover::after { opacity: .14; }
.bouton.grand { min-height: 52px; padding: 0 26px; font-size: 15px; }
.bouton.petit { min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: 999px; }
.bouton svg, .bouton .ico { width: 16px; height: 16px; flex: 0 0 auto; stroke-width: var(--trait); }
.bouton.tertiaire { border-color: transparent; background: transparent; color: var(--texte); }
.bouton.tertiaire:hover { background: transparent; border-color: transparent; }
.bouton.danger { border-color: var(--danger); color: var(--danger); background: var(--surface); }
.bouton.danger:hover { background: var(--surface); border-color: var(--danger); color: var(--danger); }
.bouton.danger.plein, .back-office .bouton.danger.plein { background: var(--alerte-fond); border-color: var(--alerte-fond); color: var(--alerte-texte); }
.bouton.danger.plein:hover, .back-office .bouton.danger.plein:hover { background: var(--alerte-fond); color: var(--alerte-texte); }
.bouton:disabled, .bouton[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.bouton:disabled::after, .bouton[disabled]::after { opacity: 0; }

/* ── Pilules de filtre et controles segmentes (`.segments`, `barreSegmentee`) ─────────────── */
.segments { display: inline-flex; flex-wrap: wrap; gap: 8px; max-width: 100%; padding: 0; background: none; border-radius: 0; }
.segments button, .pilule {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 8px; min-height: 38px; height: 38px;
  padding: 0 16px; border-radius: 999px; border: 1px solid var(--bord-fort); background: transparent; color: var(--texte);
  font-weight: var(--g-texte); font-size: 14px; white-space: nowrap; cursor: pointer; box-shadow: none;
  transition: transform var(--d1) var(--courbe);
}
.segments button::after, .pilule::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; z-index: -1; transition: opacity var(--d1) var(--courbe); }
.segments button:hover::after, .pilule:hover::after { opacity: .06; }
.segments button:active, .pilule:active { transform: scale(.96); }
.segments button.actif, .segments button[aria-pressed="true"], .pilule[aria-pressed="true"],
.back-office .barre-segmentee button[aria-pressed="true"] {
  background: var(--accent); color: var(--accent-texte); border-color: var(--accent); box-shadow: none;
}
.segments button b, .pilule b, .segments button .compte-onglet {
  font-weight: var(--g-fort); font-size: 12px; min-width: 20px; height: 20px; padding: 0 6px; margin: 0; border-radius: 999px;
  display: inline-grid; place-items: center; background: var(--surface-2); color: var(--texte-doux); font-variant-numeric: tabular-nums;
}
.segments button.actif b, .segments button[aria-pressed="true"] b, .pilule[aria-pressed="true"] b,
.segments button.actif .compte-onglet { background: var(--accent-texte); color: var(--accent); }

/* ── Champs ───────────────────────────────────────────────────────────────────────────────── */
.champ { gap: 6px; margin-bottom: 14px; }
.champ label { font-size: 13px; font-weight: var(--g-fort); color: var(--texte-moyen); }
.champ input, .champ select, .champ textarea, .recherche-liste input, .selecteur, .filtre-application select, .filtre-pieces, .serie-cases input {
  min-height: 44px; padding: 10px 14px; border: 1px solid var(--bord-champ); border-radius: var(--rayon-s);
  font-size: 14px; background: var(--surface); color: var(--texte); transition: none;
}
.champ textarea { min-height: 88px; }
.champ input:hover, .champ select:hover, .champ textarea:hover { border-color: var(--texte-doux); }
.champ input:focus, .champ select:focus, .champ textarea:focus, .recherche-liste input:focus, .selecteur:focus, .filtre-pieces:focus, .serie-cases input:focus {
  outline: none; border-color: var(--focus); box-shadow: var(--anneau);
}
.champ input[readonly], .champ textarea[readonly] { background: var(--surface-2); color: var(--texte-doux); }
.champ .aide { font-size: 12.5px; color: var(--texte-doux); }
/* La saisie d'un montant porte son unite collee au champ, a droite (devise, « % », « € TTC »). */
.montant-saisie { display: flex; align-items: stretch; max-width: 320px; }
.montant-saisie input { flex: 1; min-width: 0; border-radius: var(--rayon-s) 0 0 var(--rayon-s); }
.montant-saisie .devise { display: inline-flex; align-items: center; padding: 0 12px; border: 1px solid var(--bord-champ); border-left: 0; white-space: nowrap; border-radius: 0 var(--rayon-s) var(--rayon-s) 0; background: var(--surface-2); color: var(--texte-doux); font-weight: var(--g-fort); }
/* La recherche d'une liste : une pilule, comme la maquette. */
.recherche-liste { display: flex; align-items: center; gap: 6px; }
.recherche-liste input { border-radius: 999px; min-height: 38px; height: 38px; padding: 0 16px; border-color: var(--bord-fort); background: transparent; }
.recherche-liste .bouton { min-height: 38px; height: 38px; }

/* ── Bandeaux ─────────────────────────────────────────────────────────────────────────────── */
.note {
  border: 0; border-left: 0; padding: 14px 18px; border-radius: 18px; font-size: 14px;
  background: var(--info-pale); color: var(--texte); box-shadow: inset 0 0 0 1px var(--bord);
}
.note.alerte { background: var(--alerte-pale); box-shadow: inset 0 0 0 1px var(--alerte-pale); }
.note.danger { background: var(--danger-pale); box-shadow: inset 0 0 0 1px var(--danger-pale); }
.note.succes { background: var(--succes-pale); box-shadow: inset 0 0 0 1px var(--succes-pale); }
.note .titre { font-weight: var(--g-fort); margin-bottom: 2px; }
.note.alerte .titre, .note.danger .titre { color: var(--alerte); }

/* ── Boites de dialogue ───────────────────────────────────────────────────────────────────── */
dialog.boite {
  border: 1px solid var(--bord); border-radius: var(--rayon-carte); box-shadow: var(--ombre-menu); background: var(--surface); color: var(--texte);
}
/* `backwards` ET NON `both` (correctif du 2026-10-21) : une animation de transform qui RESTE
   appliquee apres sa fin fait de la boite le bloc conteneur de ses enfants en `position: fixed`
   (Chrome). Le menu « … » d'une piece se posait alors decale de la position de la boite, hors de
   celle-ci, rogne : rien ne s'ouvrait a l'ecran. L'entree garde son mouvement, la boite n'en
   garde aucune trace une fois ouverte. */
dialog.boite[open] { animation: boite-entree var(--d3) var(--courbe-sortie) backwards; }
@keyframes boite-entree { from { opacity: 0; transform: translateY(12px) scale(.98); } }
dialog.boite .boite-entete { padding: 20px 24px 14px; border-bottom: 0; }
dialog.boite .boite-entete h2 { font-size: 22px; font-weight: var(--g-titre); letter-spacing: -.01em; line-height: 1.2; }
dialog.boite .boite-corps { padding: 6px 24px 18px; }
dialog.boite .boite-pied { padding: 14px 24px 18px; background: var(--surface); border-top: 1px solid var(--bord); gap: 10px; }
.fermer { position: relative; isolation: isolate; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--bord-fort); color: var(--texte); font-size: 18px; }
.fermer::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; z-index: -1; transition: opacity var(--d1) var(--courbe); }
.fermer:hover::after { opacity: .08; }

/* ── L'annonce (message furtif) : pilule pleine qui monte du bas ──────────────────────────── */
.furtif {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; display: flex; align-items: center; gap: 16px; max-width: min(90vw, 640px);
  padding: 12px 20px; border-radius: 999px; background: var(--accent); color: var(--accent-texte); box-shadow: var(--ombre-menu);
  font-size: 14px; transform: translateX(-50%); animation: annonce-entree var(--d3) var(--courbe-sortie) both;
}
@keyframes annonce-entree { from { opacity: 0; transform: translate(-50%, calc(100% + 40px)); } }
.furtif.danger { background: var(--alerte-fond); color: var(--alerte-texte); }
.furtif.succes { background: var(--accent); color: var(--accent-texte); }
.furtif.annulable { padding: 8px 8px 8px 20px; }
.furtif.annulable .bouton, .furtif.annulable .bouton:hover {
  min-height: 36px; padding: 0 16px; border-radius: 999px; border: 1px solid currentColor; background: none; color: inherit;
}

/* ── Menus, listes et panneaux flottants ──────────────────────────────────────────────────── */
.menu-actions-liste, .rail-espaces, .cherchable-panneau {
  border: 1px solid var(--bord); border-radius: 18px; background: var(--surface); box-shadow: var(--ombre-menu); padding: 6px;
}
.back-office .menu-actions-liste .bouton, .menu-actions-liste .bouton { border-radius: 12px; }
.cherchable-entree { border-radius: 12px; }
.cherchable-entree.actif { background: var(--selection); }
.rail-espaces button { border-radius: 12px; }

/* ── Onglets d'une page (decision 0108) : pilules ─────────────────────────────────────────── */
.onglets-page { gap: 6px; border-bottom: 0; padding: 2px 0 6px; }
.onglets-page [role=tab] {
  position: relative; isolation: isolate; min-height: 38px; padding: 0 16px; border: 1px solid var(--bord-fort); border-radius: 999px;
  color: var(--texte); background: transparent; transition: transform var(--d1) var(--courbe);
}
.onglets-page [role=tab]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; z-index: -1; transition: opacity var(--d1) var(--courbe); }
.onglets-page [role=tab]:hover { background: transparent; color: var(--texte); }
.onglets-page [role=tab]:hover::after { opacity: .06; }
.onglets-page [role=tab][aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); font-weight: var(--g-fort); }
.onglets-page .compte { background: var(--alerte-pale); color: var(--alerte); border-radius: 999px; }
.onglets-page [aria-selected="true"] .compte { background: var(--accent-texte); color: var(--accent); }
.onglets-page .repere-onglet { background: var(--alerte-trait); box-shadow: 0 0 0 2px var(--surface); }

/* ── Etats vides, etapes, squelettes ──────────────────────────────────────────────────────── */
.vide { color: var(--texte-doux); }
.etat-vide .etat-vide-icone { width: 56px; height: 56px; border-radius: 50%; background: transparent; border: 1px solid var(--bord-fort); color: var(--texte-doux); }
.etat-vide h3 { font-size: 18px; font-weight: var(--g-titre); }
/* LE PARCOURS EN ETAPES (`parcoursEtapes`). La conversion design-2026 n'avait garde que les
   couleurs : la mise en page (liste sans puce native, rangee, puce ronde) etait partie avec
   l'ancienne regle, et le navigateur rendait une liste numerotee brute, le numero natif devant le
   numero de la puce (« 1. 1. Plateforme »). Garde : tests/banc-controle-visuel.mjs. */
ol.etapes { list-style: none; display: flex; gap: 10px; margin: 0 0 18px; padding: 0; }
ol.etapes li { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--bord); border-radius: 18px; }
.etape-puce { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: 13px;
  background: var(--surface-2); color: var(--texte-doux); font-weight: var(--g-fort); }
.etape-puce svg { width: 15px; height: 15px; }
.etape-titre { display: block; line-height: 1.3; }
.etape-detail { display: block; font-size: 12.5px; color: var(--texte-doux); line-height: 1.3; }
ol.etapes li.faite .etape-puce { background: var(--ok-fond); color: var(--ok-texte); }
ol.etapes li[aria-current="step"] { border-color: var(--accent); }
ol.etapes li[aria-current="step"] .etape-puce { background: var(--accent); color: var(--accent-texte); }
.etape-titre { font-weight: var(--g-fort); }
.squelette { display: grid; gap: 14px; padding: 4px 0; }
.squelette i, .br-squelette {
  position: relative; overflow: hidden; display: block; height: 14px; border-radius: 999px; background: var(--surface-3);
  animation: none;
}
.squelette i::after, .br-squelette::after {
  content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--surface), transparent);
  transform: translateX(-100%); animation: balaye 1.1s var(--courbe) infinite;
}
@keyframes balaye { to { transform: translateX(100%); } }
.squelette i:nth-child(1) { width: 38%; height: 26px; }
.squelette i:nth-child(2) { width: 92%; height: 96px; border-radius: var(--rayon-carte); }
.squelette i:nth-child(3) { width: 74%; }
.br-squelette { height: 58px; margin: 8px 12px; border-radius: 18px; }
.bandeau-lent { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 10px 16px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--bord); color: var(--texte-doux); font-size: 13.5px; }

/* ── Tuiles d'applications, sections d'aide ───────────────────────────────────────────────── */
.tuile { display: block; color: var(--texte); text-decoration: none; min-height: 130px; transition: transform var(--d2) var(--courbe); }
.tuile:hover { color: var(--texte); text-decoration: none; transform: translateY(-3px); box-shadow: var(--ombre); }
.tuile .initiale { width: 40px; height: 40px; border-radius: 50%; background: transparent; border: 1px solid var(--bord-fort); color: var(--texte); font-weight: var(--g-fort); }
.tuile.indisponible { background: var(--surface-2); box-shadow: none; }
.aide-sommaire, .aide-section { padding: 20px 24px; }

/* ── Accueil (decision 0126) : ce qui demande l'attention, le chiffre d'affaires, la reprise ── */
.accueil { gap: 16px; }
.indicateurs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.indic {
  position: relative; overflow: hidden; isolation: isolate; display: flex; flex-direction: column; min-height: 206px;
  padding: 20px 20px 22px 22px; border-radius: var(--rayon-indic); background: var(--c-fond); color: var(--c-texte);
  text-decoration: none; box-shadow: inset 0 0 0 1px var(--c-bord); transition: transform var(--d2) var(--courbe);
}
.indic:hover { transform: translateY(-3px); text-decoration: none; color: var(--c-texte); }
.indic-1 { --c-fond: var(--c1-fond); --c-texte: var(--c1-texte); --c-doux: var(--c1-doux); --c-valeur: var(--c1-valeur); --c-icone: var(--c1-icone); --c-bord: var(--c1-bord); }
.indic-2 { --c-fond: var(--c2-fond); --c-texte: var(--c2-texte); --c-doux: var(--c2-doux); --c-valeur: var(--c2-valeur); --c-icone: var(--c2-icone); --c-bord: var(--c2-bord); }
.indic-3 { --c-fond: var(--c3-fond); --c-texte: var(--c3-texte); --c-doux: var(--c3-doux); --c-valeur: var(--c3-valeur); --c-icone: var(--c3-icone); --c-bord: var(--c3-bord); }
.indic-4 { --c-fond: var(--c4-fond); --c-texte: var(--c4-texte); --c-doux: var(--c4-doux); --c-valeur: var(--c4-valeur); --c-icone: var(--c4-icone); --c-bord: var(--c4-bord); }
.indic-tete { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.indic-pastille { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--c-doux); min-width: 0; }
.indic-pastille .ico { opacity: .8; color: var(--c-icone); }
.indic .rond { width: 40px; height: 40px; color: var(--c-icone); border-color: currentColor; opacity: .75; }
.indic:hover .rond .ico { transform: translate(2px, -2px); }
.valeur-grande { font-weight: var(--g-titre); font-size: var(--valeur-taille); letter-spacing: var(--valeur-approche); line-height: 1;
  font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.valeur-grande .u { font-size: .5em; letter-spacing: 0; margin-left: .12em; vertical-align: .62em; }
.indic .valeur-grande { margin-top: auto; padding-top: 22px; color: var(--c-valeur); }
.indic-libelle { margin-top: 10px; font-weight: var(--g-fort); font-size: 14px; }
.indic-detail { margin-top: 2px; font-size: 12.5px; color: var(--c-doux); }
[data-compte] { display: inline-block; }
.accueil-deux { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.accueil-deux > :only-child { grid-column: 1 / -1; }
.chiffres { display: flex; gap: 40px; flex-wrap: wrap; margin: 4px 0 22px; }
.chiffre-bloc .valeur-grande { font-size: var(--valeur-taille-2); font-weight: 300; }
.chiffre-bloc .lib { margin-top: 8px; color: var(--texte-doux); font-size: 13px; }
.delta { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px;
  font-weight: var(--g-fort); background: var(--ok-fond); color: var(--ok-texte); margin-left: 8px; vertical-align: middle; }
.delta.baisse { background: var(--brouillon-fond); color: var(--brouillon-texte); }
.histo {
  position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--histo-gap, 10px); height: 240px;
  padding-top: 34px; background-image: var(--grille); background-size: 100% 25%; background-position: 0 34px;
}
.histo-mois { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.histo-col { position: relative; flex: 1; width: 100%; max-width: var(--barre-l); }
.histo-piste { position: absolute; inset: 0; overflow: hidden; border-radius: var(--barre-rayon); background: var(--surface-2); }
.histo-piste i {
  position: absolute; left: 0; right: 0; bottom: 0; height: var(--h); border-radius: var(--barre-rayon); background: var(--barre);
  animation: monte var(--d-barres) var(--courbe-sortie) both; animation-delay: calc(120ms + var(--i, 0) * 30ms);
}
.histo-mois.courant .histo-piste i { background: var(--barre-courante); }
/* LES HACHURES NE DISENT QU'UNE CHOSE : un mois PREVU. Jamais une alerte, jamais ailleurs. */
.histo-mois.futur .histo-piste { background: transparent; }
.histo-mois.futur .histo-piste i { background: var(--hachures); box-shadow: inset 0 0 0 1px var(--barre-future); }
@keyframes monte { from { transform: translateY(101%); } }
.histo-mois small { font-size: 11.5px; color: var(--texte-doux); white-space: nowrap; }
.histo-mois.courant small { color: var(--texte); font-weight: var(--g-fort); }
.bulle {
  position: absolute; left: 50%; bottom: calc(var(--h) + 8px); transform: translateX(-50%); padding: 5px 10px; border-radius: 999px;
  font-size: 12px; font-weight: var(--g-fort); white-space: nowrap; background: var(--bulle-fond); color: var(--bulle-texte);
  font-variant-numeric: tabular-nums; animation: bulle-entree var(--d3) var(--courbe-sortie) both; animation-delay: 700ms;
}
@keyframes bulle-entree { from { opacity: 0; transform: translate(-50%, 10px); } }
.legende { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; font-size: 12.5px; color: var(--texte-doux); }
.legende span { display: inline-flex; align-items: center; gap: 8px; }
.legende i { width: 14px; height: 14px; border-radius: 5px; background: var(--barre); }
.legende .l-c { background: var(--barre-courante); }
.legende .l-f { background: var(--hachures); box-shadow: inset 0 0 0 1px var(--barre-future); }
.liste-liens { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.liste-liens li { margin: 0; }
.liste-liens a {
  position: relative; isolation: isolate; display: flex; align-items: center; gap: 14px; min-height: 0; padding: 12px 10px; margin: 0 -10px;
  border-radius: 16px; text-decoration: none; color: var(--texte);
}
.liste-liens a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--survol); opacity: 0; z-index: -1; transition: opacity var(--d1) var(--courbe); }
.liste-liens a:hover { background: none; text-decoration: none; color: var(--texte); }
.liste-liens a:hover::after { opacity: 1; }
.liste-liens .rond { width: 40px; height: 40px; border-color: var(--bord-fort); color: var(--texte-doux); opacity: 1; }
.liste-liens span.texte { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.liste-liens strong { display: block; font-weight: var(--g-fort); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liste-liens small { display: block; color: var(--texte-doux); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.liste-liens time { margin-left: auto; color: var(--texte-doux); font-size: 12px; white-space: nowrap; }
.a-jour { display: flex; align-items: center; gap: 14px; }
.a-jour > .ico { width: 30px; height: 30px; color: var(--ok-texte); }
.a-jour p { margin: 2px 0 0; }

/* ── Factures (decision 0126) : synthese, filtres en pilules, recherche en pilule ─────────── */
.synthese { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; margin-bottom: 18px; }
.filtres { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filtres .segments { flex: 0 1 auto; }
.champ-pilule {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--bord-fort);
  background: transparent; color: var(--texte-doux); min-width: 220px;
}
.champ-pilule input { border: 0; background: none; outline: none; flex: 1; min-width: 0; color: var(--texte); height: 100%; padding: 0; }
.champ-pilule input::placeholder { color: var(--texte-doux); }
.champ-pilule:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.champ-pilule .ico { width: 16px; height: 16px; }
.periode-pilule { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 6px 0 14px; border-radius: 999px; border: 1px solid var(--bord-fort); color: var(--texte); }
.periode-pilule input { border: 0; background: none; height: 34px; color: var(--texte); padding: 0 4px; min-width: 0; }
.periode-pilule input:focus { outline: 2px solid var(--focus); outline-offset: 0; border-radius: 8px; }
.periode-pilule .ico { width: 16px; height: 16px; }
.filtres-suite { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -4px 0 14px; }
.retard-ligne { display: block; font-size: 11px; color: var(--alerte-trait); line-height: 1; font-weight: var(--g-fort); }
.pied-table { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-top: 1px solid var(--bord); color: var(--texte-doux); font-size: 13px; }

/* ── Courrier entrant (presentation seulement, decision 0126) ─────────────────────────────── */
.br-liste { background: var(--surface); border: 1px solid transparent; border-radius: var(--rayon-carte); box-shadow: var(--ombre); padding: 8px; overflow: visible; }
.br-ligne {
  position: relative; isolation: isolate; border: 0; border-radius: 18px; padding: 12px; column-gap: 12px; margin: 0;
}
.br-ligne + .br-ligne { margin-top: 2px; }
.br-ligne::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--survol); opacity: 0; z-index: -1; transition: opacity var(--d1) var(--courbe); pointer-events: none; }
.br-ligne:hover { background: none; }
.br-ligne:hover::after { opacity: 1; }
.br-ligne.courante { background: var(--selection); box-shadow: none; }
.br-ligne:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.br-qui { font-weight: var(--g-fort); }
.br-quand { color: var(--texte-doux); font-size: 12px; }
.br-sujet { font-size: 14px; }
.br-sujet strong { font-weight: var(--g-fort); }
.br-infos { font-size: 12px; color: var(--texte-doux); gap: 6px; }
.br-piece, .etiquette-boite {
  height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; background: var(--surface-2); color: var(--texte-doux);
  border: 1px solid var(--bord); display: inline-flex; align-items: center; gap: 5px;
}
.br-boite { min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--bord-fort); background: transparent; color: var(--texte); font-size: 14px; }
.br-boite[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-texte); font-weight: var(--g-texte); }
.br-panneau { background: var(--surface); border: 1px solid transparent; border-radius: var(--rayon-carte); box-shadow: var(--ombre); padding: 24px; }
.br-panneau h2 { font-size: 22px; font-weight: var(--g-titre); letter-spacing: -.01em; line-height: 1.2; }
.br-panneau .corps-message { border: 0; background: transparent; padding: 0; color: var(--texte-doux); font-size: 13.5px; max-width: 70ch; }
.br-panneau .apercu-piece { border: 1px solid var(--bord); border-radius: 18px; }
.br-panneau.glisse { animation: glisse var(--d3) var(--courbe-sortie) both; }
@keyframes glisse { from { opacity: 0; transform: translateX(18px); } }
.br-selection { border-radius: 999px; border: 1px solid var(--bord); box-shadow: var(--ombre-menu); padding: 8px 8px 8px 20px; }
.br-multi { border-radius: 18px; }
.lu-sur-document { color: var(--texte-doux); background: var(--surface-2); }
/* Les couleurs de boite (palette fermee du serveur) : des jetons, lisibles dans les deux modes. */
.c-bleu::before, .br-boite[data-couleur="bleu"]::before { background: var(--attente-texte); }
.c-vert::before, .br-boite[data-couleur="vert"]::before { background: var(--ok-texte); }
.c-ambre::before, .br-boite[data-couleur="ambre"]::before { background: var(--alerte-trait); }
.c-rouge::before, .br-boite[data-couleur="rouge"]::before { background: var(--danger); }
.c-violet::before, .br-boite[data-couleur="violet"]::before { background: var(--partiel-texte); }
.c-gris::before, .br-boite[data-couleur="gris"]::before { background: var(--texte-doux); }

/* ── Ecran moyen ──────────────────────────────────────────────────────────────────────────── */
@media screen and (max-width: 1180px) {
  .indicateurs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .accueil-deux { grid-template-columns: minmax(0, 1fr); }
}

/* ── Telephone (sous 768 px, decision 0143) : la barre laterale devient un tiroir ──────────── */
@media screen and (max-width: 767px) {
  .bouton, .segments button { min-height: 44px; }
  .bouton.petit { min-height: 40px; }
  .coquille .appli { display: block; }
  .coquille .rail {
    position: fixed; left: 0; top: 0; bottom: 0; width: 286px; max-width: 100vw; height: auto; z-index: 60;
    background: var(--surface); transform: translateX(-102%); transition: transform var(--d3) var(--courbe-sortie);
    box-shadow: none; animation: none;
  }
  .coquille .rail.ouvert { transform: none; box-shadow: var(--ombre-menu); }
  .rail-tete [data-fermer-menu] { display: inline-grid; margin-left: auto; }
  .coquille .rail-tete .rail-replier { display: none; }
  .voile { display: block; position: fixed; inset: 0; z-index: 55; background: var(--voile); animation: voile-entree var(--d3) var(--courbe) both; }
  .voile[hidden] { display: none; }
  @keyframes voile-entree { from { opacity: 0; } }
  .coquille .barre-haute { padding: 12px 16px 4px; gap: 8px; }
  .coquille .menu-bouton { display: inline-grid; }
  .marque-barre { display: flex; padding: 0 4px; }
  .marque-barre .marque { display: inline-flex; align-items: center; gap: 8px; }
  .marque-barre .marque-icone { width: 22px; height: 22px; }
  .marque-barre .marque-mot { display: block; height: 12px; filter: var(--logo-filtre); }
  .palette-ouvrir { display: none; }
  .coquille .barre-haute .aide-lien { display: none; }
  .coquille .principal { padding: 6px 16px 104px; }
  .coquille .entete { margin: 8px 0 18px; align-items: flex-start; }
  .coquille .entete > .boutons { width: 100%; }
  .coquille .entete > .boutons .bouton { flex: 1; justify-content: center; padding: 0 14px; }
  .indicateurs { gap: 10px; }
  .indic { min-height: 168px; padding: 16px; }
  .indic .rond { width: 34px; height: 34px; }
  .carte { padding: 18px; }
  .chiffres { gap: 22px; }
  .histo { --histo-gap: 5px; height: 200px; }
  .histo-mois small { font-size: 10px; }
  .bulle { font-size: 11px; padding: 4px 8px; }
  .filtres { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 12px; padding: 0 16px 2px; scrollbar-width: none; }
  .filtres .segments { flex-wrap: nowrap; }
  .filtres .champ-pilule { min-width: 180px; }
  .utilisateur-menu, .coquille .utilisateur-menu { position: fixed; left: 12px; right: 12px; top: 68px; width: auto; transform-origin: top center; }
  /* La barre du bas : une pilule pleine qui flotte, quatre gestes. */
  .barre-mobile {
    display: flex; position: fixed; left: 12px; right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 25; height: 64px; padding: 6px; border-radius: 999px;
    background: var(--mobile-fond); color: var(--mobile-texte); box-shadow: var(--ombre-menu); border: 0;
  }
  .barre-mobile > a, .barre-mobile > button {
    position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 0;
    border: 0; background: none; color: inherit; text-decoration: none; font-size: 11px; font-weight: var(--g-texte); border-radius: 999px; cursor: pointer; padding: 0;
  }
  .barre-mobile > [hidden] { display: none; }
  .barre-mobile .ico { width: 20px; height: 20px; }
  .barre-mobile [aria-current="page"] { background: var(--mobile-actif-fond); color: var(--mobile-actif-texte); font-weight: var(--g-texte); }
  .barre-mobile .notifications-pastille { top: 8px; right: calc(50% - 16px); box-shadow: 0 0 0 2px var(--mobile-fond); }
  body.coquille { padding-bottom: 0; }
  .notifications-panneau { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(88px + env(safe-area-inset-bottom)); width: auto; max-height: 64vh; transform-origin: bottom center; }
  .bandeau-maj { bottom: calc(88px + env(safe-area-inset-bottom)); }
  .furtif { left: 16px; right: 16px; bottom: calc(88px + env(safe-area-inset-bottom)); transform: none; justify-content: space-between; max-width: none; border-radius: 24px; }
  @keyframes annonce-entree-mobile { from { opacity: 0; transform: translateY(calc(100% + 110px)); } }
  .furtif { animation-name: annonce-entree-mobile; }
  .br-panneau { border-radius: 0; padding: 16px 16px 96px; animation: monte-feuille var(--d3) var(--courbe-sortie) both; }
  @keyframes monte-feuille { from { opacity: 0; transform: translateY(24px); } }
  ol.etapes { flex-wrap: wrap; }
  ol.etapes li { flex: 1 1 calc(50% - 10px); }
  .rail-marque, .coquille .rail .pied-appli { display: none; }
  .pied-appli.pied-page { display: flex; }
}
.pied-appli.pied-page { display: none; align-items: center; gap: 10px; margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--bord); color: var(--texte-doux); font-size: 12px; }

/* ── Telephone ────────────────────────────────────────────────────────────────────────────── */
@media screen and (max-width: 620px) {
  .coquille .rail { width: 286px; max-width: calc(100vw - 24px); }
  .coquille .entreprise { display: none; }
  dialog.palette { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; margin: 0; border: 0; border-radius: 0; }
  .palette-pied { display: none; }
  ol.etapes li { flex-basis: 100%; }
  dialog.boite, dialog.boite.large { border-radius: 0; }
}
@media screen and (max-width: 420px) {
  .coquille .entete h1 { font-size: var(--h1-taille-mobile); }
  .indic .valeur-grande { font-size: var(--valeur-taille-mobile); }
  .chiffre-bloc .valeur-grande { font-size: var(--valeur-taille-mobile); }
  .indic-libelle { font-size: 13px; }
  .indic-detail { display: none; }
  .indic-pastille .pt-txt { display: none; }
}

/* ── Sobriete : mouvement reduit, economie de donnees, 2G, sonde de fluidite ──────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
}
.sobre *, .sobre *::before, .sobre *::after, .leger *, .leger *::before, .leger *::after {
  animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important;
  transition-duration: 1ms !important; transition-delay: 0ms !important;
}

@media print {
  body::before { display: none; }
  .coquille .rail, .coquille .barre-haute, .barre-mobile, .fil-ariane, .evitement, .furtif { display: none !important; }
  .coquille .appli { display: block; }
  body.coquille { padding: 0; background: var(--surface); }
}

/* ── Le back-office garde sa peau (decision 0098), sur les jetons de la decision 0126 ──────── */
.back-office.coquille .barre-haute { background: var(--bo-fond); color: var(--bo-texte); border-bottom: 0; box-shadow: inset 0 -3px 0 var(--bo-accent); padding-bottom: 12px; }
.back-office.coquille .barre-haute .palette-ouvrir { background: var(--bo-fond-2); border-color: var(--bo-bord); color: var(--bo-doux); }
.back-office.coquille .barre-haute kbd { background: transparent; color: var(--bo-doux); border-color: var(--bo-bord); }
.back-office.coquille .barre-haute .bouton-icone, .back-office.coquille .barre-haute .aide-lien { border-color: var(--bo-bord); color: var(--bo-texte); }
.back-office.coquille .barre-haute .marque-mot { filter: brightness(0) invert(1); }
.back-office.coquille .rail { border-right: 3px solid var(--bo-accent); }
.back-office.coquille .rail a.rail-entree { color: var(--texte); min-height: 40px; }
.back-office.coquille .rail a.rail-entree.actif { margin-left: 0; padding-left: 14px; background: var(--bo-accent-pale); color: var(--bo-accent-texte); box-shadow: inset 3px 0 0 var(--bo-accent); }
/* Fiches d'un tableau sur telephone : l'intitule en petit, sans capitales (maquette). */
@media screen and (max-width: 620px) {
  .fiches td:not([data-intitule=""])::before { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: var(--g-texte); color: var(--texte-doux); }
}
/* Le compte porte dans une pilule pressee garde le contraste de la pilule (courrier entrant). */
[aria-pressed="true"] .faible, .segments button.actif .faible { color: inherit; }

/* ── Recette du 2026-10-21 (decision 0126) ────────────────────────────────────────────────── */
/* La console d'administration : bandeau anthracite, la mention en pastille claire. */
.back-office-titre { padding: 5px 12px; border-radius: 999px; background: var(--bo-pastille); color: var(--bo-fond);
  font-size: 12.5px; font-weight: var(--g-fort); letter-spacing: 0; text-transform: none; }
.back-office.coquille .barre-haute .bouton-icone:hover::after, .back-office.coquille .barre-haute .aide-lien:hover::after { opacity: .14; }
/* L'accueil : une autre alerte que la plus grave est une carte blanche, point et texte terracotta. */
.point-alerte { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--alerte-trait); flex: none; }
.indic-alerte .indic-pastille { color: var(--alerte-trait); font-weight: var(--g-fort); }
/* « Aussi a traiter » : une ligne par element, compacte. */
.carte.aussi { margin-top: 16px; padding: 18px 22px 12px; }
.carte.aussi .carte-tete { margin-bottom: 6px; }
.carte.aussi .carte-tete h3 { margin: 0; font-size: 15px; font-weight: var(--g-fort); }
.aussi-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); column-gap: 24px; }
.aussi-liste a { padding: 8px 10px; }
.aussi-liste .rond { width: 34px; height: 34px; }
.aussi-liste strong { display: flex; align-items: center; gap: 8px; }
.aussi-nombre { margin-left: auto; font-variant-numeric: tabular-nums lining-nums; font-weight: var(--g-fort); color: var(--texte); }
.aussi-liste a > .ico { color: var(--texte-doux); }
/* Le graphique prend autant de colonnes que de mois (les mois prevus s'ajoutent aux douze). */
.histo { grid-template-columns: repeat(var(--n, 12), minmax(0, 1fr)); }
/* Les grands tableaux : lignes denses de 42 px, en-tetes sur une ligne, texte long coupe. */
.tableau-cadre thead th, .tableau-cadre button.tri { white-space: nowrap; }
.tableau-cadre td.nombre, .tableau-cadre th.nombre { text-align: right; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
/* Un numero de piece (CT26-0004) ne se coupe pas a son tiret (decision 0147). */
.tableau-cadre td.reference { white-space: nowrap; }
@media screen and (min-width: 621px) {
  /* LE TEXTE COUPE CEDE LA PLACE AUX MONTANTS (recette du 21/10) : une cellule `td-tronque` n'impose
     aucune largeur minimale (`max-width: 0`) et prend ce qui reste une fois les dates, statuts et
     montants poses ; le tableau tient donc dans la largeur, sans defilement, des 1280 px. */
  .tableau-cadre td.td-tronque, .tableau-cadre th.td-tronque { max-width: 0; width: 22%; }
  .tableau-cadre th.td-tronque, .tableau-cadre th.td-tronque button.tri { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .td-tronque .cellule { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tableau-cadre tbody td, .tableau-cadre thead th, .tableau-cadre button.tri { padding-left: 10px; padding-right: 10px; }
  .tableau-cadre tbody td { padding-top: 8px; padding-bottom: 8px; }
  /* La fleche de tri ne se dessine que sur la colonne triee (la maquette n'en montre aucune) : la
     place va aux donnees. L'en-tete reste un bouton, annonce trie ou non (`aria-sort`). */
  .tableau-cadre th[aria-sort="none"] .tri-sens { display: none; }
  .tableau-cadre .tri-sens { width: 11px; height: 11px; }
  .tableau-cadre td.td-tronque, .tableau-cadre th.td-tronque { min-width: 6rem; }
  /* Une colonne de personnes porte un rond de 32 px avant le nom (decision 0156) : elle prend la
     largeur de ce rond en plus, pour que le nom garde la place qu'il avait. */
  .tableau-cadre td.td-tronque.col-personne, .tableau-cadre th.td-tronque.col-personne { width: 29%; }
  /* Colonnes compactes (retard, certification) : serrees, en petit. */
  .tableau-cadre td.compact, .tableau-cadre th.compact, .tableau-cadre th.compact button.tri { padding-left: 6px; padding-right: 6px; font-size: 12.5px; }
  .tableau-cadre td.compact .etiquette { padding: 0 8px; font-size: 11.5px; }
  .td-tronque .cellule br + .faible, .td-tronque .cellule .pile { white-space: nowrap; }
}

/* Liste longue dans un dialogue (catégories d'un connecteur, fiches gardées) : bornée, défilante. */
.defile-borne { max-height: 280px; overflow-y: auto; overscroll-behavior: contain; }
/* Le graphique de l'accueil : l'infobulle de chaque mois, au survol et au focus ; un prevu plafonne
   porte une marque de coupure (deux traits obliques du fond) sous le haut de la barre. */
.histo-mois { position: relative; outline-offset: 4px; border-radius: 12px; }
.histo-info {
  position: absolute; left: 50%; bottom: calc(100% - 26px); z-index: 6; padding: 6px 12px; border-radius: 999px; white-space: nowrap;
  background: var(--accent); color: var(--accent-texte); font-size: 12px; font-variant-numeric: tabular-nums; pointer-events: none;
  opacity: 0; transform: translate(-50%, 4px); transition: opacity var(--d1) var(--courbe), transform var(--d1) var(--courbe);
}
.histo-mois:hover .histo-info, .histo-mois:focus-visible .histo-info { opacity: 1; transform: translate(-50%, 0); }
.histo-mois:first-child .histo-info { left: 0; transform: translate(0, 4px); }
.histo-mois:first-child:hover .histo-info, .histo-mois:first-child:focus-visible .histo-info { transform: none; }
.histo-mois:last-child .histo-info { left: auto; right: 0; transform: translate(0, 4px); }
.histo-mois:last-child:hover .histo-info, .histo-mois:last-child:focus-visible .histo-info { transform: none; }
.histo-mois.coupee .histo-piste::after {
  content: ""; position: absolute; left: -4px; right: -4px; top: 18%; height: 6px; z-index: 2;
  background: var(--surface); transform: skewY(-14deg);
  box-shadow: 0 -1.5px 0 var(--barre-future), 0 1.5px 0 var(--barre-future);
}
/* Dossier du personnel (decision 0125) : l'avenant sous son contrat, la description, la recherche. */
.ligne-dossier.piece-avenant { margin-left: 22px; padding-left: 10px; border-left: 2px solid var(--bord-fort); }
.piece-description { color: var(--texte-moyen); font-size: .86rem; white-space: pre-line; }
.filtre-pieces { width: 100%; max-width: 22rem; margin: 0 0 8px; min-height: 34px; padding: 6px 10px; border: 1px solid var(--bord-champ, var(--bord-fort)); border-radius: var(--rayon-s); font: inherit; font-size: .88rem; background: var(--surface); color: var(--texte); }
.filtre-pieces:focus { outline: none; border-color: var(--primaire); box-shadow: var(--anneau); }
@media (max-width: 900px) { .ligne-dossier.piece-avenant { margin-left: 12px; } .filtre-pieces { max-width: none; font-size: 16px; } }

/* LA CORRECTION SUR LA LIGNE LUE (note de frais, demande du 2026-10-21) : la valeur se clique et
   devient un champ a sa place. Elle reste du texte au repos ; le soulignement pointille dit qu'elle
   se corrige, sans transformer le tableau en formulaire. */
.valeur-corrigeable { all: unset; box-sizing: border-box; cursor: text; border-bottom: 1px dashed var(--bord-fort); border-radius: 2px; padding: 0 1px; color: inherit; font: inherit; min-height: 24px; display: inline-flex; align-items: center; }
.valeur-corrigeable:hover { border-bottom-color: var(--primaire); }
.valeur-corrigeable:focus-visible { outline: 2px solid var(--primaire); outline-offset: 2px; }
.champ-corrige { width: 100%; min-width: 6.5rem; min-height: 34px; padding: 4px 8px; border: 1px solid var(--bord-champ, var(--bord-fort)); border-radius: var(--rayon-s); font: inherit; background: var(--surface); color: var(--texte); }
.champ-corrige:focus { outline: none; border-color: var(--primaire); box-shadow: var(--anneau); }
.champ-corrige[aria-invalid="true"] { border-color: var(--alerte); }
.valeur-lue-aide { display: block; white-space: normal; line-height: 1.3; }
td.nombre .valeur-ligne { max-width: 15rem; }
@media (max-width: 900px) { .champ-corrige { font-size: 16px; } }
.valeur-ligne { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; max-width: 100%; vertical-align: middle; }
.valeur-ligne > div, .valeur-ligne > .valeur-lue-aide { flex-basis: 100%; margin: 0; max-width: none; }
td.nombre .valeur-ligne { justify-content: flex-end; }
td.nombre .valeur-ligne > div, td.nombre .valeur-ligne > .valeur-lue-aide { text-align: right; }
@media screen and (max-width: 620px) {
  .fiches .valeur-ligne { justify-content: flex-end; }
  .fiches .valeur-ligne > div, .fiches .valeur-ligne > .valeur-lue-aide { text-align: right; }
  .fiches .cellule:has(.valeur-ligne) { display: block; }
}
/* Replie en fiche, la cellule `td` est une boite flexible : la hauteur fixe des lignes (42 px,
   decision 0126) y devient une hauteur STRICTE et la pastille ou l'aide debordaient sur la ligne
   suivante (mesure a 390 px). */
/* Generalise le 21/10 (decision 0130) : toute cellule repliee prend la hauteur de son contenu --
   un motif sous un libelle debordait sur le fournisseur. */
@media screen and (max-width: 620px) { .fiches td { height: auto; min-height: 42px; } }
/* Le menu volant de la barre etroite (decision 0126) : un panneau a droite du rail, ombre de menu,
   fondu et leger glissement (140 ms), les ecrans en pilules comme dans la barre complete. */
.rail-volant {
  position: fixed; z-index: 70; min-width: 248px; max-width: min(320px, calc(100vw - 120px)); max-height: calc(100vh - 16px); overflow-y: auto;
  padding: 8px; border-radius: var(--rayon-menu); background: var(--surface); border: 1px solid var(--bord); box-shadow: var(--ombre-menu);
  color: var(--rail-texte); animation: volant-entree 140ms var(--courbe-sortie) both;
}
@keyframes volant-entree { from { opacity: 0; transform: translateX(-6px); } }
.rail-volant-titre { padding: 8px 14px 6px; font-size: 14px; font-weight: var(--g-fort); color: var(--texte); }
.rail-volant .rail-appli, .rail-volant .rail-groupe { padding: 10px 14px 4px; font-size: 12px; color: var(--texte-doux); text-transform: none; letter-spacing: 0; font-weight: var(--g-texte); }
.rail-volant a.rail-entree {
  position: relative; isolation: isolate; display: flex; align-items: center; min-height: 38px; padding: 0 14px; border-radius: 999px;
  color: var(--texte); text-decoration: none; font-size: 13.5px;
}
.rail-volant a.rail-entree::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: currentColor; opacity: 0; z-index: -1; transition: opacity var(--d1) var(--courbe); }
.rail-volant a.rail-entree:hover, .rail-volant a.rail-entree:focus-visible { text-decoration: none; color: var(--texte); }
.rail-volant a.rail-entree:hover::before { opacity: .06; }
.rail-volant a.rail-entree:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.rail-volant a.rail-entree.actif { background: var(--rail-actif-fond); color: var(--rail-actif-texte); }
.rail-volant a.rail-entree.actif::before { display: none; }
/* Le menu ouvert remplace la bulle du nom de la rubrique. */
body.rail-replie .rail a.rubrique[aria-expanded="true"] > span:not(.pastille-n) { opacity: 0 !important; }
@media screen and (max-width: 767px) { .rail-volant { display: none; } }
/* LE CONTROLE SEGMENTE (`barreSegmentee`, decision 0126, recette du 21/10) : un conteneur arrondi,
   les options dedans, centrees, l'option choisie pleine. Hauteur des pilules de filtre (38 px),
   44 px de cible sous 900 px. Remplace la mise en page d'avant, y compris celle de la flotte
   (couleur, vues, modes) et du back-office. `.pilules` garde des pilules separees. */
.segments.barre-segmentee:not(.pilules), .back-office .segments.barre-segmentee:not(.pilules) {
  display: inline-flex; flex-wrap: nowrap; align-items: stretch; gap: 2px; width: auto; max-width: 100%; height: auto;
  padding: 3px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--bord);
}
.barre-segmentee:not(.pilules) button, .back-office .barre-segmentee:not(.pilules) button {
  flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; min-height: 30px; margin: 0; padding: 0 14px; border: 0; border-radius: 999px; background: transparent;
  color: var(--texte-doux); font-size: 13.5px; font-weight: var(--g-texte); line-height: 1; text-align: center; white-space: nowrap; box-shadow: none;
}
.barre-segmentee:not(.pilules) button:hover { color: var(--texte); }
.barre-segmentee:not(.pilules) button.actif, .barre-segmentee:not(.pilules) button[aria-checked="true"],
.back-office .barre-segmentee:not(.pilules) button[aria-checked="true"] { background: var(--accent); color: var(--accent-texte); }
.barre-segmentee:not(.pilules) button.actif::after { opacity: 0; }
.barre-segmentee:not(.pilules) button:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.barre-segmentee:not(.pilules) button.actif .faible { color: inherit; opacity: .8; }
/* La flotte : la couleur prend la largeur de son panneau, deux moities egales. */
.ag-couleurs.barre-segmentee { display: flex; width: 100%; }
.ag-couleurs.barre-segmentee button { flex: 1 1 0; min-width: 0; padding: 0 10px; font-size: 13px; }
@media screen and (max-width: 900px) {
  .barre-segmentee:not(.pilules) button, .back-office .barre-segmentee:not(.pilules) button { height: 44px; min-height: 44px; }
}
@media screen and (max-width: 620px) {
  .back-office .barre > .barre-segmentee:not(.pilules), .back-office .segments.barre-segmentee:not(.pilules) { display: flex; width: 100%; }
  .back-office .barre-segmentee:not(.pilules) button { flex: 1 1 0; min-width: min-content; white-space: normal; line-height: 1.15; font-size: 12.5px; padding: 0 8px; }
}
/* En barre etroite, les titres de groupe sont masques DANS la barre ; le menu volant les garde. */
body.rail-replie .rail-volant .rail-appli, body.rail-replie .rail-volant .rail-groupe { display: block; }
/* Banc du back-office (recette du 21/10) : la barre haute de la console tient en 64 px, le marqueur
   se raccourcit sur telephone, les filtres et la recherche gardent leurs regles d'avant. */
.back-office.coquille .barre-haute { padding: 10px 32px; }
.back-office-titre .mot-court { display: none; }
@media screen and (max-width: 900px) {
  .back-office.coquille .barre-haute { padding: 10px 16px; }
  .recherche-liste .bouton, .recherche-liste input { height: 44px; min-height: 44px; }
}
@media screen and (max-width: 620px) {
  .back-office-titre .mot-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .back-office-titre .mot-court { display: inline; }
  .back-office.coquille .barre-haute .theme-bascule { display: none; }
}
@media (min-width: 768px) { .bouton.filtres-bascule { display: none; } }
@media screen and (max-width: 620px) {
  /* Beaucoup d'options (filtres des modules) : le controle se resserre et tient sur une ligne. */
  .back-office .segments.barre-segmentee:not(.pilules) { gap: 0; padding: 2px; }
  .back-office .barre-segmentee:not(.pilules) button { padding: 0 5px; font-size: 12px; gap: 3px; }
}

/* TIERS PARTICULIERS (decision 0131) : le choix « Entreprise / Particulier » en tete du formulaire
   d'un tiers, libelle comme un champ, la barre a sa largeur naturelle. */
.champ.choix-forme { align-items: flex-start; }
.champ.choix-forme .libelle-forme { font-size: 13px; font-weight: var(--g-fort); color: var(--texte-moyen); }
/* ── Apercu des pieces et visionneuse (correctif du 2026-10-21) ───────────────────────────────
   Le cadre prend la hauteur disponible, 520 px au moins sur un grand ecran ; sur un telephone,
   une hauteur raisonnable, et « Agrandir » ouvre en plein ecran. Jetons seulement. */
.apercu { margin-top: 10px; }
.apercu-outils { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.apercu-outils .apercu-nom { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--texte-doux); font-size: .86rem; }
.apercu-outils .bouton, .visionneuse-entete .bouton { display: inline-flex; align-items: center; gap: 6px; }
.apercu-outils .ico, .visionneuse-entete .ico { width: 16px; height: 16px; }
.apercu-cadre { display: block; width: 100%; height: max(520px, calc(100vh - 260px)); border: 1px solid var(--bord); border-radius: var(--rayon-s); background: var(--surface-2); }
.apercu-image { display: block; width: 100%; height: auto; border: 1px solid var(--bord); border-radius: var(--rayon-s); }
.apercu-attente { height: 240px; border-radius: var(--rayon-s); background: var(--surface-2); }
@media (prefers-reduced-motion: no-preference) { .apercu-attente { animation: br-pulse 1.4s ease-in-out infinite; } }
.ajustement-piece .apercu-cadre { height: max(520px, 70vh); }
dialog.boite.boite-visionneuse { width: 95vw; max-width: 95vw; height: 95vh; max-height: 95vh; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
dialog.boite.boite-visionneuse:not([open]) { display: none; }
.visionneuse-entete { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--bord); flex: 0 0 auto; }
.visionneuse-entete .visionneuse-nom { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* La copie marquee (decision 0134) : l'etiquette d'une piece sensible, et l'original reserve. */
.apercu-copie, .visionneuse-copie, .cote-copie { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.cote-copie { margin-left: 8px; }
.copie-marquee .ico { width: 14px; height: 14px; }
.copie-reservee { font-size: .82rem; }
.visionneuse-entete .visionneuse-position { white-space: nowrap; }
.visionneuse-vue { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 10px; }
.visionneuse-vue .apercu-cadre { height: 100%; min-height: 0; border: 0; }
.visionneuse-vue .apercu-image { width: auto; max-width: 100%; margin: 0 auto; border: 0; }
@media (max-width: 900px) {
  .apercu-cadre { height: clamp(320px, 60vh, 560px); }
  .ajustement-piece .apercu-cadre { height: clamp(320px, 60vh, 560px); }
  dialog.boite.boite-visionneuse { inset: 0; width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; border: 0; border-radius: 0; margin: 0; }
  .visionneuse-entete .bouton span { display: none; }
}

/* L'annonce de reprise apres une mise a jour (correctif du 2026-10-21) : en haut, pour ne pas
   recouvrir les annonces ordinaires ; elle reste jusqu'a la reprise. */
.furtif.annonce-reprise { top: 16px; bottom: auto; z-index: 90; }
@media (max-width: 900px) { .furtif.annonce-reprise { top: calc(12px + env(safe-area-inset-top)); bottom: auto; } }

/* Comparer deux pieces (decision 0125) ; l'encadre « Deja recu » ; les elements ignores. */
.visionneuse-vue.cote-a-cote { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cote-a-cote .cote { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cote-a-cote .cote-titre { font-weight: var(--g-fort); padding: 0 0 6px; overflow-wrap: anywhere; }
.cote-a-cote .cote-vue { flex: 1 1 auto; min-height: 0; }
.cote-a-cote .apercu-cadre { height: 100%; min-height: 0; }
.encadre-doublon { margin: 10px 0; background: var(--attente-fond); box-shadow: inset 0 0 0 1px var(--attente-fond); }
.encadre-doublon .titre { color: var(--attente-texte); }
.encadre-doublon p { margin: 4px 0; overflow-wrap: anywhere; white-space: normal; }
.encadre-doublon .boutons { margin-top: 8px; }
.br-ignores-liste { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.br-ignores-liste li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
.br-ignores-liste .nom { overflow-wrap: anywhere; }
@media (max-width: 900px) { .visionneuse-vue.cote-a-cote { grid-template-columns: 1fr; grid-auto-rows: minmax(60vh, auto); overflow: auto; } }

/* LA VISIONNEUSE AVEC SON PANNEAU (note de frais, decision 0130) : la piece a gauche, ce qu'elle
   justifie et les gestes du valideur a droite ; l'un sous l'autre sur un telephone. */
.visionneuse-corps { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.visionneuse-corps .visionneuse-vue { min-height: 0; }
.visionneuse-panneau { border-left: 1px solid var(--bord); padding: 14px 16px; overflow: auto; display: flex; flex-direction: column; gap: 10px; background: var(--surface); }
.visionneuse-panneau dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.visionneuse-panneau dt { color: var(--texte-doux); }
.visionneuse-panneau dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.visionneuse-panneau textarea { width: 100%; min-height: 72px; font: inherit; padding: 6px 8px; border: 1px solid var(--bord-champ, var(--bord-fort)); border-radius: var(--rayon-s); background: var(--surface); color: var(--texte); }
.visionneuse-panneau .boutons { display: flex; flex-wrap: wrap; gap: 8px; }
.visionneuse-panneau kbd { font: inherit; font-size: 11px; padding: 0 5px; border: 1px solid var(--bord); border-radius: 4px; color: var(--texte-doux); }
.visionneuse-sans-piece { padding: 24px; text-align: center; }
@media screen and (max-width: 900px) {
  .visionneuse-corps { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .visionneuse-panneau { border-left: 0; border-top: 1px solid var(--bord); max-height: 45vh; }
}
/* Choisir une piece ou une ligne dans une boite (decision 0130) : une option par rangee, la
   vignette lisible, l'option choisie bordee de la couleur primaire. */
.choix-pieces { display: grid; gap: 8px; }
.choix-piece { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 8px; border: 1px solid var(--bord); border-radius: var(--rayon-s); cursor: pointer; }
.choix-pieces .choix-piece { margin-bottom: 0; }
.choix-piece:has(input:checked) { border-color: var(--primaire); box-shadow: var(--anneau); }
.choix-piece .vignette { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; }
.justificatif-ligne { display: inline-flex; align-items: center; gap: 8px; }
/* LA HIERARCHIE DES MENUS (retour de Manu du 21/10, menu volant et barre complete). Le titre de la
   rubrique, les intertitres de groupe et les ecrans se ressemblaient. Trois niveaux, trois formes :
   - le TITRE de la rubrique (menu volant) : une taille au-dessus des ecrans, couleur texte, un
     filet fin dessous ;
   - l'INTERTITRE de groupe (Facturation, Catalogue, Paie...) : petites capitales, 11,5 px, lettres
     espacees, couleur faible, plus d'air au-dessus qu'en dessous pour le rattacher a ses ecrans ;
     ni cliquable, ni focalisable, ni SELECTIONNABLE : le « fond vert pale » vu sur « Facturation »
     etait la selection de texte (jeton `--selection`) posee par un clic sur l'intertitre ;
   - les ECRANS, en retrait sous leur intertitre, fond au survol, l'ecran ouvert en petrole (clair)
     ou blanc casse (sombre). */
.rail-volant-titre {
  margin: 0 4px 6px; padding: 8px 10px 10px; border-bottom: 1px solid var(--bord);
  font-size: 15px; font-weight: var(--g-texte); color: var(--texte); user-select: none; cursor: default;
}
.rail-appli, .rail-groupe, .coquille .rail .groupe,
.rail-volant .rail-appli, .rail-volant .rail-groupe {
  padding: 14px 14px 4px; font-size: 11.5px; line-height: 1.3; font-weight: var(--g-fort);
  text-transform: uppercase; letter-spacing: .06em; color: var(--texte-faible);
  background: none; user-select: none; -webkit-user-select: none; cursor: default; pointer-events: none;
}
.rail-volant-titre + .rail-appli, .rail-volant-titre + .rail-groupe,
.rail-entrees > .rail-appli:first-child, .rail-entrees > .rail-groupe:first-child { padding-top: 6px; }
.rail-volant .rail-appli ~ a.rail-entree, .rail-volant .rail-groupe ~ a.rail-entree,
.coquille .rail .rail-entrees .rail-appli ~ a.rail-entree, .coquille .rail .rail-entrees .rail-groupe ~ a.rail-entree { margin-left: 8px; }
/* L'apercu de la requalification : des champs lisibles, pas rognes a la largeur du texte. */
.tableau-requalif select { min-width: 8.5rem; }
.tableau-requalif input { min-width: 9rem; }

/* LE FORMULAIRE D'UN TIERS (decision 0131, B2) : une colonne logique, des blocs separes d'un filet,
   les roles en pastilles, les sections propres a chaque role repliables. Jetons seulement. */
.fiche-tiers { display: flex; flex-direction: column; gap: 4px; }
.fiche-entete { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: flex-start; }
.fiche-bloc { border-top: 1px solid var(--bord); padding-top: 12px; margin-top: 4px; }
.fiche-bloc > h3 { margin: 0 0 8px; font-size: 14px; font-weight: var(--g-fort); }
.fiche-bloc > p.faible { margin: -4px 0 8px; }
.choix-roles .pastilles-roles { display: flex; flex-wrap: wrap; gap: 6px; }
.pastille-role-cadre { display: contents; }
.pastille-role-cadre[hidden] { display: none !important; }
.pastille-role { position: relative; display: inline-flex; align-items: center; min-height: 38px; padding: 0 14px;
  border: 1px solid var(--bord-champ); border-radius: 999px; cursor: pointer; font-size: 13.5px; color: var(--texte-moyen); user-select: none; }
.pastille-role input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pastille-role:has(input:checked) { background: var(--rail-actif-fond); border-color: var(--rail-actif-fond); color: var(--rail-actif-texte); }
.pastille-role:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.section-role > summary { cursor: pointer; font-size: 14px; font-weight: var(--g-fort); padding: 2px 0 10px; }
.extrait-replie > summary { cursor: pointer; color: var(--lien); text-decoration: underline; text-underline-offset: 3px; margin-bottom: 10px; width: max-content; }
.valeur-deduite { display: block; min-height: 40px; padding: 10px 0; font-variant-numeric: tabular-nums; color: var(--texte); }
.logo-tiers .logo-ligne { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.logo-apercu { width: 72px; height: 72px; display: grid; place-items: center; border: 1px dashed var(--bord-champ); border-radius: var(--rayon-s); background: var(--papier, var(--surface)); overflow: hidden; text-align: center; font-size: 11px; padding: 4px; }
.logo-apercu img { max-width: 100%; max-height: 100%; object-fit: contain; }
.logo-tiers [data-logo-message].alerte, [data-iban-etat].alerte { color: var(--alerte-texte); }
/* L'avatar d'un tiers : son logo, sinon ses initiales. */
.avatar-tiers { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 8px; object-fit: contain; background: var(--papier, var(--surface)); border: 1px solid var(--bord); }
.avatar-tiers.initiales { display: inline-grid; place-items: center; font-size: 11px; font-weight: var(--g-fort); color: var(--texte-moyen); background: var(--surface-2); letter-spacing: .02em; }
.avatar-tiers.grand { width: 48px; height: 48px; flex-basis: 48px; border-radius: 12px; font-size: 16px; }
.avatar-tiers.petit { width: 20px; height: 20px; flex-basis: 20px; border-radius: 5px; margin-right: 8px; vertical-align: middle; }
.nom-avec-avatar { display: inline-flex; align-items: center; gap: 10px; }
.fiche-titre { display: flex; align-items: center; gap: 12px; }

/* LES CASES ET LES BOUTONS RADIO, UN SEUL COMPOSANT (controle visuel du 21/10). Le rendu natif
   grisait une option CHOISIE mais non modifiable (« Raccordée à Quaeroo » ne paraissait pas
   cochee) et laissait des cases de 13 px grises. 18 px, jetons, l'etat choisi reste lisible meme
   desactive, l'anneau de focus au clavier. Garde : tests/banc-controle-visuel.mjs (controles natifs). */
input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: none; appearance: none; flex: 0 0 auto; display: inline-grid; place-content: center;
  width: 18px; height: 18px; margin: 0; vertical-align: middle; cursor: pointer;
  border: 1.5px solid var(--bord-champ, var(--bord-fort)); background: var(--surface); color: var(--accent-texte);
}
input[type="checkbox"] { border-radius: 5px; }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:checked, input[type="radio"]:checked, input[type="checkbox"]:indeterminate {
  background: var(--accent); border-color: var(--accent); }
input[type="radio"]:checked::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
input[type="checkbox"]:checked::before { content: ""; width: 9px; height: 5px; margin-top: -2px;
  border: 2px solid currentColor; border-top: 0; border-right: 0; transform: rotate(-45deg); }
input[type="checkbox"]:indeterminate::before { content: ""; width: 9px; height: 2px; background: currentColor; }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { cursor: default; opacity: .7; }
input[type="checkbox"]:disabled:checked, input[type="radio"]:disabled:checked { opacity: 1; }
@media (forced-colors: active) { input[type="checkbox"], input[type="radio"] { appearance: auto; -webkit-appearance: auto; } }
/* Une case dans un champ de formulaire garde sa taille de case : la regle des champs (marge
   interieure de 14 px, hauteur de 44 px) l'etirait en rectangle. */
.champ input[type="checkbox"], .champ input[type="radio"] { width: 18px; height: 18px; min-height: 0; padding: 0; border-width: 1.5px; }
.champ input[type="checkbox"] { border-radius: 5px; }
.champ input[type="radio"] { border-radius: 50%; }
.champ label:has(> input[type="checkbox"]), .champ label:has(> input[type="radio"]) { display: inline-flex; align-items: center; gap: 8px; min-height: 24px; cursor: pointer; }

/* ── CONTROLE VISUEL DU 21/10 (tests/banc-controle-visuel.mjs) : corrections de composants ──── */
/* Les champs du navigateur prennent la police du produit (un mois, une date, une recherche en
   gardaient une autre). */
button, input, select, textarea { font-family: inherit; }
/* L'infobulle d'un mois de l'accueil, invisible au repos, poussait la page de 4 px a droite sur
   un telephone : le graphique ne deborde plus horizontalement. */
:has(> .histo-mois) { overflow-x: clip; }
@media screen and (max-width: 620px) {
  /* Une barre segmentee plus large que l'ecran defile EN ELLE-MEME, sans pousser la page
     (bulletins de paie, rapprochement bancaire). */
  .segments.barre-segmentee:not(.pilules) { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .segments.barre-segmentee:not(.pilules)::-webkit-scrollbar { display: none; }
  .segments.barre-segmentee:not(.pilules) button { flex: 0 0 auto; }
  /* Cibles de 24 px au moins sur telephone (WCAG 2.5.8) : le lien seul d'une cellule ou d'une
     ligne de liste, le lien d'un chapeau, la case d'une ligne de courrier. */
  .cellule > a:only-child, main li > a:only-child, .chapeau a { display: inline-flex; align-items: center; min-height: 24px; min-width: 24px; }
  .br-ligne input[type=checkbox], .br-multi-ligne input[type=checkbox] { width: 24px; height: 24px; }
  .aide-bascule { width: 24px; height: 24px; }
}
/* UN CHAMP NU (hors `.champ`) n'est plus le champ du navigateur : bordure en creux, fond gris
   (plan comptable, mois des heures supplementaires). `:where` ne pese RIEN : toute regle d'un
   composant (champ, recherche, palette, editeur de lignes) garde la main. */
:where(input:not([type=checkbox], [type=radio], [type=file], [type=range], [type=color], [type=hidden], [type=submit], [type=button], [type=reset], [type=image]), select, textarea) {
  min-height: 34px; padding: 6px 10px; border: 1px solid var(--bord-champ, var(--bord-fort)); border-radius: var(--rayon-s);
  background: var(--surface); color: var(--texte); font: inherit; }
:where(input:not([type=checkbox], [type=radio], [type=file], [type=range], [type=color], [type=hidden]), select, textarea):focus-visible {
  outline: none; border-color: var(--focus); box-shadow: var(--anneau); }
/* LA SOURCE OFFICIELLE ET LA SANTE (decision 0132). La recherche en tete du bloc Entreprise : les
   resultats sous le champ, chacun un bouton ; la sante sur la fiche, bordee de sa couleur. */
.recherche-source { margin-bottom: 10px; }
.resultats-source { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; padding: 4px; max-height: 320px; overflow: auto;
  border: 1px solid var(--bord); border-radius: var(--rayon-s); background: var(--surface); box-shadow: var(--ombre); }
.resultat-source { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; width: 100%; text-align: left; padding: 8px 10px;
  border: 0; border-radius: var(--rayon-s); background: none; color: var(--texte); font: inherit; cursor: pointer; }
.resultat-source:hover, .resultat-source:focus-visible { background: var(--surface-2); outline: none; }
.resultat-source:focus-visible { box-shadow: inset 0 0 0 2px var(--focus); }
.resultat-source .faible { flex-basis: 100%; }
.carte-sante { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--bord); border-radius: var(--rayon-s); }
.carte-sante.sante-procedure, .carte-sante.sante-cession, .carte-sante.sante-liquidation, .carte-sante.sante-cesse { border-color: var(--alerte-texte); box-shadow: inset 4px 0 0 var(--alerte-texte); }
.verif-identifiant.alerte { color: var(--alerte-texte); }
/* LA BARRE ETROITE NAVIGUE (retour de Manu du 22/10). Le titre du menu volant est un lien vers la
   page principale de la rubrique : meme allure de titre, souligne au survol. Sur un ecran sans
   survol, un petit chevron au bord de l'icone ouvre le menu ; ailleurs il n'existe pas. */
a.rail-volant-titre { display: block; text-decoration: none; }
a.rail-volant-titre:hover { text-decoration: underline; text-underline-offset: 3px; color: var(--texte); }
a.rail-volant-titre:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; border-radius: var(--rayon-s); }
.coquille .rail-rubrique { position: relative; }

/* LE FORMULAIRE D'UN TIERS : la ville a plus de place que le code postal (recette du 22/10,
   « CLERMONT-FERRAND » se coupait). La ligne prend deux colonnes de la grille, la ville deux parts. */
.fiche-tiers .ligne-ville { grid-column: span 2; grid-template-columns: minmax(6rem, 1fr) minmax(0, 2fr); }
@media (max-width: 700px) { .fiche-tiers .ligne-ville { grid-column: auto; } }
/* ── ERGONOMIE MOBILE ET TABLETTE (decision 0143, demande de Manu du 22/10) ─────────────────── */
@media screen and (max-width: 767px) {
  /* 5. LA BARRE DU BAS NE MASQUE PLUS LA FIN DE LA PAGE : sa hauteur (64 px), son ecart au bord
     (12 px), une respiration, et la zone sure de l'iPhone sont reserves sous le contenu. */
  .coquille .principal { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
  /* UN SEUL DECLENCHEUR DU TIROIR : « Menu » dans la barre du bas, a portee de pouce. Le bouton
     du haut ouvrait le meme tiroir ; il disparait des que la barre du bas existe. */
  .coquille .barre-haute .menu-bouton { display: none; }
  .coquille .barre-haute { padding-left: 12px; }
}

/* 6. LE GRAPHIQUE DE L'ACCUEIL TIENT DANS L'ECRAN. La bulle du mois en cours et l'infobulle d'un
   mois s'accrochent au bord de leur colonne du cote du centre du graphique (`moitie-g`,
   `moitie-d`, posees par l'accueil) : elles ne sortent plus a droite, meme a 390 px. */
.histo-mois .mois-court { display: none; }
.histo-mois.moitie-g .histo-info, .histo-mois.moitie-g .bulle { left: 0; right: auto; transform: none; }
.histo-mois.moitie-d .histo-info, .histo-mois.moitie-d .bulle { left: auto; right: 0; transform: none; }
.histo-mois.moitie-g:hover .histo-info, .histo-mois.moitie-g:focus-visible .histo-info,
.histo-mois.moitie-d:hover .histo-info, .histo-mois.moitie-d:focus-visible .histo-info { transform: none; }
.histo-mois.moitie-g .bulle, .histo-mois.moitie-d .bulle { animation-name: bulle-entree-bord; }
@keyframes bulle-entree-bord { from { opacity: 0; transform: translateY(10px); } }
/* Douze libelles « janv. » ne tiennent pas dans 390 px : l'initiale du mois, le mois entier
   restant dans l'infobulle et pour le lecteur d'ecran. */
@media screen and (max-width: 480px) {
  .histo-mois .mois-long { display: none; }
  .histo-mois .mois-court { display: inline; }
}
/* SANS SURVOL, UN TOUCHER MONTRE LE MOIS : la colonne prend le focus au toucher, l'infobulle
   s'affiche, et la bulle du mois en cours s'efface pour ne pas la chevaucher. */
@media (hover: none) {
  .histo-mois:focus .histo-info { opacity: 1; }
  .histo-mois:focus .bulle { opacity: 0; }
  .histo-mois:focus { outline: none; }
}

/* 7. « REPRENDRE OU VOUS EN ETIEZ » : la ligne occupe toute la largeur (la regle des cibles de
   24 px la rendait `inline-flex`, l'heure se collait au texte) ; titre puis sous-titre a gauche,
   heure alignee a droite. Meme correction pour « Aussi a traiter ». */
main .liste-liens li > a:only-child { display: flex; width: auto; }
.liste-liens span.texte { flex: 1 1 auto; }
.liste-liens time { flex: 0 0 auto; align-self: center; text-align: right; }

/* 8. CIBLES TACTILES DE 44 PX sur un ecran tactile (telephone, tablette, ecran tactile de bureau).
   Les boutons grandissent ; les liens courts (fil d'Ariane, numero dans une liste, lien de piece)
   gardent leur dessin et recoivent une zone de toucher elargie par un pseudo-element. */
@media (pointer: coarse) {
  .bouton, .bouton.petit, .segments button, .pilule, summary, button.tri, .onglets-page [role=tab],
  .fiche-r-puce, .fiche-r-retour { min-height: 44px; }
  .bouton-icone, .bouton-icone.petit, .rail-replier, .rail-tete [data-fermer-menu] { flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; }
  .fil-ariane a, .cellule > a, a.lien-fiche, a.lien-piece, .lien-tri { position: relative; }
  .fil-ariane a::before, .cellule > a::before, a.lien-fiche::before, a.lien-piece::before, .lien-tri::before {
    content: ""; position: absolute; inset: -10px -6px;
  }
}

/* ── TABLETTE DE 768 A 1279 PX (decision 0143) : la barre etroite a icones, pas le tiroir ────── */
/* Le tiroir et la barre du bas sont reserves au telephone (sous 768 px). Entre 768 et 900 px, ce
   qui servait la mise en page du contenu (et non la navigation) est garde ici. */
@media screen and (min-width: 768px) and (max-width: 900px) {
  .coquille .principal { padding: 10px 24px 48px; }
  .coquille .barre-haute { padding: 14px 24px 6px; }
  .grille.c3, .grille.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .segments { display: flex; flex-wrap: wrap; }
  .indicateurs { gap: 10px; }
  .histo { --histo-gap: 6px; }
  .palette-ouvrir { flex-basis: 260px; }
  .palette-ouvrir kbd { display: none; }
}

/* LES TABLEAUX SUR TABLETTE (`ajusterTableau`) : une colonne secondaire masquee, ou le tableau
   entier en fiches empilees, les memes que sur un telephone. */
.col-masquee { display: none; }
.fiches.en-fiches { overflow-x: visible; }
.fiches.en-fiches table, .fiches.en-fiches tbody, .fiches.en-fiches tfoot, .fiches.en-fiches tr { display: block; }
.fiches.en-fiches thead { display: none; }
.fiches.en-fiches tr { padding: 10px 12px; border-bottom: 1px solid var(--bord); }
.fiches.en-fiches tr:last-child { border-bottom: 0; }
.fiches.en-fiches td { display: flex; gap: 10px; align-items: baseline; padding: 3px 0; border-bottom: 0; height: auto; max-width: none; width: auto; }
.fiches.en-fiches td:empty { display: none; }
.fiches.en-fiches td:not([data-intitule=""])::before {
  content: attr(data-intitule); flex: 0 0 30%; font-size: 12px; color: var(--texte-doux);
}
.fiches.en-fiches .cellule { flex: 1 1 auto; min-width: 0; text-align: right; overflow-wrap: anywhere; white-space: normal; }
/* UN EN-TETE DE TRI NE SE COUPE PAS : la colonne de texte long se resserre, pas son titre. */
@media screen and (min-width: 621px) {
  .tableau-cadre th.td-tronque { min-width: max-content; }
  .tableau-cadre th.td-tronque, .tableau-cadre th.td-tronque button.tri { overflow: visible; text-overflow: clip; }
}

/* 1. CHAMPS A 16 PX SUR ECRAN TACTILE : sous 16 px, iOS zoome la page a chaque saisie. Une seule
   regle, pour tous les champs, dialogues et filtres compris. */
@media (pointer: coarse) {
  input:not([type=checkbox], [type=radio], [type=range], [type=file], [type=color], [type=hidden], [type=submit], [type=button], [type=reset], [type=image]), select, textarea { font-size: 16px !important; }
}

/* 2. UN MONTANT NE SE COUPE JAMAIS. Il reste sur une ligne, en chiffres tabulaires, et sa taille
   suit la largeur de sa carte (`cqi`) au lieu de passer a la ligne au milieu des chiffres. */
.carte.indicateur { container-type: inline-size; }
.indicateur .valeur { white-space: nowrap; overflow-wrap: normal; font-size: min(var(--valeur-taille-3), 14cqi); }
.valeur-grande, .chiffre-bloc .valeur-grande, td.nombre, .montant { white-space: nowrap; font-variant-numeric: tabular-nums lining-nums; }
@media screen and (max-width: 620px) {
  /* Deux indicateurs par ligne au plus, a 390 px. */
  .rangee-indicateurs > .indicateur { flex: 1 1 calc(50% - 5px); }
  .carte.indicateur { padding: 14px 16px; }
  /* Une etiquette longue (« Assurance responsabilite civile · a renouveler ») passe a la ligne au
     lieu de sortir de l'ecran. */
  .etiquette { max-width: 100%; white-space: normal; text-align: left; }
}
@media screen and (max-width: 767px) {
  .fiches .etiquette { max-width: 100%; white-space: normal; text-align: left; }
}

/* 4. DIALOGUES SUR TABLETTE : deux colonnes. Une grille de trois ou quatre colonnes passe a deux ;
   un dialogue large dont les champs se suivent sans grille (vehicule) les range sur deux colonnes,
   tout ce qui n'est pas un champ gardant la largeur entiere. */
@media screen and (min-width: 768px) and (max-width: 1279px) {
  dialog .grille.c3, dialog .grille.c4, dialog .fiche-r-grille.c3, dialog .fiche-r-grille.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  dialog.boite.large .boite-corps:not(:has(.grille, .fiche-r-grille)) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; align-items: start; }
  dialog.boite.large .boite-corps:not(:has(.grille, .fiche-r-grille)) > :not(.champ) { grid-column: 1 / -1; }
}
/* Le resultat d'une boite de messagerie (courrier) : large sur un ecran large, sans largeur
   imposee dans une fiche de telephone. */
.releve-resultat { min-width: 15rem; }
.fiches .releve-resultat { min-width: 0; }
@media screen and (max-width: 620px) { .releve-resultat { min-width: 0; } }
/* La rubrique dont le menu volant est ouvert (barre etroite, toucher ou survol) : fond petrole. */
body.coquille.rail-replie .rail a.rubrique[aria-expanded="true"] { background: var(--rail-actif-fond); color: var(--rail-actif-texte); }
body.coquille.rail-replie .rail a.rubrique[aria-expanded="true"]::before { display: none; }
/* L'intitule d'une fiche se lit a gauche, meme dans une colonne de montants alignee a droite. */
.fiches td::before { text-align: left; }
/* LA CARTE COMPACTE (decision 0143, `rolesCarte`) : trois lignes au plus.
   1. le sujet a gauche (le premier en gras, le second a la suite), le montant a droite en gras ;
   2. les secondaires en petit, separes par « · » (un nombre garde son intitule) ;
   3. les pastilles, puis les actions a droite. Les intitules « libelle : valeur » disparaissent. */
.fiches.en-fiches table.carte-compacte tr {
  display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 4px; padding: 12px 14px; min-height: 0;
}
.fiches.en-fiches table.carte-compacte tr::before, .fiches.en-fiches table.carte-compacte tr::after { content: ""; flex-basis: 100%; height: 0; }
.fiches.en-fiches table.carte-compacte tr::before { order: 3; }
.fiches.en-fiches table.carte-compacte tr::after { order: 5; }
.fiches.en-fiches table.carte-compacte td { display: block; padding: 0; border: 0; height: auto; min-height: 0; width: auto; max-width: none; text-align: left; }
.fiches.en-fiches table.carte-compacte td:empty, .fiches.en-fiches table.carte-compacte td[data-carte="cache"] { display: none; }
.fiches.en-fiches table.carte-compacte td::before { content: none; }
.fiches.en-fiches table.carte-compacte .cellule { display: inline; text-align: left; overflow-wrap: normal; white-space: inherit; }
.fiches.en-fiches table.carte-compacte td[data-carte="case"] { order: 0; }
.fiches.en-fiches table.carte-compacte td[data-carte="sujet"] {
  order: 1; flex: 0 1 auto; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--g-fort);
}
.fiches.en-fiches table.carte-compacte td[data-carte="sujet"] ~ td[data-carte="sujet"] { font-weight: var(--g-texte); flex-shrink: 2; }
.fiches.en-fiches table.carte-compacte td[data-carte="sujet"] .cellule { white-space: nowrap; }
.fiches.en-fiches table.carte-compacte td[data-carte="montant"] {
  order: 2; flex: none; margin-left: auto; font-weight: var(--g-fort); white-space: nowrap; font-variant-numeric: tabular-nums lining-nums;
}
.fiches.en-fiches table.carte-compacte td[data-carte="secondaire"] { order: 4; font-size: 12.5px; color: var(--texte-doux); white-space: nowrap; }
.fiches.en-fiches table.carte-compacte td[data-carte="secondaire"] ~ td[data-carte="secondaire"]::before { content: "· "; }
.fiches.en-fiches table.carte-compacte td.nombre[data-carte="secondaire"]::before { content: attr(data-intitule) " "; }
.fiches.en-fiches table.carte-compacte td[data-carte="secondaire"] ~ td.nombre[data-carte="secondaire"]::before { content: "· " attr(data-intitule) " "; }
.fiches.en-fiches table.carte-compacte td[data-carte="pastille"] { order: 6; }
.fiches.en-fiches table.carte-compacte td[data-carte="action"] { order: 7; margin-left: auto; }
.fiches.en-fiches table.carte-compacte td[data-carte="action"] .boutons, .fiches.en-fiches table.carte-compacte td[data-carte="action"] .cellule { display: inline-flex; gap: 6px; }
/* Sur un ecran tactile, les raccourcis clavier ne se proposent pas : la touche « A » d'un bouton,
   l'aide « Fleches, Echap » de la visionneuse, le « Ctrl K » de la recherche. */
@media (pointer: coarse) {
  .aide-clavier, .bouton kbd, .palette-ouvrir kbd { display: none; }
}
/* La premiere ligne ne passe jamais a la ligne : le dernier sujet prend la place qui reste et se
   coupe, le montant garde la sienne. */
.fiches.en-fiches table.carte-compacte td[data-carte="sujet"] { flex: 1 1 0; }
.fiches.en-fiches table.carte-compacte td[data-carte="sujet"]:has(~ td[data-carte="sujet"]) { flex: 0 0 auto; max-width: 45%; }

/* ── LE TIROIR DU TELEPHONE (decision 0143, partie 2) ─────────────────────────────────────────── */
.tiroir-recherche, .rail-compte, .rail-entrees.tiroir-seul { display: none; }
.coquille .rail-entrees[hidden] { display: none; }
@media screen and (max-width: 767px) {
  /* Pleine hauteur, zones sures comprises ; 85 % de la largeur, 360 px au plus ; la liste defile
     entre une tete et un pied fixes. */
  .coquille .rail {
    top: 0; bottom: auto; height: 100vh; height: 100dvh; width: min(85vw, 360px); max-width: none; overflow: hidden;
    padding: calc(14px + env(safe-area-inset-top)) 14px calc(10px + env(safe-area-inset-bottom)) calc(14px + env(safe-area-inset-left));
  }
  .coquille .rail .rail-defile { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
  .coquille .rail .rail-bas { flex: 0 0 auto; }
  /* Un voile net : le contenu derriere ne se lit plus. */
  .voile { background: var(--voile-tiroir); }
  /* Le sous-menu du pied (parametrage) s'ouvre en accordeon dans le pied ; sa copie en fin de
     liste, faite pour la barre complete, n'a pas lieu d'etre ici. */
  .coquille .rail .rail-section-pied { display: none; }
  .coquille .rail .rail-entrees.tiroir-seul:not([hidden]) { display: flex; max-height: 40vh; overflow-y: auto; }
  .coquille .rail a.rubrique[aria-expanded="true"]:not(.actif) { background: var(--surface-2); }
  /* La recherche en tete. */
  .tiroir-recherche {
    display: flex; align-items: center; gap: 10px; flex: 0 0 auto; min-height: 44px; margin: 4px 0 6px; padding: 0 14px;
    border: 1px solid var(--bord); border-radius: 999px; background: var(--surface); color: var(--texte-doux); font: inherit; font-size: 15px; cursor: pointer;
  }
  .tiroir-recherche .ico { width: 18px; height: 18px; }
  /* La personne en pied, qui ouvre le menu du compte ; son bouton du haut s'efface. */
  .rail-compte {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; margin-top: 6px; padding: 6px 8px;
    border: 0; border-radius: 16px; background: transparent; color: var(--texte); font: inherit; text-align: left; cursor: pointer;
  }
  .rail-compte:hover, .rail-compte[aria-expanded="true"] { background: var(--surface-2); }
  .rail-compte .avatar { flex: 0 0 auto; }
  .rail-compte-texte { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
  .rail-compte-texte strong, .rail-compte-texte small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rail-compte-texte small { color: var(--texte-doux); font-size: 12.5px; }
  .rail-compte > .ico { transform: rotate(-90deg); color: var(--texte-doux); }
  .coquille .barre-haute .utilisateur-bouton { display: none; }
  .coquille .rail .rail-marque { display: none; }
  /* Ouvert depuis le tiroir, le menu du compte se pose au-dessus du pied, par-dessus le tiroir. */
  body.tiroir-ouvert .utilisateur-menu, body.tiroir-ouvert .coquille .utilisateur-menu {
    top: auto; bottom: calc(76px + env(safe-area-inset-bottom)); left: 12px; right: auto; width: calc(min(85vw, 360px) - 24px); z-index: 70;
    max-height: calc(100dvh - 120px); overflow-y: auto;
  }
  /* L'en-tete ne passe pas sous l'encoche (viewport-fit=cover). */
  .coquille .barre-haute { padding-top: calc(12px + env(safe-area-inset-top)); }
}
@media (prefers-reduced-motion: reduce) { .coquille .rail { transition: none; } .voile { animation: none; } }
/* Paysage avec encoche : le contenu s'ecarte des bords arrondis. */
.coquille .principal { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
@media screen and (min-width: 768px) { .coquille .principal { padding-left: max(32px, env(safe-area-inset-left)); padding-right: max(32px, env(safe-area-inset-right)); } }
/* ── Selection multiple (decision 0142) : composant unique `js/selection.js` ───────────────────
   Case par ligne, barre collee en bas. Petrole pour la selection ; le terracotta (danger) reste
   aux seuls gestes destructeurs de la barre. Sur un telephone, les cases n'apparaissent qu'en mode
   « Sélectionner ». */
.col-selection { width: 44px; padding-left: 14px !important; padding-right: 0 !important; }
.col-selection input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; vertical-align: middle; }
td.col-selection { cursor: pointer; }
tr.ligne-choisie > td { background: var(--selection); }
.barre-selection { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: min(1080px, calc(100vw - 32px));
  background: var(--surface); color: var(--texte); border: 1px solid var(--bord); border-radius: 999px;
  box-shadow: var(--ombre-menu); padding: 8px 8px 8px 20px; }
.barre-selection[hidden] { display: none; }
.barre-selection-compte { font-weight: 600; white-space: nowrap; margin-right: 4px; }
.barre-selection-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.barre-selection-actions .actions-ligne { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; width: auto; flex: none; margin: 0; }
@media (min-width: 700px) {
  .barre-selection { flex-wrap: nowrap; }
  .barre-selection-actions { flex: 0 1 auto; }
  .barre-selection [data-sel-vider] { white-space: nowrap; }
}
body.avec-barre-selection main, body.avec-barre-selection .contenu { padding-bottom: 96px; }
.seulement-telephone { display: none; }
.bilan-issues { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.bilan-issue { background: var(--surface-2); border-radius: 999px; padding: 6px 14px; }
.bilan-nombre { font-weight: 650; }
.bilan-supprime, .bilan-restaure, .bilan-modifie, .bilan-efface { background: var(--ok-fond); color: var(--ok-texte); }
.bilan-archive { background: var(--attente-fond); color: var(--attente-texte); }
.bilan-refuse, .bilan-erreur { background: var(--danger-pale); color: var(--danger); }
.bilan-detail { margin: 6px 0; }
.bilan-detail summary { cursor: pointer; font-weight: 600; }
.bilan-detail ul { margin: 6px 0 0; padding-left: 18px; }
.bilan-detail li { margin: 4px 0; }
@media (max-width: 699px) {
  .seulement-telephone { display: inline-flex; }
  .avec-selection .col-selection { display: none !important; }
  body.mode-selection .avec-selection .col-selection { display: flex !important; width: auto; padding: 0 0 6px !important; }
  .barre-selection { left: 12px; right: 12px; transform: none; bottom: 12px; border-radius: 18px; padding: 10px 12px; max-width: none; }
  .barre-selection-actions { width: 100%; }
  body.avec-barre-selection main, body.avec-barre-selection .contenu { padding-bottom: 200px; }
}
/* La barre de selection (0142) sur telephone se pose au-dessus de la barre du bas et de la zone
   sure, au lieu de la recouvrir (decision 0143). */
@media screen and (max-width: 767px) {
  .barre-selection { bottom: calc(88px + env(safe-area-inset-bottom)); }
}

/* LE CHOIX D'UN MOIS (`armerChoixMois`) : precedent, nom du mois, suivant ; meme hauteur qu'un champ. */
.choix-mois {
  position: relative; display: inline-flex; align-items: center; gap: 2px; min-height: 40px; padding: 2px;
  border: 1px solid var(--bord-champ, var(--bord-fort)); border-radius: 999px; background: var(--surface); color: var(--texte); max-width: 100%;
}
.choix-mois:focus-within { border-color: var(--focus); box-shadow: var(--anneau); }
.choix-mois-nom { flex: 1 1 auto; min-width: 9.5em; padding: 0 6px; text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; }
.choix-mois.vide .choix-mois-nom { color: var(--texte-doux); }
.choix-mois-pas, .choix-mois-effacer {
  display: inline-grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--texte-doux); cursor: pointer;
}
.choix-mois-pas:hover, .choix-mois-effacer:hover { background: var(--surface-2); color: var(--texte); }
.choix-mois-pas:disabled { opacity: .35; cursor: default; }
.choix-mois-pas[data-mois-pas="-1"] .ico { transform: scaleX(-1); }
.choix-mois-effacer[hidden] { display: none; }
.choix-mois-source { position: absolute; left: 50%; bottom: 0; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.champ .choix-mois { display: flex; width: 100%; }
@media (pointer: coarse) {
  .choix-mois { min-height: 48px; }
  .choix-mois-pas, .choix-mois-effacer { flex-basis: 44px; width: 44px; height: 44px; }
}

/* ── Le feu de sante des tiers (decision 0145) ─────────────────────────────────────────────── */
.feu { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px 2px 6px; border-radius: 999px;
  font-size: .82rem; font-weight: 600; line-height: 1.5; white-space: nowrap; vertical-align: middle; }
.feu svg { width: 14px; height: 14px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; }
.feu.compact { padding: 3px; }
.feu-mot-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.feu.feu-rouge { background: var(--feu-rouge-pale); color: var(--feu-rouge); }
.feu.feu-orange { background: var(--feu-ocre-pale); color: var(--feu-ocre); }
.feu.feu-vert { background: var(--feu-vert-pale); color: var(--feu-vert); }
.feu.feu-gris { background: var(--feu-gris-pale); color: var(--feu-gris); }
/* Entreprise fermee qui ne compte plus (0145) : neutre, un trait au lieu d'un aplat. */
.feu.feu-ferme { background: transparent; color: var(--feu-gris); box-shadow: inset 0 0 0 1px var(--bord-fort); font-weight: 500; }
.bandeau-feu { margin: 8px 0 12px; padding: 10px 14px; border-radius: var(--rayon-s); border-left: 4px solid;
  background: var(--surface-2); color: var(--texte); }
.bandeau-feu.feu-rouge { border-color: var(--feu-rouge); background: var(--feu-rouge-pale); }
.bandeau-feu.feu-orange { border-color: var(--feu-ocre); background: var(--feu-ocre-pale); }
.bandeau-feu .titre { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; }
.bandeau-feu ul { margin: 6px 0 4px; padding-left: 20px; }
.bandeau-feu p { margin: 4px 0 0; }
.bandeau-feu a, .bandeau-feu .lien { color: inherit; text-decoration: underline; }
.liste-motifs-feu { list-style: none; padding: 0; margin: 8px 0 12px; }
.liste-motifs-feu li { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.sante-episodes { list-style: none; margin: 8px 0 0; padding: 0; }
.sante-episodes > li { padding: 8px 0; border-top: 1px solid var(--bord); }
.sante-episodes ol { margin: 4px 0 0; padding-left: 18px; }
.sante-episodes .retracte { text-decoration: line-through; color: var(--texte-doux); }
.creances-feu { margin-top: 10px; }
.creances-feu .ligne { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.filtre-feu { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.filtre-feu button { cursor: pointer; border: 1px solid var(--bord-fort); background: var(--surface); }
.filtre-feu button[aria-pressed="true"] { outline: 2px solid var(--focus); outline-offset: 1px; }
button.lien { background: none; border: 0; padding: 0; font: inherit; color: var(--lien); text-decoration: underline; cursor: pointer; }
.texte-alerte { color: var(--feu-rouge); font-weight: 600; }
.ligne-licences { margin-top: 14px; padding: 10px 14px; border: 1px solid var(--bord); border-radius: var(--rayon-s); line-height: 1.7; }
.ligne-licences a, .ligne-licences button.lien { display: inline-block; }
.siren-ligne { border: 1px solid var(--bord); border-radius: var(--rayon-s); padding: 10px 14px; margin: 0 0 10px; }
.siren-ligne legend { padding: 0 6px; }
.siren-choix { display: flex; gap: 10px; align-items: flex-start; margin: 6px 0; cursor: pointer; }
.siren-choix input { margin-top: 4px; }

/* L'attestation sur l'honneur du permis (decision 0151) : le texte en entier, puis la case. */
.permis-attestation { margin-top: 10px; }
.permis-attestation-texte { margin: 6px 0; padding: 10px 12px; border-left: 3px solid var(--bord-fort); border-radius: var(--rayon-s);
  background: var(--surface); color: var(--texte); white-space: pre-line; overflow-wrap: anywhere; }
.permis-certifie { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0; min-height: 24px; cursor: pointer; }
.permis-certifie input { flex: none; width: 18px; height: 18px; margin: 2px 0 0; }
.permis-historique { margin-top: 10px; }
.permis-historique summary { min-height: 24px; cursor: pointer; }

/* ── La photo du compte : le bouton de Mon espace et la boite de recadrage (decision 0156) ──── */
.me-avatar-bouton { position: relative; flex: 0 0 auto; padding: 0; border: 0; background: transparent; cursor: pointer;
  border-radius: 50%; min-width: 52px; min-height: 52px; }
.me-avatar-bouton:focus-visible { outline: 2px solid var(--primaire); outline-offset: 3px; }
.me-avatar-bouton:hover .me-avatar { box-shadow: 0 0 0 3px var(--primaire-pale); }
.me-avatar-pastille { position: absolute; right: -3px; bottom: -3px; display: grid; place-items: center; width: 24px; height: 24px;
  border-radius: 50%; background: var(--surface); color: var(--texte-moyen); border: 1px solid var(--bord-fort);
  box-shadow: var(--ombre-menu); }
.me-avatar-pastille .ico { width: 14px; height: 14px; }
.photo-choix { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.photo-choix p { margin: 0 0 4px; }
.photo-grand { flex: 0 0 auto; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%;
  background: var(--primaire-pale); color: var(--primaire); font-weight: 700; font-size: 30px; letter-spacing: .02em; }
.photo-engagements { list-style: none; margin: 0 0 16px; padding: 12px 14px; display: grid; gap: 8px; border-radius: var(--rayon-s);
  background: var(--surface-2); font-size: 13.5px; }
.photo-engagements li { display: flex; gap: 10px; align-items: flex-start; }
.photo-engagements .ico { flex: 0 0 auto; width: 18px; height: 18px; color: var(--texte-doux); margin-top: 1px; }
.photo-gestes { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-fichier { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.photo-fichier input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.photo-fichier:focus-within { outline: 2px solid var(--primaire); outline-offset: 2px; }
.photo-consigne { margin: 0 0 12px; }
.photo-atelier { display: flex; gap: 16px; align-items: flex-start; }
.photo-scene { position: relative; flex: 0 0 auto; width: min(320px, 100%); aspect-ratio: 1; border-radius: var(--rayon-s); overflow: hidden;
  background: var(--surface-3); cursor: grab; touch-action: none; user-select: none; }
.photo-scene.saisie { cursor: grabbing; }
.photo-scene:focus-visible { outline: 2px solid var(--primaire); outline-offset: 2px; }
.photo-toile { display: block; width: 100%; height: 100%; }
.photo-masque { position: absolute; inset: 0; pointer-events: none; border-radius: 50%;
  box-shadow: 0 0 0 999px var(--voile), inset 0 0 0 2px color-mix(in srgb, var(--surface) 85%, transparent); }
.photo-apercus { display: grid; gap: 8px; justify-items: center; }
.photo-apercus-ronds { display: grid; gap: 10px; justify-items: center; }
.photo-apercu { border-radius: 50%; background: var(--surface-3); border: 1px solid var(--bord); }
.photo-apercu.grand { width: 64px; height: 64px; }
.photo-apercu.petit { width: 32px; height: 32px; }
.photo-apercu-titre { font-size: 12.5px; }
.photo-zoom { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.photo-zoom input { flex: 1 1 auto; accent-color: var(--primaire); }
.photo-aide-clavier { margin: 8px 0 0; font-size: 12.5px; }
@media (max-width: 620px) {
  .photo-atelier { flex-direction: column; align-items: stretch; }
  .photo-scene { width: 100%; }
  .photo-apercus { grid-template-columns: auto 1fr; align-items: center; justify-items: start; }
  .photo-apercus-ronds { grid-auto-flow: column; align-items: center; }
  .photo-choix { gap: 12px; }
  .photo-grand { width: 72px; height: 72px; font-size: 24px; }
}
/* Le rond d'une personne dans une liste et dans un circuit de validation (decision 0156). */
.avatar.liste { width: 32px; height: 32px; flex: 0 0 32px; font-size: 12px; }
.avatar.mini { width: 22px; height: 22px; flex: 0 0 22px; font-size: 9.5px; }
.nom-avec-avatar.personne { align-items: flex-start; }
.nom-avec-avatar.personne > .avatar { margin-top: 1px; }
.nom-avec-avatar.personne > span:last-child { min-width: 0; }
.valideur-ligne, .personne-ligne { display: flex; align-items: center; gap: 6px; }
.cherchable[data-forme="personne"] .cherchable-entree { display: flex; align-items: center; gap: 8px; }
/* Dans une colonne qui coupe son texte (`td-tronque`), le rond reste entier et c'est le NOM qui se
   coupe, par des points de suspension, ligne par ligne ; l'infobulle de la cellule le dit en entier. */
.td-tronque .nom-avec-avatar.personne { display: flex; max-width: 100%; }
.td-tronque .nom-avec-avatar.personne > span:last-child,
.td-tronque .valideur-ligne > span:not(.avatar):not(.a-photo) { display: block; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
/* L'interface IA, UNE pour tout le produit (lot IA-0, `js/ia.js`). La pastille « Proposé par l'IA »
   a la meme classe partout : c'est la mention de transparence, elle ne change pas d'un ecran a
   l'autre. Aucune couleur ici : celles des etiquettes et des notes. */
.pastille-ia { display: inline-flex; align-items: center; gap: 5px; }
.ico.ico-ia { width: 15px; height: 15px; }
.carte-ia-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.carte-ia-texte { white-space: pre-line; overflow-wrap: anywhere; line-height: 1.5; }
.carte-ia-sources, .carte-ia-confiance { margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.carte-ia-actions { margin-top: 12px; align-items: center; }
.ia-avis { display: inline-flex; align-items: center; gap: 6px; }
/* « Demandez à Quaeroo » dans la palette (lot IA-2) : la reponse sous la liste, defilante. */
/* Une reponse de l'assistant affichee : la liste ne prend plus que sa hauteur, sinon sur telephone
   elle pousse la reponse au bas de l'ecran et laisse un grand vide entre la ligne et la reponse. */
.palette:has(.palette-ia) .palette-liste, dialog:has(.palette-ia) .palette-liste { flex: 0 0 auto; max-height: 35vh; }
.palette-ia { flex: 1 1 auto; max-height: none; min-height: 0; overflow-y: auto; padding: 10px 16px 12px; border-top: 1px solid var(--bord); overscroll-behavior: contain; }
.assistant-brut { margin-top: 8px; }
.assistant-liste { margin-top: 8px; overflow-x: auto; }
.assistant-compris { margin: 8px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.assistant-correction { margin-top: 8px; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.assistant-choix { flex-wrap: wrap; gap: 6px; margin-top: 6px; }
/* « Le point de la semaine » sur l'accueil (lot IA-3) : trois chiffres, trois actions, aucun graphique.
   Tout se replie sur une colonne quand la place manque (390 px), sans debordement horizontal. */
.point-tete { flex-wrap: wrap; gap: 8px; }
.point-chiffres { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 4px 0 10px; }
.point-chiffre { display: flex; flex-direction: column; min-width: 0; }
.point-chiffre strong { font-size: 1.15em; overflow-wrap: anywhere; }
.point-raison { margin: 0 0 8px; }
.point-actions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.point-action { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.point-rang { flex: none; width: 22px; height: 22px; border-radius: 999px; display: inline-flex; align-items: center;
  justify-content: center; font-size: 12px; background: var(--surface-2); color: var(--texte-doux); }
.point-phrase { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.point-rien { margin: 0; }
.point-calcul { margin-top: 10px; }
.point-calcul summary { min-height: 24px; cursor: pointer; }
.point-signaux { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.point-pied { margin-top: 12px; flex-wrap: wrap; align-items: center; gap: 8px; }
.point-avis { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.assistant-possibles { margin: 6px 0; padding-left: 18px; }
.bouton-ia { display: inline-flex; align-items: center; gap: 6px; }
.ia-module { padding: 12px 0; border-top: 1px solid var(--bord); }
.ia-module:first-child { border-top: 0; }
.ia-module-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ia-module-note { margin: 4px 0 0; }
.ia-module-chiffres { margin-top: 8px; }
.ia-interrupteur { display: inline-flex; align-items: center; gap: 8px; min-height: 24px; cursor: pointer; }
.ia-interrupteur input { flex: none; width: 18px; height: 18px; margin: 0; }
.ia-plafond { width: 12em; max-width: 100%; min-height: 32px; }
.ia-journal { margin-top: 12px; }
.ia-journal summary { min-height: 24px; cursor: pointer; }

/* Aide a la redaction des devis (lot IA-5) : la liste des lignes proposees, sans puce native. */
.dd-lignes { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 10px; }
.dd-ligne { padding: 10px 12px; border: 1px solid var(--bord); border-radius: 12px; }
.dd-ligne > div { margin-top: 4px; }

/* « par Netaix » : QUI fournit l'IA (decision 0157, complement « mention »). La pastille IA dit
   QUE c'est l'IA ; cette mention dit QUI la fournit, une seule fois par ecran, en pied de carte IA
   ou a cote de la source d'une piece lue. Discrete : petite, couleur du texte secondaire, le signe
   monochrome (`currentColor`), aucune couleur de marque, aucun bandeau. L'infobulle s'ouvre au
   survol, au focus (clavier) et au toucher (classe `ouverte`, posee par `quaeroo.js`). */
.mention-netaix { position: relative; display: inline-flex; align-items: center; vertical-align: middle;
  font-size: 12px; font-weight: normal; color: var(--texte-doux); }
.mention-netaix-bouton { display: inline-flex; align-items: center; gap: 4px; min-height: 24px; padding: 0 2px;
  border: 0; background: none; font: inherit; color: inherit; cursor: help; border-radius: 6px; }
.mention-netaix-bouton:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.mention-netaix-signe { width: 12px; height: 12px; flex: none; }
.mention-netaix-bulle { display: none; position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 30;
  width: max-content; max-width: min(280px, 80vw); padding: 8px 10px; border-radius: var(--rayon-xs);
  background: var(--surface); color: var(--texte); border: 1px solid var(--bord); box-shadow: var(--ombre-menu);
  font-size: 12.5px; line-height: 1.4; white-space: normal; }
/* Le pont invisible entre le bouton et la bulle : la souris passe au lien sans refermer. */
.mention-netaix-bulle::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 6px; }
.mention-netaix:hover .mention-netaix-bulle, .mention-netaix:focus-within .mention-netaix-bulle,
.mention-netaix.ouverte .mention-netaix-bulle { display: block; }
.carte-ia-pied { margin-top: 10px; display: flex; justify-content: flex-end; }
.mention-netaix-presentation { margin: 6px 0 10px; }

/* « Antivirus indisponible » a cote d'une piece acceptee sans analyse (decision 0097, audit Q-02,
   `attributsAntivirus` dans js/quaeroo.js). */
a[data-antivirus="non_analysee"]::after {
  content: attr(data-antivirus-libelle);
  display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px;
  font-size: 0.78em; font-weight: 600; line-height: 1.6; vertical-align: middle;
  color: var(--alerte); background: var(--alerte-pale);
}
