/* ==========================================================================
   Lyrge · espace de prospection
   Thème clair par défaut ([data-theme="clair"]), sombre en option.
   Sommaire : 1 Polices & tokens · 2 Base · 3 Structure · 4 Composants
              5 Pages · 6 Surcouches (palette, aide, toasts) · 7 Mobile
   ========================================================================== */

/* 1. Polices & tokens ----------------------------------------------------- */
@font-face { font-family: "Manrope"; src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("fonts/unbounded-latin-wght-normal.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }

:root {
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Unbounded", "Manrope", system-ui, sans-serif;
  --r-xs: 6px; --r-sm: 8px; --r: 12px; --r-lg: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --side: 248px;
}

:root, [data-theme="clair"] {
  color-scheme: light;
  --bg: #f7f6fb;
  --surface: #ffffff;
  --surface-2: #faf9fd;
  --surface-3: #f2f0f8;
  --hover: #f4f2fb;
  --border: #e9e6f2;
  --border-2: #dcd8ea;
  --text: #17142c;
  --text-2: #4a4666;
  --muted: #7d7996;
  --brand: #4a2fd6;
  --brand-2: #5d44e6;
  --brand-ink: #3b23b8;
  --brand-soft: #efebff;
  --brand-soft-2: #e2dcff;
  --on-brand: #ffffff;
  --focus: rgba(74, 47, 214, .35);
  --shadow-sm: 0 1px 2px rgba(23, 20, 44, .05);
  --shadow: 0 1px 2px rgba(23, 20, 44, .04), 0 4px 16px -4px rgba(23, 20, 44, .08);
  --shadow-lg: 0 12px 40px -8px rgba(23, 20, 44, .18), 0 2px 6px rgba(23, 20, 44, .06);
  --overlay: rgba(23, 20, 44, .32);
  --danger: #c93030; --danger-soft: #fdecec;
  --warn: #9a6200; --warn-soft: #fdf3dc;
  --ok: #13703c; --ok-soft: #e4f5eb;

  --st-nouveau: #6d4ef0;       --st-nouveau-bg: #f1edff;       --st-nouveau-ink: #4a2fd6;
  --st-a_contacter: #2f7de1;   --st-a_contacter-bg: #e8f1fd;   --st-a_contacter-ink: #1c5bb0;
  --st-contacte: #d99a0b;      --st-contacte-bg: #fcf3dd;      --st-contacte-ink: #855700;
  --st-repondu: #0f9d8f;       --st-repondu-bg: #e1f5f2;       --st-repondu-ink: #0a6a60;
  --st-rdv: #1f9d55;           --st-rdv-bg: #e3f5ea;           --st-rdv-ink: #136c3a;
  --st-signe: #15803d;         --st-signe-bg: #d6f0df;         --st-signe-ink: #0d5a2a;
  --st-refus: #dc4c4c;         --st-refus-bg: #fdecec;         --st-refus-ink: #a02424;
  --st-ne_pas_contacter: #dc4c4c; --st-ne_pas_contacter-bg: #fdecec; --st-ne_pas_contacter-ink: #a02424;
  --st-ecarte: #9a97ad;        --st-ecarte-bg: #f0eff5;        --st-ecarte-ink: #5c5973;
}

[data-theme="sombre"] {
  color-scheme: dark;
  --bg: #0b0a12;
  --surface: #13111d;
  --surface-2: #171523;
  --surface-3: #1d1a2c;
  --hover: #1c1a2a;
  --border: #25223a;
  --border-2: #34304f;
  --text: #eeebfb;
  --text-2: #bdb8d8;
  --muted: #8d89a8;
  --brand: #6b52f5;
  --brand-2: #7b64ff;
  --brand-ink: #b8a9ff;
  --brand-soft: rgba(123, 100, 255, .16);
  --brand-soft-2: rgba(123, 100, 255, .26);
  --focus: rgba(123, 100, 255, .5);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px -4px rgba(0, 0, 0, .4);
  --shadow-lg: 0 16px 48px -8px rgba(0, 0, 0, .6);
  --overlay: rgba(0, 0, 0, .55);
  --danger: #f38a8a; --danger-soft: rgba(243, 138, 138, .12);
  --warn: #f2c261; --warn-soft: rgba(242, 194, 97, .12);
  --ok: #6fd69a; --ok-soft: rgba(111, 214, 154, .12);

  --st-nouveau-bg: rgba(123, 100, 255, .16);  --st-nouveau-ink: #c2b6ff;  --st-nouveau: #8f7bff;
  --st-a_contacter-bg: rgba(88, 158, 245, .15); --st-a_contacter-ink: #a6cbfa; --st-a_contacter: #5a9ef5;
  --st-contacte-bg: rgba(242, 194, 97, .14);  --st-contacte-ink: #f4d189;  --st-contacte: #e8b545;
  --st-repondu-bg: rgba(52, 199, 183, .14);   --st-repondu-ink: #8de3d9;   --st-repondu: #34c7b7;
  --st-rdv-bg: rgba(111, 214, 154, .14);      --st-rdv-ink: #9fe6bd;       --st-rdv: #56cf8a;
  --st-signe-bg: rgba(111, 214, 154, .24);    --st-signe-ink: #c1f2d4;     --st-signe: #3fbf74;
  --st-refus-bg: rgba(243, 138, 138, .13);    --st-refus-ink: #f7b3b3;     --st-refus: #ef7070;
  --st-ne_pas_contacter-bg: rgba(243, 138, 138, .13); --st-ne_pas_contacter-ink: #f7b3b3; --st-ne_pas_contacter: #ef7070;
  --st-ecarte-bg: rgba(141, 137, 168, .14);   --st-ecarte-ink: #b3b0c8;    --st-ecarte: #8d89a8;
}

/* 2. Base ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14.5px/1.5 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11"; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; }
code { font: .88em ui-monospace, "Cascadia Code", Consolas, monospace; background: var(--surface-3); border: 1px solid var(--border); border-radius: var(--r-xs); padding: .1em .45em; }
kbd { display: inline-grid; place-items: center; min-width: 1.6em; height: 1.6em; padding: 0 .4em; font: 600 .72rem/1 var(--font); color: var(--muted);
  background: var(--surface); border: 1px solid var(--border-2); border-bottom-width: 2px; border-radius: 5px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: var(--r-xs); }
::selection { background: var(--brand-soft-2); }
[hidden] { display: none !important; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic--xs { width: 13px; height: 13px; display: inline-block; vertical-align: -1px; margin-left: 3px; }
.muted { color: var(--muted); }
.txt { color: var(--text); }
.txt-danger { color: var(--danger) !important; }
.txt-warn { color: var(--warn) !important; }
.petit { font-size: .86rem; }
.bloc { display: block; }
.nowrap { white-space: nowrap; }
.grow { flex: 1 1 200px; }
[data-theme="clair"] .si-sombre, [data-theme="sombre"] .si-clair { display: none; }

/* 3. Structure ------------------------------------------------------------ */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.main { min-width: 0; }
.page { max-width: 1280px; margin: 0 auto; padding: 32px 40px 72px; display: grid; gap: 24px; align-content: start; }

.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; padding: 18px 14px; background: var(--surface);
  border-right: 1px solid var(--border); overflow-y: auto; }
.side__logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; font: 700 1.05rem var(--font-display); letter-spacing: -.01em; }
.side__search { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; margin-bottom: 10px; border: 1px solid var(--border);
  border-radius: var(--r-sm); background: var(--surface-2); color: var(--muted); text-align: left; transition: border-color .15s, background .15s; }
