/* FAGA CRM — la feuille du produit. Une seule famille de contrôles, une seule écriture de chaque règle. */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 300 800; font-display: swap; src: url("../fonts/manrope-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 300 800; font-display: swap; src: url("../fonts/manrope-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --bg: #F4F3FA; --bg-2: #ECEAF6; --surface: #FFFFFF; --line: #E9E8F2; --line-2: #DCDAEB;
  --ink: #15142E; --ink-2: #5E5D7A; --ink-3: #706E8C;
  --accent: #6B5DF2; --accent-2: #5B8DEF; --accent-ink: #4A3EDB; --accent-soft: #EEEBFF; --accent-soft-2: #F6F4FF;
  --mint: #A6EBD0; --mint-2: #4FCFA3; --mint-ink: #157F58; --mint-soft: #E5F8F0;
  --sun: #FFE7A8; --sun-ink: #8F6300; --sun-soft: #FFF6DD;
  --rose: #FFC9C9; --rose-ink: #C42B2B; --rose-soft: #FFECEC;
  --sky: #CDE3FF; --sky-ink: #2A63C8; --sky-soft: #E9F2FF;
  --r-xl: 22px; --r-lg: 16px; --r-md: 12px; --r-sm: 8px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(21,20,46,.04), 0 10px 28px -14px rgba(21,20,46,.14);
  --shadow-2: 0 14px 32px -12px rgba(107,93,242,.30);
  --font: "Manrope", "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2,.7,.2,1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg);
  background-image: radial-gradient(900px 420px at 8% -10%, rgba(140,120,255,.16), transparent 60%),
                    radial-gradient(800px 380px at 96% -6%, rgba(90,140,239,.14), transparent 60%);
  background-attachment: fixed;
  font: 14px/1.5 var(--font); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
  accent-color: var(--accent); caret-color: var(--accent);
}
::selection { background: var(--accent-soft); color: var(--accent-ink); }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-sm); }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: 26px; line-height: 1.2; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0; }
code { font: 12px/1.4 ui-monospace, "Cascadia Mono", Consolas, Menlo, monospace; color: var(--ink-2); word-break: break-all; }
small, .small { font-size: 12px; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }

/* ---------- la coque */
.shell { max-width: 1340px; margin: 0 auto; padding: 18px 22px 64px; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 6px 0 22px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand .mark { display: block; width: auto; height: 22px; }
.brand .mark-txt span { color: var(--ink-2); font-weight: 500; }
.units { display: flex; align-items: center; gap: 6px; margin-left: 4px; }
.unit-badge { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--surface); display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: var(--mint-soft); color: var(--mint-ink); cursor: pointer; margin-left: -10px; transition: transform .15s var(--ease); }
.unit-badge:first-child { margin-left: 0; }
.unit-badge { position: relative; opacity: .5; filter: grayscale(1); }
.unit-badge.on { width: 44px; height: 44px; font-size: 13px; opacity: 1; filter: none; z-index: 1;
  background: var(--accent-soft); color: var(--accent-ink); border-color: var(--surface); box-shadow: 0 0 0 2px var(--accent); }
.unit-badge.on::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid var(--surface); background: var(--mint-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 10px no-repeat; }
.unit-badge:hover { opacity: 1; filter: none; }
.unit-badge:hover { transform: translateY(-1px); }
.unit-form { display: contents; }
.pills { display: flex; gap: 6px; margin: 0 auto; padding: 4px; overflow-x: auto; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); font-weight: 550; white-space: nowrap; transition: border-color .15s, color .15s, box-shadow .15s; }
.pill:hover { text-decoration: none; color: var(--ink); border-color: var(--line-2); }
.pill.on { color: var(--accent-ink); border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft-2); }
.pill .ic { opacity: .75; }
.tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
/* ---------- le rail : la navigation tient à toute largeur, le mot apparaît au survol ou au clavier */
.rail { position: fixed; top: 12px; bottom: 12px; left: 12px; width: 60px; z-index: 30; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-1); }
.rail-brand { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 10px; }
.rail-brand img { display: block; width: 40px; height: auto; }
.rail-nav { display: flex; flex-direction: column; gap: 4px; }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }

/*  LES GROUPES DU RAIL.
    Un trait, pas un titre : soixante pixels ne portent pas de mot lisible, et une étiquette
    verticale se lit moins bien que rien. Le nom de la phase vit dans l'infobulle de chaque
    icône et dans l'`aria-label` du groupe ; le trait dit seulement « ici, on change de
    métier ». Le premier groupe n'en porte pas : on ne sépare pas du vide. */
.rail-g { display: flex; flex-direction: column; gap: 4px; padding-top: 7px; margin-top: 6px;
          border-top: 1px solid var(--line); }
