/* ======================================================================
   LE TEMPLATE (XIII1, 15/09/2026) — la feuille de composants de la maquette
   validee par le cabinet, avec les memes noms : .btn (.pri .sec .ghost .dan
   .sm), .fld (.ok .err), .search, .chip, .seg, table.t, .toast, .card, .kpi,
   .alert. Un SYSTEME : chaque composant a des etats, une taille, une regle,
   et il est le meme partout.

   L'identite reste — vert #0E6656 a la marque, Atkinson au texte, Plex Mono
   aux chiffres, Newsreader a la marque et nulle part ailleurs. Ce qui change :
   le fond gris-vert froid (#F3F5F2) a la place du beige, l'encre #16201F, et
   un bleu de SELECTION (#2F5FD0) HORS des quatre verdicts, pour qu'une ligne
   puisse etre orange ET selectionnee sans que les deux signes se battent.

   Quatre regles : un seul bouton primaire par ecran, et le danger n'est
   jamais primaire ; un champ dit son etat ; les chiffres sont en mono,
   alignes a droite ; une notification s'efface, une erreur reste.
   ====================================================================== */
:root{
  --ground:#F3F5F2; --surface:#FFFFFF; --surface-2:#E9EDE9; --ink:#16201F; --mute:#5C6B66;
  --rule:#D9DFD9; --rule-strong:#B6C0BA;
  --brand:#0E6656; --brand-ink:#FFFFFF; --brand-soft:#DDEBE5;
  --sel:#2F5FD0; --sel-soft:#E3EAFA;
  --rouge:#B03A2E; --rouge-soft:#F6E3E0; --orange:#A9690A; --orange-soft:#F6ECD9;
  --violet:#7D4F96; --violet-soft:#EEE5F3; --vert:#2E7D4F; --vert-soft:#DFF0E5;
  --rail:#111A18; --rail-2:#1B2725; --rail-ink:#CBD8D3; --rail-mute:#7E918B;
  --shadow:0 1px 2px rgba(22,32,31,.06), 0 8px 24px rgba(22,32,31,.08);
  --radius:9px;

  /* Les jetons de IX4 bis restent (le rail, les quatre verdicts) : ils
     pointent sur les memes valeurs, un seul endroit les definit. */
  --a-rail:var(--rail); --a-rail-2:var(--rail-2); --a-rail-ink:var(--rail-ink); --a-rail-mute:var(--rail-mute);
  --v-rouge:var(--rouge); --v-violet:var(--violet); --v-orange:var(--orange); --v-vert:var(--vert);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --ground:#0F1514; --surface:#171F1E; --surface-2:#1F2927; --ink:#E4EBE8; --mute:#93A39E;
    --rule:#2A3533; --rule-strong:#3D4A47;
    --brand:#4FB79B; --brand-ink:#07211B; --brand-soft:#173029;
    --sel:#7E9DEB; --sel-soft:#1C2740;
    --rouge:#E0806F; --rouge-soft:#3A1F1B; --orange:#DBA24A; --orange-soft:#33280F;
    --violet:#B48BCB; --violet-soft:#2E2138; --vert:#6FC292; --vert-soft:#17301F;
    --shadow:0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}
:root[data-theme="dark"]{
  --ground:#0F1514; --surface:#171F1E; --surface-2:#1F2927; --ink:#E4EBE8; --mute:#93A39E;
  --rule:#2A3533; --rule-strong:#3D4A47;
  --brand:#4FB79B; --brand-ink:#07211B; --brand-soft:#173029;
  --sel:#7E9DEB; --sel-soft:#1C2740;
  --rouge:#E0806F; --rouge-soft:#3A1F1B; --orange:#DBA24A; --orange-soft:#33280F;
  --violet:#B48BCB; --violet-soft:#2E2138; --vert:#6FC292; --vert-soft:#17301F;
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
}

*{box-sizing:border-box}
/* La DENSITE de IX4 : 13 px. Le metier est de la production, on ne lit pas
   un article, on travaille. */
body{
  margin:0; background:var(--ground); color:var(--ink);
  font-family:"Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  font-size:13px; line-height:1.5; -webkit-font-smoothing:antialiased;
}
.mono, .cpt{font-family:"IBM Plex Mono", ui-monospace, "Cascadia Mono", monospace; font-variant-numeric:tabular-nums}
h1{font-weight:700; font-size:16px; line-height:1.3; margin:0 0 4px; letter-spacing:0}
h2{font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--mute); margin:20px 0 8px; font-weight:700}
h3{font-size:15px; margin:0 0 6px}
h4{margin:18px 0 4px; font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--mute)}
.lede, .sub{color:var(--mute); margin:0 0 12px; font-size:13px}
.eyebrow{font-size:11px; letter-spacing:.12em; text-transform:uppercase; color:var(--mute); font-weight:700}
:focus-visible{outline:2px solid var(--sel); outline-offset:2px; border-radius:6px}
[hidden]{display:none !important}
@media (prefers-reduced-motion: reduce){*{animation:none !important; transition:none !important}}

/* ---------------------------------------------------------------- boutons
   primaire / secondaire / discret / danger / petit. Un seul primaire par
   ecran ; le danger n'est jamais primaire. */
.btn{display:inline-flex; align-items:center; gap:7px; height:32px; padding:0 13px; border-radius:7px;
  border:1px solid transparent; font:inherit; font-size:13px; font-weight:700; cursor:pointer;
  line-height:1; white-space:nowrap; color:var(--ink); background:var(--surface); border-color:var(--rule-strong)}
.btn.pri{background:var(--brand); color:var(--brand-ink); border-color:var(--brand)}
.btn.pri:hover:not(:disabled){filter:brightness(1.08)}
.btn.sec{background:var(--surface); color:var(--ink); border-color:var(--rule-strong)}
.btn.sec:hover:not(:disabled){background:var(--surface-2)}
.btn.ghost{background:transparent; color:var(--brand); border-color:transparent}
.btn.ghost:hover:not(:disabled){background:var(--brand-soft)}
.btn.dan{background:var(--rouge); color:#fff; border-color:var(--rouge)}
.btn.sm{height:26px; padding:0 9px; font-size:12px}
.btn:disabled{opacity:.45; cursor:not-allowed}
.btn .k{font-family:"IBM Plex Mono",monospace; font-size:10.5px; opacity:.7; border:1px solid currentColor;
  border-radius:4px; padding:0 4px; line-height:1.5}
.linkbtn{background:transparent; border:0; color:var(--brand); font:inherit; font-size:12.5px;
  text-decoration:underline; text-underline-offset:3px; cursor:pointer; padding:2px}
.btnrow{display:flex; gap:10px; flex-wrap:wrap; margin-top:14px}

/* ---------------------------------------------------------------- champs
   libelle au-dessus ; vide / valide (vert) / faux (rouge + la phrase qui dit
   quoi corriger) ; aide sous le champ. */
.fld{display:grid; gap:4px; min-width:0}
.fld label{font-size:11.5px; font-weight:700; color:var(--mute); letter-spacing:.02em}
.fld input, .fld select, .fld textarea, .in{height:32px; padding:0 10px; border:1px solid var(--rule-strong);
  border-radius:7px; background:var(--surface); color:var(--ink); font:inherit; font-size:13px; width:100%}
.fld textarea{height:auto; min-height:52px; padding:6px 10px; resize:vertical}
.fld .help{font-size:11.5px; color:var(--mute)}
.fld.err input, .fld.err textarea{border-color:var(--rouge)} .fld.err .help{color:var(--rouge)}
.fld.ok input{border-color:var(--vert)}
input[type=checkbox], input[type=radio]{accent-color:var(--brand); cursor:pointer; margin:0}
.search{display:flex; align-items:center; gap:8px; border:1px solid var(--rule-strong); border-radius:7px;
  background:var(--surface); padding:0 10px; height:32px}
.search svg{color:var(--mute); flex:none}
.search input{border:0; background:transparent; font:inherit; font-size:13px; color:var(--ink); width:100%; outline:none; min-width:0}

/* ---------------------------------------------------------------- chips
   avec leur compte (`.m`). Les quatre verdicts, « deja au FEC » (.fec, qui
   n'est PAS une cinquieme couleur), neutre ; `.on` = le filtre actif. */
.chip{display:inline-flex; align-items:center; gap:5px; height:22px; padding:0 8px; border-radius:99px;
  font-size:11.5px; font-weight:700; border:1px solid transparent; white-space:nowrap; vertical-align:middle}
.chip .m{font-family:"IBM Plex Mono",monospace; font-weight:600; font-variant-numeric:tabular-nums}
.chip.rouge{background:var(--rouge-soft); color:var(--rouge)} .chip.orange{background:var(--orange-soft); color:var(--orange)}
.chip.violet{background:var(--violet-soft); color:var(--violet)} .chip.vert{background:var(--vert-soft); color:var(--vert)}
.chip.neutre{background:var(--surface-2); color:var(--mute)} .chip.fec{background:var(--ink); color:var(--ground)}
.chip.on{border-color:currentColor}
button.chip{cursor:pointer; font:inherit; font-size:11.5px; font-weight:700}
button.chip:disabled{opacity:.4; cursor:not-allowed}

/* ---------------------------------------------------------------- segmented */
.seg{display:inline-flex; border:1px solid var(--rule-strong); border-radius:7px; overflow:hidden}
.seg button{border:0; background:var(--surface); color:var(--mute); font:inherit; font-size:12px; padding:5px 11px; cursor:pointer}
.seg button + button{border-left:1px solid var(--rule)}
.seg button.on{background:var(--ink); color:var(--ground); font-weight:700}

/* ---------------------------------------------------------------- tables
   en-tete fixe, chiffres en mono alignes a droite, comptes en mono, lisere
   de verdict 3 px, ligne exclue a 50 %, ligne selectionnee en bleu. */
table.t{width:100%; border-collapse:collapse; font-size:12.5px}
table.t th{text-align:left; font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--mute);
  font-weight:700; padding:7px 9px; border-bottom:1px solid var(--rule-strong); background:var(--surface);
  position:sticky; top:0; z-index:1; white-space:nowrap}
table.t td{padding:6px 9px; border-bottom:1px solid var(--rule); vertical-align:middle}
table.t tbody tr:hover td{background:var(--surface-2)}
table.t tr.sel td{background:var(--sel-soft)}
table.t tr.coche td{background:var(--sel-soft)}
table.t .num, table.t th.num{text-align:right; font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums; white-space:nowrap}
table.t .cpt{font-family:"IBM Plex Mono",monospace; font-size:12px}
table.t tr.vrouge td:first-child{box-shadow:inset 3px 0 0 var(--rouge)}
table.t tr.vorange td:first-child{box-shadow:inset 3px 0 0 var(--orange)}
table.t tr.vvert td:first-child{box-shadow:inset 3px 0 0 var(--vert)}
table.t tr.vviolet td:first-child{box-shadow:inset 3px 0 0 var(--violet)}
table.t tr.mort td{opacity:.5}
/* Entree 336 : le bandeau des accords en attente (cadre.js). */
.cadre-accords{display:block; flex-basis:100%; margin:0; padding:8px 12px; border-radius:7px; background:var(--brand-soft); color:var(--ink); font-weight:600; text-decoration:none; border-bottom:1px solid var(--rule)}
.cadre-accords[hidden]{display:none}
/* Entree 332 : une image que le serveur n'a pas rendue se voit (api.js). */
img.image-cassee{outline:2px dashed var(--orange); outline-offset:-2px; min-width:24px; min-height:24px}
table.t tfoot td{font-weight:700; border-bottom:0; border-top:1px solid var(--rule-strong)}
.wrapx{overflow-x:auto; max-width:100%}

/* ---------------------------------------------------------------- toast
   une confirmation s'efface ; une erreur (.grave) reste jusqu'a ce qu'on la
   ferme. */
.toast{display:inline-flex; align-items:center; gap:10px; background:var(--ink); color:var(--ground);
  padding:9px 12px 9px 14px; border-radius:9px; box-shadow:var(--shadow); font-size:12.5px; line-height:1.45}