.side__search:hover { border-color: var(--border-2); background: var(--surface); }
.side__search span { flex: 1; }
.side__nav { display: grid; gap: 2px; }
.side__nav a, .side__btn { display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: var(--r-sm); color: var(--text-2);
  font-weight: 600; border: 0; background: none; width: 100%; text-align: left; position: relative; transition: background .15s, color .15s; }
.side__nav a:hover, .side__btn:hover { background: var(--hover); color: var(--text); }
.side__nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.side__nav a[aria-current="page"] .ic { color: var(--brand); }
.side__nav a > span:first-of-type, .side__btn > span { flex: 1; }
.side__sec { margin-top: 10px; font-weight: 500 !important; font-size: .92rem; }
.side__badge { min-width: 22px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--brand);
  color: var(--on-brand); font-size: .74rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.side__badge--discret { background: var(--surface-3); color: var(--muted); font-weight: 650; }
.side__nav a[aria-current="page"] .side__badge--discret { background: var(--surface); }
.side__foot { margin-top: auto; display: grid; gap: 2px; padding-top: 12px; border-top: 1px solid var(--border); }
.side__foot .side__btn { font-weight: 500; font-size: .92rem; }
.side__foot kbd { flex: none; }

.mtop, .bnav { display: none; }

/* 4. Composants ------------------------------------------------------------ */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow-sm); min-width: 0; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card__head .card__title { margin: 0; }
.card__title { display: flex; align-items: center; gap: 8px; font-size: .95rem; font-weight: 700; margin-bottom: 14px; }
.card__title .ic { color: var(--muted); width: 16px; height: 16px; }
.duo { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; }
.duo--tight { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stack { display: grid; gap: 14px; }
.grille2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rang--gauche { justify-content: flex-start; }
.side__foot a.side__btn[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.rang { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; }

.phead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.phead h1, .hello h1, .tri__head h1 { font: 700 1.65rem/1.2 var(--font-display); letter-spacing: -.02em; }
.phead p { margin-top: 6px; }
.retour { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 600; font-size: .9rem; width: fit-content; margin-bottom: -8px; }
.retour:hover { color: var(--text); }
.retour .ic { width: 16px; height: 16px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text); font-weight: 650; white-space: nowrap; box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s; }
.btn:hover { background: var(--hover); border-color: var(--border-2); }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 16px; height: 16px; }
.btn--primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); box-shadow: 0 1px 2px rgba(74, 47, 214, .3), inset 0 1px 0 rgba(255, 255, 255, .15); }
.btn--primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn--ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn--ghost:hover { background: var(--hover); color: var(--text); }
.btn--danger-soft { color: var(--danger); }
.btn--danger-soft:hover { background: var(--danger-soft); border-color: transparent; }
.btn--sm { height: 32px; padding: 0 11px; font-size: .88rem; }
.btn--xs { height: 26px; padding: 0 9px; font-size: .8rem; border-radius: var(--r-xs); }
.btn--lg { height: 46px; padding: 0 20px; font-size: .98rem; border-radius: var(--r); }
.btn--block { width: 100%; }
.btn kbd { margin-left: 4px; background: transparent; }
.btn--primary kbd { color: rgba(255, 255, 255, .8); border-color: rgba(255, 255, 255, .35); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-sm); border: 0; background: none; color: var(--text-2); }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn--sm { width: 30px; height: 30px; }
.icon-btn--sm .ic { width: 16px; height: 16px; }
.lien { color: var(--brand-ink); font-weight: 600; }
.lien:hover { text-decoration: underline; text-underline-offset: 3px; }
.lien-fleche { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 12px; color: var(--brand-ink); font-weight: 650; font-size: .9rem; }
.lien-fleche .ic { width: 15px; height: 15px; transition: transform .15s var(--ease); }
.lien-fleche:hover .ic { transform: translateX(3px); }