.rail-g:first-child { padding-top: 0; margin-top: 0; border-top: 0; }

/*  Et en haut, où la place existe, la phase s'écrit. */
.pill-g { flex: 0 0 auto; align-self: center; padding: 0 4px 0 10px; font-size: 10.5px;
          font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3);
          border-left: 1px solid var(--line); margin-left: 4px; white-space: nowrap; }
.pill-g:first-child { border-left: 0; margin-left: 0; padding-left: 0; }

/* ------------------------------------------------------------------ le rail sur un écran court

   Quinze pastilles de 44 px plus la marque et les réglages réclament près de 780 px de haut. Sur un
   portable posé sur un bureau — fenêtre de 800 px, barre d'onglets comprise — le bas du rail sortait
   de l'écran : on perdait les dernières icônes, et surtout **l'engrenage des Paramètres**, qui est le
   seul chemin vers la moitié du produit.

   On resserre plutôt que de faire défiler. Un rail qui défile clipperait les infobulles — elles sont
   posées hors de sa boîte, et un conteneur qui défile coupe ce qui en dépasse. On ne laisse donc
   défiler qu'en tout dernier recours, quand aucun resserrement ne suffit plus. */
@media (max-height: 880px) {
  .rail { top: 8px; bottom: 8px; padding: 8px 0; }
  .rail-brand { width: 38px; height: 38px; margin-bottom: 4px; }
  .rail-brand img { width: 34px; }
  .rail-item { width: 38px; height: 38px; }
  .rail-nav { gap: 2px; }
}
@media (max-height: 760px) {
  .rail-brand { height: 30px; margin-bottom: 2px; }
  .rail-item { width: 36px; height: 36px; }
  .rail-nav { gap: 0; }
}
@media (max-height: 660px) {
  /* Il n'y a plus de place à gagner : le rail défile, et les réglages restent accrochés en bas.
     Les infobulles se perdent ici — les icônes gardent leur aria-label, qui est ce qui compte. */
  .rail-nav { overflow-y: auto; scrollbar-width: none; min-height: 0; }
  .rail-nav::-webkit-scrollbar { display: none; }
}
.rail-item { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--ink-2); transition: background-color .15s var(--ease), color .15s var(--ease); }
.rail-item:hover { background: var(--accent-soft-2); color: var(--ink); text-decoration: none; }
.rail-item.on { background: var(--accent-soft); color: var(--accent-ink); }
.rail-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* La pastille du rail : le seul signal qui dise « il y a du travail ici ». Elle se pose SUR l'icône
   — le rail n'a pas la place à côté, et un chiffre détaché ne se rattache à rien. Elle disparaît à
   zéro : un compteur qui affiche 0 apprend à être ignoré. (`.rail-item` est déjà en position
   relative, c'est ce qui l'ancre. Nommée en toutes lettres : « .rail-n » se confondait avec
   « .rail-nav » au premier coup d'œil comme au grep.) */
.rail-compte { position: absolute; top: 1px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px;
               border-radius: var(--r-pill); background: var(--rose-ink); color: #fff;
               font-size: 10.5px; font-weight: 800; line-height: 17px; text-align: center;
               box-shadow: 0 0 0 2px var(--surface); }
.rail [data-tip]::after { content: attr(data-tip); position: absolute; left: calc(100% + 14px); top: 50%; transform: translate(-6px, -50%); white-space: nowrap; padding: 6px 10px; border-radius: var(--r-md); background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600; letter-spacing: .01em; box-shadow: var(--shadow-2); opacity: 0; pointer-events: none; transition: opacity .15s var(--ease), transform .15s var(--ease); }
.rail [data-tip]::before { content: ""; position: absolute; left: calc(100% + 8px); top: 50%; transform: translate(-6px, -50%); border: 6px solid transparent; border-right-color: var(--ink); border-left: 0; opacity: 0; pointer-events: none; transition: opacity .15s var(--ease), transform .15s var(--ease); }
.rail [data-tip]:hover::after, .rail [data-tip]:hover::before, .rail [data-tip]:focus-visible::after, .rail [data-tip]:focus-visible::before { opacity: 1; transform: translate(0, -50%); }
@media (min-width: 761px) {
  body:has(.rail) { padding-left: 84px; }
  .topbar .pills, .topbar .brand .mark, .topbar .top-gear { display: none; }
  .topbar .units { margin-left: 8px; }
}
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink-3); min-width: 220px; }
.search input { border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); width: 100%; }
.search input::placeholder { color: var(--ink-3); }
.avatar-me { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--accent-ink);
  background: var(--accent-soft); border: 1px solid var(--line); position: relative; }