.toast.grave{background:var(--rouge); color:#fff}
.toast b{font-weight:700}
.toast button{border:0; background:transparent; color:inherit; cursor:pointer; font-size:19px; line-height:1; padding:0 4px; opacity:.7}
.toast button:hover{opacity:1}

/* ---------------------------------------------------------------- cartes, KPI, alertes */
.card{border:1px solid var(--rule); border-radius:var(--radius); background:var(--surface); padding:12px 14px}
.card.done{border-left:3px solid var(--vert)}
.card h3{margin:0 0 4px; font-size:15px}
.card .sub{margin:0 0 10px}
.kpi{display:grid; gap:2px}
.kpi .v{font-family:"IBM Plex Mono",monospace; font-size:20px; font-weight:600; letter-spacing:-.01em; font-variant-numeric:tabular-nums}
.kpi .l{font-size:11.5px; color:var(--mute)} .kpi .d{font-size:11.5px}
.kpi .d.up{color:var(--vert)} .kpi .d.bad{color:var(--rouge)}
.alert{display:flex; gap:10px; align-items:flex-start; padding:8px 11px; border:1px solid var(--rule);
  border-left-width:3px; border-radius:7px; background:var(--surface); font-size:12.5px; line-height:1.5}
.alert.rouge, .alert.deja_au_fec{border-left-color:var(--rouge)} .alert.orange, .alert.fec_double{border-left-color:var(--orange)}
.alert.violet{border-left-color:var(--violet)} .alert.vert{border-left-color:var(--vert)} .alert.pret{border-left-color:var(--rule-strong)}
.alert .a{margin-left:auto; flex:none}
.alert .cpt{font-size:11.5px; color:var(--mute)}
.grid4{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:8px}
.grid2{display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:12px}
.stack{display:grid; gap:6px}
.stack > .l{display:flex; justify-content:space-between; align-items:center; gap:8px}
.stack > .l.mort{color:var(--mute)}

/* ======================================================================
   LA COQUILLE — rail · barre du haut · onglets · espace dossier
   ====================================================================== */
.appli{display:flex; align-items:stretch; min-height:100vh}
.zone{flex:1; min-width:0; display:flex; flex-direction:column}

/* IX1 — le rail permanent : 232 px, sombre, le seul geste franc. */
.rail{width:232px; flex:none; position:sticky; top:0; height:100vh; overflow:auto;
  background:var(--rail); color:var(--rail-ink); border-right:1px solid #0A100F; padding:10px 0 18px}
.rail-tete{padding:0 10px 8px; display:flex; flex-direction:column; gap:7px}
.rail-feu{display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; padding:7px 10px;
  border-radius:7px; cursor:pointer; background:var(--rail-2); border:1px solid #27352F; color:var(--rail-ink);
  font:inherit; font-size:12.5px; font-weight:700; text-align:left}
.rail-feu:hover{border-color:#3A4C45}
.rail-feu-n{font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums; background:#2A3733;
  color:var(--rail-mute); border-radius:99px; padding:1px 7px}
.rail-feu-n.chaud{background:var(--rouge); color:#fff}
.rail-q{width:100%; padding:6px 9px; border-radius:7px; font:inherit; font-size:12.5px;
  background:#0A100F; border:1px solid #27352F; color:var(--rail-ink)}
.rail-q::placeholder{color:var(--rail-mute)}
.rail-q:focus{outline:1px solid var(--brand); outline-offset:0}
.rl-titre{padding:12px 12px 4px; font-size:10px; letter-spacing:.12em; text-transform:uppercase; color:var(--rail-mute); font-weight:700}
.rl{display:flex; align-items:center; gap:8px; width:100%; text-align:left; background:transparent; border:0;
  border-left:3px solid transparent; color:var(--rail-ink); font:inherit; font-size:12.5px; padding:5px 10px 5px 7px;
  cursor:pointer; min-height:28px}
.rl:hover{background:#18231F}
.rl.sel{background:var(--rail-2); border-left-color:var(--brand)}
.rl-nom{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.rl-n{font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums; font-size:11px; color:var(--rail-mute); flex:none}
.rl-rien{padding:14px 12px; color:var(--rail-mute); font-size:12px}
/* La pastille de gravite : le PIRE l'emporte. */
.pt{width:7px; height:7px; border-radius:50%; flex:none; display:block}
.pt.deja_au_fec, .pt.rouge{background:var(--rouge)}
.pt.violet{background:var(--violet)}
.pt.fec_double, .pt.att{background:var(--orange)}
.pt.pret, .pt.ok{background:#2F3E39}

/* La barre du haut : la marque, la recherche globale (Ctrl K), qui, le compteur de taches. */
#topbar{display:flex; align-items:center; gap:10px; padding:7px 14px; background:var(--surface);
  border-bottom:1px solid var(--rule); position:sticky; top:0; z-index:20}
/* IX5 — le Newsreader a la marque et a rien d'autre. */
.brand{font-family:"Newsreader",Georgia,serif; font-weight:600; font-size:18px; letter-spacing:-.01em; margin-right:6px; display:flex; align-items:baseline; gap:10px}
.brand span{font-family:"Atkinson Hyperlegible","Segoe UI",system-ui,sans-serif; font-size:12px; color:var(--mute); letter-spacing:.06em; text-transform:uppercase; font-weight:400}
#topbar .search{max-width:420px; flex:1}
#topbar .who{margin-left:auto; font-size:12px; color:var(--mute); white-space:nowrap}
#taches{font:inherit; font-size:12px; color:var(--mute); background:transparent; border:1px solid transparent;
  border-radius:7px; padding:4px 8px; cursor:pointer}
#taches.actif{color:var(--ink); border-color:var(--rule-strong)}
#taches .spin{margin-right:6px}

/* Les onglets : un par dossier ouvert, comme un navigateur. */
#onglets{display:flex; align-items:flex-end; gap:2px; padding:6px 14px 0; background:var(--surface);
  border-bottom:1px solid var(--rule); overflow-x:auto}
.tab{padding:6px 12px; border:1px solid transparent; border-bottom:0; border-radius:7px 7px 0 0; font:inherit;
  font-size:12.5px; color:var(--mute); display:flex; gap:8px; align-items:center; background:transparent;
  cursor:pointer; white-space:nowrap}
.tab.on{background:var(--ground); border-color:var(--rule); color:var(--ink); font-weight:700; margin-bottom:-1px}
.tab .x{opacity:.5; font-size:11px; padding:0 2px; border-radius:4px}
.tab .x:hover{opacity:1; background:var(--surface-2)}
.tab.plus{color:var(--brand)}
.spin{width:9px; height:9px; border-radius:50%; border:2px solid var(--brand); border-top-color:transparent;
  display:inline-block; animation:tourne 1s linear infinite; flex:none}
@keyframes tourne{to{transform:rotate(360deg)}}

/* L'espace dossier : l'en-tete, les sous-onglets, un div par sous-onglet. */
#espace{padding:14px; display:grid; gap:12px; align-content:start; min-width:0}
section.dossier{display:grid; gap:12px}
.head{display:flex; align-items:center; gap:14px; flex-wrap:wrap}
.head h2{font-size:17px; font-weight:700; margin:0; letter-spacing:0; text-transform:none; color:var(--ink)}
.head .id{font-family:"IBM Plex Mono",monospace; font-size:12px; color:var(--mute)}
.head .actions{margin-left:auto; display:flex; gap:6px}
.subtabs{display:flex; gap:2px; border-bottom:1px solid var(--rule); font-size:12.5px; overflow-x:auto}
.subtabs button{padding:6px 11px; color:var(--mute); border:0; border-bottom:2px solid transparent; background:transparent;
  font:inherit; cursor:pointer; white-space:nowrap; display:inline-flex; align-items:center}
.subtabs button.on{color:var(--ink); border-bottom-color:var(--brand); font-weight:700}
.subtabs .b{margin-left:4px; background:var(--surface-2); border-radius:99px; padding:0 6px; font-family:"IBM Plex Mono",monospace; font-size:10.5px}
.subtabs .b.rouge{background:var(--rouge-soft); color:var(--rouge)}
.sous{display:grid; gap:12px; align-content:start}

/* La loupe ACD (XII2) et la palette (XIII3) : le combo de la maquette. */
.loupe, .palette{position:fixed; inset:0; z-index:65; display:flex; justify-content:center; align-items:flex-start;
  padding-top:12vh; background:rgba(22,32,31,.28)}
.combo{position:relative; width:min(640px, calc(100% - 32px))}
.combo .search{box-shadow:var(--shadow); border-radius:9px; height:40px}
.combo .search input{font-size:15px}
.loupe-ou{font-size:11px; color:var(--mute); white-space:nowrap}
.combo .list{border:1px solid var(--rule-strong); border-radius:8px; background:var(--surface); box-shadow:var(--shadow);
  margin-top:6px; overflow:hidden; max-height:60vh; overflow-y:auto}
.combo .row{display:grid; grid-template-columns:76px 1fr 140px 130px; gap:10px; padding:7px 11px;
  border:0; border-bottom:1px solid var(--rule); border-radius:0; font:inherit; font-size:12.5px; align-items:center;
  background:var(--surface); color:inherit; cursor:pointer; text-align:left; width:100%; min-height:0}
.combo .row:last-child{border-bottom:0}
.combo .row:hover{background:var(--surface-2)}
.combo .row.sel{background:var(--sel-soft)}
.combo .row.ouvert{color:var(--mute)}
.combo .row .code{font-family:"IBM Plex Mono",monospace; font-weight:600}
.combo .row .sub{color:var(--mute); font-size:11.5px; margin:0}
.combo .row .mono{font-size:11.5px}
.combo .foot{padding:6px 11px; font-size:11.5px; color:var(--mute); background:var(--surface-2); border-radius:0 0 8px 8px; margin-top:2px}
.combo .vide{padding:12px; color:var(--mute); font-size:12.5px; margin:0}
.combo .grp{padding:6px 11px 2px; font-size:10px; letter-spacing:.12em; text-transform:uppercase; color:var(--mute); font-weight:700;
  background:var(--surface-2); border:0}
@media (max-width:700px){ .combo .row{grid-template-columns:70px 1fr} .combo .row .sub2{display:none} }

/* ======================================================================
   LES ECRANS
   ====================================================================== */

/* Le premier ecran d'une session — qui es-tu ? — sans rail. */
#ecran1{max-width:640px; margin:0 auto; padding:60px 22px}
#ecran1 .footnote{margin-top:40px; color:var(--mute); font-size:12.5px; max-width:70ch}
#qui .card{display:flex; align-items:center; gap:12px; cursor:pointer; width:100%; text-align:left; font:inherit; color:inherit}
#qui .card:hover{border-color:var(--brand)}
#qui .card .nom{font-weight:700; font-size:14px}

/* Le suivi d'une tache (suivi.js) : les etapes, le chrono, le verdict. */
.etapes{list-style:none; margin:10px 0 4px; padding:0}
.etapes li{display:flex; align-items:center; gap:10px; padding:5px 0; font-size:13px; color:var(--mute)}
.etapes li::before{content:""; width:9px; height:9px; border-radius:50%; background:var(--rule); flex:0 0 9px}
.etapes li.fait{color:inherit}
.etapes li.fait::before{background:var(--vert)}
.etapes li.encours{color:inherit; font-weight:600}
.etapes li.encours::before{background:var(--sel); animation:bat 1.1s ease-in-out infinite}
@keyframes bat{0%,100%{opacity:1}50%{opacity:.25}}
.chrono{margin-left:auto; font-family:"IBM Plex Mono",monospace; font-size:12px; color:var(--mute); font-weight:400; font-variant-numeric:tabular-nums}
.verdict{margin:12px 0 2px; padding:10px 13px; border-radius:7px; line-height:1.55; border:1px solid var(--rule); border-left-width:3px}
.verdict h4{margin:0 0 4px; font-size:13px; letter-spacing:0; text-transform:none; color:inherit}
.verdict p{margin:3px 0; font-size:12.5px}
.verdict.ko{background:var(--rouge-soft); border-color:var(--rouge)}
.verdict.ok{background:var(--vert-soft); border-color:var(--vert)}
details.tech{margin-top:10px}
details.tech summary{cursor:pointer; font-size:12.5px; color:var(--mute); padding:4px 0}
details.tech pre{margin:8px 0 0; padding:10px; font-size:12px; white-space:pre-wrap; max-height:300px; overflow:auto;
  background:var(--surface-2); border-radius:7px}
.fiche{max-height:440px; overflow:auto; padding:4px 2px 2px}
.fiche h3,.fiche h4,.fiche h5,.fiche h6{margin:14px 0 4px; font-size:13px; letter-spacing:.01em; text-transform:none; color:inherit}
.fiche h3:first-child{margin-top:2px}
.fiche p{margin:5px 0; line-height:1.55}
.fiche ul{margin:5px 0 8px; padding-left:20px}
.fiche li{margin:2px 0; line-height:1.5}
.fiche s{opacity:.5}
.fiche code{font-family:"IBM Plex Mono",monospace; font-size:.92em; background:var(--surface-2); padding:1px 5px; border-radius:4px}

/* Le choix des pieces (preparer.js) : un groupe par famille, l'exercice. */
.grp{border:1px solid var(--rule); border-radius:var(--radius); background:var(--surface); overflow:hidden}
.grp + .grp{margin-top:8px}
.grp-row{display:flex; align-items:center; gap:12px; padding:10px 14px; cursor:pointer}
.grp-row:hover{background:var(--brand-soft)}
.grp-row input{width:16px; height:16px; flex:none}
.grp-row .g-main{flex:1; min-width:0}
.grp-row .g-t{font-weight:700; font-size:13.5px}
.grp-row .g-s{color:var(--mute); font-size:12px}
.grp-detail{background:transparent; border:0; border-top:1px solid var(--rule); color:var(--brand); font:inherit;
  font-size:12.5px; text-align:left; padding:8px 14px; width:100%; cursor:pointer; text-decoration:underline; text-underline-offset:3px}
.grp-items{border-top:1px solid var(--rule); padding:10px 14px 12px; display:grid;
  grid-template-columns:repeat(auto-fill, minmax(190px,1fr)); gap:4px 16px}
.grp-items label{display:flex; align-items:center; gap:8px; font-size:12.5px; cursor:pointer; padding:3px 0}
/* XVII4 — les outils de plage, en tete du detail. Ils tiennent la largeur du
   groupe : ils portent sur TOUT le groupe, pas sur une colonne. */
.grp-outils{grid-column:1 / -1; display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  padding-bottom:8px; margin-bottom:4px; border-bottom:1px solid var(--rule); font-size:12px; color:var(--mute)}
.grp-plage{display:flex; align-items:center; gap:5px}
.grp-plage input{width:62px; height:26px; padding:0 6px; border:1px solid var(--rule-strong);
  border-radius:6px; background:var(--surface); color:inherit; font:inherit; font-size:12px;
  font-family:"IBM Plex Mono",monospace; text-align:right}
.grp-astuce{margin-left:auto}
/* Le rang, pour que « de 1 a 20 » ne demande pas de compter. */
.grp-items .rang{flex:none; min-width:22px; text-align:right; font-family:"IBM Plex Mono",monospace;
  font-size:11px; color:var(--mute)}
.exos{display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-top:10px; padding:9px 14px;
  border:1px solid var(--rule); border-radius:var(--radius); background:var(--surface)}
.exos-t{font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--mute); font-weight:700}
.exo{display:flex; align-items:center; gap:7px; cursor:pointer; font-size:13px}
.exos-n{flex-basis:100%; margin:0; color:var(--orange); font-size:12.5px}
.pickbar{display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:12px; padding-top:12px; border-top:1px solid var(--rule)}
.pickbar .cnt{font-weight:700; font-size:13.5px; margin-right:auto}

/* ---------------------------------------------------------------- la relecture (X, XI3, XIV)
   TROIS VOLETS : la liste · la piece · l'ecriture (A·B depuis RL2). Une ecriture est
   un objet a plusieurs lignes qu'on corrige, eclate, equilibre : elle merite
   son volet. Aucune fenetre, aucune modale — le collaborateur ne doit jamais
   perdre sa liste des yeux. */
/* RL2 (27/09/2026) — L'ECRAN A·B. La liste courte a gauche, la PIECE AU
   CENTRE, l'ecriture a droite. Les trois repartitions de XVI5 (R1, R2, R3)
   disparaissent : elles compensaient une disposition qui ne montrait jamais
   la piece en grand pendant qu'on corrige. Decision du cabinet, 27/09 ; la
   simulation `notes/2026-09-27_maquettes_relecture/simulation.html` fait foi.

     >= 1400 px   310 px · la piece · 570 px
     <  1400 px   212 px · la piece · 548 px   (un portable 14 pouces)
     <  1100 px   la liste a gauche ; l'ecriture, puis la piece SOUS elle
     <   760 px   une colonne

   La liste ne disparait jamais : etroite a 1366, elle garde le tiers, la
   date, le montant et la couleur — jamais un rail de vignettes muet. */
.relu3{display:grid; grid-template-columns:310px minmax(0,1fr) 570px; gap:12px; margin-top:4px}
.relu3 .cote.liste{grid-column:1} .relu3 .cote.piece{grid-column:2} .relu3 .cote.journal{grid-column:3}
/* LA RANGEE (RL2.b) : barre du verdict · vignette · tiers et ce que c'est ·
   montant et date · etat. La case de selection (chantier X) parait au
   survol, et partout des qu'une ligne est choisie. */
.lignes.rangs td{padding:6px 6px; vertical-align:middle}
.lignes.rangs col.c-sel{width:0} .lignes.rangs col.c-barre{width:6px}
.lignes.rangs col.c-vig{width:38px} .lignes.rangs col.c-mt{width:78px} .lignes.rangs col.c-etat{width:22px}
.lignes.rangs.choix col.c-sel{width:24px}
.lignes.rangs td.sel{padding:0; overflow:hidden}
.lignes.rangs td.sel input{margin:0 4px; display:none}
.lignes.rangs.choix td.sel input, .lignes.rangs tr:hover td.sel input{display:inline-block}
.lignes.rangs tr:hover td.sel{width:24px}
.lignes.rangs td.barre{padding:0}
.lignes.rangs td.barre::before{content:""; display:block; width:4px; height:36px; border-radius:2px; background:var(--rule-strong)}
.lignes.rangs tr.vrouge td.barre::before{background:var(--rouge)}
.lignes.rangs tr.vviolet td.barre::before{background:var(--violet)}
.lignes.rangs tr.vorange td.barre::before{background:var(--orange)}
.lignes.rangs tr.vvert td.barre::before{background:var(--vert)}
.lignes.rangs td.vig{padding:4px 2px}
.lignes.rangs td.vig img{display:block; width:30px; height:38px; object-fit:cover; object-position:top;
  border:1px solid var(--rule-strong); border-radius:3px; background:var(--surface)}
.lignes.rangs td.lib .tiers{display:block; font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.lignes.rangs td.lib .quoi{display:block; font-size:11.5px; color:var(--mute); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.lignes.rangs td.lib .quoi .jpast{margin:0 2px 0 0}
.lignes.rangs td.mt{text-align:right; font-family:"IBM Plex Mono",monospace}
.lignes.rangs td.mt b{display:block; font-size:12.5px} .lignes.rangs td.mt span{display:block; font-size:11px; color:var(--mute)}
.lignes.rangs td.mt span.d-court{display:none}
.lignes.rangs td.etat{text-align:center; color:var(--mute); padding:0}
.lignes.rangs td.etat.corr{color:var(--brand)} .lignes.rangs td.etat.excl{color:var(--rouge)}
.lignes.rangs tr.hors td.lib .tiers, .lignes.rangs tr.hors td.lib .quoi{color:var(--mute); text-decoration:line-through}
/* La hauteur SUIT l'ecran ; `--hauteur-relu` existe pour que le plein ecran la remplace. */
.relu3{--hauteur-relu:clamp(460px, calc(100vh - 220px), 1200px)}
.relu3 .cote{border:1px solid var(--rule); border-radius:var(--radius); overflow:hidden; background:var(--surface);
  display:flex; flex-direction:column; height:var(--hauteur-relu); min-width:0}
/* III3 — la piece en grand : les deux autres volets se masquent, la piece prend tout. */
.relu3.plein{--hauteur-relu:calc(100vh - 120px); grid-template-columns:1fr}
.relu3.plein .cote:not(.piece){display:none}
.relu3.plein .cote.piece{grid-column:1; grid-row:auto}
.relu3 .cote > header{padding:7px 10px; border-bottom:1px solid var(--rule); font-size:11.5px; color:var(--mute);
  display:flex; align-items:center; gap:10px; background:var(--surface); min-height:31px}
.relu3 .cote > header .verdicts{margin-left:auto; font-family:"IBM Plex Mono",monospace; font-size:12px}
.relu3 .corps{overflow:auto; flex:1}
/* La liste ne descend pas sous 140 px (X) — soit une dizaine de lignes, moins
   on ne voit plus ce qu'on relit. Le volet central defile SEUL : il n'a plus
   a plafonner a 42 %, il a son volet. */
.relu3 .corps{min-height:140px}
.relu3 .detail{border-top:0; max-height:none}
/* Sous 1400 px — le portable 14 pouces : la liste se serre (212 px) et
   perd sa vignette ; l'ecriture garde de quoi porter le bloc des montants. */
@media (max-width:1399px){
  .relu3{grid-template-columns:212px minmax(0,1fr) 548px}
  .lignes.rangs col.c-vig, .lignes.rangs td.vig{display:none}
  .lignes.rangs col.c-mt{width:58px} .lignes.rangs col.c-etat{width:16px}
  .lignes.rangs td.mt span.d-long{display:none} .lignes.rangs td.mt span.d-court{display:block}
  .lignes.rangs td{padding:6px 4px}
  .relu3 .detail .champs3{grid-template-columns:138px minmax(0,1fr) 96px}
}
/* A moins de 1100 px, trois colonnes ne tiennent plus : la piece passe SOUS
   l'ecriture, et la liste garde sa colonne — c'est elle qu'on ne lache pas. */
@media (max-width:1100px){
  .relu3{grid-template-columns:212px minmax(0,1fr)}
  .relu3 .cote.liste{grid-column:1; grid-row:1 / span 2}
  .relu3 .cote.journal{grid-column:2; grid-row:1}
  .relu3 .cote.piece{grid-column:2; grid-row:2; height:clamp(360px, 60vh, 800px)}
}
@media (max-width:760px){
  .relu3{grid-template-columns:1fr}
  .relu3 .cote.liste, .relu3 .cote.journal, .relu3 .cote.piece{grid-column:1; grid-row:auto}
}
/* LE VOLET DE L'ECRITURE (RL2.c) : 12 px, etiquettes a 10 px, champs de
   26 px. On gagne de la place en enlevant du decor, pas en rapetissant tout. */
.relu3 .cote.journal .detail{font-size:12px; padding:10px 12px; display:flex; flex-direction:column; gap:8px}
.relu3 .detail .fld{display:flex; flex-direction:column; gap:2px; min-width:0}
.relu3 .detail .fld > span{font-size:10px; letter-spacing:.08em; text-transform:uppercase; color:var(--mute); font-weight:700}
.relu3 .detail .fld input[type=text], .relu3 .detail .fld textarea{height:26px; font-size:12px}
.relu3 .detail .fld textarea{height:auto; min-height:52px}
.relu3 .detail .fld .lu{display:flex; align-items:center; min-height:26px; padding:0 8px; border:1px solid var(--rule);
  border-radius:6px; background:var(--surface-2); font-weight:400; overflow:hidden; white-space:nowrap; text-overflow:ellipsis}
.relu3 .detail .champs3{display:grid; grid-template-columns:150px minmax(0,1fr) 110px; gap:8px}
.relu3 .detail .champs3 .dat{display:flex; gap:3px; align-items:center; flex-wrap:wrap}
.relu3 .detail .champs3 .dat input[type=text]{flex:1 1 0; width:auto; min-width:0}
.relu3 .detail .champs3 .dat .btn{padding:0 4px; flex:none}
.relu3 .detail .champs3 .dat .tdit{flex-basis:100%}
.relu3 .detail .champs3 .dat .tdit:empty{display:none}
.relu3 .detail .sanslignes{display:grid; grid-template-columns:auto 1fr; gap:6px 9px; align-items:center}
.relu3 .detail .n1{display:flex; gap:6px; padding:6px 8px; background:var(--orange-soft); border-radius:7px;
  font-size:11.5px; line-height:1.45}
.relu3 .detail .gestes{display:flex; flex-wrap:wrap; gap:6px 10px; align-items:flex-start;
  padding-top:6px; border-top:1px solid var(--rule)}
.relu3 .detail .gestes .remise{flex:1; min-width:220px; margin:0}
.relu3 .detail details.plus{border-top:1px solid var(--rule); padding-top:6px}
.relu3 .detail details.plus > summary{cursor:pointer; color:var(--mute); font-size:11.5px}
.relu3 .detail .trace.acreer{background:var(--violet-soft); border-radius:7px; padding:6px 8px}
/* La piece dit laquelle elle montre. */
.relu3 .cote.piece > header #pNom{color:var(--ink); font-family:"IBM Plex Mono",monospace; font-size:12px;
  overflow:hidden; white-space:nowrap; text-overflow:ellipsis; min-width:0}
.relu3 .cote.liste > header b{color:var(--ink)}
.relu3 .cote.liste > header{flex-wrap:nowrap; white-space:nowrap}
.relu3 .cote.liste > header .compteur{margin-left:auto}
.relu3 .cote.liste > header .compteur .n{min-width:44px}
.relu3 .cote.liste .fl-outils{flex-wrap:wrap}
/* Dans la colonne de la liste, les pastilles et le tri PASSENT A LA LIGNE :
   un filtre coupe a droite est un filtre qu'on ne voit pas. */
.relu3 .cote.liste .fl-chips{flex-wrap:wrap; overflow:visible}
.relu3 .cote.liste .fl-outils .seg{flex:1 1 100%; max-width:100%; overflow-x:auto; scrollbar-width:none}
.relu3 .cote.liste .fl-outils .seg button{flex:none}
.relu3 .cote.liste .fl-outils .seg button{padding:4px 7px; font-size:11.5px}
/* 29/09 (entree 156) — la liste d'abord. Le resume et « Raccourcis » sur UNE
   ligne, les raccourcis replies ; des pastilles et des lignes plus serrees :
   sur l'ecran du cabinet, trois ecritures visibles, c'est trop peu. */
.relu3 .cote.liste .kbd{flex-wrap:nowrap; align-items:baseline; padding:4px 10px}
.relu3 .cote.liste .kbd .verdicts{margin:0; color:var(--ink); white-space:nowrap}
.relu3 .cote.liste .kbd details.raccourcis{margin-left:auto; min-width:0}
.relu3 .cote.liste .kbd details.raccourcis > summary{cursor:pointer; white-space:nowrap; text-align:right; list-style:none}
.relu3 .cote.liste .kbd details.raccourcis[open]{margin-left:0; flex:1 1 100%}
.relu3 .cote.liste .kbd details.raccourcis[open] > summary{margin-bottom:3px}
.relu3 .cote.liste .kbd:has(details[open]){flex-wrap:wrap}
.relu3 .cote.liste .filtres{gap:3px; padding:4px 8px}
.relu3 .cote.liste .fl-chips{gap:3px}
.relu3 .cote.liste .fp{height:20px; padding:0 6px; font-size:11px; gap:4px}
.relu3 .cote.liste .fq{height:22px}
.relu3 .cote.liste .lignes.rangs td{padding:3px 5px}
.relu3 .cote.liste .lignes.rangs td.vig{padding:2px}
.relu3 .cote.liste .lignes.rangs td.vig img{width:24px; height:30px}
.relu3 .cote.liste .lignes.rangs td.barre::before{height:30px}
/* RL2.d — le panneau rouge des pieces sans ecriture : une ligne de titre qui
   se deplie (note du 23/09, point 1). Deplie, il poussait la liste hors de vue. */
details.alerte-fec.sansecr > summary{cursor:pointer; list-style-position:inside}
details.alerte-fec.sansecr > summary .linkbtn{margin-left:8px}
/* LE RAIL SE REPLIE (RL2, decision du 27/09). Les planches n'avaient pas le
   rail des dossiers : avec lui, la piece ne faisait que 290 px a 1366. Il se
   replie en une bande QUAND un lot est ouvert en relecture — la feuille de
   style le sait seule (`:has`) : aucun module n'a a prevenir la relecture
   qu'on a change d'onglet ou de dossier. `rail-garde` : le collaborateur l'a
   rouvert, c'est retenu. */
.rail-bascule{display:none; width:100%; border:0; background:transparent; color:var(--rail-mute);
  font:inherit; font-size:12px; cursor:pointer; padding:4px 10px 10px; text-align:left}
.rail-bascule:hover{color:var(--rail-ink)}
.rail-bascule .ouvrir{display:none; font-size:18px; line-height:1}
.appli:has(#espace > section:not([hidden]) [data-sous="relecture"]:not([hidden]) .relu3) .rail-bascule{display:block}
/* 29/09 (entree 166) — le releve aussi : le rail se replie, la place va aux
   lignes et a la page du releve. */
.appli:has(#espace > section:not([hidden]) [data-sous="relecture"]:not([hidden]) .bq-releve) .rail-bascule{display:block}
.appli:has(#espace > section:not([hidden]) [data-sous="relecture"]:not([hidden]) .bq-releve):not(.rail-garde) .rail{width:40px; padding:10px 0}
.appli:has(#espace > section:not([hidden]) [data-sous="relecture"]:not([hidden]) .bq-releve):not(.rail-garde) .rail > :not(.rail-bascule){display:none}
.appli:has(#espace > section:not([hidden]) [data-sous="relecture"]:not([hidden]) .bq-releve):not(.rail-garde) .rail-bascule{text-align:center; padding:4px 0}
.appli:has(#espace > section:not([hidden]) [data-sous="relecture"]:not([hidden]) .bq-releve):not(.rail-garde) .rail-bascule .ouvrir{display:inline}
.appli:has(#espace > section:not([hidden]) [data-sous="relecture"]:not([hidden]) .bq-releve):not(.rail-garde) .rail-bascule .replier{display:none}
.appli:has(#espace > section:not([hidden]) [data-sous="relecture"]:not([hidden]) .relu3):not(.rail-garde) .rail{width:40px; padding:10px 0}
.appli:has(#espace > section:not([hidden]) [data-sous="relecture"]:not([hidden]) .relu3):not(.rail-garde) .rail > :not(.rail-bascule){display:none}
.appli:has(#espace > section:not([hidden]) [data-sous="relecture"]:not([hidden]) .relu3):not(.rail-garde) .rail-bascule{text-align:center; padding:4px 0}
.appli:has(#espace > section:not([hidden]) [data-sous="relecture"]:not([hidden]) .relu3):not(.rail-garde) .rail-bascule .ouvrir{display:inline}
.appli:has(#espace > section:not([hidden]) [data-sous="relecture"]:not([hidden]) .relu3):not(.rail-garde) .rail-bascule .replier{display:none}
.lignes{width:100%; border-collapse:collapse; font-size:12.5px; table-layout:fixed}
.lignes td{padding:6px 7px; border-bottom:1px solid var(--rule); vertical-align:top; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.lignes tr{cursor:pointer}
.lignes tbody tr:hover td{background:var(--surface-2)}
.lignes tr.sel td{background:var(--sel-soft)}
.lignes tr.coche td{background:var(--sel-soft)}
.lignes tr.sel.coche td{box-shadow:inset 0 0 0 1px var(--sel)}
.lignes tr.hors td{opacity:.45}
/* Le verdict de LIGNE : un lisere a gauche, jamais un aplat. */
.lignes tr.vvert td:first-child{box-shadow:inset 3px 0 0 var(--vert)}
.lignes tr.vorange td:first-child{box-shadow:inset 3px 0 0 var(--orange)}
.lignes tr.vviolet td:first-child{box-shadow:inset 3px 0 0 var(--violet)}
.lignes tr.vrouge td:first-child{box-shadow:inset 3px 0 0 var(--rouge)}
.lignes tr.vviolet td{background:var(--violet-soft)}
.lignes tr.vrouge td{background:var(--rouge-soft)}
/* Deja au FEC (VI) : PAS une cinquieme couleur de verdict — une etiquette. */
.lignes tr.dejafec td{background:rgba(120,120,130,.13)}
.lignes tr.dejafec .lib{text-decoration:line-through; text-decoration-thickness:1px}
.tagfec{display:inline-block; padding:0 4px; border-radius:3px; font-size:10.5px; letter-spacing:.4px;
  background:var(--ink); color:var(--ground); vertical-align:1px}
.detail .trace.dejafec{color:var(--ink); background:rgba(120,120,130,.12); padding:7px 9px; border-radius:6px}
.alerte-fec{margin:0 0 4px; padding:9px 12px; border-radius:7px; background:var(--rouge-soft);
  border:1px solid var(--rouge); border-left-width:3px; font-size:12.5px; line-height:1.5}
.detail .trace.vvert{color:var(--vert)} .detail .trace.vorange{color:var(--orange)}
.detail .trace.vviolet{color:var(--violet)} .detail .trace.vrouge{color:var(--rouge)}
.lignes .num{text-align:right; font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums; white-space:nowrap}
.lignes .cpt{font-family:"IBM Plex Mono",monospace; font-size:12px}
.lignes .lib{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.lignes thead th{position:sticky; top:0; z-index:1; background:var(--surface); text-align:left; font-size:10.5px;
  letter-spacing:.08em; text-transform:uppercase; color:var(--mute); font-weight:700; padding:6px 7px; border-bottom:1px solid var(--rule-strong)}
.lignes thead th.num{text-align:right}
.lignes input[type=text]{width:100%; font:inherit; padding:3px 6px; border:1px solid var(--rule-strong); border-radius:5px; background:var(--surface); color:inherit}
.lignes input.num{text-align:right}
.detail{padding:10px 12px; border-top:1px solid var(--rule); font-size:12.5px}
.detail label{font-size:11.5px; font-weight:700; color:var(--mute)}
.detail input[type=text]{height:28px; padding:0 8px; border:1px solid var(--rule-strong); border-radius:6px; background:var(--surface); color:inherit; font:inherit; font-size:12.5px; width:100%}
.detail textarea{width:100%; min-height:44px; font:inherit; font-size:12.5px; padding:6px 8px; border:1px solid var(--rule-strong); border-radius:6px; resize:vertical; background:var(--surface); color:inherit}
.detail .trace{margin-top:7px; color:var(--mute); line-height:1.5}
.detail .avecregle{display:flex; flex-direction:column; gap:2px}
.detail label.regle, .jbar label.regle{display:flex; align-items:center; gap:5px; font-size:11.5px; color:var(--mute); cursor:pointer; font-weight:400}
.detail label.regle input{width:auto}
.detail .lignesdet{margin-top:10px}
/* X1 — les quatre verdicts deviennent des filtres : des chips, avec leur
   compte. XIV : deux lignes — les chips, puis le tri et la recherche. Sur un
   volet de 391 px, une seule ligne ecrasait le tri a 2 px (mesure au banc). */
.filtres{display:grid; gap:5px; padding:6px 10px; border-bottom:1px solid var(--rule); background:var(--surface-2)}
.fl-chips{display:flex; align-items:center; gap:5px; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none}
.fl-chips::-webkit-scrollbar{display:none}
.fl-outils{display:flex; align-items:center; gap:6px; min-width:0}
.fl-outils .seg{flex:none}
.fl-outils .seg button{padding:4px 8px; font-size:11.5px}
.fp{display:inline-flex; align-items:center; gap:5px; height:22px; padding:0 8px; border-radius:99px; font:inherit;
  font-size:11.5px; font-weight:700; border:1px solid transparent; background:var(--surface); color:var(--mute); cursor:pointer; white-space:nowrap}
.fp b{font-family:"IBM Plex Mono",monospace; font-weight:600; font-variant-numeric:tabular-nums}
.fp:disabled{opacity:.4; cursor:not-allowed}
.fp.vrouge{color:var(--rouge); background:var(--rouge-soft)}
.fp.vviolet{color:var(--violet); background:var(--violet-soft)}
.fp.vorange{color:var(--orange); background:var(--orange-soft)}
.fp.vvert{color:var(--vert); background:var(--vert-soft)}
.fp.fec{color:var(--ground); background:var(--ink)}
.fp.on{border-color:currentColor}
.fp.raz{background:transparent; border-color:var(--rule-strong)}
.fq{min-width:0; flex:1 1 80px; height:24px; padding:0 8px; border-radius:99px;
  border:1px solid var(--rule-strong); background:var(--surface); color:inherit; font:inherit; font-size:11.5px}
/* XVI2 — le journal se VOIT. La repartition reelle d'un lot remplace le seul
   nom de sa famille (« ACHATS » pour 12 achats, 7 ventes et 2 releves) ; une
   pastille par ligne ; un journal vide de toute ecriture passe en rouge. */
.jrepartition{font-variant-numeric:tabular-nums}
.jrep{white-space:nowrap}
.jrep b{font-family:"IBM Plex Mono",monospace; font-weight:700; letter-spacing:.03em}
.jrep.vide{color:var(--rouge); font-weight:700}
.jsep{margin:0 5px; color:var(--rule-strong)}
.jpast{display:inline-block; min-width:30px; padding:0 4px; border-radius:4px; text-align:center;
  font-family:"IBM Plex Mono",monospace; font-size:10.5px; font-weight:700; letter-spacing:.03em;
  background:var(--surface-2); color:var(--mute)}
.jpast.vide{background:var(--rouge-soft); color:var(--rouge)}
/* XVI6 — un journal change et PAS ENCORE enregistre : il se voit, sinon on
   change le journal et la colonne continue de dire l'ancien. */
.jpast.change{background:var(--sel-soft); color:var(--sel); outline:1px dashed var(--sel)}
.fl-journaux{display:flex; align-items:center; gap:5px; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none}
.fl-journaux::-webkit-scrollbar{display:none}
.fp.fj{font-family:"IBM Plex Mono",monospace; letter-spacing:.03em; background:var(--surface-2); color:var(--ink)}
.fp.fj.vide{background:var(--rouge-soft); color:var(--rouge)}
.fp.fj i{font-style:normal; font-family:"Atkinson Hyperlegible",system-ui,sans-serif; font-weight:600; font-size:10.5px}
.alerte-fec.sansecr .pourquoi{display:block; margin-top:5px}
.alerte-fec.sansecr .pourquoi span{display:block; font-size:11.5px; color:var(--ink); opacity:.85}
.alerte-fec.sansecr .pourquoi b{font-family:"IBM Plex Mono",monospace}
.alerte-fec.sansecr .linkbtn{margin-top:4px}
/* XVI4 — la loupe des comptes (A1), SOUS la case en cours. Elle lit le
   disque, jamais l'API : la fiche, notes/acd_parametrage.json, les emplois
   comptes au FEC.

   XVII3 — elle s'appelle `.loupecpt`, PAS `.loupe`. La palette « Chercher un
   dossier dans ACD » porte deja `.loupe` (ligne 263 : `fixed`, `inset:0`), et
   cette regle-ci, plus bas dans la feuille, l'ecrasait a specificite egale :
   la palette s'affichait a y=1080 — hors de l'ecran, mesure au banc le 16/09.
   Deux objets differents, deux noms.

   17/09 — `fixed`, ET POSEE SUR `document.body`. En `absolute` dans la
   cellule, elle etait ROGNEE et invisible : `.jgrid td` porte
   `overflow:hidden`, et deux autres ancetres coupent aussi
   (`.jgridx{overflow-x:auto}`, `.relu3 .cote{overflow:hidden}`). Mesure au
   banc : une boite de 360x140 dans une cellule de 100x35, a y=1159 pour un
   ecran de 1080. Elle existait dans le DOM et personne ne la voyait.

   `fixed` echappe aux trois. C'est le JS qui pose `top` et `left` depuis le
   rectangle du champ, et qui la suit au defilement : une regle de feuille de
   style ne peut pas le faire depuis `body`. */
.loupecpt{position:fixed; z-index:70; min-width:280px; max-width:360px;
  max-height:260px; overflow:auto; background:var(--surface); border:1px solid var(--rule-strong);
  border-radius:7px; box-shadow:0 8px 24px rgba(0,0,0,.14); font-size:12px}
.loupecpt .lgroupe{padding:5px 9px 3px; font-size:10px; letter-spacing:.08em; text-transform:uppercase;
  color:var(--mute); font-weight:700; background:var(--surface-2); position:sticky; top:0}
.loupecpt .lc{display:flex; align-items:baseline; gap:7px; padding:4px 9px; cursor:pointer}
.loupecpt .lc b{font-family:"IBM Plex Mono",monospace; font-weight:600; flex:none}
.loupecpt .lc .llib{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
  color:var(--mute)}
.loupecpt .lc .lemp{flex:none; font-family:"IBM Plex Mono",monospace; font-size:10.5px; color:var(--mute)}
.loupecpt .lc.on{background:var(--sel-soft)}
.loupecpt .lrien, .loupecpt .lnote{padding:7px 9px; color:var(--mute); line-height:1.45}
.loupecpt .lnote{border-top:1px solid var(--rule); background:var(--orange-soft); color:var(--orange)}
/* Un compte tape a la main qui n'existe nulle part : un AVERTISSEMENT, pas un
   blocage — un compte peut exister dans ACD sans etre ni au FEC ni dans un
   plan jamais relu. */
.linconnu{position:absolute; top:100%; left:0; z-index:19; white-space:normal; width:230px;
  padding:4px 7px; font-size:11px; line-height:1.35; color:var(--rouge);
  background:var(--rouge-soft); border:1px solid var(--rouge); border-radius:5px}
/* XVI5 — le compteur de la barre, et la FILE. Les chips de couleur et de
   journal ne MASQUENT plus des lignes : ils definissent la file que les
   fleches et « Valider » suivent. La file est FIGEE au moment du
   choix — une ecriture qui change de couleur en etant corrigee la quitte sans
   decaler le compteur sous les yeux. */
.compteur{display:inline-flex; align-items:center; gap:2px; font-family:"IBM Plex Mono",monospace;
  font-size:12.5px; color:var(--mute)}
.compteur button{border:1px solid var(--rule-strong); background:var(--surface); color:inherit;
  font:inherit; width:22px; height:22px; border-radius:5px; cursor:pointer; line-height:1}
.compteur button:disabled{opacity:.35; cursor:not-allowed}
.compteur .n{min-width:64px; text-align:center}
.compteur .quoi{font-family:"Atkinson Hyperlegible",system-ui,sans-serif; font-weight:700; color:var(--ink)}
/* Une ligne DE LA FILE : une barre a gauche, sans toucher aux quatre couleurs
   (verdict.py decide, l'ecran lit). */
.filefin{display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:7px 10px;
  border-bottom:1px solid var(--rule); background:var(--vert-soft); font-size:12px; color:var(--vert)}
.filefin b{color:var(--ink)}
/* XVI6 — le transfert : DEUX gestes, et ils ne se ressemblent pas. Changer
   le journal ne touche pas au sens ; changer la nature l'inverse, et l'ecran
   le DIT avant de valider. */
/* XVII2 — le verrou. Au repos, deux pastilles et « Modifier… » ; ouvert, les
   deux `<select>` et « Annuler ». Le bouton occupe la largeur sous les deux
   colonnes : il porte sur les DEUX gestes, pas sur l'un des deux. */
.transfert .tverrou{grid-column:1 / -1; display:flex; align-items:center; gap:10px}
.transfert .tverrou .tdit{flex:1 1 0; min-width:0}
.transfert.ferme .chip{align-self:start}
.transfert{display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:10px;
  padding:8px 9px; border:1px solid var(--rule); border-radius:7px; background:var(--surface-2)}
.transfert .tgeste{display:grid; gap:3px; min-width:0}
.transfert label{font-size:11.5px; font-weight:700; color:var(--mute)}
.transfert select{height:28px; padding:0 6px; border:1px solid var(--rule-strong);
  border-radius:6px; background:var(--surface); color:inherit; font:inherit; font-size:12px; width:100%}
.transfert .tdit{font-size:11px; color:var(--mute); line-height:1.35; min-height:15px}
.transfert #tInversion:not(:empty){color:var(--orange); font-weight:700}
.transfert .tdit.vide{color:var(--orange)}
@media (max-width:760px){ .transfert{grid-template-columns:1fr} }
/* XVI7 — remettre a traiter. Le bouton est gris et la raison ecrite quand
   c'est interdit : sur un doublon dans ACD il n'y a rien a decider. */
.remise{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:8px}
.remise input{width:150px; height:26px; padding:0 7px; border:1px solid var(--rule-strong);
  border-radius:6px; background:var(--surface); color:inherit; font:inherit; font-size:12px}
.remise .tdit{font-size:11px; color:var(--mute); line-height:1.35; flex:1 1 170px; min-width:0}
.remise .tdit.vide{color:var(--rouge)}
/* XVIII2 — lever un statut rouge. Le bloc se voit : le liseré rouge dit d'ou
   vient la couleur, et le texte a cote dit que la date n'y changera rien. Il
   est dans le volet CENTRAL, donc dans les trois repartitions. */
.lever{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:8px;
  padding:7px 9px; border-left:3px solid var(--rouge); background:var(--surface);
  border-radius:0 6px 6px 0}
.lever .tdit{font-size:11px; color:var(--mute); line-height:1.35; flex:1 1 170px; min-width:0}
.lever.fait{border-left-color:var(--brand)}
.lever.fait .tdit{color:var(--brand)}
/* XVIII10 — la date tolerante : le champ texte, le bouton calendrier, et ce
   que l'ecran DIT quand la date tombe hors de l'exercice (il avertit, il ne
   bloque pas). */
.dat{display:flex; align-items:center; gap:5px; flex-wrap:wrap}
.dat input[type=text]{width:108px}
.dat input[type=date]{width:130px}
.dat .tdit{flex:1 1 100%; font-size:11px; color:var(--mute); line-height:1.35;
  min-height:0}
.dat .tdit.vide{color:var(--orange)}
/* XVIII7 — rejouer la regle : les trois portees, et l'apercu qui dit combien
   AVANT d'ecrire. Le bloc n'apparait qu'une fois la regle posee. */
.rejeu{margin-top:8px; padding:8px 9px; border-left:3px solid var(--brand);
  background:var(--surface); border-radius:0 6px 6px 0}
.rejeu .tdit{font-size:11px; color:var(--mute); line-height:1.4; margin:3px 0}
.rejeu .tdit.vide{color:var(--orange)}
.rejeu-portees{display:flex; gap:6px; flex-wrap:wrap; margin-top:5px}
.rejeu-apercu{margin-top:7px; padding-top:7px; border-top:1px solid var(--rule)}
.rejeu-liste{margin:4px 0 7px; padding-left:15px; font-size:11px;
  color:var(--mute); line-height:1.45; max-height:190px; overflow:auto}
/* XVIII2 — les quatre issues d'une alerte ROUGE, dans « Ou est le feu ». */
.al-issues{margin:4px 0 0; padding-left:15px; font-size:11px; color:var(--mute);
  line-height:1.4}
/* XVI8 / A2 — la loupe ETENDUE, dans le volet central. Deux colonnes, une
   recherche, un panneau de detail. Quand il y a 736 comptes, la petite liste
   sous le champ ne suffit plus. */
.a2{display:flex; flex-direction:column; gap:8px; min-height:0}
.a2bar{display:flex; align-items:center; gap:8px}
.a2bar input{flex:1; min-width:0; height:28px; padding:0 9px; border-radius:99px;
  border:1px solid var(--rule-strong); background:var(--surface); color:inherit; font:inherit; font-size:12.5px}
.a2note{padding:6px 9px; border-radius:6px; background:var(--orange-soft); color:var(--orange); font-size:11.5px}
.a2cols{display:grid; grid-template-columns:1fr 1fr; gap:8px; min-height:0}
.a2col{display:flex; flex-direction:column; border:1px solid var(--rule); border-radius:7px; overflow:hidden; min-width:0}
.a2col > header{display:flex; align-items:center; gap:7px; padding:5px 8px; background:var(--surface-2);
  font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--mute); font-weight:700}
.a2col > header .cpt{font-size:11px; letter-spacing:0; text-transform:none}
.a2col > header .linkbtn{margin-left:auto; font-size:11.5px; text-transform:none; letter-spacing:0}
.a2liste{overflow:auto; max-height:240px}
.a2l{display:flex; align-items:baseline; gap:7px; padding:3px 8px; cursor:pointer; font-size:12px}
.a2l b{font-family:"IBM Plex Mono",monospace; font-weight:600; flex:none}
.a2l .llib{flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--mute)}
.a2l .lemp{flex:none; font-family:"IBM Plex Mono",monospace; font-size:10.5px; color:var(--mute)}
.a2l.on{background:var(--sel-soft)}
.a2l.mort{opacity:.55}
.a2det{display:grid; gap:5px; padding:8px 9px; border:1px solid var(--rule); border-radius:7px;
  background:var(--surface-2)}
.a2det .a2quoi{font-size:12.5px}
.a2det .a2quoi b{font-family:"IBM Plex Mono",monospace}
.a2det .tdit{font-size:11.5px; color:var(--mute); line-height:1.4}
.a2det .btn{justify-self:start}
.a2impossible{padding:6px 8px; border-radius:6px; background:var(--rouge-soft); color:var(--rouge);
  font-size:11.5px; line-height:1.4}
@media (max-width:760px){ .a2cols{grid-template-columns:1fr} }
/* X2 — les actions en lot : seulement quand il y a une selection. */
.enlot{display:flex; align-items:center; gap:8px; padding:6px 10px; border-bottom:1px solid var(--rule); background:var(--sel-soft); font-size:12px}
/* 29/09 (entree 169) — la barre des gestes en lot PASSE A LA LIGNE. Dans la
   colonne de la liste (310 px, 212 a 1366), « Inclure, Exclure, Marquer vues,
   Meme compte, Remettre, Deselectionner » sortaient du cadre : on ne voyait
   que les trois premiers (vu par le cabinet en simulation). */
.enlot{flex-wrap:wrap; gap:5px}
.enlot > b{flex-basis:100%}
.relu3 .cote.liste .enlot{display:grid; grid-template-columns:1fr 1fr; gap:4px}
.relu3 .cote.liste .enlot > b{grid-column:1 / -1}
.relu3 .cote.liste .enlot .btn{height:24px; padding:0 6px; font-size:11px; justify-content:flex-start; min-width:0;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.relu3 .cote.liste .enlot .linkbtn{justify-self:start; align-self:center}
/* Vue tableau : toute la largeur, une seule ligne. */
.relu3.tableau .cote.liste .enlot{display:flex; flex-wrap:wrap}
.relu3.tableau .cote.liste .enlot > b{flex-basis:auto; margin-right:6px}
/* XI3 — l'editeur de journal. */
/* S1 (XVI3, 16/09/2026) — LES LARGEURS. Six colonnes sans largeur imposee :
   le navigateur sert d'abord celles dont le contenu a une taille propre, et la
   seule colonne qui contient une PHRASE recoit les restes. Mesure au banc le
   16/09, sur « Deplacements, missions et receptions » (36 caracteres) : le
   champ Libelle faisait 98 px a 1920, 73 a 1600, 55 a 1366 — six caracteres
   lisibles sur trente-six. On impose donc table-layout:fixed, plus des
   largeurs aux colonnes COURTES : le Libelle prend tout le reste.

   ET UN PLANCHER, sans quoi le remede est pire. Mesure du 16/09 : avec les
   seules largeurs fixes, le Libelle tombe a 68 px a 1600 et **18 px** a 1366 —
   les colonnes courtes sont rigides et le reste se reduit a rien. `min-width`
   sur la table donne au Libelle un plancher a toute largeur ; en dessous, la
   grille defile horizontalement dans son propre cadre plutot que d'affamer la
   seule colonne qui porte une phrase. Le volet central de 346 px a 1366 ne
   peut PAS tenir compte + phrase + taux + debit + credit : c'est la
   repartition R2 « Saisir » (XVI5) qui lui donne de la place. */
.jgridx{overflow-x:auto; scrollbar-width:thin}
.jgrid{width:100%; min-width:560px; border-collapse:collapse; font-size:12.5px;
  margin-top:4px; table-layout:fixed}
.jgrid col.c-compte{width:100px} .jgrid col.c-cat{width:104px} .jgrid col.c-tva{width:64px}
.jgrid col.c-debit{width:78px} .jgrid col.c-credit{width:78px}
.jgrid col.c-sup{width:22px}
/* S3 — le compte POSE son libelle : gris tant que personne n'a ecrit dedans,
   encre pleine des qu'on tape. Une seule chose decide, et c'est la meme des
   deux cotes (XVI1 tranche a l'envoi). */
.jgrid td input.pose{color:var(--mute); font-style:italic}
.jgrid th{font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--mute); text-align:left; padding:4px 5px;
  border-bottom:1px solid var(--rule-strong); font-weight:700}
.jgrid th.num{text-align:right}
.jgrid td{padding:3px 4px; border-bottom:1px solid var(--rule); white-space:nowrap; overflow:hidden}
.jgrid td input{width:100%; font:inherit; font-size:12.5px; height:28px; padding:0 6px; border:1px solid var(--rule-strong);
  border-radius:5px; background:var(--surface); color:inherit}
.jgrid td.num input{text-align:right; font-family:"IBM Plex Mono",monospace}
.jgrid td.cpt input{font-family:"IBM Plex Mono",monospace}
.jgrid td.tva input{text-align:right}
.jgrid td.tva select{width:100%; height:28px; font:inherit; font-size:12px; padding:0 2px;
  border:1px solid var(--rule-strong); border-radius:5px; background:var(--surface); color:inherit}
.jgrid td.tva .mute{display:block; text-align:right; padding-right:6px}
.jgrid tr.ltiers td{background:var(--brand-soft)}
.jgrid tr.ltva td{background:var(--surface-2)}
.jgrid .sup{border:0; background:none; color:var(--mute); cursor:pointer; font-size:14px; padding:0 4px}
.jgrid .sup:disabled{opacity:.3; cursor:not-allowed}
.jgrid tfoot td{font-weight:700; border-bottom:0; padding-top:6px}
.jgrid tfoot .ok{color:var(--vert)} .jgrid tfoot .ko{color:var(--rouge)}
.jgrid tfoot .num{text-align:right; font-family:"IBM Plex Mono",monospace}
.jbar{display:flex; gap:8px; align-items:center; margin-top:8px; flex-wrap:wrap}
.jbar label.regle{margin-left:auto}
/* RL3 (27/09) — la categorie SUR LA LIGNE : une pastille, un clic ouvre le
   panneau C. « ? » quand aucune n'a ete lue pour cette ligne. */
.jgrid td.cat{overflow:hidden}
.jgrid .catp{width:100%; height:26px; border:1px solid var(--brand); border-radius:13px; background:var(--brand-soft);
  color:var(--brand); font:inherit; font-size:11.5px; font-weight:700; padding:0 6px; cursor:pointer;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-align:left}
.jgrid .catp.vide{border-color:var(--orange); background:var(--orange-soft); color:var(--orange); text-align:center}
.jgrid td.cat .mute{font-size:11px}
/* Le panneau C, dans le volet de l'ecriture : la liste et la piece restent
   sous les yeux (comme la loupe etendue A2). */
.catpan{display:flex; flex-direction:column; gap:8px; min-height:0}
.cattete{display:flex; align-items:center; gap:8px}
.cattete .mono{font-size:11.5px; color:var(--mute)} .cattete .btn{margin-left:auto}
.catreconnu{font-size:12px; padding:6px 8px; background:var(--surface-2); border-radius:7px}
.catpan #cQ{height:28px; border:1px solid var(--rule-strong); border-radius:6px; padding:0 8px; font:inherit; font-size:12px;
  background:var(--surface); color:inherit}
.catliste{display:flex; flex-direction:column; border:1px solid var(--rule); border-radius:8px; overflow:auto; max-height:52vh}
.catfam{font-size:10px; letter-spacing:.08em; text-transform:uppercase; color:var(--mute); font-weight:700; padding:8px 10px 2px}
.catrow{display:grid; grid-template-columns:minmax(0,1fr) 72px 118px; gap:8px; align-items:center; text-align:left;
  border:0; background:transparent; font:inherit; font-size:12px; padding:6px 10px; cursor:pointer; color:inherit}
.catrow:hover{background:var(--surface-2)} .catrow.on{background:var(--brand-soft)}
.catrow .catnom{min-width:0} .catrow .catnom .mono{font-size:10.5px}
.catrow .catquoi{display:block; font-size:11px; color:var(--mute); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.catrow .chip{justify-self:start; font-size:10.5px}
.catmots{margin:0 10px 8px; padding:8px 10px; background:var(--surface-2); border-radius:8px; display:flex; flex-direction:column; gap:6px; font-size:11.5px}
.catmots .lbl{font-size:10px; letter-spacing:.08em; text-transform:uppercase; font-weight:700}
.catchips{display:flex; flex-wrap:wrap; gap:6px; align-items:center}
.catchips .chip button{border:0; background:transparent; color:var(--mute); cursor:pointer; padding:0}
.catchips input{height:24px; width:140px; font:inherit; font-size:12px; border:1px solid var(--rule-strong); border-radius:5px; padding:0 6px;
  background:var(--surface); color:inherit}
.catpied{display:flex; flex-wrap:wrap; gap:8px 12px; align-items:center; font-size:12px; padding-top:6px; border-top:1px solid var(--rule)}
.catpied #cRegle{margin-left:auto}
/* RL4 (27/09) — le tri par l'en-tete, l'etat de relecture, le tiroir des
   exclues, le menu d'une ligne. */
.relu3 .cote.liste{position:relative}
.rangs-tete{display:flex; gap:2px; padding:4px 8px; border-bottom:1px solid var(--rule); background:var(--surface); flex-wrap:wrap}
.rangs-tete button{border:0; background:transparent; font:inherit; font-size:10.5px; letter-spacing:.06em;
  text-transform:uppercase; color:var(--mute); font-weight:700; cursor:pointer; padding:2px 5px; border-radius:4px}
.rangs-tete button:hover{background:var(--surface-2)}
.rangs-tete button.on{color:var(--ink); background:var(--surface-2)}
.rangs-tete button.retour{margin-left:auto; text-transform:none; letter-spacing:0; font-weight:400}
.fl-etats{display:flex; gap:5px; flex-wrap:wrap}
.relu3 .progres{color:var(--mute); font-family:"IBM Plex Mono",monospace; font-size:12px}
.lignes.rangs td.etat button{border:0; background:transparent; color:inherit; font:inherit; cursor:pointer;
  width:100%; height:30px; padding:0; border-radius:4px}
.lignes.rangs td.etat button:hover{background:var(--surface-2)}
.lignes.rangs td.etat.vue{color:var(--vert)}
details.exclues{border-top:1px solid var(--rule); padding:5px 10px; font-size:12px; background:var(--surface)}
details.exclues > summary{cursor:pointer; color:var(--mute)}
details.exclues .exclue{display:flex; justify-content:space-between; gap:8px; padding:3px 0}
.menuligne{position:absolute; z-index:5; display:flex; flex-direction:column; min-width:210px; background:var(--surface);
  border:1px solid var(--rule-strong); border-radius:8px; box-shadow:0 6px 18px rgba(0,0,0,.14); padding:4px}
.menuligne button{display:flex; justify-content:space-between; gap:12px; border:0; background:transparent; font:inherit;
  font-size:12.5px; text-align:left; padding:6px 8px; border-radius:5px; cursor:pointer; color:inherit}
.menuligne button:hover:not(:disabled){background:var(--surface-2)}
.menuligne button:disabled{opacity:.45; cursor:not-allowed}
.relu3 .detail .remise select, .relu3 .detail .remise input{height:26px; font-size:12px}
/* RL5 (27/09) — « Ce qui va changer » : un tiroir a droite, avant le clic
   final. La liste et la piece restent derriere, rien n'est ecrit. */
.tiroirF{position:fixed; top:0; right:0; bottom:0; width:min(560px, 92vw); z-index:20; overflow:auto;
  background:var(--surface); border-left:1px solid var(--rule-strong); box-shadow:-10px 0 28px rgba(0,0,0,.16);
  padding:14px 16px; display:flex; flex-direction:column; gap:10px; font-size:12.5px}
.tiroirF .ftete{display:flex; align-items:center; gap:8px} .tiroirF .ftete .btn{margin-left:auto}
.tiroirF .frefus{background:var(--rouge-soft); color:var(--rouge); border-radius:7px; padding:7px 9px; font-weight:700}
.tiroirF .fecr{border:1px solid var(--rule); border-radius:8px; padding:8px 10px; display:flex; flex-direction:column; gap:5px}
.tiroirF .fecr-tete{display:flex; align-items:center; gap:6px; flex-wrap:wrap}
.tiroirF .fgeste{display:grid; grid-template-columns:96px minmax(0,1fr) auto; gap:8px; align-items:center;
  font-family:"IBM Plex Mono",monospace; font-size:12px}
.tiroirF .fgeste s{color:var(--mute)}
.tiroirF .fraison{font-size:11.5px}
.tiroirF .fcontroles{display:flex; flex-direction:column; gap:4px; padding-top:6px; border-top:1px solid var(--rule)}
.tiroirF .fc.ok{color:var(--vert)} .tiroirF .fc.av{color:var(--orange)} .tiroirF .fc.ko{color:var(--rouge)}
.tiroirF .fpied{display:flex; align-items:center; gap:10px; margin-top:auto; padding-top:8px; border-top:1px solid var(--rule)}
.tiroirF .fpied .btn{margin-left:auto}
/* Sous la piece : le mot reconnu (RL3) ; RL6 y mettra « lu sur la piece ». */
.pieceLu{border-top:1px solid var(--rule); padding:7px 10px; font-size:12px; background:var(--surface)}
/* RL7 — la confirmation du renommage, sur place. */
.relu3 .detail .renommer{background:var(--brand-soft); border-radius:7px; padding:7px 9px; font-size:12px; line-height:1.5}
.relu3 .detail .champs3 input#fNum:disabled{background:var(--surface-2); color:var(--mute)}
/* RL6 (27/09) — « lu sur la piece » : un bouton par champ lu ; le survol entoure
   la zone sur la page, le clic reporte dans le champ. */
.pieceLu{display:flex; flex-wrap:wrap; gap:6px 10px; align-items:center}
.pieceLu .lbl{font-size:10px; letter-spacing:.08em; text-transform:uppercase; color:var(--mute); font-weight:700}
.pieceLu button{border:1px solid var(--rule); background:var(--surface); border-radius:6px; font:inherit; font-size:12px;
  padding:2px 7px; cursor:pointer; color:inherit}
.pieceLu button:hover{border-color:var(--brand); background:var(--brand-soft)}
.pieceLu button.absent{color:var(--mute); border-style:dashed}
.pieceLu .motlu{font-size:12px}
.piece .pagecadre{position:relative; width:calc(100% * var(--zoom, 1))}
.piece .pagecadre img{width:100%}
.piece .zonelue{position:absolute; border:3px solid var(--brand); background:rgba(14,102,86,.14);
  border-radius:3px; pointer-events:none; box-sizing:content-box; margin:-4px 0 0 -4px; padding:2px}
/* RL1 (27/09) — le bloc des montants, V2 : le TTC de la piece tape une fois,
   une ligne par taux, et ce qui reste a ventiler. La forme ne change pas avec
   le nombre de taux. Densite de la decision du cabinet : 12 px, etiquettes a
   10 px, champs de 26 px, 30 px pour le TTC. */
.v2{border:1px solid var(--rule-strong); border-radius:8px; padding:8px 10px; margin:6px 0 4px;
  background:var(--surface-2); display:flex; flex-direction:column; gap:6px; font-size:12px}
.v2-tete{display:grid; grid-template-columns:150px 1fr; gap:10px; align-items:start}
.v2-ttc{display:flex; flex-direction:column; gap:2px}
.v2-ttc span, .v2-taux th{font-size:10px; letter-spacing:.08em; text-transform:uppercase; color:var(--mute); font-weight:700}
.detail .v2-ttc input[type=text], .v2-ttc input{height:30px; font-size:15px; font-weight:700; text-align:right; border:2px solid var(--brand);
  border-radius:6px; padding:0 8px; font-family:"IBM Plex Mono",monospace; background:var(--surface); color:inherit}
.v2-dit{color:var(--mute); line-height:1.45; padding-top:14px}
.v2-ok{color:var(--vert); font-weight:700} .v2-ko{color:var(--orange); font-weight:700}
.v2-taux{width:100%; border-collapse:collapse; table-layout:fixed}
.v2-taux th{text-align:left; padding:2px 4px} .v2-taux th.num{text-align:right}
.v2-taux th:first-child{width:128px} .v2-taux th:last-child{width:22px}
.v2-taux td{padding:2px 4px}
.detail .v2-taux input[type=text], .v2-taux input, .v2-taux select, .v2-pied select{width:100%; height:26px; font:inherit; font-size:12px; padding:0 6px;
  border:1px solid var(--rule-strong); border-radius:5px; background:var(--surface); color:inherit}
.v2-taux input.num{text-align:right; font-family:"IBM Plex Mono",monospace}
.v2-taux .v2-exo{display:block; text-align:right; color:var(--mute); padding-right:6px}
.v2-taux .sup{border:0; background:none; color:var(--mute); cursor:pointer; font-size:14px; padding:0 4px}
.v2-pied{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.v2-pied select{width:auto; color:var(--mute)}
.v2-somme{margin-left:auto; color:var(--mute); font-family:"IBM Plex Mono",monospace; font-size:11.5px}
/* La piece, et son zoom. */
.piece .corps{cursor:zoom-in; background:#8E9794}
.piece .corps.zoome{cursor:grab}
.piece .corps.tire{cursor:grabbing}
.piece img{display:block; width:calc(100% * var(--zoom, 1)); height:auto; max-width:none}
.piece .nav{margin-left:auto; display:flex; gap:6px; align-items:center}
.piece .nav .z{font-variant-numeric:tabular-nums; min-width:44px; text-align:right; color:var(--mute)}
.piece .nav button{border:1px solid var(--rule-strong); background:var(--surface); border-radius:5px; cursor:pointer; padding:1px 8px; font:inherit; color:inherit}
.barre{display:flex; gap:10px; align-items:center; margin-top:10px; flex-wrap:wrap}
.barre .info{color:var(--mute); font-size:12.5px}
/* 29/09 (entree 167) — envoyer depuis la relecture ; les lots envoyes, ranges. */
.envoibar{display:inline-flex; align-items:center; gap:8px; margin-left:12px}
details.lots-envoyes{margin-top:10px}
details.lots-envoyes > summary{cursor:pointer; color:var(--mute); font-weight:700}
details.lots-envoyes .card{opacity:.7}
/* 29/09 (entree 165) — la vue tableau : la liste prend toute la largeur. */
.relu3 .cote.liste > header #bVue{margin-left:6px; height:22px; padding:0 8px; font-size:11px}
.relu3.tableau{grid-template-columns:1fr}
.relu3.tableau .cote.piece, .relu3.tableau .cote.journal{display:none}
.relu3.tableau .cote.liste{grid-column:1; grid-row:auto}
.relu3.tableau .cote.liste .fl-outils{flex-wrap:nowrap}
.relu3.tableau .cote.liste .fl-outils .fq{flex:1 1 auto}
.relu3.tableau .cote.liste .fl-outils .fl-tri{flex:none; max-width:200px}
.lignes.tableauv{width:100%; border-collapse:collapse; font-size:12.5px}
.lignes.tableauv th{position:sticky; top:0; background:var(--surface); font-size:10.5px; letter-spacing:.06em;
  text-transform:uppercase; color:var(--mute); text-align:left; padding:6px 8px; border-bottom:1px solid var(--rule); z-index:1}
.lignes.tableauv th.num, .lignes.tableauv td.num{text-align:right; font-family:"IBM Plex Mono",monospace}
.lignes.tableauv td{padding:4px 8px; border-bottom:1px solid var(--rule); vertical-align:middle; white-space:nowrap}
.lignes.tableauv th.sel, .lignes.tableauv td.sel{width:30px; padding:0 8px}
.lignes.tableauv td.sel input{display:inline-block; margin:0}
.lignes.tableauv td.quoi{color:var(--mute); max-width:260px; overflow:hidden; text-overflow:ellipsis}
.lignes.tableauv td.raison{color:var(--orange); font-size:11.5px; max-width:320px; overflow:hidden; text-overflow:ellipsis}
.lignes.tableauv input.tcompte{width:92px; height:24px; border:1px solid var(--rule-strong); border-radius:6px; padding:0 6px;
  background:var(--surface); color:var(--ink)}
.lignes.tableauv input.tcompte.change{border-color:var(--brand); background:var(--brand-soft)}
.lignes.tableauv tr{cursor:pointer}
.lignes.tableauv tr:hover td{background:var(--surface-2)}
/* 29/09 (entree 164) — la barre d'etat du lot, les onglets, Filtrer, le tri. */
.etatlot{display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:0 0 6px; padding:6px 12px;
  border:1px solid var(--rule); border-radius:var(--radius); background:var(--surface); font-size:12.5px}
.etatlot .pp{display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:4px; vertical-align:1px}
.etatlot .pp.vert{background:var(--vert)} .etatlot .pp.orange{background:var(--orange)}
.etatlot .fecl{color:var(--rouge); font-weight:700}
.etatlot details.sansecr > summary{list-style:none; cursor:pointer}
.etatlot details.sansecr > summary::-webkit-details-marker{display:none}
.etatlot details.sansecr[open]{flex-basis:100%; background:var(--surface-2); border-radius:7px; padding:6px 10px}
.etatlot details.sansecr .pourquoi{display:block; margin-top:5px}
.etatlot details.sansecr .pourquoi span{display:block; font-size:11.5px}
.fl-onglets{display:flex; gap:0; border-bottom:1px solid var(--rule); margin:0 -8px; overflow-x:auto; scrollbar-width:none}
.fl-onglets::-webkit-scrollbar{display:none}
.fl-onglets button{border:0; background:none; font:inherit; font-size:12px; font-weight:700; color:var(--mute);
  padding:6px 8px 5px; border-bottom:2px solid transparent; cursor:pointer; white-space:nowrap}
.fl-onglets button b{font-family:"IBM Plex Mono",monospace; font-weight:600; margin-left:2px}
.fl-onglets button.on{color:var(--brand); border-bottom-color:var(--brand)}
/* La recherche a sa ligne ; « Filtrer » et le tri la suivante : dans une
   colonne de 212 px, les trois sur une ligne ecrasaient la recherche. */
.relu3 .cote.liste .fl-outils{flex-wrap:wrap}
.relu3 .cote.liste .fl-outils .fq{flex:1 1 100%}
.relu3 .cote.liste .fl-outils .fl-tri{flex:1 1 auto; max-width:none}
.fl-outils .fl-bouton{flex:none; height:24px}
.fl-outils .fl-bouton.on{border-color:var(--brand); color:var(--brand)}
.fl-outils .fl-tri{flex:none; height:24px; max-width:118px; border:1px solid var(--rule-strong); border-radius:7px;
  background:var(--surface); color:var(--ink); font:inherit; font-size:11.5px}
.fl-pop{display:grid; gap:4px; padding:6px 0 2px; border-top:1px dashed var(--rule)}
.fl-pop[hidden]{display:none}
.fl-titre{font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:var(--mute); font-weight:700}
/* 29/09 (entree 163) — le panneau categorie : la categorie de la ligne en
   haut, son compte modifiable, la portee, ses mots. */
/* La liste des autres categories garde de quoi se lire : sous le bloc de la
   categorie choisie, la colonne la ratatinait a 2 px (vu en simulation). */
.catpan .catliste{flex:0 0 auto; min-height:180px}
.catpan .catchoisie{padding:10px 12px; background:var(--brand-soft); border-bottom:1px solid var(--rule)}
.catpan .catgrand{font-size:15px; font-weight:700}
.catpan .catcompte{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:8px}
.catpan .catcompte input{width:110px; height:28px; border:1px solid var(--rule-strong); border-radius:7px; padding:0 8px;
  background:var(--surface); color:var(--ink); font-family:"IBM Plex Mono",monospace}
.catpan .catlib{color:var(--mute); font-size:12px}
.catpan .catportee{display:flex; gap:14px; flex-wrap:wrap; margin-top:8px; font-size:12px}
.catpan .catchoisie .catmots{margin-top:8px; padding:0; background:transparent; border:0}
.catpan .catchips .chip.neuf{border-color:var(--brand); background:var(--surface); color:var(--brand)}
.catpan .catchips input{height:24px}
.catpan .catdit{margin-top:4px; font-size:12px; color:var(--brand); font-weight:700}
/* 29/09 (entree 162) — la loupe d'une charge voit tout le plan. */
.loupecpt .lclasses{display:flex; gap:3px; flex-wrap:wrap; padding:5px 8px; border-bottom:1px solid var(--rule)}
.loupecpt .lclasses .chip{height:20px; padding:0 7px; font-size:11px; cursor:pointer; font-family:"IBM Plex Mono",monospace}
.loupecpt .lclasse{font-size:10.5px; font-weight:700; color:var(--orange); background:var(--orange-soft);
  border-radius:4px; padding:0 5px; margin-left:auto; white-space:nowrap}
.kbd{display:flex; gap:10px; flex-wrap:wrap; font-size:11.5px; color:var(--mute); padding:6px 10px; border-top:1px solid var(--rule); background:var(--surface)}
.kbd kbd{font-family:"IBM Plex Mono",monospace; border:1px solid var(--rule-strong); border-radius:4px; padding:0 5px; background:var(--surface-2); color:var(--ink); font-size:11px}

/* ---------------------------------------------------------------- les alertes du dossier, ou est le feu (IX) */
.alertes{display:flex; flex-direction:column; gap:4px}
.al-t{display:flex; align-items:center; gap:8px; margin:16px 0 4px; font-size:11px; letter-spacing:.1em; text-transform:uppercase; font-weight:700}
.al-t span{font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums; letter-spacing:0; background:var(--surface-2);
  color:var(--mute); border-radius:99px; padding:1px 8px; text-transform:none}
.al-t.deja_au_fec, .al-t.rouge{color:var(--rouge)} .al-t.violet{color:var(--violet)} .al-t.fec_double{color:var(--orange)} .al-t.pret{color:var(--mute)}
table.t tr.al-l > td:first-child{box-shadow:inset 3px 0 0 var(--rule-strong)}
table.t tr.al-l.deja_au_fec > td:first-child, table.t tr.al-l.rouge > td:first-child{box-shadow:inset 3px 0 0 var(--rouge)}
table.t tr.al-l.violet > td:first-child{box-shadow:inset 3px 0 0 var(--violet)}
table.t tr.al-l.fec_double > td:first-child{box-shadow:inset 3px 0 0 var(--orange)}
/* La table du feu est en largeur FIXE : c'est le nom du lot qui se coupe, pas l'information. */
table.t.fixe{table-layout:fixed}
table.t.fixe td{overflow-wrap:anywhere}

/* XVII7 — le cycle de vie d'une alerte. Une alerte CLASSEE ne disparait pas :
   elle palit. Rien n'est supprime, et « montrer les classees » les retrouve
   toutes — c'est la difference entre archiver et effacer. */
.feu-export{display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin:0 0 6px}
.feu-export .etats{display:flex; gap:6px; flex-wrap:wrap}
.feu-classees{display:flex; align-items:center; gap:6px; font-size:12.5px; color:var(--mute); cursor:pointer}
.feu-export .btn{margin-left:auto}
.al-d{margin-top:4px; font-size:11.5px; color:var(--mute); line-height:1.4}
.al-g{font-size:12px; color:var(--brand)}
.seg.sm button{padding:3px 8px; font-size:11px}
tr.al-l.classee > td, .alert.classee{opacity:.55}
/* XVIII8 — les OPERATIONS d'un constat, depliees au clic. Aucune donnee
   nouvelle : elles etaient deja dans le cache, l'ecran les jetait. */
.ops{margin-top:6px; border:1px solid var(--rule); border-radius:6px; overflow:auto;
  max-height:320px}
.ops table{margin:0; font-size:11.5px}
.ops th{position:sticky; top:0; background:var(--surface); z-index:1}
.ops tr.classee > td{opacity:.55}
.alert.classee{background:var(--surface-2)}

/* ---------------------------------------------------------------- les couts (VIII) : table.t et .card */
table.t tr.ventil > td{background:var(--surface-2); padding:4px 18px}
table.t tr.ventil table.t{margin:8px 0; font-size:12px}
table.t tr.cache td{color:var(--vert); border-bottom:0}

/* ---------------------------------------------------------------- le volet de saisie et le bandeau (VII) */
.volet{position:fixed; inset:0; z-index:60; display:flex; justify-content:flex-end; background:rgba(22,32,31,.28)}
.voletBoite{width:min(420px, 100%); height:100%; overflow:auto; background:var(--surface); border-left:1px solid var(--rule);
  box-shadow:var(--shadow); padding:24px 24px 20px; display:flex; flex-direction:column; gap:8px}
.voletBoite h3{margin:0 0 2px; font-size:17px}
.voletBoite label{font-size:11.5px; font-weight:700; color:var(--mute); letter-spacing:.02em}
.voletBoite input[type=text]{height:36px; font-size:15px; padding:0 12px; border:1px solid var(--rule-strong); border-radius:7px;
  background:var(--surface); color:var(--ink); font-family:inherit}
.voletBoite input[type=text]:focus{outline:2px solid var(--sel); outline-offset:1px}
.voletAide{margin:2px 0 0; font-size:12.5px; line-height:1.55; color:var(--mute); white-space:pre-line}
.voletBoite .btnrow{margin-top:6px}
.mot{position:fixed; left:50%; transform:translateX(-50%); bottom:22px; z-index:70; display:inline-flex; align-items:center; gap:10px;
  max-width:min(680px, calc(100vw - 32px)); background:var(--ink); color:var(--ground); padding:9px 12px 9px 14px;
  border-radius:9px; box-shadow:var(--shadow); font-size:12.5px; line-height:1.45}
.mot.grave{background:var(--rouge); color:#fff}
.mot button{border:0; background:transparent; color:inherit; cursor:pointer; font-size:19px; line-height:1; padding:0 4px; opacity:.7}
.mot button:hover{opacity:1}

/* ---------------------------------------------------------------- la fenetre de confirmation de l'envoi (VII3 : elle reste) */
dialog{border:0; border-radius:12px; padding:0; max-width:520px; width:calc(100% - 40px); background:var(--surface); color:var(--ink);
  box-shadow:0 20px 60px rgba(0,0,0,.35)}
dialog::backdrop{background:rgba(10,20,20,.55)}
.dlg{padding:22px 24px}
.dlg h3{margin:0 0 8px; font-size:17px; line-height:1.25}
.dlg p{margin:0 0 6px; color:var(--mute); font-size:13px}
.dlg .alert{margin-top:12px}
.dlg ul{margin:4px 0 0; padding-left:18px}

/* Les cartes des lots a relire, et ce qui reste de la relecture hors grille. */
.dejafec{color:var(--rouge)}
.feu-export{margin:0 0 8px}
#travailOuvrir{display:grid; gap:10px}
.suivis{display:grid; gap:10px; margin-bottom:12px}
.suivis:empty{display:none}
#topbar .search .ph{color:var(--mute); font-size:12.5px; display:flex; align-items:center; gap:6px}
#topbar .search .ph kbd{font-family:"IBM Plex Mono",monospace; border:1px solid var(--rule-strong); border-radius:4px; padding:0 5px; font-size:10.5px; background:var(--surface-2)}
#topbar button.search{cursor:pointer; text-align:left}

@media (max-width: 900px){
  .appli{flex-direction:column}
  .rail{width:100%; height:auto; max-height:40vh; position:static; border-right:0; border-bottom:1px solid #0A100F}
}

/* Le raccourci vers /acces : un lien, pas un bouton — il change de page.
   Il se tient a cote du nom, discret, et ne se voit que de l'administrateur.
   Il ne porte PAS `.who` : cette classe a `margin-left:auto`, et deux
   elements qui la portent se collent l'un a l'autre — le second n'a plus
   d'espace libre a pousser. */
#topbar .lien-acces{margin-left:14px; font-size:12px; color:var(--mute);
                    white-space:nowrap; text-decoration:none; cursor:pointer}
#topbar .lien-acces:hover{text-decoration:underline}

/* La marque du parametrage dans le rail (entree 65). Discrete : elle dit
   qu'un dossier n'est pas pret, elle ne raconte pas pourquoi — le titre du
   survol et l'onglet Parametrage le font. */
.rl .rl-pa { margin-left: auto; font-size: 10px; padding: 1px 5px; }
.rl .rl-pa + .rl-n { margin-left: 4px; }

/* La pastille « sans ecriture » de la relecture : meme forme que « deja au
   FEC », meme rouge que le journal vide — c'est le meme fait vu de deux
   cotes. */
.fl .fp.vide { border-color: var(--rouge); color: var(--rouge); }
.fl .fp.vide.on { background: var(--rouge); color: #fff; }

/* « remise » : le PDF est reparti dans a_traiter/, l'ecriture reste au lot
   pour memoire. Discret et gris — ce n'est pas une alerte, c'est un etat. */
.tagremis{font-size:9.5px; font-weight:700; letter-spacing:.04em;
  text-transform:uppercase; padding:1px 4px; border-radius:3px;
  background:var(--surface-2); color:var(--muted)}

/* La table de TVA de l'onglet Parametrage. Deux tableaux qui se lisent d'un
   coup d'oeil : le taux a gauche, le compte a cote, sa provenance ensuite. */
.tvasens{margin-top:14px}
.tvasens .t td{padding:4px 8px}
.tvasens input{width:100%; max-width:130px}
.tvasens .l{display:flex; gap:8px; align-items:center; margin-top:8px; flex-wrap:wrap}
.tvasens .l input{max-width:190px}

/* ---------------------------------------------------------------- l'onglet Pieces, deux vues (arrangement 2, 25/09/2026)
   Le segment « Par famille / Par arrivee », les filtres de la vue par arrivee,
   la ligne d'une piece (vignette, nom, identifiant), l'apercu a cote de la
   table. Les classes portent `pan-` : `.piece` est deja pris par la relecture
   (son <img> prend toute la largeur), et une vignette de 30 px n'en veut pas. */
.filtres{display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding-bottom:10px; margin-bottom:10px; border-bottom:1px solid var(--rule)}
.filtres .seg{flex:none}
.seg .b{margin-left:5px; background:var(--surface-2); border-radius:99px; padding:0 6px; font-family:"IBM Plex Mono",monospace; font-size:10.5px; font-weight:400}
.seg button.on .b{background:var(--ground); color:var(--ink)}
.b.orange, .seg .b.orange, .subtabs .b.orange{background:var(--orange-soft); color:var(--orange)}
.fp{display:inline-flex; align-items:center; gap:5px; height:24px; padding:0 9px; border-radius:99px; font:inherit;
  font-size:11.5px; font-weight:700; border:1px solid transparent; background:var(--surface-2); color:var(--mute); cursor:pointer; white-space:nowrap}
.fp b{font-family:"IBM Plex Mono",monospace; font-weight:600; font-variant-numeric:tabular-nums}
.fp.on{border-color:currentColor; color:var(--ink)}
.fp.vorange{color:var(--orange); background:var(--orange-soft)}
.fp.vorange.on{color:var(--orange)}
.pan-table td{vertical-align:middle}
.pan-table tr.pan-cache{display:none}
.pan-table input[type="checkbox"]{width:16px; height:16px; margin:0}
.pan-piece{display:flex; align-items:center; gap:9px; min-width:0}
.pan-vig{width:30px; height:40px; object-fit:cover; object-position:top; border:1px solid var(--rule-strong); border-radius:3px;
  background:var(--surface-2); flex:none; cursor:zoom-in; display:inline-block}
.pan-n{min-width:0; display:grid; gap:1px}
.pan-nom{display:block; font-weight:700; max-width:280px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; cursor:pointer}
.pan-nom:hover{color:var(--brand); text-decoration:underline; text-underline-offset:3px}
.pan-id{font-family:"IBM Plex Mono",monospace; font-size:11px; color:var(--mute); font-variant-numeric:tabular-nums}
.pan-quand{font-family:"IBM Plex Mono",monospace; font-size:12px; color:var(--mute); white-space:nowrap; font-variant-numeric:tabular-nums}
.pan-src{display:block; font-size:11px; color:var(--mute); margin-top:2px}
.pan-table select{max-width:170px; font:inherit; font-size:12px; height:26px; border:1px solid var(--rule-strong); border-radius:6px; background:var(--surface); color:inherit; padding:0 4px}
.pan-gestes{display:inline-flex; gap:4px; white-space:nowrap}
.pan-duo{display:grid; grid-template-columns:minmax(0,1fr); gap:12px; align-items:start}
.pan-duo.ouvert{grid-template-columns:minmax(0,1.4fr) minmax(300px,.8fr)}
.pan-apercu{border:1px solid var(--rule); border-radius:var(--radius); background:var(--surface); overflow:hidden; position:sticky; top:8px}
.pan-apercu header{display:flex; align-items:center; gap:10px; padding:7px 10px; border-bottom:1px solid var(--rule); font-size:12px; color:var(--mute); min-height:31px}
.pan-apercu header b{color:var(--ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0}
.pan-apercu .mono{font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums; flex:none}
.pan-nav{margin-left:auto; display:flex; gap:4px; flex:none}
.pan-nav button{border:1px solid var(--rule-strong); background:var(--surface); border-radius:5px; cursor:pointer; padding:1px 8px; font:inherit; color:inherit; line-height:1.4}
.pan-nav button:disabled{opacity:.4; cursor:default}
.pan-apercu .corps{background:#8E9794; max-height:min(72vh, 900px); overflow:auto}
.pan-apercu img{display:block; width:100%; height:auto}
@media (max-width:1100px){ .pan-duo.ouvert{grid-template-columns:1fr} .pan-apercu{position:static} }

/* « Divers » dans la vue par famille (entree 84) : un groupe qu'on ne coche pas. */
.grp.gris{opacity:.85; border-style:dashed}
.grp.gris .grp-row{cursor:default}
.grp.gris .grp-row:hover{background:transparent}
.grp.gris .grp-row .btn{margin-left:8px}
.fp-sep{width:1px; height:18px; background:var(--rule-strong); margin:0 4px}
.pan-ouvrir{font-size:12px; color:var(--brand); text-decoration:underline; text-underline-offset:3px; margin-right:6px; white-space:nowrap}
.pan-attente{padding:14px; margin:0; color:#fff}
.pan-apercu .corps img{min-height:40px}
.pan-lu{display:block; font-size:11.5px; color:var(--ink); margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:320px}

/* ---------------------------------------------------------------- l'ecran de decoupage (entree 91)
   Les pages dans l'ordre, un rond entre deux pages (coupe / lien / hesitation),
   la liste des morceaux, l'apercu. Les classes portent `dec-`. */
.dec-tete{display:flex; align-items:flex-start; gap:14px}
.dec-tete .cpt{font-size:13px}
.dec-actions{margin-left:auto; display:flex; gap:8px; align-items:center; flex-wrap:wrap; justify-content:flex-end}
.dec-orange{color:var(--orange)}
.dec-corps{display:grid; grid-template-columns:minmax(0,1fr) 372px; gap:14px; align-items:start}
.dec-gauche{display:grid; gap:12px; min-width:0}
.dec-legende{display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; margin-bottom:8px}
.dec-legende .sub{margin:0; margin-left:auto}
.dec-legende i.dec-div{display:inline-flex; width:16px; height:16px; font-size:10px; margin:0 1px; vertical-align:middle; font-style:normal}
.dec-bande{display:flex; flex-wrap:wrap; align-items:center; gap:6px 0}
.dec-page{display:inline-flex; flex-direction:column; align-items:center; gap:2px; width:66px; padding:4px 0; border:1px solid var(--rule-strong); border-radius:4px; background:var(--surface); cursor:pointer}
.dec-page.on{border-color:var(--sel); background:var(--sel-soft)}
.dec-page img{width:56px; height:74px; object-fit:cover; object-position:top; border:1px solid var(--rule); background:var(--surface-2)}
.dec-num{font-family:"IBM Plex Mono",monospace; font-size:10px; color:var(--mute)}
.dec-div{width:22px; height:22px; margin:0 2px; border-radius:50%; border:0; font:inherit; font-size:12px; line-height:22px; padding:0; cursor:pointer; display:inline-flex; align-items:center; justify-content:center}
.dec-div.coupe{background:var(--ink); color:var(--ground)}
.dec-div.lien{background:var(--surface-2); color:var(--mute)}
.dec-div.hes{background:var(--orange-soft); color:var(--orange); font-weight:700; box-shadow:0 0 0 2px var(--orange)}
.dec-entete, .dec-ligne{display:grid; grid-template-columns:82px minmax(0,1fr) 210px 120px 132px; gap:0 10px; align-items:center; padding:6px; font-size:12.5px}
.dec-entete{font-size:10.5px; letter-spacing:.08em; text-transform:uppercase; color:var(--mute); font-weight:700; border-bottom:1px solid var(--rule-strong)}
.dec-ligne{border-bottom:1px solid var(--rule); border-radius:4px}
.dec-ligne.hes{background:#FBF5EA}
/* La FAMILLE en couleur, la meme partout (maquette C1, entree 102) : vert
   achat, bleu vente, orange divers, violet banque, gris ancienne. */
.dec-ligne{box-shadow:inset 4px 0 0 var(--rule-strong)}
.dec-ligne.fam-factures{box-shadow:inset 4px 0 0 var(--brand)}
.dec-ligne.fam-ventes{box-shadow:inset 4px 0 0 var(--sel)}
.dec-ligne.fam-a_qualifier{box-shadow:inset 4px 0 0 var(--orange)}
.dec-ligne.fam-releves{box-shadow:inset 4px 0 0 var(--violet)}
.dec-ligne.fam-anciennes{box-shadow:inset 4px 0 0 var(--mute)}
.dec-carre{display:inline-block; width:10px; height:10px; border-radius:2px; vertical-align:-1px; margin-right:4px; background:var(--rule-strong)}
.dec-carre.fam-factures{background:var(--brand)} .dec-carre.fam-ventes{background:var(--sel)} .dec-carre.fam-a_qualifier{background:var(--orange)}
.dec-carre.fam-releves{background:var(--violet)} .dec-carre.fam-anciennes{background:var(--mute)}
.dec-grille{display:grid; grid-template-columns:repeat(auto-fill, minmax(124px, 1fr)); gap:10px}
.dec-carte{position:relative; border:1px solid var(--rule-strong); border-radius:6px; background:var(--surface); overflow:hidden; display:grid}
.dec-carte.on{box-shadow:0 0 0 2px var(--sel)}
.dec-carte.vue{border-color:var(--ink)}
.dec-carte.hes{border:1px dashed var(--orange)}
.dec-bandeau{display:flex; justify-content:space-between; align-items:center; gap:4px; padding:3px 7px; font-size:10.5px; font-weight:700; letter-spacing:.06em; color:#fff; background:var(--rule-strong); white-space:nowrap}
.dec-bandeau .dec-pnum{font-weight:600; opacity:.9}
.fam-factures .dec-bandeau{background:var(--brand)} .fam-ventes .dec-bandeau{background:var(--sel)}
.fam-a_qualifier .dec-bandeau{background:var(--orange)} .fam-releves .dec-bandeau{background:var(--violet)} .fam-anciennes .dec-bandeau{background:var(--mute)}
.dec-carte img{display:block; width:100%; height:120px; object-fit:cover; object-position:top; background:var(--surface-2); cursor:zoom-in}
.dec-carte .dec-coche{position:absolute; top:30px; left:8px; width:18px; height:18px; margin:0; cursor:pointer}
.dec-pied{font-size:11px; padding:4px 7px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.dec-pied .sub{margin:0; display:inline}
.dec-barre{display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:10px; padding:8px 12px; border-radius:8px; background:var(--rail); color:var(--rail-ink); font-size:12.5px}
.dec-barre .sep{width:1px; height:22px; background:var(--rail-mute); opacity:.5}
.dec-barre .dec-pousse{flex:1}
.dec-barre button{height:30px; padding:0 11px; border:1px solid var(--rail-mute); border-radius:6px; background:transparent; color:#fff; font:inherit; font-size:12.5px; cursor:pointer}
.dec-barre button:disabled{opacity:.4; cursor:default}
.dec-barre button.ghost{border-color:transparent; color:var(--rail-ink)}
.dec-barre button.dec-fam{border:0; font-weight:700; letter-spacing:.04em; background:var(--rule-strong); color:#fff}
.dec-barre button.dec-fam.fam-factures{background:var(--brand)} .dec-barre button.dec-fam.fam-ventes{background:var(--sel)}
.dec-barre button.dec-fam.fam-a_qualifier{background:var(--orange)} .dec-barre button.dec-fam.fam-releves{background:var(--violet)} .dec-barre button.dec-fam.fam-anciennes{background:var(--mute)}
.dec-ligne .sub{margin:0; font-size:11px; display:block}
.dec-lu{min-width:0; display:grid; gap:1px}
.dec-lu b{overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.dec-ligne select{max-width:170px; font:inherit; font-size:12px; height:26px; border:1px solid var(--rule-strong); border-radius:6px; background:var(--surface); color:inherit; padding:0 4px}
.dec-src{margin-top:2px}
.dec-montant{font-variant-numeric:tabular-nums}
.dec-gestes{display:flex; gap:4px; justify-content:flex-end; white-space:nowrap}
.dec-apercu{position:sticky; top:8px}
.dec-apercu .corps{max-height:min(60vh, 720px)}
.dec-sous{padding:8px 10px; border-top:1px solid var(--rule); margin:0}
@media (max-width:1100px){ .dec-corps{grid-template-columns:1fr} .dec-apercu{position:static} }

/* Entree 113 — l'ecran Preparer avec son devis (maquette A), les pieces au
   fil de l'eau (B), le journal de la piece (C). */
.dvGrille{display:grid; grid-template-columns:minmax(0,1.6fr) minmax(220px,1fr); gap:14px}
@media (max-width:760px){ .dvGrille{grid-template-columns:1fr} }
.dvGrille h5{margin:0 0 8px; font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--mute)}
.dvListe{max-height:50vh; overflow:auto}
.dvLigne{display:grid; grid-template-columns:20px minmax(0,1fr) minmax(0,1.4fr); gap:8px; align-items:center;
  padding:6px 0; border-bottom:1px solid var(--rule); cursor:pointer}
.dvLigne.off{opacity:.55}
.dvLigne .nom, .suiviPiece .nom{font-family:var(--mono, monospace); font-size:12px; overflow:hidden;
  text-overflow:ellipsis; white-space:nowrap}
/* 8b (entree 142) : dans le devis, le nom ENTIER puis la raison dessous. */
.dvLigne{grid-template-columns:20px minmax(0,1fr)}
.dvLigne .dvTexte{display:flex; flex-direction:column; gap:2px; min-width:0}
.dvLigne .dvTexte .nom{white-space:normal; overflow-wrap:anywhere}
.volet.large .voletBoite{width:min(980px, 100%)}
.dvLigne .why, .suiviPiece .why{font-size:12px; color:var(--mute)}
.dvDevis{display:grid; gap:8px; align-content:start}
.dvDevis .dline{display:flex; justify-content:space-between; gap:8px; font-size:13px}
.dvDevis .dtot{display:flex; justify-content:space-between; border-top:1px solid var(--rule); padding-top:6px;
  font-weight:700}
.dvDevis .kv{display:grid; grid-template-columns:auto 1fr; gap:4px 10px; font-size:12.5px; margin:0}
.dvDevis .kv dt{color:var(--mute)} .dvDevis .kv dd{margin:0}
.dvBarre{height:6px; background:rgba(120,120,130,.18); border-radius:99px; overflow:hidden; margin-bottom:2px}
.dvBarre i{display:block; height:100%; background:var(--vert)}
.tagv{display:inline-block; font-size:11px; font-weight:700; padding:1px 8px; border-radius:999px;
  white-space:nowrap; background:rgba(120,120,130,.14)}
.tagv.rouge{color:var(--rouge)} .tagv.orange{color:var(--orange)} .tagv.violet{color:var(--violet)}
.tagv.vert{color:var(--vert)} .tagv.sel{color:var(--ink)}
.suiviPieces{margin-top:10px}
.suiviPiece{display:grid; grid-template-columns:minmax(0,1.3fr) 130px 100px minmax(0,1.4fr); gap:10px;
  align-items:center; padding:5px 0; border-bottom:1px solid var(--rule)}
.journalPiece{margin-top:10px} .journalPiece summary{cursor:pointer; font-size:13px}
.journalPiece .ev{display:grid; grid-template-columns:18px minmax(0,1fr); gap:10px; padding-bottom:10px}
.journalPiece .dot{width:10px; height:10px; border-radius:50%; margin-top:5px; background:var(--ink)}
.journalPiece .dot.g{background:var(--vert)} .journalPiece .dot.o{background:var(--orange)}
.journalPiece .dot.v{background:var(--violet)}
.journalPiece .who{font-size:11.5px; color:var(--mute)} .journalPiece .what{font-size:12.5px}

/* ---- La frise des banques (etape 7e, entree 136) : la maquette du 28/09 ---- */
.chip.sel{background:var(--sel-soft); color:var(--sel)}
.bq-frise{display:grid; grid-template-columns:200px repeat(12, minmax(0, 1fr)); gap:6px; align-items:stretch}
.bq-m{font-size:10.5px; letter-spacing:.06em; text-transform:uppercase; color:var(--mute); font-weight:700; text-align:center; padding-bottom:2px}
.bq-cpt{display:flex; flex-direction:column; justify-content:center; gap:1px; font-size:12px; padding-right:6px}
.bq-cpt b{font-size:13.5px}
.bq-c{border:1px solid var(--rule); border-radius:8px; padding:7px 8px; min-height:66px; box-sizing:border-box;
  display:flex; flex-direction:column; gap:2px; line-height:1.3; text-align:left; font:inherit; font-size:11.5px; cursor:pointer}
.bq-c:hover{border-color:var(--rule-strong)}
.bq-c.acd{background:var(--surface-2); color:var(--mute)}
.bq-c.ok{background:var(--vert-soft); border-color:var(--vert); color:var(--ink)}
.bq-c.prep{background:var(--orange-soft); border-color:var(--orange); color:var(--ink)}
.bq-c.lire{background:var(--sel-soft); border-color:var(--sel); color:var(--ink)}
.bq-c.trou{background:var(--rouge-soft); border-color:var(--rouge); border-style:dashed; color:var(--ink)}
.bq-c.vide{background:transparent; color:var(--mute); cursor:default}
.bq-chaine{grid-column:2 / span 12; display:flex; flex-wrap:wrap; gap:4px 12px; font-size:11.5px; color:var(--mute); padding:1px 2px 10px}
.bq-chaine .ko{color:var(--rouge); font-weight:700}
.bq-leg{display:flex; flex-wrap:wrap; gap:6px}
.bq-trois{display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px}
.bq-manque .btnrow{margin:2px 0 8px}
@media (max-width: 900px){ .bq-trois{grid-template-columns:1fr} .bq-frise{overflow-x:auto} }

/* ---------------- 7g — la relecture d'un releve (entree 138) ----------------
   Repris de la maquette validee le 28/09 (`banque_barret.html`). */
.bq-releve .bq-compte{display:flex; flex-wrap:wrap; gap:8px 10px; align-items:center; padding:9px 11px;
  border:1px solid var(--rule); border-radius:9px; background:var(--surface)}
.bq-releve .bq-compte input.violet{border-color:var(--violet); color:var(--violet); background:var(--violet-soft)}
.bq-releve .bq-compte .regle{display:flex; align-items:center; gap:6px; font-size:12px; color:var(--mute)}
.bq-solde{display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:8px; margin:8px 0 2px}
.bq-solde > div{background:var(--surface-2); border-radius:8px; padding:7px 11px}
.bq-solde .l{font-size:10.5px; color:var(--mute); display:block}
.bq-solde .v{font-family:"IBM Plex Mono",monospace; font-size:16px; font-weight:600}
.bq-solde .fin{background:var(--vert-soft)}
.bq-solde .faux{background:var(--rouge-soft)}
.bq-corps{display:grid; grid-template-columns:minmax(0, 1.4fr) minmax(0, 1fr); gap:12px; align-items:start}
.bq-piece{border:1px solid var(--rule); border-radius:9px; overflow:auto; max-height:760px; background:var(--surface-2)}
.bq-lignes{display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1.1fr); gap:10px; align-items:start}
.bq-liste{max-height:640px; overflow:auto; display:block}
.bq-liste td{padding:6px 8px; border-bottom:1px solid var(--rule); vertical-align:top; cursor:pointer}
.bq-liste .tiers{display:block; font-size:12.5px} .bq-liste .quoi{display:block; font-size:11.5px; color:var(--mute)}
.bq-liste td.mt{text-align:right; font-family:"IBM Plex Mono",monospace; white-space:nowrap}
.bq-liste td.mt .cr{color:var(--vert)} .bq-liste .d-court{display:block; font-size:11px; color:var(--mute)}
.bq-liste tr.vvert td:first-child{box-shadow:inset 3px 0 0 var(--vert)}
.bq-liste tr.vorange td:first-child{box-shadow:inset 3px 0 0 var(--orange)}
.bq-liste tr.mort{opacity:.55; text-decoration:line-through}
.pt2{display:inline-block; width:9px; height:9px; border-radius:50%; background:var(--rule-strong)}
.pt2.lettre{background:var(--vert)} .pt2.atrancher{background:var(--orange)} .pt2.connu{background:var(--mute)}
.bq-detail{border:1px solid var(--rule); border-radius:9px; padding:10px 12px; display:flex; flex-direction:column; gap:8px}
.bq-detail .champs3{display:grid; grid-template-columns:110px minmax(0,1fr) 96px; gap:8px}
.bq-detail .fld > span{font-size:10px; letter-spacing:.08em; text-transform:uppercase; color:var(--mute); font-weight:700}
.bq-detail .contre{display:grid; grid-template-columns:120px minmax(0,1fr); gap:8px; align-items:end}
.bq-detail .contre .fld input{width:100%; box-sizing:border-box}
.bq-lettre{border:2px solid var(--vert); border-radius:9px; padding:9px 11px; display:flex; flex-direction:column; gap:3px}
.bq-lettre.non{border:1px dashed var(--orange)}
.bq-auto{font-size:11.5px; color:var(--mute)}
/* 29/09 (entree 168) — le releve annote : une colonne par chose, le compte
   en etiquette editable, le libelle qui prend la place, les soldes en bordure. */
.an-t{width:100%; border-collapse:collapse; font-size:12.5px; table-layout:fixed}
/* Le releve annote a besoin de largeur : la page du releve cede la place. */
.bq-corps:has(.an-t){grid-template-columns:minmax(0, 2.2fr) minmax(0, 1fr)}
.an-t col.c-d{width:108px} .an-t col.c-lu{width:26%} .an-t col.c-m{width:92px} .an-t col.c-s{width:100px}
.an-t col.c-cpt{width:118px} .an-t col.c-x{width:34px}
.an-t td, .an-t th{padding:5px 8px; border-bottom:1px solid var(--rule); vertical-align:middle}
.an-t th{font-size:10.5px; letter-spacing:.06em; text-transform:uppercase; color:var(--mute); text-align:left}
.an-t th.num{text-align:right}
.an-t td.n{text-align:right; font-family:"IBM Plex Mono",monospace; font-variant-numeric:tabular-nums; white-space:nowrap}
.an-t td.dt{color:var(--mute); font-size:11.5px}
/* 02/10 (entree 182) : la date est un champ depuis l'entree 176 — « 02/03/2026 »
   et son calendrier ne tenaient pas dans les 52 px de la date « 02/03 ». */
.an-t td.dt{padding-left:4px; padding-right:2px}
.an-t td.dt input[type=date]{font-size:11.5px; padding:2px 1px}
.an-t td.dt input[type=date]::-webkit-calendar-picker-indicator{margin:0 0 0 2px; padding:0; width:11px}
.an-t td.lu{white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:12px}
.an-t td.cre{color:var(--vert)} .an-t td.solde{color:var(--mute)}
.an-t tbody tr td:first-child{box-shadow:inset 3px 0 0 transparent}
.an-t tr.k-lettre td:first-child{box-shadow:inset 3px 0 0 var(--vert)}
.an-t tr.k-atrancher td:first-child{box-shadow:inset 3px 0 0 var(--orange)}
.an-t tr.atr td{background:var(--rouge-soft)}
.an-t tr.mort td{opacity:.5; text-decoration:line-through}
.an-t tbody tr:not(.an-bord):hover td{background:var(--surface-2)}
.an-t tr.an-bord td{background:var(--surface-2); font-weight:700; font-size:12px; border-bottom:1px solid var(--rule-strong)}
.an-t input.cpt{width:100%; height:26px; box-sizing:border-box; border:1px solid var(--rule-strong); border-radius:6px; padding:0 6px;
  font-family:"IBM Plex Mono",monospace; font-size:11.5px; font-weight:700; background:var(--surface); color:var(--ink)}
.an-t input.cpt.lettre{background:var(--vert-soft); border-color:var(--vert); color:var(--vert)}
.an-t input.cpt.atrancher{background:var(--orange-soft); border-color:var(--orange); color:var(--orange)}
.an-t input.lib{width:100%; height:26px; box-sizing:border-box; border:1px solid transparent; border-radius:6px; padding:0 6px;
  background:transparent; color:var(--ink); font:inherit}
.an-t input.lib:hover{border-color:var(--rule)} .an-t input.lib:focus{border-color:var(--brand); background:var(--surface)}
.an-t .sup{border:0; background:transparent; color:var(--mute); font-size:16px; cursor:pointer}
.an-t .sup:hover{color:var(--rouge)}
.bq-releve .barre{display:flex; gap:10px; align-items:center; margin-top:10px; flex-wrap:wrap}
.bq-releve .barre .info{color:var(--mute); font-size:12.5px}
/* 29/09 (entree 166) — « ligne par ligne », refait : la ligne du releve
   d'abord, le compte en etiquette, la page du releve plus grande. */
.bq-corps{grid-template-columns:minmax(0, 1.25fr) minmax(0, 1fr)}
.bq-lignes{grid-template-columns:minmax(0, 1fr) minmax(0, 1fr)}
.bq-liste{overflow-x:hidden}
.bq-liste tbody{display:table; width:100%; table-layout:fixed}
.bq-liste td.mt{width:84px} .bq-liste td.etat{width:22px}
.bq-liste td{padding:5px 8px; vertical-align:middle}
.bq-liste td.dt{width:40px; color:var(--mute); font-size:11.5px}
.bq-liste .lu-l{display:block; font-size:12px; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:260px}
.bq-liste .quoi{display:flex; gap:6px; align-items:center; flex-wrap:wrap; margin-top:2px}
.bq-liste .ecr{color:var(--mute); font-size:11px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:170px}
.bq-liste tr.sel td{background:var(--sel-soft)}
.bq-liste tr:hover td{background:var(--surface-2)}
.bq-liste tr.sel:hover td{background:var(--sel-soft)}
.cpt-chip{font-family:"IBM Plex Mono",monospace; font-size:10.5px; font-weight:700; padding:1px 6px; border-radius:4px;
  background:var(--surface-2); color:var(--ink)}
.cpt-chip.lettre{background:var(--vert-soft); color:var(--vert)}
.cpt-chip.atrancher{background:var(--orange-soft); color:var(--orange)}
.bq-detail{background:var(--surface)}
.bq-detail .champs3{grid-template-columns:96px minmax(0,1fr) 110px; background:var(--surface-2); border-radius:7px; padding:8px 10px}
.bq-detail .contre{grid-template-columns:150px minmax(0,1fr)}
.bq-detail .contre .fld input{height:30px}
@media (max-width: 1100px){ .bq-corps, .bq-lignes{grid-template-columns:minmax(0, 1fr)} .bq-solde{grid-template-columns:repeat(2, minmax(0, 1fr))} }
/* 01/10 (entree 176) : la page du releve se zoome ; le sens et le montant se corrigent. */
.bq-zoombar{display:flex; gap:6px; align-items:center; padding:4px 6px; border-bottom:1px solid var(--rule); background:var(--surface)}
.bq-page{overflow:auto; max-height:720px; cursor:zoom-in}
.bq-page.zoome{cursor:grab}
.bq-mt{display:flex; gap:6px; align-items:center}
.an-t input.an-in{width:100%; min-width:0; border:1px solid transparent; background:transparent; font:inherit; padding:2px 3px}
.an-t input.an-in:hover, .an-t input.an-in:focus{border-color:var(--rule-strong); background:var(--surface)}
.an-t input.an-in.n{text-align:right}
.bq-piece{overflow:hidden; max-height:none}
.bq-mvt{display:grid; grid-template-columns:repeat(auto-fit, minmax(110px, 1fr)); gap:8px; margin-top:6px}
.bq-mvt input, .bq-mvt select{width:100%; min-width:0}

/* ======================================================================
   LE CADRE (refonte, lot 1, 28/10/2026) — `cadre.js` : la barre du haut
   (« Votre compte : nom — cabinet CODE ») et le menu par role, autour de
   chaque page connectee. Maquette v5 validee le 28/10.
   ====================================================================== */
.cadre{min-height:100vh; display:grid; grid-template-columns:220px minmax(0, 1fr);
  grid-template-rows:auto 1fr}
.cadre-haut{grid-column:1 / -1; display:flex; align-items:center; gap:16px; flex-wrap:wrap;
  padding:10px 20px; background:var(--surface); border-bottom:1px solid var(--rule)}
/* La police de la marque vient de `.brand` : le Newsreader n'a qu'une regle. */
.cadre-marque{font-size:20px; color:var(--brand); text-decoration:none; margin-right:0}
.cadre-marque small{font-family:"Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  font-size:12px; color:var(--mute); font-weight:400; margin-left:8px; letter-spacing:0}
.cadre-compte{margin-left:auto; display:flex; align-items:center; gap:14px; flex-wrap:wrap;
  font-size:13px; color:var(--mute)}
.cadre-compte strong{color:var(--ink)}
.cadre-code{font-family:"IBM Plex Mono", ui-monospace, monospace; font-size:12px; color:var(--ink);
  background:var(--surface-2); border:1px solid var(--rule); border-radius:4px; padding:1px 6px}
.cadre-sortir{background:none; border:0; padding:0; color:var(--brand); cursor:pointer; font:inherit;
  font-size:13px; text-decoration:underline; text-underline-offset:3px}
.cadre-menu{position:sticky; top:0; align-self:start; height:calc(100vh - var(--cadre-haut, 0px)); overflow:auto;
  display:flex; flex-direction:column; padding:14px 10px; background:var(--surface);
  border-right:1px solid var(--rule)}
.cadre-liens{display:flex; flex-direction:column; gap:2px}
.cadre-groupe{font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--mute);
  font-weight:700; padding:12px 10px 4px}
.cadre-groupe:first-child{padding-top:2px}
.cadre-liens a{display:block; padding:8px 10px; border-radius:6px; color:var(--ink);
  text-decoration:none; font-size:13.5px}
.cadre-liens a:hover{background:var(--surface-2)}
.cadre-liens a[aria-current="page"]{background:var(--brand-soft); color:var(--brand); font-weight:700}
.cadre-branchement{margin-top:auto; display:flex; align-items:center; gap:8px; padding:12px 10px 2px;
  border-top:1px solid var(--rule); font-size:12.5px; color:var(--mute); text-decoration:none}
.cadre-branchement:hover{color:var(--ink)}
.cadre-point{width:8px; height:8px; border-radius:50%; background:var(--vert); flex:none}
.cadre-point.off{background:var(--rule-strong)}
.cadre-ecran{min-width:0}
/* La barre du travail n'a plus le nom a pousser : le compteur des taches
   prend sa place a droite. */
#topbar #taches{margin-left:auto}
@media (max-width:860px){
  .cadre{grid-template-columns:1fr}
  .cadre-haut{padding:10px 16px}
  .cadre-compte{margin-left:0}
  .cadre-menu{position:static; height:auto; flex-direction:row; align-items:center; overflow-x:auto;
    padding:6px 8px; border-right:0; border-bottom:1px solid var(--rule)}
  .cadre-liens{flex-direction:row}
  .cadre-liens a{white-space:nowrap}
  .cadre-groupe{display:none}
  .cadre-branchement{margin:0 0 0 auto; border-top:0; padding:0 8px; white-space:nowrap}
}

/* ======================================================================
   LES ECRANS DU CADRE (refonte, lot 2, 28/10/2026) — Cabinets, Le service,
   Abonnement, et ceux des lots suivants : un titre, des chiffres, des blocs,
   des tables. Releve de la maquette v5 ; prefixe `ec-` pour ne rien heurter
   des 1 400 lignes d'avant.
   ====================================================================== */
.ec{max-width:1180px; padding:24px 28px 40px; display:grid; gap:22px; min-width:0}
.ec-titre{display:flex; align-items:flex-end; justify-content:space-between; gap:12px 20px; flex-wrap:wrap}
.ec-titre h1{margin:0; font-size:22px; font-weight:700}
.ec-titre p{margin:4px 0 0; color:var(--mute)}
.ec h2{font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--mute); margin:0 0 10px; font-weight:700}
.ec-bloc{border:1px solid var(--rule); border-radius:var(--radius); padding:16px 18px; min-width:0; background:var(--surface)}
.ec-bloc.doux{background:var(--surface-2); border-color:transparent}
.ec-bloc.tab{padding:4px 8px; overflow-x:auto}
.ec-deux{display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); gap:22px; align-items:start}
.ec-chiffres{display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); border:1px solid var(--rule);
  border-radius:var(--radius); background:var(--surface)}
.ec-chiffres > div{padding:14px 18px; border-left:1px solid var(--rule); min-width:0}
.ec-chiffres > div:first-child{border-left:0}
.ec-chiffres .v{font-family:"IBM Plex Mono", ui-monospace, monospace; font-variant-numeric:tabular-nums;
  font-size:24px; font-weight:500; line-height:1.2}
.ec-chiffres .l{color:var(--mute); font-size:12.5px}
.ec-cle{display:grid; grid-template-columns:170px minmax(0,1fr); gap:6px 14px; font-size:13.5px; margin:0}
.ec-cle dt{color:var(--mute)} .ec-cle dd{margin:0; min-width:0}
.ec-muet{color:var(--mute)} .ec-petit{font-size:12.5px}
.ec-cpt{font-family:"IBM Plex Mono", ui-monospace, monospace; font-variant-numeric:tabular-nums; font-size:13px}
.ec-p{display:inline-flex; align-items:center; gap:5px; border-radius:999px; padding:1px 9px; font-size:12px;
  font-weight:700; white-space:nowrap; background:var(--surface-2); color:var(--mute)}
.ec-p.vert{background:var(--vert-soft); color:var(--vert)}
.ec-p.marque{background:var(--brand-soft); color:var(--brand)}
.ec-p.orange{background:var(--orange-soft); color:var(--orange)}
.ec-p.rouge{background:var(--rouge-soft); color:var(--rouge)}
.ec-avis{border-left:3px solid var(--orange); background:var(--orange-soft); padding:10px 14px;
  border-radius:0 6px 6px 0; font-size:13px}
.ec-refus{color:var(--rouge); min-height:1em; margin:6px 0 0}
.ec table.t td{vertical-align:top}
.ec tr.clic{cursor:pointer}
@media (max-width:860px){
  .ec{padding:18px 16px 32px}
  .ec-deux{grid-template-columns:1fr}
  .ec-chiffres{grid-template-columns:repeat(2, minmax(0,1fr))}
  .ec-chiffres > div:nth-child(3){border-left:0}
  .ec-chiffres > div:nth-child(n+3){border-top:1px solid var(--rule)}
  .ec-cle{grid-template-columns:1fr}
}

/* ===============================================================
   LA LISTE DES DOSSIERS (refonte, lot 3, 28/10/2026, entree 203) — le rail,
   les onglets et Ctrl K partis, la page est une liste puis UNE fiche.
   ====================================================================== */
.appli{display:block}
.ec-q{width:240px; max-width:100%; height:32px; padding:0 10px; border:1px solid var(--rule-strong);
  border-radius:7px; font:inherit; font-size:13px; background:var(--surface); color:var(--ink)}
.ec-q:focus{outline:2px solid var(--brand-soft); border-color:var(--brand)}
#liste.ec{padding-top:8px}
#liste tr.clic:hover td, #liste tr.clic:focus td{background:var(--surface-2)}
.head .retour{background:none; border:0; padding:0; color:var(--mute); cursor:pointer; font:inherit; font-size:13px}
.head .retour:hover{color:var(--ink)}
#topbar{border-bottom:0; background:transparent; padding:6px 28px 0}
@media (max-width:860px){ #topbar{padding:6px 16px 0} }

/* ======================================================================
   LA FICHE DU DOSSIER (refonte, lot 4, 28/10/2026, entree 204) — quatre
   sous-onglets ; le Parametrage en LECTURE SEULE : ses gestes ne se montrent
   pas (le serveur les garde toujours, l'ecran ne les propose plus).
   ====================================================================== */
.lecture-seule button, .lecture-seule input, .lecture-seule select, .lecture-seule textarea,
.lecture-seule .linkbtn{display:none !important}
.lecture-seule::before{content:"En lecture seule. Ces réglages viennent d’ACD et des décisions du cabinet ; Claude s’en sert pour vérifier chaque pièce.";
  display:block; color:var(--mute); font-size:12.5px; margin:0 0 10px}
.lots-table tr.clic:hover td{background:var(--surface-2)}
=======
   LA RELECTURE HABILLEE (refonte, lot 5, 28/10/2026) — maquette v5.
   Decision du user : la relecture des achats et de la banque garde TOUTES
   ses fonctions et sa disposition (liste, piece, ecriture ; lignes, ligne
   du releve, image) ; seul le visuel change. Le moteur (`relecture.js`,
   `relecture_banque.js`) n'est pas reecrit : cette section, plus trois
   retouches de balisage (le mot du verdict, sa phrase, les deux blocs du
   volet). Entree 200 de DEPENDANCES.
   ====================================================================== */

/* 1. LE VERDICT : une barre de couleur a gauche, UN MOT (a corriger, a
   trancher, a verifier, sur, deja dans ACD), et la phrase en francais
   courant. Il remonte en tete du volet avec les autres avis : on lit ce
   qu'il faut faire avant de lire les champs. */
.relu3 .cote.journal .detail > .n1,
.relu3 .cote.journal .detail > .verdict-bloc,
.relu3 .cote.journal .detail > .lever,
.relu3 .cote.journal .detail > .trace.dejafec,
.relu3 .cote.journal .detail > .trace.acreer{order:-1; margin-top:0}
.relu3 .detail .trace.verdict-bloc{display:flex; flex-direction:column; gap:1px; margin:0;
  padding:8px 12px; border-left:4px solid var(--rule-strong); border-radius:0 7px 7px 0;
  background:var(--surface-2); color:var(--ink); font-size:12.5px; line-height:1.45}
.verdict-bloc .verdict-mot{font-size:11px; letter-spacing:.08em; text-transform:uppercase; font-weight:700; color:var(--mute)}
.relu3 .detail .trace.verdict-bloc.vrouge{border-left-color:var(--rouge); background:var(--rouge-soft)}
.relu3 .detail .trace.verdict-bloc.vviolet{border-left-color:var(--violet); background:var(--violet-soft)}
.relu3 .detail .trace.verdict-bloc.vorange{border-left-color:var(--orange); background:var(--orange-soft)}
.relu3 .detail .trace.verdict-bloc.vvert{border-left-color:var(--vert); background:var(--vert-soft)}
.verdict-bloc.vrouge .verdict-mot{color:var(--rouge)} .verdict-bloc.vviolet .verdict-mot{color:var(--violet)}
.verdict-bloc.vorange .verdict-mot{color:var(--orange)} .verdict-bloc.vvert .verdict-mot{color:var(--vert)}
.relu3 .detail .trace.dejafec{border-left:4px solid var(--rule-strong); border-radius:0 7px 7px 0}
/* Le mot, dans la liste et dans l'en-tete du volet. */
.vmot{display:inline-block; padding:0 6px; border-radius:4px; font-size:10.5px; font-weight:700;
  line-height:16px; letter-spacing:0; background:var(--surface-2); color:var(--mute); vertical-align:1px}
.vmot.vrouge{background:var(--rouge-soft); color:var(--rouge)} .vmot.vviolet{background:var(--violet-soft); color:var(--violet)}
.vmot.vorange{background:var(--orange-soft); color:var(--orange)} .vmot.vvert{background:var(--vert-soft); color:var(--vert)}
.chip.vmot{height:20px; line-height:20px; border-radius:99px; padding:0 8px; font-size:11px}
/* La barre de la ligne : grise quand ACD a deja la piece (maquette v5). */
.lignes.rangs tr.dejafec td.barre::before{background:var(--rule-strong)}
.lignes.rangs td.barre::before{width:4px; border-radius:0 2px 2px 0}

/* 2. LES CHAMPS PAR BLOCS : la piece (date, tiers, n°, journal, fichier),
   puis l'ecriture (libelle, montants, grille). Les gestes et le repli
   restent dessous, hors bloc. */
.relu3 .detail .ecr-bloc{display:flex; flex-direction:column; gap:8px; padding:10px 12px;
  border:1px solid var(--rule); border-radius:8px; background:var(--surface); min-width:0}
.relu3 .detail .ecr-bloc::before{font-size:10.5px; letter-spacing:.1em; text-transform:uppercase;
  color:var(--mute); font-weight:700}
.relu3 .detail .ecr-bloc-piece::before{content:"La pièce"}
.relu3 .detail .ecr-bloc-ecriture::before{content:"L’écriture"}
.relu3 .detail .ecr-bloc .transfert{margin-top:0}
.relu3 .detail .ecr-bloc .lignesdet > label{font-size:10.5px; letter-spacing:.1em; text-transform:uppercase;
  color:var(--mute); font-weight:700}
.relu3 .detail .gestes{border-top:0; padding-top:0}
/* Les trois volets : un en-tete plus net, des coins comme la maquette. */
.relu3 .cote{border-radius:10px}
.relu3 .cote > header{background:var(--surface-2); border-bottom-color:var(--rule)}
.relu3 .cote.journal > header #jTitre{display:flex; align-items:center; gap:6px; flex-wrap:wrap; color:var(--ink)}

/* 3. LA BARRE D'ENVOI RESTE EN BAS (sticky), achats comme banque : sur un
   long volet, « Envoyer » ne doit pas partir hors de l'ecran. */
.relu-travail .card > .barre,
.bq-releve > .barre{position:sticky; bottom:0; z-index:6; margin:10px -14px -12px; padding:10px 14px;
  background:var(--surface); border-top:1px solid var(--rule); border-radius:0 0 var(--radius) var(--radius);
  box-shadow:0 -6px 14px -10px rgba(0,0,0,.25)}

/* 4. « VOIR EN GRAND » MASQUE AUSSI LE CADRE : le menu (`cadre.js`) et le
   rail des dossiers s'effacent, la piece prend toute la largeur. Echap ou
   « Revenir a la liste » les rend. La feuille le sait seule (`:has`) : ni
   `cadre.js` ni `relecture.js` n'ont a se prevenir. */
.cadre:has(.relu3.plein){grid-template-columns:minmax(0, 1fr)}
.cadre:has(.relu3.plein) .cadre-menu,
.appli:has(.relu3.plein) .rail{display:none}

/* 5. LA BANQUE : la meme barre de couleur sur chaque ligne, avec les couleurs
   de l'entree 166 (lettree vert, a trancher orange, compte connu gris, lue
   deux fois rouge) ; la facture proposee dans le meme bloc que le verdict ;
   les champs par blocs. */
.bq-liste tr td:first-child{box-shadow:inset 4px 0 0 var(--rule-strong)}
.bq-liste tr.vvert td:first-child{box-shadow:inset 4px 0 0 var(--vert)}
.bq-liste tr.vorange td:first-child{box-shadow:inset 4px 0 0 var(--orange)}
.bq-liste tr:has(.chip.rouge) td:first-child{box-shadow:inset 4px 0 0 var(--rouge)}
.bq-lettre, .bq-lettre.non{border:0; border-left:4px solid var(--vert); border-radius:0 7px 7px 0;
  background:var(--vert-soft); padding:8px 12px}
.bq-lettre.non{border-left-color:var(--orange); background:var(--orange-soft)}
.bq-lettre > b{font-size:11px; letter-spacing:.08em; text-transform:uppercase; color:var(--vert)}
.bq-lettre.non > b{color:var(--orange)}
.bq-detail{border-radius:10px; gap:10px}
.bq-detail .lignesdet{border:1px solid var(--rule); border-radius:8px; padding:10px 12px}
/* Dans son bloc, le libelle n'avait plus que 80 px : le compte cede. */
.bq-detail .contre{grid-template-columns:104px minmax(0, 1fr)}
.bq-detail .lignesdet > label{font-size:10.5px; letter-spacing:.1em; text-transform:uppercase; color:var(--mute); font-weight:700}
.bq-releve .bq-compte{background:var(--surface-2); border-color:transparent}
.bq-solde > div{border:1px solid var(--rule); background:var(--surface)}
.bq-solde .fin{border-color:var(--vert)} .bq-solde .faux{border-color:var(--rouge)}

/* 6. LE TELEPHONE (375 px) : le volet de l'ecriture passe en une colonne,
   la barre d'envoi garde ses boutons cote a cote : collante, elle ne doit
   pas manger l'ecran. */
@media (max-width:560px){
  .relu3 .detail .champs3{grid-template-columns:1fr}
  .bq-solde{grid-template-columns:1fr 1fr}
  .bq-detail .contre{grid-template-columns:1fr}
  .relu-travail .card > .barre, .bq-releve > .barre{gap:6px; padding:8px 14px}
  .relu-travail .card > .barre .btn, .bq-releve > .barre .btn{height:28px; padding:0 9px; font-size:12px}
  .relu-travail .card > .barre .info, .bq-releve > .barre .info{font-size:11.5px; line-height:1.35}
}

/* Lot 6 (entree 206) : la confirmation d'envoi, code retape. */
.dlg .dlg-fec{font-size:12.5px; color:var(--mute); margin:8px 0}
.dlg .dlg-code{display:grid; gap:6px; font-size:13px; margin:10px 0}
.dlg .dlg-code input{height:34px; border:1px solid var(--rule-strong); border-radius:6px; padding:0 9px;
  font:inherit; font-family:"IBM Plex Mono", ui-monospace, monospace; background:var(--surface); color:var(--ink); max-width:220px}

/* Lot 7 (entree 207) : le lot envoye, en lecture seule. */
.relu-travail.lot-envoye::before{content:"Ce lot est envoyé dans ACD : il se relit, il ne se modifie plus.";
  display:block; border-left:3px solid var(--brand); background:var(--brand-soft); padding:9px 12px;
  border-radius:0 6px 6px 0; font-size:13px; margin:0 0 10px}
.relu-travail.lot-envoye #bValider, .relu-travail.lot-envoye #bAnnulerL, .relu-travail.lot-envoye #bEnr,
.relu-travail.lot-envoye #fEnregistrer, .relu-travail.lot-envoye #bPlus, .relu-travail.lot-envoye #bGrouper,
.relu-travail.lot-envoye .regle, .relu-travail.lot-envoye #bqValRel, .relu-travail.lot-envoye #bqEnvoyer,
.relu-travail.lot-envoye #bqQuandMeme, .relu-travail.lot-envoye [data-valider-ligne],
.relu-travail.lot-envoye [data-retirer], .relu-travail.lot-envoye [data-ajouter],
.lot-envoye ~ * #bEnvoyer, #espace section:has(.relu-travail.lot-envoye) #envoiBar{display:none !important}
.relu-travail.lot-envoye input, .relu-travail.lot-envoye select, .relu-travail.lot-envoye textarea{pointer-events:none}

/* 02/11/2026 (entree 217) : le menu de gauche se replie (bouton ☰ du cadre),
   pour donner toute la largeur a la relecture. Le choix est garde. */
.cadre-replier{background:none; border:1px solid var(--rule); border-radius:6px; width:32px; height:30px;
  font-size:16px; line-height:1; color:var(--ink); cursor:pointer}
.cadre-replier:hover{background:var(--surface-2)}
.cadre.menu-replie{grid-template-columns:minmax(0, 1fr)}
.cadre.menu-replie .cadre-menu{display:none}