/* Formulaires */
input[type="text"], input[type="search"], input[type="password"], input[type="date"], select, textarea {
  width: 100%; height: 38px; padding: 0 12px; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-sm);
  transition: border-color .15s, box-shadow .15s; }
textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 32px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237d7996' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--focus); }
::placeholder { color: var(--muted); opacity: 1; }
.field { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; }
.field-ic { position: relative; display: flex; align-items: center; }
.field-ic .ic { position: absolute; left: 11px; color: var(--muted); width: 16px; height: 16px; pointer-events: none; }
.field-ic input { padding-left: 34px; }
.erreur { color: var(--danger); font-weight: 600; font-size: .9rem; }

/* Pastilles de statut : point coloré + libellé écrit */
.st { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px 0 8px; border-radius: 999px; font-size: .78rem; font-weight: 700;
  white-space: nowrap; background: var(--st-bg); color: var(--st-ink); }
.st__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--st); flex: none; }
.st--nouveau { --st: var(--st-nouveau); --st-bg: var(--st-nouveau-bg); --st-ink: var(--st-nouveau-ink); }
.st--a_contacter { --st: var(--st-a_contacter); --st-bg: var(--st-a_contacter-bg); --st-ink: var(--st-a_contacter-ink); }
.st--contacte { --st: var(--st-contacte); --st-bg: var(--st-contacte-bg); --st-ink: var(--st-contacte-ink); }
.st--repondu { --st: var(--st-repondu); --st-bg: var(--st-repondu-bg); --st-ink: var(--st-repondu-ink); }
.st--rdv { --st: var(--st-rdv); --st-bg: var(--st-rdv-bg); --st-ink: var(--st-rdv-ink); }
.st--signe { --st: var(--st-signe); --st-bg: var(--st-signe-bg); --st-ink: var(--st-signe-ink); }
.st--refus { --st: var(--st-refus); --st-bg: var(--st-refus-bg); --st-ink: var(--st-refus-ink); }
.st--ne_pas_contacter { --st: var(--st-ne_pas_contacter); --st-bg: var(--st-ne_pas_contacter-bg); --st-ink: var(--st-ne_pas_contacter-ink); }
.st--ecarte { --st: var(--st-ecarte); --st-bg: var(--st-ecarte-bg); --st-ink: var(--st-ecarte-ink); }
.st--fichier { --st: var(--muted); --st-bg: var(--surface-3); --st-ink: var(--text-2); }

/* Sélecteur d'étape en ligne (même look que la pastille) */
.stsel { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px 0 9px; border-radius: 999px;
  background: var(--st-bg); color: var(--st-ink); font-size: .8rem; font-weight: 700; cursor: pointer; transition: box-shadow .15s; }
.stsel:hover { box-shadow: 0 0 0 1px var(--st); }
.stsel select { appearance: none; height: auto; width: auto; padding: 0; border: 0; background: none; color: inherit; font-weight: 700; box-shadow: none !important; cursor: pointer; }
.stsel select option { color: var(--text); background: var(--surface); }
.stsel .ic { width: 14px; height: 14px; opacity: .7; pointer-events: none; }
.stsel.is-saving { opacity: .6; }

/* Classe A / B / C */
.cl { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; font: 700 .8rem/1 var(--font-display); flex: none;
  color: var(--text-2); background: var(--surface-3); border: 1px solid var(--border-2); }
.cl--a { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.cl--b { background: var(--brand-soft); border-color: var(--brand-soft-2); color: var(--brand-ink); }
.cl--n { background: transparent; border-style: dashed; color: var(--muted); }
.cl--xs { width: 20px; height: 20px; font-size: .66rem; border-radius: 5px; }
.cl--sm { width: 24px; height: 24px; font-size: .74rem; }
.cl--lg { width: 44px; height: 44px; font-size: 1.15rem; border-radius: 11px; }

/* Jauge de score */
.ring { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none; }
.ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3.2; }
.ring__bg { stroke: var(--surface-3); }
.ring__val { stroke: var(--brand); stroke-linecap: round; }
.ring__txt { font: 700 .8rem/1 var(--font-display); color: var(--text); }
.ring--lg { width: 64px; height: 64px; }
.ring--lg .ring__txt { font-size: 1.1rem; }
.score-pill--pre { background: transparent; border: 1px dashed var(--border-2); }
.score-pill--pre .muted { font-weight: 500; font-size: .74rem; }
.score-pill { display: inline-block; min-width: 34px; padding: 2px 8px; border-radius: 999px; background: var(--surface-3); font-weight: 700; font-size: .82rem; text-align: center; font-variant-numeric: tabular-nums; }