/* Pas de point vert sur l avatar du compte : le vert ne dit qu une chose, le profil actif. */
.me-menu { position: relative; }
.me-menu details > summary { list-style: none; cursor: pointer; }
.me-menu details > summary::-webkit-details-marker { display: none; }
.me-menu .menu { position: absolute; right: 0; top: 48px; z-index: 30; min-width: 220px; padding: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.me-menu .menu a, .me-menu .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: var(--r-md); border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.me-menu .menu a:hover, .me-menu .menu button:hover { background: var(--accent-soft-2); text-decoration: none; }
.me-menu .menu .who { padding: 6px 10px 10px; color: var(--ink-2); font-size: 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }

/* ---------- boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: var(--r-pill); border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; transition: transform .15s var(--ease), box-shadow .15s, background .15s, border-color .15s; }
.btn:hover { text-decoration: none; border-color: var(--line-2); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }
.btn-primary { color: #fff; border: 0; background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%); box-shadow: var(--shadow-2); }
.btn-primary:hover { filter: saturate(1.05) brightness(1.03); box-shadow: 0 16px 34px -12px rgba(107,93,242,.42); }
.btn-soft { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.btn-soft:hover { background: #E4E0FF; }
.btn-danger { color: var(--rose-ink); }
.btn-danger:hover { background: var(--rose-soft); border-color: var(--rose); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-icon { width: 40px; padding: 0; border-radius: 50%; }
.btn-icon.btn-sm { width: 32px; }
.btn-ok { color: var(--mint-ink); border-color: var(--mint); background: var(--mint-soft); }
.btn-ok:hover { background: #D6F3E6; border-color: var(--mint-2); }

/* ---------- cartes et grilles */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 20px 22px; box-shadow: var(--shadow-1); }
/* LES BLOCS DE PAGE SE SUIVENT À 16 PX. Une seule idée, et il faut nommer tout ce qui compte
   comme un bloc : la règle ne connaissait que la carte, si bien qu'une carte suivie d'une grille
   ou d'un formulaire se collait à elle — 0 px, sans que rien ne le signale. C'est la mesure qui
   l'a montré, pas l'œil. Corollaire appris au passage : un élément invisible glissé entre deux
   blocs (un <style>, par exemple) rompt l'adjacence et fait retomber l'écart à zéro. */