/* Puces, onglets, étiquettes */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text-2); font-weight: 600; font-size: .86rem; transition: all .15s; }
.chip:hover { border-color: var(--muted); color: var(--text); }
.chip[aria-current="true"], .chip.is-on { background: var(--text); border-color: var(--text); color: var(--surface); }
.chips--sm .chip { height: 30px; font-size: .83rem; }
.chip--ghost { border-style: dashed; }
.chip--date { position: relative; padding: 0 10px; }
.chip--date input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.chip--date input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.chip .ic { width: 15px; height: 15px; }
.chip__n { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.chip[aria-current="true"] .chip__n { color: inherit; opacity: .7; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; margin-bottom: -8px; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; color: var(--muted); font-weight: 650; border-bottom: 2px solid transparent;
  margin-bottom: -1px; white-space: nowrap; transition: color .15s; }
.tab:hover { color: var(--text); }
.tab[aria-current="true"] { color: var(--text); border-color: var(--brand); }
.tab__n { padding: 1px 7px; border-radius: 999px; background: var(--surface-3); font-size: .75rem; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tab[aria-current="true"] .tab__n { background: var(--brand-soft); color: var(--brand-ink); }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: var(--r-xs); background: var(--surface-3);
  color: var(--text-2); font-size: .74rem; font-weight: 650; }
.tag .ic { width: 12px; height: 12px; }
.tag--warn { background: var(--warn-soft); color: var(--warn); }
.tag--danger { background: var(--danger-soft); color: var(--danger); }

/* Barre d'outils de liste */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar .field-ic { flex: 1 1 240px; }
.toolbar select { width: auto; flex: 0 1 auto; }
.toolbar--card { padding: 14px; }

/* Tableaux */
.table-wrap { overflow-x: auto; }
.table-wrap.card { padding: 0; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .76rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
  padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; background: var(--surface-2); }
.card:not(.table-wrap) .table th { background: none; padding-top: 4px; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr[data-href] { cursor: pointer; }
.table tbody tr:hover { background: var(--hover); }
.table tr.is-selected { background: var(--brand-soft); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .check { width: 44px; padding-right: 0; }
.table--compact td, .table--compact th { padding: 9px 10px; }
.table--compact td a { font-weight: 650; }
input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.table--fichier td:nth-child(2) { min-width: 240px; }
.cellnom { display: flex; align-items: center; gap: 12px; }
.cellnom__nom { font-weight: 700; color: var(--text); }
.cellnom__nom:hover { color: var(--brand-ink); }
.cellnom__sub { display: block; font-size: .8rem; color: var(--muted); margin-top: 1px; }
.classes { display: inline-flex; align-items: center; gap: 4px; font-weight: 650; font-variant-numeric: tabular-nums; }
.classes .cl { margin-left: 4px; }

/* Barre d'action groupée : flottante en bas */
.lot { position: fixed; left: 50%; bottom: 24px; z-index: 30; transform: translateX(calc(-50% + var(--side) / 2)); display: flex; align-items: center; gap: 10px;
  padding: 8px 8px 8px 16px; background: var(--text); color: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-lg); animation: monte .2s var(--ease); }
.lot[hidden] { display: none; }
.lot .btn { box-shadow: none; }
.lot .btn:not(.btn--primary) { background: transparent; color: var(--surface); border-color: rgba(255, 255, 255, .25); }
[data-theme="sombre"] .lot .btn:not(.btn--primary) { border-color: rgba(0, 0, 0, .25); }
.lot select { height: 32px; width: auto; background-color: transparent; color: inherit; border-color: rgba(127, 127, 127, .4); font-size: .88rem; }
.lot select option { color: var(--text); background: var(--surface); }
.lot .icon-btn { color: inherit; width: 32px; height: 32px; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; }

/* Bandeau d'information (fichier SIRENE) */
.info { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 14px; padding: 14px 16px; border-radius: var(--r); background: var(--surface);
  border: 1px solid var(--border); border-left: 3px solid var(--brand); font-size: .9rem; color: var(--text-2); }
.info p { flex: 1 1 320px; line-height: 1.55; }
.info strong { color: var(--text); }
.info__ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--brand-soft); color: var(--brand); flex: none; }
.info__ic .ic { width: 17px; height: 17px; }
.info__actions { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; padding-left: 46px; }
.avance { width: 100%; display: grid; gap: 6px; padding-left: 46px; }
.avance__barre { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.avance__barre span { display: block; height: 100%; width: var(--w, 0); background: var(--brand); border-radius: 4px; transition: width .7s var(--ease); }
.fichier-strip { display: flex; align-items: center; gap: 14px; padding: 14px 18px; transition: border-color .15s, box-shadow .15s; }
.fichier-strip:hover { border-color: var(--border-2); box-shadow: var(--shadow); }
.fichier-strip__txt { flex: 1; min-width: 0; display: grid; gap: 2px; font-size: .92rem; }
.fichier-strip__txt .muted { font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fichier-strip .lien-fleche { margin: 0; padding: 0; white-space: nowrap; }
.todo__ic--neutre { background: var(--surface-3); color: var(--text-2); }

/* Messages */
.flash { display: none; }
.alerte { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r); background: var(--danger-soft); color: var(--danger); font-weight: 600; }
.empty { display: grid; justify-items: center; gap: 10px; padding: 56px 24px; text-align: center; }
.empty__ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); margin-bottom: 4px; }
.empty__ic .ic { width: 24px; height: 24px; }
.empty h1, .empty h2 { font: 700 1.2rem var(--font-display); }