.card + .card, .card + .grid, .card + form,
.grid + .card, form + .card { margin-top: 16px; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-h .sub { color: var(--ink-2); font-weight: 500; font-size: 13px; }
.card-h .link { font-size: 13px; font-weight: 600; }
.grid { display: grid; gap: 16px; }
.grid-main { grid-template-columns: minmax(0, 1fr) 372px; align-items: start; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack > * + * { margin-top: 16px; }
.page-h { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 4px 0 18px; }
.page-h .kicker-date { color: var(--ink-2); font-weight: 500; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- chiffres */
.stat { display: grid; gap: 6px; }
.stat .t { display: flex; align-items: center; justify-content: space-between; color: var(--ink); font-weight: 600; }
.stat .v { font-size: 30px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; }
.stat .c { color: var(--ink-2); font-size: 12px; }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-mint { background: var(--mint-soft); color: var(--mint-ink); }
.badge-rose { background: var(--rose-soft); color: var(--rose-ink); }
.badge-sun { background: var(--sun-soft); color: var(--sun-ink); }
.badge-sky { background: var(--sky-soft); color: var(--sky-ink); }
.badge-accent { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- listes */
.list { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 10px; border-radius: var(--r-lg); transition: background .15s var(--ease); }
.row + .row { border-top: 1px solid var(--line); }
.row:hover { background: var(--accent-soft-2); }
.row.is-late { background: linear-gradient(90deg, var(--rose-soft), transparent 70%); }
.row .who { min-width: 0; }
.row .who > b { display: block; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .who > span { display: block; color: var(--ink-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .end { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; }
.row .end .time { font-weight: 600; color: var(--ink); }
.row .chev { color: var(--ink-3); }
.row a.cover { position: absolute; inset: 0; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--accent-ink); background: var(--accent-soft); position: relative; }
.avatar.mint { color: var(--mint-ink); background: var(--mint-soft); }
.avatar.sky { color: var(--sky-ink); background: var(--sky-soft); }
.avatar.sun { color: var(--sun-ink); background: var(--sun-soft); }
.avatar.rose { color: var(--rose-ink); background: var(--rose-soft); }
.avatar .k { position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--surface); display: grid; place-items: center; background: var(--accent); color: #fff; }
.avatar .k .ic { width: 10px; height: 10px; }
.chan { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.chan.call { background: var(--sky-soft); color: var(--sky-ink); }
.chan.email { background: var(--mint-soft); color: var(--mint-ink); }
.chan.sms { background: var(--sun-soft); color: var(--sun-ink); }
.chan.meeting { background: var(--accent-soft); color: var(--accent-ink); }
.chan.other, .chan.none { background: var(--bg-2); color: var(--ink-2); }
.empty { display: block; padding: 10px 6px 4px; color: var(--ink-2); font-size: 13px; line-height: 1.55; }
.empty b { color: var(--ink); font-weight: 600; margin-right: 6px; }

/* ---------- le graphique en points */
.dots { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: end; gap: 6px; height: 132px; padding: 6px 2px 0; }
.dots .col { display: flex; flex-direction: column-reverse; align-items: center; gap: 4px; height: 100%; }
.dots .d { width: 9px; height: 9px; border-radius: 50%; background: var(--mint); }
.dots .col.today .d { background: var(--accent); }
.dots .col .z { width: 9px; height: 9px; border-radius: 50%; background: var(--bg-2); }
.dots-x { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin-top: 8px; color: var(--ink-3); font-size: 11px; text-align: center; }
.dots-x .today { color: #fff; background: var(--accent); border-radius: var(--r-sm); padding: 1px 0; }
.legend { display: flex; gap: 16px; color: var(--ink-2); font-size: 13px; }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: var(--mint); }
.legend i.acc { background: var(--accent); }

/* ---------- tableaux */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 6px 10px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--accent-soft-2); }
.tbl td:first-child, .tbl th:first-child { padding-left: 4px; }
.tbl .cell-main b { display: block; font-weight: 600; }
.tbl .cell-main span { color: var(--ink-2); font-size: 13px; }

/* ---------- états */
.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.tag-draft { background: var(--bg-2); color: var(--ink-2); }
.tag-sent, .tag-viewed, .tag-open { background: var(--sky-soft); color: var(--sky-ink); }
.tag-accepted, .tag-won, .tag-active, .tag-done { background: var(--mint-soft); color: var(--mint-ink); }
.tag-lost, .tag-late, .tag-error, .tag-failed, .tag-refused { background: var(--rose-soft); color: var(--rose-ink); }
.tag-warn, .tag-nurture, .tag-configured, .tag-expired { background: var(--sun-soft); color: var(--sun-ink); }
.tag-accent { background: var(--accent-soft); color: var(--accent-ink); }

/* ---------- formulaires */
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > label, .lbl { font-size: 13px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 12px; color: var(--ink-3); }
.input, .select, .textarea { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 10px 12px; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus, .textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-3) 50%), linear-gradient(135deg, var(--ink-3) 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.textarea { min-height: 96px; resize: vertical; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.check input { width: 18px; height: 18px; margin: 0; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-foot { display: flex; align-items: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.inline-form { display: inline; }

/* ---------- messages du système */
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r-lg); border: 1px solid var(--mint); background: var(--mint-soft); color: var(--mint-ink); margin-bottom: 16px; font-weight: 500; }
.toast.err { border-color: var(--rose); background: var(--rose-soft); color: var(--rose-ink); }
.toast.info { border-color: var(--sky); background: var(--sky-soft); color: var(--sky-ink); }
.note { padding: 12px 14px; border-radius: var(--r-md); background: var(--accent-soft-2); color: var(--ink-2); font-size: 13px; }
.note b { color: var(--ink); }
.sep { height: 1px; background: var(--line); margin: 14px 0; }

/* ---------- fenêtre du produit — jamais un dialogue du navigateur */
dialog.dlg { border: 1px solid var(--line); border-radius: var(--r-xl); padding: 22px; width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow-1); background: var(--surface); color: var(--ink); }
dialog.dlg::backdrop { background: rgba(21,20,46,.28); backdrop-filter: blur(3px); }
dialog.dlg h2 { margin-bottom: 8px; }
dialog.dlg .dlg-t { color: var(--ink-2); margin-bottom: 14px; }

/* ---------- entrée */
.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate .card { width: min(420px, 100%); padding: 28px; }
.gate .brand { justify-content: center; margin-bottom: 18px; }
.gate .brand .mark { height: 40px; }

/* ---------- réactif */
@media (max-width: 1080px) { .grid-main { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .rail { display: none; }
  .shell { padding: 12px 12px 48px; }
  .topbar { flex-wrap: wrap; gap: 10px; }
  .pills { order: 3; width: 100%; margin: 0; }
  .search { min-width: 0; width: 44px; padding: 0; justify-content: center; }
  .search input { display: none; }
  .grid-2, .grid-3, .form-row { grid-template-columns: 1fr; }
  .card { padding: 16px; border-radius: var(--r-lg); }
  .row { grid-template-columns: 40px minmax(0, 1fr); }
  .row .end { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; }
  .page-h { flex-direction: column; align-items: stretch; }
  .page-h .actions { margin-top: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .page-h .actions .btn { height: 34px; padding: 0 12px; font-size: 13px; flex: 0 0 auto; }
  .dots .col:nth-child(-n+16), .dots-x span:nth-child(-n+16) { display: none; }
  .steps .step { min-width: 84px; }
  h1 { font-size: 22px; }
  .stat .v { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- compatibilité des vues non encore refaites (classes de la première coque) */
.grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kpi b { display: block; font-size: 28px; font-weight: 700; }
div.ok { display: flex; gap: 10px; padding: 12px 16px; border-radius: var(--r-lg); border: 1px solid var(--mint); background: var(--mint-soft); color: var(--mint-ink); margin-bottom: 16px; }
div.err { display: flex; gap: 10px; padding: 12px 16px; border-radius: var(--r-lg); border: 1px solid var(--rose); background: var(--rose-soft); color: var(--rose-ink); margin-bottom: 16px; }
form.f label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin: 12px 0 6px; }
form.f label .muted { font-weight: 500; }
form.f input:not([type="checkbox"]):not([type="file"]), form.f select, form.f textarea { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 10px 12px; }
form.f input:focus, form.f select:focus, form.f textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
form.f .deux { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.btn.second { background: var(--surface); color: var(--ink); }
h1 .tag { vertical-align: middle; margin-left: 6px; }
h2 { margin-top: 22px; margin-bottom: 10px; }
.card > h2:first-child, .card-h h2 { margin-top: 0; }
table:not(.tbl) { width: 100%; border-collapse: collapse; }
table:not(.tbl) th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 6px 10px 10px; border-bottom: 1px solid var(--line); }
table:not(.tbl) td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table:not(.tbl) tr:last-child td { border-bottom: 0; }
.tag.draft { background: var(--bg-2); color: var(--ink-2); } .tag.sent { background: var(--sky-soft); color: var(--sky-ink); } .tag.accepted, .tag.won { background: var(--mint-soft); color: var(--mint-ink); } .tag.lost { background: var(--rose-soft); color: var(--rose-ink); }
pre { white-space: pre-wrap; font: 14px/1.5 var(--font); }
@media (max-width: 760px) { form.f .deux { grid-template-columns: 1fr; } }

/* ---------- les outils : barres pastel, jauge en points, barre partagée, blocs de sources */
.bars { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: end; height: 150px; padding-top: 6px; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.bar { width: 100%; max-width: 64px; border-radius: 14px 14px 6px 6px; background: linear-gradient(180deg, #FFD9C7 0%, #FFE9DA 100%); }
.bar.lt_1h, .bar.lt_24h { background: linear-gradient(180deg, var(--mint) 0%, #DDF6EC 100%); }
.bar.lt_48h { background: linear-gradient(180deg, #FFE0B8 0%, #FFF0DC 100%); }
.bar.gt_48h, .bar.none { background: linear-gradient(180deg, #FFC9C9 0%, #FFE6E6 100%); }
.bar-v { font-weight: 700; font-size: 14px; }
.bar-l { font-size: 11px; color: var(--ink-3); text-align: center; line-height: 1.2; }
.bar-marks { display: flex; justify-content: center; gap: 22%; margin-top: 6px; }
.bar-marks span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); }
.bar-marks span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--sun); }
.gauge { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 2px; }
.gauge .g { width: 18px; height: 18px; border-radius: 50%; background: var(--bg-2); }
.gauge .g.on { background: var(--mint-2); }
.split { display: flex; height: 44px; border-radius: 14px; overflow: hidden; gap: 4px; }
.split-on { background: linear-gradient(90deg, var(--sun) 0%, var(--mint) 100%); border-radius: 14px; min-width: 6px; }
.split-off { flex: 1; border-radius: 14px; background: repeating-linear-gradient(135deg, #E8E7F1 0 6px, #F4F3FA 6px 12px); }
.split-legend { display: flex; justify-content: space-between; margin-top: 8px; color: var(--ink-2); font-size: 13px; }
.split-legend b { display: block; font-size: 22px; color: var(--ink); line-height: 1.1; }
.blocks { display: flex; gap: 6px; }
.block { min-width: 64px; padding: 12px 12px 10px; border-radius: 14px; background: linear-gradient(180deg, #FFE4D3, #FFEFE5); }
.block:nth-child(2) { background: linear-gradient(180deg, var(--mint), #DDF6EC); }
.block:nth-child(3) { background: linear-gradient(180deg, #F3D9F5, #F8E9F9); }
.block:nth-child(n+4) { background: var(--bg-2); }
.block b { display: block; font-size: 20px; }
.block span { font-size: 12px; color: var(--ink-2); }
.frac { display: inline-block; vertical-align: 1px; padding: 0 6px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 700; margin-left: 4px; }
.note .ic { vertical-align: -2px; margin-right: 4px; color: var(--accent-ink); }


/* ---------- le champ fichier, dans la langue du produit */
.file { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.file .file-name { color: var(--ink-2); font-size: 13px; }
.file input:focus-visible + .btn { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- l'étiquette du jour ne se coupe pas ; les libellés des barres gardent une même ligne de base sur téléphone */
.dots-x span { white-space: nowrap; justify-self: center; }
.dots-x .today { width: max-content; padding: 1px 6px; }
.dots-x span:last-child.today { justify-self: end; }
@media (max-width: 760px) { .bar-l { display: block; min-height: 2.4em; line-height: 1.2; } }

/* sur téléphone, le chevron d'une ligne de tâche n'orpheline pas : le titre mène déjà au dossier */
@media (max-width: 760px) { .row .end .btn ~ .chev { display: none; } }

/* ---------- la page de signature : la proposition d'abord, l'acte ensuite */
.sign { max-width: 880px; margin: 0 auto; padding: 8px 0 40px; }
.sign-head { padding: 8px 4px 18px; }
.sign-from { font-size: 13px; font-weight: 700; color: var(--accent-ink); letter-spacing: .02em; margin-bottom: 6px; }
.sign-head h1 { margin-bottom: 4px; }
.sign-sub { color: var(--ink-2); font-size: 15px; }
.sign-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 20px; margin-top: 16px; }
.sign-facts small { display: block; color: var(--ink-3); font-size: 11px; margin-bottom: 2px; }
.sign-facts b { font-size: 16px; font-variant-numeric: tabular-nums; }
.sign-facts b span { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.sign-doc iframe { display: block; width: 100%; height: min(72vh, 900px); min-height: 420px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-2); }
.sign-steps { list-style: none; counter-reset: s; display: grid; gap: 8px; margin: 4px 0 18px; padding: 0; }
.sign-steps li { counter-increment: s; display: flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 14px; }
.sign-steps li::before { content: counter(s); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bg-2); color: var(--ink-2); font-size: 12px; font-weight: 700; flex: 0 0 26px; }
.sign-steps li.now { color: var(--ink); font-weight: 600; }
.sign-steps li.now::before { background: var(--accent); color: #fff; }
.sign-steps li.done::before { content: ""; background: var(--mint-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231F7A57' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; }
.code-input { font-size: 22px; letter-spacing: .35em; font-variant-numeric: tabular-nums; text-align: center; max-width: 220px; }
.sign-consent { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0 4px; line-height: 1.5; }
.sign-consent input { margin-top: 4px; flex: 0 0 auto; }
.sign-resend { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.sign-decline { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.sign-decline summary { cursor: pointer; color: var(--ink-2); font-size: 13px; }
.sign-decline form { margin-top: 12px; }
.sign-state { text-align: center; padding: 24px 8px; }
.sign-state .ic { color: var(--accent-ink); }
.sign-state.ok .ic { color: var(--mint-ink); }
.sign-state h1 { font-size: 22px; margin: 10px 0 6px; }
.sign-state p { color: var(--ink-2); max-width: 56ch; margin: 0 auto 14px; }
.sign-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.sign-foot { text-align: center; color: var(--ink-3); font-size: 12px; margin-top: 22px; }
@media (max-width: 760px) { .sign-doc iframe { height: 60vh; } .sign-head { padding-top: 0; } }

/* un champ couleur garde la hauteur d'un champ */
.input[type="color"] { height: 40px; padding: 4px 6px; cursor: pointer; }

/* ---------- la version d'une proposition : une ligne qu'on ouvre */
.tbl tr.vrow { cursor: pointer; }
.tbl tr.vrow:hover td { background: var(--accent-soft-2); }
.tbl tr.vrow.is-sent td { background: var(--mint-soft); }
.vlink { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }

.dotc { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: -1px; border: 1px solid var(--line-2); }

/* Un profil est un rond, toujours. L'actif est le même rond, plus marqué : couleur, anneau, coche. */
.avatar { aspect-ratio: 1; }
.avatar.off { opacity: .55; filter: grayscale(1); }
.avatar.on { box-shadow: 0 0 0 2px var(--accent), 0 0 0 4px var(--surface); }
.avatar.on::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 17px; height: 17px; border-radius: 50%;
  border: 2px solid var(--surface); background: var(--mint-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 10px no-repeat; }

/* Les pages publiques : mêmes cartes, mais un texte qui se lit. */
.pub { max-width: 760px; margin: 40px auto; padding: 0 16px; }
.pub .card { padding: 28px 32px; }
.pub h1 { font-size: 26px; margin-bottom: 4px; }
.pub h2 { font-size: 15px; font-weight: 650; margin: 22px 0 6px; }
.pub p, .pub li { color: var(--ink-2); line-height: 1.65; margin-bottom: 10px; }
.pub ul { padding-left: 20px; margin-bottom: 10px; }
.pub code { font-size: 13px; }
.pub-foot { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; }
@media (max-width: 600px) { .pub .card { padding: 20px 18px; } }

/* ---------- ce que la recherche vient d'ouvrir : l'objet visé se signale, puis se tait */
tr:target, .card:target, section:target { scroll-margin-top: 96px; }
tr:target td { animation: cible 2.8s var(--ease) both; }
.card:target { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------------------------------------------------------------- l'aperçu et son fil */
.apc-e { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.apc-s { border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 10px; background: var(--bg-2); }
.apc-s.on { background: var(--mint-soft); border-color: var(--mint); }
.apc-s span { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: var(--r-pill);
              background: var(--surface); border: 2px solid var(--line-2); color: var(--surface); }
.apc-s.on span { background: var(--mint-2); border-color: var(--mint-2); }
.apc-s b { display: block; font-size: 13px; margin-top: 4px; }
.apc-s i { font-style: normal; font-size: 11.5px; color: var(--ink-2); }
.apc-f { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow: auto; }
.apc-m { border-radius: var(--r-md); padding: 9px 12px; font-size: 13.5px; }
.apc-studio { background: var(--accent-soft-2); border: 1px solid var(--accent-soft); }
.apc-agent { background: var(--bg-2); border: 1px solid var(--line); }
.apc-q { font-size: 11.5px; color: var(--ink-3); margin-bottom: 3px; font-weight: 600; }
.apc .sep { height: 1px; background: var(--line); margin: 16px 0 14px; }
.apc-a { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
.apc-l, .apc-r { display: flex; gap: 8px; align-items: flex-start; flex: 1 1 320px; }
.apc-r textarea { flex: 1 1 auto; resize: vertical; }
.apc-ok { color: var(--mint-ink); } .apc-non { color: var(--rose-ink); } .apc-vous { color: var(--accent-ink); }
@media (max-width: 780px) { .apc-e { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------------------------------------------------------------- la chaîne d'un dossier
   Elle vit sur trois écrans (fiche du dossier, fiche personne, fiche organisation) : sa feuille
   appartient donc au produit. Elle était posée en <style> dans le composant, et cet élément
   s'intercalait entre la carte et le bloc suivant — `.card + .grid` ne voyait plus son voisin,
   et les deux se collaient. Une règle d'adjacence ne pardonne pas un élément invisible au milieu. */
  .chn-g { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.1fr); gap: 26px; }
  .chn-t { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
           color: var(--ink-3); margin-bottom: 12px; }
  .chn-l { list-style: none; margin: 0; padding: 0; }
  .chn-i { display: flex; gap: 12px; align-items: flex-start; padding: 0 0 16px; position: relative; }
  /* Le fil qui relie les gestes : il part du centre de la pastille et s'arrête au dernier. */
  .chn-i::before { content: ""; position: absolute; left: 10px; top: 21px; bottom: 0; width: 2px;
                   background: var(--line-2); }
  .chn-i:last-child::before { display: none; }
  .chn-p { flex: 0 0 auto; width: 21px; height: 21px; border-radius: var(--r-pill); display: grid;
           place-items: center; background: var(--surface); border: 2px solid var(--line-2);
           color: var(--surface); position: relative; z-index: 1; }
  .chn-fait .chn-p { background: var(--mint-2); border-color: var(--mint-2); }
  .chn-attente .chn-p { border-color: var(--sun); background: var(--sun-soft); }
  .chn-refuse .chn-p { background: var(--rose-ink); border-color: var(--rose-ink); }
  .chn-i b { display: block; font-size: 14px; }
  .chn-vide b { color: var(--ink-3); font-weight: 600; }
  .chn-d { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 2px; word-break: break-word; }
  .chn-j { margin: 0; }
  .chn-ok { color: var(--mint-ink); }
  .chn-tard { color: var(--sun-ink); }
  .chn-e { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: var(--r-pill);
           background: var(--sun-soft); color: var(--sun-ink); font-size: 11px; font-weight: 700; }
  .chn-late { color: var(--rose-ink); font-weight: 700; }
  .chn-miss { color: var(--ink-3); font-weight: 700; text-decoration: line-through; }
  .chn-m td { background: var(--bg-2); }
  .chn-m .cell-main { color: var(--ink-2); }
  .chn-w { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }
  .chn-r td { background: var(--rose-soft); }
  @media (max-width: 900px) { .chn-g { grid-template-columns: 1fr; gap: 20px; } }
@keyframes cible { 0%, 55% { background: var(--accent-soft); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { tr:target td { animation: none; background: var(--accent-soft); } }

/* ---------- la portée de l'écran : quel profil on regarde, et comment en sortir */
.portee { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: -4px 0 16px;
          padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--r-pill);
          background: var(--surface); color: var(--ink-2); font-size: 13px; }
.portee b { color: var(--ink); font-weight: 650; }
.portee form { display: inline-flex; }
.portee .ic { color: var(--ink-3); }
.unit-badge.unit-all { width: auto; padding: 0 11px; font-size: 12px; letter-spacing: .01em; }

/* Une règle de l'auteur bat celle du navigateur : sans ce !important, `hidden` ne cache rien
   d'un élément que la feuille met en display:grid ou flex — la recherche comptait juste et
   n'effaçait rien. */
[hidden] { display: none !important; }

/* ---------- ce que la recherche du bandeau laisse voir sur la page en cours */
.search { position: relative; }
.search-avis { position: absolute; top: calc(100% + 6px); right: 0; z-index: 30;
               padding: 7px 14px; border: 1px solid var(--line); border-radius: var(--r-pill);
               background: var(--surface); color: var(--ink-2); font-size: 13px; white-space: nowrap;
               box-shadow: 0 12px 28px -14px rgba(21, 20, 46, .35); }
.search-avis b { color: var(--ink); }

/* ---------- trier et filtrer depuis le titre de la colonne
   Un tableau n'a pas besoin d'un bandeau au-dessus de lui : le titre de la colonne sait ce qu'il
   contient. Un titre qui trie est un lien — le premier clic trie, le second retourne. Un titre qui
   filtre porte son menu, et ce menu n'est fait que de liens : s'il reste ouvert faute de script,
   on peut encore choisir. */
.tbl th.th-x { position: relative; padding-top: 1px; padding-bottom: 9px; }
.thb { display: inline-flex; align-items: center; gap: 5px; margin: 0 -9px; padding: 5px 9px;
       border-radius: var(--r-sm); color: var(--ink-3); font-size: 12px; font-weight: 600;
       cursor: pointer; white-space: nowrap; list-style: none; }
.thb::-webkit-details-marker { display: none; }
.thb:hover { background: var(--accent-soft-2); color: var(--ink); text-decoration: none; }
.thb.on { background: var(--accent-soft); color: var(--accent-ink); }
.thb .ic { opacity: 0; transition: opacity .12s, transform .15s var(--ease); }
.thb:hover .ic, .thb.on .ic, details.thm > .thb .ic { opacity: .55; }
.thb.on .ic { opacity: 1; }
.thb.on:not(.bas) .ic { transform: rotate(180deg); }          /* de A vers Z : la pointe monte */
details.thm[open] > .thb { background: var(--accent-soft); color: var(--accent-ink); }
details.thm[open] > .thb .ic { transform: rotate(180deg); opacity: 1; }

.thm .menu { position: absolute; z-index: 40; top: 100%; left: 0; min-width: 214px; max-height: 62vh;
             overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-md);
             background: var(--surface); box-shadow: 0 18px 38px -16px rgba(21,20,46,.34); }
.thm .menu a { display: flex; align-items: center; justify-content: space-between; gap: 18px;
               padding: 7px 10px; border-radius: var(--r-sm); color: var(--ink);
               font-size: 13px; font-weight: 500; }
.thm .menu a span { color: var(--ink-3); font-size: 12px; font-weight: 600; }
.thm .menu a:hover { background: var(--accent-soft-2); text-decoration: none; }
.thm .menu a.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; }
.thm .menu a.on span { color: var(--accent-ink); }
.thm .menu-t { padding: 10px 10px 4px; color: var(--ink-3); font-size: 11px; font-weight: 700;
               letter-spacing: .06em; text-transform: uppercase; }

/* ---------------------------------------------------------------- la saisie assistée
   On tape le libellé d une ligne, la bibliothèque propose ce qu elle a, et la dernière
   entrée permet de créer l article avec les lettres déjà tapées. Deux écrans s en servent —
   la proposition et la facture — donc ces règles vivent ici et non dans une vue. */
  .sug { position: relative; }
  .sug-list { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; margin-top: 4px; overflow: hidden;
              background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md); box-shadow: var(--shadow-1); }
  .sug-i { display: block; width: 100%; text-align: left; padding: 8px 12px; border: 0; background: none; cursor: pointer; font: inherit; }
  .sug-i:hover, .sug-i:focus { background: var(--accent-soft-2); }
  .sug-i b { display: block; font-weight: 600; }
  .sug-i span { display: block; font-size: 12.5px; color: var(--ink-2); }
  .sug-n { border-top: 1px solid var(--line); }
  .sug-n b { color: var(--accent-ink, var(--ink)); }