/* Infobulle */
.tip { position: absolute; z-index: 60; pointer-events: none; padding: 6px 10px; border-radius: var(--r-sm); background: var(--text); color: var(--surface);
  font-size: .8rem; font-weight: 600; opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; max-width: 280px; box-shadow: var(--shadow); }
.tip--on { opacity: 1; transform: none; }

/* 5. Pages ----------------------------------------------------------------- */
/* Aujourd'hui */
.hello { display: grid; gap: 6px; padding: 8px 0 4px; }
.hello__date { color: var(--brand-ink); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.hello h1 { font-size: 2rem; }
.hello__sub { color: var(--text-2); font-size: 1.02rem; }
.todo { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.todo__card { display: flex; flex-direction: column; gap: 6px; transition: box-shadow .2s, transform .2s; }
.todo__card--focus { border-color: var(--brand-soft-2); background: linear-gradient(180deg, var(--brand-soft), var(--surface) 70%); }
.todo__head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.todo__head h2 { font-size: .92rem; font-weight: 700; flex: 1; }
.todo__count { font-weight: 800; color: var(--text-2); font-variant-numeric: tabular-nums; }
.todo__ic { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; flex: none; }
.todo__ic .ic { width: 17px; height: 17px; }
.todo__ic--brand { background: var(--brand); color: var(--on-brand); }
.todo__ic--warn { background: var(--st-contacte-bg); color: var(--st-contacte-ink); }
.todo__ic--info { background: var(--st-a_contacter-bg); color: var(--st-a_contacter-ink); }
.todo__ic--ok { background: var(--st-repondu-bg); color: var(--st-repondu-ink); }
.todo__big { font: 700 2.4rem/1 var(--font-display); letter-spacing: -.03em; }
.todo__empty { font-weight: 650; color: var(--text-2); }
.todo__cta { margin-top: auto; align-self: flex-start; }
.todo__card--focus .todo__cta { margin-top: 12px; }
.mini { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; margin: 0 -8px; }
.mini a { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: var(--r-sm); transition: background .12s; }
.mini a:hover { background: var(--hover); }
.mini__nom { flex: 1; min-width: 0; font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini__meta { color: var(--muted); font-size: .8rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

.section { display: grid; gap: 14px; }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.section__head h2 { font: 700 1.15rem var(--font-display); letter-spacing: -.01em; }
.perf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: 16px; }
.perf__kpis { display: grid; align-content: space-around; gap: 14px; }
.kpi { display: grid; gap: 2px; }
.kpi + .kpi { padding-top: 14px; border-top: 1px solid var(--border); }
.kpi__label { color: var(--muted); font-size: .84rem; font-weight: 600; }
.kpi__val { font: 700 1.7rem/1.15 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi__sub { color: var(--muted); font-size: .8rem; }

/* Entonnoir : une série, barres fines, extrémité arrondie, valeurs écrites */
.funnel { display: grid; gap: 12px; }
.funnel__row { display: grid; grid-template-columns: 82px minmax(0, 1fr) 44px 48px; align-items: center; gap: 12px; border-radius: var(--r-xs); cursor: default; outline-offset: 4px; }
.funnel__label { color: var(--text-2); font-size: .88rem; font-weight: 600; }
.funnel__track { height: 12px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.funnel__bar { display: block; height: 100%; width: var(--w, 0); background: var(--brand); border-radius: 0 4px 4px 0; transition: width .7s var(--ease); }
.funnel__row:hover .funnel__bar, .funnel__row:focus .funnel__bar { background: var(--brand-2); }
.funnel__val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.funnel__conv { color: var(--muted); font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; }

.feed { display: grid; gap: 14px; }
.feed__item { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; align-items: baseline; font-size: .9rem; }
.feed__item p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed__item a { font-weight: 700; }
.feed__item a:hover { color: var(--brand-ink); }
.feed__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); transform: translateY(-1px); }
.feed__item--statut .feed__dot { background: var(--brand); }
.feed__item--note .feed__dot { background: var(--st-contacte); }
.feed__time { color: var(--muted); font-size: .78rem; white-space: nowrap; }

/* Pipeline */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start;
  scroll-snap-type: x proximity; }
.col { display: flex; flex-direction: column; background: var(--surface-3); border-radius: var(--r-lg); min-height: 240px; scroll-snap-align: start;
  transition: background .15s, box-shadow .15s; }
.col__head { display: flex; align-items: center; gap: 9px; padding: 14px 14px 10px; }
.col__head .st__dot { width: 9px; height: 9px; }
.col__head h2 { font-size: .9rem; font-weight: 750; flex: 1; }
.col__count { font-weight: 700; color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.col__body { display: grid; gap: 8px; padding: 0 8px 10px; align-content: start; flex: 1; min-height: 120px; border-radius: var(--r); }
.col__empty { display: none; padding: 18px; text-align: center; color: var(--muted); font-size: .84rem; border: 1.5px dashed var(--border-2); border-radius: var(--r); }
.col__body:not(:has(.kcard)) .col__empty { display: block; }
.col.is-over { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand); }
.board__foot { text-align: center; }
.kcard { display: grid; gap: 6px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-sm);
  cursor: grab; transition: box-shadow .15s, transform .15s, opacity .15s; }
.kcard:hover { box-shadow: var(--shadow); border-color: var(--border-2); }
.kcard.is-dragging { opacity: .45; transform: rotate(1.5deg); }
.kcard.is-moved { animation: pose .45s var(--ease); }
.kcard__top { display: flex; align-items: flex-start; gap: 8px; }
.kcard__nom { flex: 1; min-width: 0; font-weight: 700; font-size: .9rem; line-height: 1.3; }
.kcard__nom:hover { color: var(--brand-ink); }
.kcard__score { font-weight: 700; font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.kcard__sub { color: var(--muted); font-size: .78rem; }
.kcard__foot { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.kcard__age { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); font-size: .76rem; font-weight: 600; }
.kcard__age .ic { width: 12px; height: 12px; }
.kcard__move { position: relative; margin-left: auto; display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--r-xs); color: var(--muted); }
.kcard__move:hover { background: var(--hover); color: var(--text); }
.kcard__move select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; }
.kcard__move .ic { width: 16px; height: 16px; pointer-events: none; }

/* Mode tri */
.tri { display: grid; gap: 20px; max-width: 920px; width: 100%; margin: 0 auto; }
.tri__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.tri__keys { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tri__keys kbd { margin-left: 6px; }
.tri__stage { position: relative; }
.tcard { display: grid; gap: 22px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }
.tcard.is-sortie-gauche { animation: sortGauche .28s var(--ease) forwards; }
.tcard.is-sortie-droite { animation: sortDroite .28s var(--ease) forwards; }
.tcard.is-sortie-bas { animation: sortBas .28s var(--ease) forwards; }
.tcard.is-entree { animation: entree .3s var(--ease); }
.tcard__head { display: flex; align-items: center; gap: 16px; }
.tcard__titre { flex: 1; min-width: 0; }
.tcard__titre h2 { font: 700 1.45rem/1.25 var(--font-display); letter-spacing: -.02em; }
.tcard__titre p { margin-top: 4px; }
.tcard__cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; }
.tcard h3, .fiche h3 { font-size: .78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 10px; }
.tcard h3:not(:first-child) { margin-top: 20px; }
/* Actions toujours à portée : collées au bas de l'écran tant que la carte défile */
.tcard__actions { position: sticky; bottom: 0; z-index: 2; display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 10px; margin: 0 -28px -28px;
  padding: 16px 28px 20px; border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(8px); border-radius: 0 0 20px 20px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r); overflow: hidden; }
.fact { display: grid; gap: 2px; padding: 12px 14px; background: var(--surface-2); }
.fact__label { font-size: .75rem; color: var(--muted); font-weight: 650; }
.fact__val { font-weight: 700; font-size: .93rem; }
.tri__vide { display: grid; justify-items: center; gap: 12px; padding: 64px 24px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; }
.tri__vide h2 { font: 700 1.35rem var(--font-display); }
.tri__vide-ic { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.tri__vide-ic .ic { width: 28px; height: 28px; }

/* Explications, signaux, contacts */
.why { display: grid; gap: 7px; }
.why li { display: flex; gap: 10px; align-items: baseline; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.why li:not(.why--plus)::before { content: ""; width: 34px; flex: none; }
.why--plus { color: var(--text) !important; }
.why__pts { flex: none; width: 34px; font-weight: 800; font-size: .8rem; color: var(--st-rdv-ink); font-variant-numeric: tabular-nums; }
.sigs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.sig { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; background: var(--surface-3); color: var(--muted);
  font-size: .8rem; font-weight: 650; }
.sig .ic { width: 14px; height: 14px; }
.sig--bon { background: var(--st-rdv-bg); color: var(--st-rdv-ink); }
.contact { display: grid; gap: 10px; }
.contact li { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; overflow-wrap: anywhere; }
.contact .ic { width: 16px; height: 16px; color: var(--muted); margin-top: 2px; }
.contact a { color: var(--brand-ink); font-weight: 650; }
.contact a:hover { text-decoration: underline; }
.angles { display: grid; gap: 8px; }
.angles li { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; }
.angles .ic { width: 16px; height: 16px; color: var(--brand); margin-top: 2px; }
.spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: tourne .7s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.btn:disabled { opacity: .7; cursor: progress; }
.carte-vp { border-left: 3px solid var(--brand); }
.vp { display: grid; gap: 12px; }
.vp dt { font-size: .76rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 3px; }
.vp dd { font-size: .95rem; line-height: 1.55; color: var(--text); }
.dl { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 9px 12px; font-size: .92rem; }
.dl dt { color: var(--muted); }
.dl dd { font-weight: 600; overflow-wrap: anywhere; }
.excl { display: grid; gap: 10px; }
.excl li { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.excl .ic { width: 16px; height: 16px; color: var(--muted); margin-top: 2px; }

/* Fiche prospect */
.fhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.fhead__id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.fhead h1 { font: 700 1.6rem/1.2 var(--font-display); letter-spacing: -.02em; }
.fhead__id p { margin-top: 4px; }
.fhead__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.stepper-card { padding: 16px 20px; display: grid; gap: 12px; }
.stepper { display: flex; align-items: center; gap: 0; overflow-x: auto; scrollbar-width: none; }
.stepper__nouveau { margin-right: 14px; flex: none; }
.stepper__step { flex: 1; min-width: 120px; position: relative; }
.stepper__step:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 2px;
  background: var(--border-2); border-radius: 2px; }
.stepper__step--fait::after { background: var(--brand) !important; }
.stepper__step button { display: grid; justify-items: center; gap: 6px; width: 100%; padding: 0 4px; border: 0; background: none; color: var(--muted);
  font-weight: 650; font-size: .84rem; border-radius: var(--r-sm); }
.stepper__step button:hover { color: var(--text); }
.stepper__step button:hover .stepper__dot { border-color: var(--brand); }
.stepper__dot { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border-2); background: var(--surface);
  color: var(--on-brand); transition: all .2s var(--ease); }
.stepper__dot .ic { width: 16px; height: 16px; stroke-width: 3; }
.stepper__step--fait .stepper__dot { background: var(--brand); border-color: var(--brand); }
.stepper__step--fait button { color: var(--text-2); }
.stepper__step--actuel .stepper__dot { border-color: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); }
.stepper__step--actuel .stepper__dot::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); }
.stepper__step--actuel button { color: var(--brand-ink); font-weight: 750; }
.stepper--sorti .stepper__step { opacity: .5; }
.stepper__sorties { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 12px; border-top: 1px solid var(--border); }
.fiche { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.fiche__main { display: grid; gap: 20px; }
.fiche__side { display: grid; gap: 20px; position: sticky; top: 20px; }
.rappel__val { font-weight: 700; font-size: .88rem; color: var(--text-2); }
.composer { display: grid; gap: 8px; margin-bottom: 18px; }
.composer__foot { display: flex; align-items: center; justify-content: space-between; }
.timeline { display: grid; gap: 0; }
.tl { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding-bottom: 16px; }
.tl:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; background: var(--border); border-radius: 2px; }
.tl__dot { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); color: var(--muted); }
.tl__dot .ic { width: 14px; height: 14px; }
.tl--statut .tl__dot { background: var(--brand-soft); color: var(--brand); }
.tl--note .tl__dot { background: var(--st-contacte-bg); color: var(--st-contacte-ink); }
.tl__body { padding-top: 4px; min-width: 0; }
.tl__titre { font-weight: 700; font-size: .9rem; }
.tl__txt { margin-top: 4px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); font-size: .9rem;
  color: var(--text-2); overflow-wrap: anywhere; }
.tl__meta { margin-top: 3px; color: var(--muted); font-size: .78rem; }
.tl__meta a { color: var(--brand-ink); font-weight: 600; }
.tl.is-new { animation: entree .35s var(--ease); }

/* Connexion */
.seul__page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(1000px 500px at 50% -10%, var(--brand-soft), transparent 70%), var(--bg); }
.auth { width: min(400px, 100%); display: grid; gap: 12px; padding: 36px 32px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow-lg); }
.auth__logo { display: flex; align-items: center; gap: 10px; font: 700 1.15rem var(--font-display); margin-bottom: 10px; }
.auth h1 { font: 700 1.5rem var(--font-display); letter-spacing: -.02em; }
.auth form { margin-top: 10px; }

/* 6. Surcouches ------------------------------------------------------------ */
dialog { padding: 0; border: 0; color: var(--text); background: none; max-width: none; max-height: none; }
dialog::backdrop { background: var(--overlay); backdrop-filter: blur(3px); }
.palette { position: fixed; inset: 12vh 0 auto; margin: 0 auto; width: min(620px, calc(100% - 32px)); background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; }
.palette[open] { animation: pop .18s var(--ease); }
.palette__field { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.palette__field .ic { color: var(--muted); width: 20px; height: 20px; }
.palette__field input { height: 56px; border: 0; padding: 0; font-size: 1.05rem; background: none; box-shadow: none !important; }
.palette__list { max-height: 50vh; overflow-y: auto; padding: 8px; }
.palette__group { padding: 10px 10px 6px; font-size: .72rem; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.palette__item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-sm); cursor: pointer; }
.palette__item[aria-selected="true"] { background: var(--brand-soft); }
.palette__item .ic { color: var(--muted); }
.palette__item[aria-selected="true"] .ic { color: var(--brand); }
.palette__nom { flex: 1; min-width: 0; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette__sous { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.palette__vide { padding: 20px 10px; text-align: center; color: var(--muted); }
.palette__foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: .78rem; }
.palette__foot span { display: inline-flex; align-items: center; gap: 4px; }
.aide { position: fixed; inset: 0; margin: auto; width: min(760px, calc(100% - 32px)); height: fit-content; padding: 24px; background: var(--surface);
  border-radius: 16px; box-shadow: var(--shadow-lg); }
.aide[open] { animation: pop .18s var(--ease); }
.aide__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.aide__head h2 { font: 700 1.2rem var(--font-display); }
.aide__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.aide h3 { font-size: .78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 10px; }
.aide dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; font-size: .88rem; }
.aide dt { white-space: nowrap; }
.toasts { position: fixed; left: 50%; bottom: 24px; z-index: 80; transform: translateX(calc(-50% + var(--side) / 2)); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
body:has(.tcard) .toasts { bottom: 110px; }
.toast { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px 8px 8px 14px; background: var(--text); color: var(--surface); border-radius: var(--r);
  box-shadow: var(--shadow-lg); font-weight: 600; font-size: .9rem; pointer-events: auto; animation: monte .22s var(--ease); max-width: min(560px, calc(100vw - 32px)); }
.toast .ic { width: 18px; height: 18px; color: var(--st-rdv); }
.toast--erreur .ic { color: var(--st-refus); }
.toast button { height: 30px; padding: 0 10px; border: 0; border-radius: var(--r-sm); background: rgba(127, 127, 127, .22); color: inherit; font-weight: 700; }
.toast button:hover { background: rgba(127, 127, 127, .35); }
.toast.is-out { animation: descend .2s var(--ease) forwards; }

@keyframes monte { from { opacity: 0; transform: translateY(10px); } }
@keyframes descend { to { opacity: 0; transform: translateY(10px); } }
@keyframes pop { from { opacity: 0; transform: scale(.97) translateY(-6px); } }
@keyframes entree { from { opacity: 0; transform: translateY(8px); } }
@keyframes pose { 0% { box-shadow: 0 0 0 3px var(--brand); } 100% { box-shadow: var(--shadow-sm); } }
@keyframes sortGauche { to { opacity: 0; transform: translateX(-40px) rotate(-2deg); } }
@keyframes sortDroite { to { opacity: 0; transform: translateX(40px) rotate(2deg); } }
@keyframes sortBas { to { opacity: 0; transform: translateY(24px); } }

/* 7. Adaptation écrans ---------------------------------------------------- */
@media (max-width: 1280px) {
  .todo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fiche { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 1100px) {
  .duo, .perf { grid-template-columns: minmax(0, 1fr); }
  .fiche { grid-template-columns: minmax(0, 1fr); }
  .fiche__side { position: static; }
  .hide-md { display: none; }
}
@media (max-width: 900px) {
  :root { --side: 0px; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .mtop { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 8px 0 16px;
    background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
  .mtop__logo { display: flex; align-items: center; gap: 9px; margin-right: auto; font: 700 1rem var(--font-display); }
  .bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px);
    border-top: 1px solid var(--border); }
  .bnav a { display: grid; justify-items: center; gap: 2px; padding: 4px 0; color: var(--muted); font-size: .68rem; font-weight: 650; }
  .bnav a[aria-current="page"] { color: var(--brand-ink); }
  .bnav__ic { position: relative; display: grid; place-items: center; width: 44px; height: 28px; border-radius: 999px; transition: background .15s; }
  .bnav a[aria-current="page"] .bnav__ic { background: var(--brand-soft); }
  .bnav__badge { position: absolute; top: -3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border-radius: 999px;
    background: var(--brand); color: var(--on-brand); font-size: .62rem; font-weight: 800; }
  .page { padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); gap: 18px; }
  .lot, .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .tcard__cols { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 640px) {
  .grille2 { grid-template-columns: minmax(0, 1fr); }
  .hello h1 { font-size: 1.55rem; }
  .phead h1, .tri__head h1, .fhead h1 { font-size: 1.35rem; }
  .todo { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .duo--tight { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 16px; border-radius: var(--r); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tcard { padding: 18px; border-radius: 16px; gap: 18px; }
  .tcard__titre h2 { font-size: 1.15rem; }
  .tcard__actions { grid-template-columns: 1fr 1fr; bottom: calc(64px + env(safe-area-inset-bottom)); margin: 0 -18px -18px; padding: 14px 18px; border-radius: 0 0 16px 16px; }
  .tcard__actions [data-tri-action="a_contacter"] { grid-column: 1 / -1; grid-row: 1; }
  .tcard__actions kbd, .tri__keys { display: none; }
  .ring--lg { width: 52px; height: 52px; }
  .fhead__actions { width: 100%; }
  .fhead__actions .btn { flex: 1; }
  .hide-sm { display: none; }
  .board { grid-auto-columns: 85%; margin: 0 -16px; padding: 0 16px 8px; }
  .phead { display: grid; grid-template-columns: minmax(0, 1fr); }
  .phead .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .phead .chip { flex: none; }
  .toolbar select { flex: 1 1 45%; }
  .funnel__row { grid-template-columns: 70px minmax(0, 1fr) 34px 40px; gap: 8px; }
  .aide__grid { grid-template-columns: minmax(0, 1fr); }
  .stepper__step { min-width: 92px; }
  .lot { left: 16px; right: 16px; transform: none; flex-wrap: wrap; }
  .fichier-strip { flex-wrap: wrap; }
  .fichier-strip__txt .muted { white-space: normal; }
  .info__actions, .avance { padding-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
