/* Cardgo — système v3, porté depuis design/maquettes-2026-10-01/project/systeme.css (source de vérité).
   Chrome clair et unifié, une feuille de contenu posée dessus, filets fins, boutons noirs.
   Thème clair par défaut ; Graphite suit prefers-color-scheme (bloc en fin de fichier) ou data-theme="graphite".
   Toute différence avec la maquette est signalée « app : » ; le reste se recopie tel quel. */

:root, [data-theme="clair"] {
  /* Plateau (chrome) et feuille de contenu */
  --canvas: #ECEEF1;
  --surface: #FFFFFF;
  --surface-2: #F6F7F9;
  --surface-3: #EDEFF2;
  --line: rgb(16 24 40 / 8%);
  --line-strong: rgb(16 24 40 / 15%);
  --ink: #0F1115;
  --ink-2: #474C57;
  --ink-3: #646A76;
  --ink-4: #9CA1AB;

  /* Navigation : même ton que le plateau */
  --nav: #ECEEF1;
  --nav-2: rgb(18 20 25 / 5%);
  --nav-3: rgb(18 20 25 / 9%);
  --nav-ink: #121419;
  --nav-ink-2: #5A606B;
  --nav-active: #FFFFFF;
  --nav-active-ring: 0 1px 2px rgb(16 24 40 / 8%), 0 0 0 1px rgb(16 24 40 / 6%);

  /* Action principale : encre. La couleur de rôle sert à la sélection et à la progression. */
  --primary: #0F1115;
  --primary-hover: #2B2F37;
  --on-primary: #FFFFFF;

  --role: #1268EA;
  --role-strong: #0B55C8;
  --role-soft: rgb(18 104 234 / 9%);
  --role-ink: #0B55C8;
  --on-role: #FFFFFF;

  --done: #15803D;   --done-soft: rgb(21 128 61 / 9%);
  --clarify: #B4580A; --clarify-soft: rgb(180 88 10 / 9%);
  --late: #C2342C;   --late-soft: rgb(194 52 44 / 9%);
  --todo: #646A76;   --todo-soft: rgb(16 24 40 / 6%);

  --sheet-shadow: 0 0 0 1px rgb(16 24 40 / 6%), 0 1px 2px rgb(16 24 40 / 4%), 0 16px 40px -20px rgb(16 24 40 / 16%);
  --shadow-pop: 0 0 0 1px rgb(16 24 40 / 7%), 0 16px 40px -12px rgb(16 24 40 / 24%);
  --shadow-lift: 0 1px 2px rgb(16 24 40 / 8%), 0 0 0 1px rgb(16 24 40 / 6%);
  --ring: 0 0 0 3px rgb(18 104 234 / 22%);
  --cover-ring: rgb(16 24 40 / 10%);
  --scrim: rgb(236 238 241 / 72%);

  --r-xs: 6px; --r-sm: 9px; --r-md: 12px; --r-lg: 14px; --r-xl: 16px;
  --ease: cubic-bezier(.22, .8, .24, 1);

  --font: var(--font-onest), "Onest", ui-sans-serif, -apple-system, "Segoe UI", sans-serif;
  --mono: var(--font-dm-mono), "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --display: var(--font-onest), "Onest", ui-sans-serif, -apple-system, sans-serif;
  --display-weight: 620; --display-track: -0.025em;

  /* Alias des maquettes de direction */
  --panel: var(--surface-2); --hair: var(--line); --hair-strong: var(--line-strong); --sheet: var(--surface);
}

[data-theme="graphite"] {
  color-scheme: dark;
  --canvas: #08090B;
  --surface: #111317;
  --surface-2: #171A1F;
  --surface-3: #1F232A;
  --line: rgb(255 255 255 / 7%);
  --line-strong: rgb(255 255 255 / 13%);
  --ink: #F1F2F4;
  --ink-2: #BABEC6;
  --ink-3: #8E949F;
  --ink-4: #5E646E;

  --nav: #08090B;
  --nav-2: rgb(255 255 255 / 5%);
  --nav-3: rgb(255 255 255 / 9%);
  --nav-ink: #F1F2F4;
  --nav-ink-2: #8A909B;
  --nav-active: rgb(255 255 255 / 8%);
  --nav-active-ring: inset 0 0 0 1px rgb(255 255 255 / 6%);

  --primary: #F1F2F4;
  --primary-hover: #FFFFFF;
  --on-primary: #0B0C0F;

  --role: #4D8EFF;
  --role-strong: #7AAAFF;
  --role-soft: rgb(77 142 255 / 14%);
  --role-ink: #8DB6FF;
  --on-role: #0B0C0F;

  --done: #43B97C;   --done-soft: rgb(67 185 124 / 12%);
  --clarify: #E8A055; --clarify-soft: rgb(232 160 85 / 12%);
  --late: #F2685E;   --late-soft: rgb(242 104 94 / 12%);
  --todo: #8E949F;   --todo-soft: rgb(255 255 255 / 6%);

  --sheet-shadow: 0 0 0 1px rgb(255 255 255 / 7%), inset 0 1px 0 rgb(255 255 255 / 4%), 0 24px 48px -20px rgb(0 0 0 / 70%);
  --shadow-pop: 0 0 0 1px rgb(255 255 255 / 9%), 0 16px 40px -8px rgb(0 0 0 / 70%);
  --shadow-lift: inset 0 0 0 1px rgb(255 255 255 / 8%);
  --ring: 0 0 0 3px rgb(77 142 255 / 30%);
  --cover-ring: rgb(255 255 255 / 10%);
  --scrim: rgb(8 9 11 / 72%);
  --display-weight: 600;
}

/* Couleur de rôle : sélection, progression, focus. Jamais les boutons. */
[data-role="prestataire"] { --role: #F5A400; --role-strong: #D98F00; --role-soft: rgb(245 164 0 / 14%); --role-ink: #8A5600; --on-role: #14181F; }
[data-role="admin"] { --role: #0F766E; --role-strong: #0B5E57; --role-soft: rgb(15 118 110 / 10%); --role-ink: #0B5E57; --on-role: #FFFFFF; }
[data-theme="graphite"][data-role="prestataire"], [data-theme="graphite"] [data-role="prestataire"] { --role-ink: #FFC24D; --role-soft: rgb(245 164 0 / 16%); }
[data-theme="graphite"][data-role="admin"], [data-theme="graphite"] [data-role="admin"] { --role: #2DB8A8; --role-ink: #5FD3C5; --role-soft: rgb(45 184 168 / 14%); }

/* ---------- Base ---------- */
* { box-sizing: border-box; }
.cg { font-family: var(--font); font-size: 13.5px; line-height: 1.5; color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; }
.cg h1, .cg h2, .cg h3, .cg h4, .cg p { margin: 0; }
.cg a { color: var(--role-ink); text-decoration: none; }
.cg a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.cg button, .cg input, .cg select, .cg textarea { font: inherit; color: inherit; }
.cg :focus-visible { outline: 2px solid var(--role); outline-offset: 2px; border-radius: 8px; }
.cg svg { flex-shrink: 0; }
.ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ico--sm { width: 14px; height: 14px; }
.ico--lg { width: 20px; height: 20px; }

.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0; }
.num { font-variant-numeric: tabular-nums; }
.t-page { font-family: var(--display); font-size: 28px; line-height: 34px; font-weight: var(--display-weight); letter-spacing: var(--display-track); text-wrap: balance; }
.t-display { font-family: var(--display); font-weight: var(--display-weight); letter-spacing: var(--display-track); }
.t-section { font-size: 15px; line-height: 22px; font-weight: 600; letter-spacing: -0.01em; }
.t-card { font-size: 14px; line-height: 20px; font-weight: 600; }
.t-value { font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.t-2 { color: var(--ink-2); }
.t-3 { color: var(--ink-3); }
.t-sm { font-size: 13px; line-height: 19px; }
.t-xs { font-size: 12px; line-height: 16px; }
.t-label { font-size: 12px; line-height: 16px; font-weight: 560; color: var(--ink-3); }
.t-strong { font-weight: 600; }
.t-pretty { text-wrap: pretty; max-width: 68ch; }

/* ---------- Coque : plateau, navigation, feuille ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; padding: 8px 8px 8px 0; background: var(--canvas); }
.main { min-width: 0; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sheet-shadow); padding: 28px 40px 56px; min-height: calc(100vh - 16px); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-lg { display: flex; flex-direction: column; gap: 24px; }
.hstack { display: flex; align-items: center; gap: 8px; }
.hstack-lg { display: flex; align-items: center; gap: 16px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; }
.cols-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cols-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grow { flex: 1 1 auto; min-width: 0; }
.sep { height: 1px; background: var(--line); border: 0; margin: 0; }

.nav { position: sticky; top: 8px; height: calc(100vh - 16px); background: transparent; color: var(--nav-ink-2); display: flex; flex-direction: column; gap: 14px; padding: 12px 10px 10px 14px; }
.nav__brand { display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 4px 2px; }
.nav__brand img { height: 46px; width: auto; display: block; }
.nav__switch { display: flex; align-items: center; gap: 9px; width: 100%; height: 36px; padding: 0 8px; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--nav-ink); cursor: pointer; text-align: left; }
.nav__switch:hover { background: var(--nav-2); }
.nav__switch small { display: none; }
.nav__switch strong { display: block; font-size: 13.5px; line-height: 18px; font-weight: 600; }
.nav__mark { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; background: var(--role); color: var(--on-role); flex-shrink: 0; }
.cg .nav__search { display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 8px; border: 0; border-radius: var(--r-sm); background: var(--nav-2); color: var(--nav-ink-2); cursor: pointer; font-size: 13px; text-decoration: none; }
.nav__search .kbd { margin-left: auto; background: transparent; }
.nav__list { display: flex; flex-direction: column; gap: 1px; list-style: none; margin: 0; padding: 0; }
.nav__group { padding: 10px 8px 4px; font-size: 12px; color: var(--nav-ink-2); font-weight: 500; }
.nav__item { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 8px; border-radius: 8px; font-weight: 520; font-size: 13.5px; position: relative; transition: background-color .16s var(--ease), color .16s var(--ease); }
.cg .nav__item { color: var(--nav-ink-2); }
.cg .nav__item:hover { background: var(--nav-2); color: var(--nav-ink); text-decoration: none; }
.cg .nav__item[aria-current="page"], .cg .nav__item[aria-current="true"] { background: var(--nav-active); color: var(--nav-ink); box-shadow: var(--nav-active-ring); }
.cg .nav__item[aria-current] .ico { color: var(--nav-ink); }
.nav__count { margin-left: auto; min-width: 0; height: auto; padding: 0; background: none; color: var(--nav-ink-2); font-size: 12px; font-weight: 520; font-variant-numeric: tabular-nums; }
.nav__count--hot { color: var(--role-ink); font-weight: 650; }
.nav__foot { margin-top: auto; display: flex; flex-direction: column; gap: 1px; }
.nav__account { display: flex; align-items: center; gap: 9px; padding: 0 8px; height: 40px; border-radius: var(--r-sm); }
.nav__account:hover { background: var(--nav-2); }
.nav__account strong { display: block; font-size: 13px; line-height: 17px; color: var(--nav-ink); font-weight: 560; }
.nav__account small { display: none; }
.nav__account .avatar { width: 22px; height: 22px; border-radius: 6px; font-size: 10px; }
/* Navigation v4 : travail, dossiers épinglés, ressources. Le lien le plus précis est surligné. */
.nav__sec { display: flex; flex-direction: column; }
.nav__sec .nav__group { padding: 0 8px 6px; font-size: 11.5px; line-height: 16px; font-weight: 560; color: var(--ink-3); }
.nav__cover { width: 14px; height: 19px; margin: 0 2px; border-radius: 3px; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 1px var(--cover-ring); }
.nav__t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- En-têtes ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 32px; margin-bottom: 20px; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-3); flex-wrap: wrap; }
.cg .crumbs a { color: var(--ink-3); }
.crumbs [aria-current] { color: var(--ink); font-weight: 560; }
.crumbs .sl { color: var(--ink-4); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { margin-top: 4px; color: var(--ink-3); }

/* ---------- Contenants ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); padding: 20px; box-shadow: 0 0 0 1px var(--line); }
.card--flush { padding: 0; overflow: hidden; }
.card--tint { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.card--inset { background: var(--surface-2); border-radius: var(--r-md); padding: 14px 16px; }
.card--outline { background: var(--surface); box-shadow: 0 0 0 1px var(--line); border-radius: var(--r-md); padding: 14px 16px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card__head--pad { padding: 16px 20px 0; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: var(--r-sm); border: 0; font-weight: 560; font-size: 13.5px; line-height: 1; cursor: pointer; white-space: nowrap; transition: background-color .18s var(--ease), transform .18s var(--ease), box-shadow .18s var(--ease); }
.btn:active { transform: scale(.98); }
.cg .btn:hover { text-decoration: none; }
.btn--primary { background: var(--primary); color: var(--on-primary); box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%), 0 1px 2px rgb(0 0 0 / 18%); }
.cg a.btn--primary { color: var(--on-primary); }
.btn--primary:hover { background: var(--primary-hover); }
.btn--secondary { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line-strong), 0 1px 2px rgb(16 24 40 / 5%); }
.cg a.btn--secondary { color: var(--ink); }
.btn--secondary:hover { background: var(--surface-2); }
.btn--ghost { background: transparent; color: var(--ink-2); }
.cg a.btn--ghost { color: var(--ink-2); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { background: transparent; color: var(--late); box-shadow: 0 0 0 1px var(--line-strong); }
.btn--dark { background: var(--primary); color: var(--on-primary); }
.btn--sm { height: 28px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn--lg { height: 42px; padding: 0 18px; font-size: 14.5px; border-radius: 11px; }
.btn--block { width: 100%; }
.btn--icon { width: 34px; padding: 0; }
.btn--sm.btn--icon { width: 28px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; transform: none; }
.btn .kbd { margin-left: 2px; }
.linkbtn { display: inline-flex; align-items: center; gap: 4px; font-weight: 560; font-size: 13px; color: var(--role-ink); background: none; border: 0; padding: 0; cursor: pointer; min-height: 28px; }
.kbd { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 5px; border: 0; box-shadow: inset 0 0 0 1px var(--line-strong); background: transparent; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); line-height: 1; }

/* Appel principal en pilule avec flèche en pastille (décision du moment) */
.cta { display: inline-flex; align-items: center; gap: 10px; height: 38px; padding: 0 5px 0 16px; border-radius: 999px; background: var(--primary); color: var(--on-primary); font-weight: 580; font-size: 13.5px; box-shadow: inset 0 1px 0 rgb(255 255 255 / 12%), 0 1px 2px rgb(0 0 0 / 18%), 0 6px 16px -8px rgb(0 0 0 / 35%); transition: transform .2s var(--ease), background-color .2s var(--ease); }
.cg a.cta { color: var(--on-primary); text-decoration: none; }
.cta:hover { background: var(--primary-hover); }
.cta:active { transform: scale(.98); }
.cta__ar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / 14%); transition: transform .2s var(--ease); }
[data-theme="graphite"] .cta__ar { background: rgb(0 0 0 / 8%); }
.cta:hover .cta__ar { transform: translateX(2px); }

/* ---------- Champs, filtres, onglets ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field__label { font-size: 12.5px; font-weight: 560; color: var(--ink-2); }
.field__help { font-size: 12px; color: var(--ink-3); }
.field__error { font-size: 12px; color: var(--late); display: flex; align-items: center; gap: 6px; font-weight: 520; }
.input, .select, .textarea { width: 100%; height: 36px; padding: 0 11px; border-radius: var(--r-sm); border: 0; box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--surface); font-size: 13.5px; color: var(--ink); transition: box-shadow .16s var(--ease); }
.textarea { height: auto; padding: 9px 11px; min-height: 84px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); opacity: .8; }
.input:focus, .select:focus, .textarea:focus { outline: none; box-shadow: inset 0 0 0 1px var(--role), var(--ring); }
.input--error { box-shadow: inset 0 0 0 1px var(--late); }
.search { position: relative; display: flex; align-items: center; }
.search .ico { position: absolute; left: 11px; color: var(--ink-3); pointer-events: none; }
.search .input { padding-left: 34px; background: var(--surface-2); box-shadow: none; }
.search .kbd { position: absolute; right: 9px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; border: 0; box-shadow: inset 0 0 0 1px var(--line); background: transparent; color: var(--ink-2); font-size: 12.5px; font-weight: 540; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--primary); box-shadow: none; color: var(--on-primary); }
.chip .n { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .n { color: inherit; opacity: .7; }
.seg { display: inline-flex; padding: 2px; gap: 2px; background: var(--surface-3); border-radius: var(--r-sm); }
.seg button { height: 28px; padding: 0 10px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-3); font-size: 12.5px; font-weight: 550; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lift); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px; color: var(--ink-3); font-weight: 540; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.cg .tabs a:hover { color: var(--ink); text-decoration: none; }
.cg .tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }

/* ---------- États : point + texte, sans pastille de fond ---------- */
.status { display: inline-flex; align-items: center; gap: 6px; height: auto; padding: 0; border-radius: 0; background: none; font-size: 12.5px; font-weight: 540; color: var(--ink-2); white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-4); flex-shrink: 0; }
.status[data-s="done"]::before { background: var(--done); }
.status[data-s="active"] { color: var(--ink); }
.status[data-s="active"]::before { background: var(--role); box-shadow: 0 0 0 3px var(--role-soft); }
.status[data-s="todo"]::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--ink-4); width: 7px; height: 7px; }
.status[data-s="clarify"] { color: var(--clarify); }
.status[data-s="clarify"]::before { background: var(--clarify); border-radius: 1.5px; transform: rotate(45deg); }
.status[data-s="late"] { color: var(--late); }
.status[data-s="late"]::before { background: var(--late); border-radius: 1px; }

/* ---------- Provenance et certitude ---------- */
.prov { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; color: var(--ink-3); white-space: nowrap; }
.prov::before { content: ""; width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; }
.prov b { font-weight: 600; color: var(--ink-2); }
.prov[data-c="observe"]::before { background: var(--ink-2); }
.prov[data-c="rapproche"]::before { background: linear-gradient(90deg, var(--ink-2) 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px var(--ink-2); }
.prov[data-c="estime"]::before { border: 1.5px dashed var(--ink-3); }
.prov[data-c="propose"]::before { border: 1.5px solid var(--role); border-radius: 2px; transform: rotate(45deg); width: 6px; height: 6px; }
.prov--pill { height: 22px; padding: 0 8px; border-radius: 6px; background: var(--surface-2); }
.est { text-decoration: underline dashed var(--ink-4); text-underline-offset: 4px; }
.gate { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 560; color: var(--ink-2); background: var(--surface-3); }

/* ---------- Progression du dossier (ancienne frise) ---------- */
.frise { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.frise__step { position: relative; display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 2px; padding: 0; border: 0; border-radius: 6px; background: none; cursor: pointer; }
.cg .frise__step { color: var(--ink); text-decoration: none; }
.frise__step::before { content: ""; display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--line-strong); margin-bottom: 8px; }
.frise__step[data-s="done"]::before { background: var(--done); }
.frise__step[data-s="active"]::before { background: linear-gradient(90deg, var(--role) 0 45%, var(--line-strong) 45%); }
.frise__step[data-s="clarify"]::before { background: repeating-linear-gradient(135deg, var(--clarify) 0 3px, transparent 3px 6px); }
.frise__step[data-s="late"]::before { background: var(--late); }
.frise__step::after { display: none; }
.frise__node { display: none; }
.frise__name { font-weight: 580; font-size: 12.5px; line-height: 17px; }
.frise__step[data-s="todo"] .frise__name { color: var(--ink-3); font-weight: 520; }
.frise__date, .frise__state { font-size: 12px; line-height: 16px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.frise__step[data-s="done"] .frise__state { color: var(--done); }
.frise__step[data-s="active"] .frise__state { color: var(--role-ink); font-weight: 560; }
.frise__step[data-s="clarify"] .frise__state { color: var(--clarify); }
.frise__step[data-s="late"] .frise__state { color: var(--late); }
.cg .frise__step:hover .frise__name { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong); }
.frise__step[aria-current="page"] .frise__name { text-decoration: underline; text-decoration-color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.frise__step[aria-pressed="true"] { background: none; }

.mfrise { display: flex; gap: 3px; width: 120px; }
.mfrise i { flex: 1; height: 4px; border-radius: 2px; background: var(--line-strong); }
.mfrise i[data-s="done"] { background: var(--done); }
.mfrise i[data-s="active"] { background: var(--role); }
.mfrise i[data-s="clarify"] { background: repeating-linear-gradient(135deg, var(--clarify) 0 3px, transparent 3px 6px); }
.mfrise i[data-s="late"] { background: var(--late); }

/* ---------- Tableaux et lignes ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 540; color: var(--ink-3); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: transparent; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .14s var(--ease); }
.table tbody tr:hover td { background: var(--surface-2); }
.table tr[aria-selected="true"] td { background: var(--role-soft); }
.table .r { text-align: right; }
.table td:first-child, .table th:first-child { padding-left: 14px; }
.table td:last-child, .table th:last-child { padding-right: 14px; }

.row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); min-height: 56px; }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--surface-2); }
.row[aria-selected="true"] { background: var(--role-soft); }
.row__main { flex: 1 1 auto; min-width: 0; }
.row__title { font-weight: 580; font-size: 14px; line-height: 19px; }
.row__meta { font-size: 12.5px; color: var(--ink-3); line-height: 17px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dot-sep::before { content: "·"; color: var(--ink-4); }

/* Couvertures, avatars, tuiles */
.cover { width: 28px; height: 38px; border-radius: 5px; object-fit: cover; display: block; flex-shrink: 0; background: var(--surface-3); box-shadow: 0 0 0 1px var(--cover-ring); }
.cover--md { width: 44px; height: 60px; border-radius: 7px; }
.cover--lg { width: 60px; height: 80px; border-radius: 8px; }
.avatar { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; font-weight: 650; background: var(--surface-3); color: var(--ink-2); flex-shrink: 0; }
.avatar--sm { width: 22px; height: 22px; border-radius: 6px; font-size: 10px; }
.avatar--lg { width: 40px; height: 40px; border-radius: 10px; font-size: 14px; }
.avatar--role { background: var(--role-soft); color: var(--role-ink); }
.avatars { display: flex; }
.avatars .avatar { box-shadow: 0 0 0 2px var(--surface); margin-left: -5px; }
.avatars .avatar:first-child { margin-left: 0; }
.tile { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line); flex-shrink: 0; }
.tile--role { background: var(--surface); color: var(--ink); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 9px 16px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; text-align: right; font-weight: 550; font-variant-numeric: tabular-nums; }

/* Encarts : discrets, jamais criards */
.note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: var(--r-md); background: var(--surface-2); color: var(--ink-2); font-size: 13px; }
.note--warn { background: var(--clarify-soft); color: var(--ink); }
.note--warn .ico { color: var(--clarify); }
.note--late { background: var(--late-soft); color: var(--ink); }
.note--role { background: var(--role-soft); color: var(--ink); }
.note--role .ico { color: var(--role-ink); }

/* Calques */
.drawer { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-pop); padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.drawer__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.scrim { background: var(--scrim); }
.dialog { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-pop); padding: 24px; }
.toast { display: inline-flex; align-items: center; gap: 12px; padding: 9px 9px 9px 14px; border-radius: var(--r-md); background: var(--primary); color: var(--on-primary); font-size: 13px; box-shadow: var(--shadow-pop); }
.toast .linkbtn { color: inherit; opacity: .75; }
.pop { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); }

.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px; border-radius: var(--r-md); background: var(--surface-2); }
.skel { display: block; border-radius: 6px; background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%); background-size: 200% 100%; height: 10px; }
.meter { height: 4px; border-radius: 2px; background: var(--line-strong); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 2px; background: var(--role); }

/* ---------- Divulgation progressive ---------- */
.folds { background: transparent; border-radius: 0; border-top: 1px solid var(--line); }
.fold { border-bottom: 1px solid var(--line); }
.fold:last-child { border-bottom: 1px solid var(--line); }
.fold > summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 2px; cursor: pointer; border-radius: 0; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary:hover .fold__label { color: var(--ink); }
.fold > summary::after { content: ""; width: 6px; height: 6px; margin: 0 4px 0 2px; border-right: 1.5px solid var(--ink-4); border-bottom: 1.5px solid var(--ink-4); transform: rotate(-45deg); transition: transform .2s var(--ease); flex-shrink: 0; }
.fold[open] > summary::after { transform: rotate(45deg) translate(-2px, -2px); }
.fold__label { font-weight: 560; font-size: 13.5px; }
.fold__value { margin-left: auto; color: var(--ink-3); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.fold__body { padding: 0 2px 16px; }

.src { position: relative; display: inline-block; }
.src > summary { list-style: none; display: inline; cursor: pointer; text-decoration: underline dotted var(--ink-4); text-underline-offset: 4px; }
.src > summary::-webkit-details-marker { display: none; }
.src.est > summary, .src--est > summary { text-decoration: underline dashed var(--ink-4); }
.src.est { text-decoration: none; }
.src__pop, .src__p { display: none; }
.src[open] > .src__pop, .src[open] > .src__p { display: flex; flex-direction: column; gap: 6px; position: absolute; z-index: 30; top: calc(100% + 8px); left: 0; width: 272px; padding: 12px 14px; background: var(--surface); border-radius: var(--r-md); box-shadow: var(--shadow-pop); font-size: 12.5px; font-weight: 400; color: var(--ink-2); line-height: 1.45; white-space: normal; text-align: left; }
.src__k { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); }
.src__k::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-2); }
.src__k--est::before { background: transparent; border: 1.5px dashed var(--ink-3); }

.more > summary { list-style: none; display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; font-size: 13px; font-weight: 560; color: var(--role-ink); cursor: pointer; }
.more > summary::-webkit-details-marker { display: none; }
.more[open] > summary { display: none; }

/* Ligne d'action : toute la ligne est le lien ; la flèche apparaît au survol */
.act { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 16px; align-items: center; gap: 14px; min-height: 56px; padding: 8px 12px; margin: 0 -12px; border-radius: 11px; color: var(--ink); transition: background-color .16s var(--ease); }
.cg .act { color: var(--ink); }
.cg .act:hover { background: var(--surface-2); text-decoration: none; }
.act__title { font-weight: 580; font-size: 14px; line-height: 19px; }
.act__sub { font-size: 12.5px; line-height: 17px; color: var(--ink-3); }
.act__due { font-size: 12.5px; font-weight: 540; color: var(--ink-3); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.act__due--soon { color: var(--clarify); }
.act > .ico:last-child { color: var(--ink-4); opacity: 0; transform: translateX(-3px); transition: opacity .16s var(--ease), transform .16s var(--ease); }
.cg .act:hover > .ico:last-child { opacity: 1; transform: none; }
.folds > .act { margin: 0; border-radius: 0; border-bottom: 1px solid var(--line); padding: 8px 4px; }

/* Décision du moment */
.focus { background: var(--surface-2); border-radius: var(--r-xl); box-shadow: inset 0 0 0 1px var(--line); padding: 16px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.focus__title { font-size: 17px; line-height: 23px; font-weight: 620; letter-spacing: -0.012em; }
.focus__sub { color: var(--ink-3); font-size: 13.5px; margin-top: 2px; }

/* ---------- Mobile (planches 390 px) ---------- */
.m { width: 390px; min-height: 844px; background: var(--surface); font-size: 16px; position: relative; display: flex; flex-direction: column; }
.m-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); }
.m-top img { height: 30px; }
.cg .m-top .btn--icon { color: var(--ink); background: transparent; border: 0; width: 44px; height: 44px; }
.m-body { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.m-tabbar { position: sticky; bottom: 0; display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px 20px; }
.m-tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 50px; justify-content: center; font-size: 11px; font-weight: 550; color: var(--ink-3); position: relative; }
.cg .m-tabbar a:hover { text-decoration: none; }
.cg .m-tabbar a[aria-current="page"] { color: var(--ink); }
.m-tabbar .badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--role); color: var(--on-role); font-size: 10.5px; font-weight: 650; display: grid; place-items: center; padding: 0 4px; }
.m-cta { position: sticky; bottom: 0; padding: 12px 16px 24px; background: linear-gradient(to top, var(--surface) 70%, transparent); display: flex; gap: 10px; }

/* Les <button> héritent la couleur via .cg button : on rétablit la couleur propre de chaque variante. */
.cg .btn--primary, .cg .btn--dark, .cg .cta, .cg .toast { color: var(--on-primary); }
.cg .btn--secondary { color: var(--ink); }
.cg .btn--ghost { color: var(--ink-2); }
.cg .btn--danger { color: var(--late); }
.cg .chip[aria-pressed="true"] { color: var(--on-primary); }
.cg .linkbtn { color: var(--role-ink); }

/* =====================================================================
   MOUVEMENT — rapide là où l'on travaille, généreux là où l'on réussit.
   Règles : transform et opacity uniquement ; ease-out pour entrer ;
   rien sur les gestes clavier (⌘K, J/K) ; tout respecte la réduction.
   ===================================================================== */
:root {
  interpolate-size: allow-keywords;
  --dur-press: 120ms;   /* appui */
  --dur-fast: 160ms;    /* survol, couleur, puces */
  --dur-base: 220ms;    /* replis, sources, entrées */
  --dur-panel: 320ms;   /* panneaux, dialogues, notifications */
  --dur-moment: 560ms;  /* moments mérités : validation, report */
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);
  --ease-spring: linear(0, 0.0549, 0.1852, 0.3492, 0.5175, 0.6712, 0.8004, 0.9011, 0.9738, 1.0217, 1.0493, 1.0615, 1.0628, 1.0572, 1.0479, 1.0373, 1.0269, 1.0176, 1.0101, 1.0044, 1.0004, 0.9979, 0.9965, 0.996, 0.9961, 0.9966, 0.9972, 0.9979, 0.9985, 0.9991, 0.9995, 0.9998, 1);
}

@keyframes cg-rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes cg-fade { from { opacity: 0; } }
@keyframes cg-fill { from { transform: scaleX(0); } }
@keyframes cg-drawer { from { opacity: 0; transform: translateX(24px); } }
@keyframes cg-dialog { from { opacity: 0; transform: scale(.96); } }
@keyframes cg-toast { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes cg-pop { from { opacity: 0; transform: translateY(-4px); } }
@keyframes cg-sheen { from { background-position: -120% 0; } to { background-position: 220% 0; } }
@keyframes cg-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Appui : la réponse est immédiate, jamais retardée */
.btn, .cta, .chip, .seg button, .linkbtn { transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-fast) ease, color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, opacity var(--dur-fast) ease; }
.btn:active, .cta:active, .chip:active, .seg button:active { transform: scale(.97); }
.cta:hover .cta__ar { transform: translateX(3px); transition: transform var(--dur-base) var(--ease-spring); }
.cg .nav__item, .act, .row, .table tbody tr, .fold > summary, .mau-row { transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, box-shadow var(--dur-fast) ease; }
.input, .select, .textarea { transition: box-shadow var(--dur-fast) ease; }
@media not (hover: hover) { .act > .ico:last-child { opacity: 1; transform: none; } }

/* Entrée de page : la feuille se pose, son contenu suit en cascade (≤ 6 éléments, 40 ms d'écart) */
.main > * > * { animation: cg-rise var(--dur-panel) var(--ease-out) both; }
.main > * > *:nth-child(2) { animation-delay: 40ms; }
.main > * > *:nth-child(3) { animation-delay: 80ms; }
.main > * > *:nth-child(4) { animation-delay: 120ms; }
.main > * > *:nth-child(5) { animation-delay: 160ms; }
.main > * > *:nth-child(n+6) { animation-delay: 200ms; }

/* Replis : la hauteur s'ouvre, le contenu monte doucement */
.fold::details-content { height: 0; overflow: clip; transition: height var(--dur-base) var(--ease-out), content-visibility var(--dur-base) allow-discrete; }
.fold[open]::details-content { height: auto; }
.fold[open] > .fold__body { animation: cg-rise var(--dur-base) var(--ease-out) both; }
.more[open] > *:not(summary) { animation: cg-rise var(--dur-base) var(--ease-out) both; }

/* Source d'un chiffre : apparaît sous la valeur, sans grossir depuis le centre */
.src[open] > .src__pop, .src[open] > .src__p { animation: cg-pop var(--dur-fast) var(--ease-out) both; }

/* Progression du dossier : les barres se remplissent à l'ouverture, l'étape en cours reste vivante */
.frise__step::before { transform-origin: left center; animation: cg-fill 520ms var(--ease-in-out) both; }
.frise__step:nth-child(2)::before { animation-delay: 70ms; }
.frise__step:nth-child(3)::before { animation-delay: 140ms; }
.frise__step:nth-child(4)::before { animation-delay: 210ms; }
.frise__step:nth-child(5)::before { animation-delay: 280ms; }
.frise__step:nth-child(6)::before { animation-delay: 350ms; }
.frise__step[data-s="active"]::after { display: block; content: ""; position: absolute; top: 0; left: 0; width: 45%; height: 4px; border-radius: 2px; pointer-events: none; background: linear-gradient(90deg, transparent 0, rgb(255 255 255 / 70%) 50%, transparent 100%) no-repeat; background-size: 40% 100%; animation: cg-sheen 2.6s linear 900ms infinite; }
.mfrise i { transform-origin: left center; animation: cg-fill 420ms var(--ease-out) both; }
.mfrise i:nth-child(2) { animation-delay: 40ms; } .mfrise i:nth-child(3) { animation-delay: 80ms; } .mfrise i:nth-child(4) { animation-delay: 120ms; } .mfrise i:nth-child(5) { animation-delay: 160ms; } .mfrise i:nth-child(6) { animation-delay: 200ms; }

/* Calques : le panneau glisse depuis son bord, le dialogue se pose au centre, la notification monte */
.scrim { animation: cg-fade var(--dur-panel) ease-out both; }
.drawer { animation: cg-drawer var(--dur-panel) var(--ease-drawer) both; }
.dialog { animation: cg-dialog var(--dur-base) var(--ease-out) both; }
.toast { animation: cg-toast var(--dur-panel) var(--ease-out) both; }
.pop { animation: none; } /* palette ⌘K : instantanée, c'est un geste clavier */
.skel { animation: cg-shimmer 1.6s linear infinite; }

/* Réduction des animations : on garde les fondus utiles, on retire tout déplacement et toute boucle */
@media (prefers-reduced-motion: reduce) {
  .main > * > *, .fold[open] > .fold__body, .more[open] > *:not(summary), .src[open] > .src__pop, .src[open] > .src__p, .drawer, .dialog, .toast { animation-name: cg-fade !important; animation-duration: 120ms !important; animation-delay: 0ms !important; }
  .frise__step::before, .mfrise i, .frise__step[data-s="active"]::after, .skel { animation: none !important; }
  .fold::details-content { transition: none; }
  .btn:active, .cta:active, .chip:active, .seg button:active { transform: none; }
  .cta:hover .cta__ar { transform: none; }
}
.m-body > * { animation: cg-rise var(--dur-panel) var(--ease-out) both; }
.m-body > *:nth-child(2) { animation-delay: 40ms; } .m-body > *:nth-child(3) { animation-delay: 80ms; } .m-body > *:nth-child(n+4) { animation-delay: 120ms; }
@media (prefers-reduced-motion: reduce) { .m-body > * { animation-name: cg-fade !important; animation-duration: 120ms !important; animation-delay: 0ms !important; } }
.cg-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cg .toast .linkbtn { color: inherit; opacity: .72; font-weight: 600; min-height: 0; }
.cg .toast .linkbtn:hover { opacity: 1; }

/* ---------- Navigation v6 : arborescence. Toute page a son entrée ; le dossier courant s'ouvre, l'entrée la plus précise est surlignée. ---------- */
.nav__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; margin: 0 -6px; padding: 0 6px 18px; scrollbar-width: none; -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 18px), transparent); }
.nav__scroll::-webkit-scrollbar { display: none; }
.nav__sub { list-style: none; margin: 1px 0 2px; padding: 0; display: flex; flex-direction: column; gap: 1px; }
.cg .nav__sub .nav__item { height: 28px; padding-left: 36px; font-size: 13px; font-weight: 500; }
.nav__count--warn { color: var(--clarify); font-weight: 650; }
.nav__gn { margin-left: 6px; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.nav__row { position: relative; }
.cg .nav__dos { padding-right: 30px; }
.cg .nav__item.is-path { color: var(--nav-ink); font-weight: 600; }
.nav__mk { width: 7px; height: 7px; margin-left: auto; flex-shrink: 0; border-radius: 1.5px; background: var(--clarify); transform: rotate(45deg); }
.nav__tw { position: absolute; right: 4px; top: 6px; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; color: var(--ink-4); cursor: pointer; transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease; }
.nav__tw:hover { background: var(--nav-3); color: var(--nav-ink); }
.nav__tw svg { transition: transform var(--dur-base) var(--ease-out); }
.nav__node:has(> input:checked) > .nav__row .nav__tw svg { transform: rotate(90deg); }
.nav__node:has(> input:focus-visible) > .nav__row .nav__tw { outline: 2px solid var(--role); outline-offset: 1px; }
.nav__kids { display: grid; grid-template-rows: 0fr; visibility: hidden; transition: grid-template-rows var(--dur-base) var(--ease-out), visibility 0s linear var(--dur-base); }
.nav__node:has(> input:checked) > .nav__kids { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows var(--dur-base) var(--ease-out), visibility 0s; }
.nav__kids > ul { min-height: 0; overflow: hidden; list-style: none; margin: 0; padding: 1px 0 4px; display: flex; flex-direction: column; gap: 1px; position: relative; }
.nav__kids > ul::before { content: ""; position: absolute; left: 17px; top: 2px; bottom: 16px; width: 1px; background: var(--line-strong); }
.nav__kids ul ul { list-style: none; margin: 1px 0 0; padding: 0; }
.cg .nav__step { height: 28px; padding-left: 30px; gap: 9px; font-size: 13px; font-weight: 500; }
.cg .nav__sub3 { height: 26px; padding-left: 48px; font-size: 12.5px; font-weight: 500; }
.nav__st { position: relative; z-index: 1; width: 8px; height: 8px; flex-shrink: 0; border-radius: 50%; background: var(--canvas); box-shadow: inset 0 0 0 1.5px var(--ink-4); }
.nav__st[data-s="done"] { background: var(--done); box-shadow: 0 0 0 2px var(--canvas); }
.nav__st[data-s="active"] { background: var(--role); box-shadow: 0 0 0 3px var(--role-soft); }
.nav__st[data-s="clarify"] { background: var(--clarify); box-shadow: 0 0 0 2px var(--canvas); border-radius: 1.5px; transform: rotate(45deg) scale(.9); }
.nav__ini { width: 14px; height: 19px; margin: 0 2px; flex-shrink: 0; border-radius: 3px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); font-size: 7.5px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .nav__kids, .nav__tw svg { transition: none; } }

/* ---------- Compagnon : discret, en bas à droite, comme une aide en ligne ---------- */
.bot { position: fixed; right: 24px; bottom: 24px; z-index: 30; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.cg:has(.scrim) .bot { display: none; }
.bot__btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop); cursor: pointer; position: relative; transition: transform var(--dur-press) var(--ease-out); }
.bot__btn:active { transform: scale(.94); }
.bot__btn .bot__x { display: none; }
.cg:has(#bot-open:checked) .bot__btn .bot__spark { display: none; }
.cg:has(#bot-open:checked) .bot__btn .bot__x { display: block; }
.cg:has(#bot-open:focus-visible) .bot__btn { outline: 2px solid var(--role); outline-offset: 2px; }
.bot__tip { position: absolute; right: calc(100% + 10px); top: 50%; translate: 4px -50%; padding: 6px 9px; border-radius: 8px; background: var(--primary); color: var(--on-primary); font-size: 12px; font-weight: 500; white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity var(--dur-fast) ease, translate var(--dur-fast) var(--ease-out), visibility 0s linear var(--dur-fast); }
.bot__btn:hover .bot__tip { opacity: 1; visibility: visible; translate: 0 -50%; transition: opacity var(--dur-fast) ease, translate var(--dur-fast) var(--ease-out), visibility 0s; }
.cg:has(#bot-open:checked) .bot__tip { display: none; }
.bot__panel { width: 360px; max-height: calc(100vh - 110px); overflow: auto; background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-pop); transform-origin: bottom right; opacity: 0; transform: translateY(8px) scale(.96); visibility: hidden; pointer-events: none; transition: opacity var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out), visibility 0s linear var(--dur-fast); }
.cg:has(#bot-open:checked) .bot__panel { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility 0s; }
.bot-h { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 8px 16px; }
.bot-h h2 { font-size: 14px; font-weight: 620; display: flex; align-items: center; gap: 8px; }
.bot-mark { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--primary); color: var(--on-primary); }
.bot-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.bot-intro { font-size: 12.5px; line-height: 18px; color: var(--ink-3); }
.bot-sugs { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.cg .bot-sug { border: 0; background: none; font: inherit; display: inline-flex; align-items: center; min-height: 30px; padding: 4px 11px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line-strong); font-size: 12.5px; font-weight: 540; color: var(--ink-2); cursor: pointer; text-align: left; transition: background-color var(--dur-fast) ease, transform var(--dur-press) var(--ease-out); }
.cg .bot-sug:hover { background: var(--surface-2); color: var(--ink); }
.cg .bot-sug:active { transform: scale(.97); }
.bot-ask { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 4px 0 12px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.bot-in { flex: 1; min-width: 0; height: 38px; border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--ink); outline: none; }
.bot-in::placeholder { color: var(--ink-3); }
.bot-send { width: 32px; height: 32px; border: 0; border-radius: 9px; display: grid; place-items: center; background: none; color: var(--ink-3); cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .bot__panel, .bot__tip { transition-duration: 1ms !important; } }

/* Pastille de non-lus dans la navigation */
.nav__pill { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: grid; place-items: center; background: var(--role); color: var(--on-role); font-size: 11px; font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------- Grammaire de priorité v2 : valeurs de gris franches. 1 agir = graphite, 2 surveiller = gris, 3 comprendre = blanc ---------- */
.cg { --z1: #15171C; --z1-card: #22252C; --z1-card-2: #2D3139; --z1-line: rgb(255 255 255 / 9%); --z1-ink: #F4F5F7; --z1-ink-2: #BCC1C9; --z1-ink-3: #8F95A0; --z1-warn: #F2A65A; --z2: #E3E6EA; --z2-ink: #3A3F48; --z2-tile: #FFFFFF; }
.cg[data-theme="graphite"] { --z1: #2B2F37; --z1-card: #363B45; --z1-card-2: #414752; --z1-line: rgb(255 255 255 / 10%); --z1-ink: #F6F7F9; --z1-ink-2: #C9CDD4; --z1-ink-3: #A1A7B1; --z2: #1A1D22; --z2-ink: #C3C8D0; --z2-tile: #23272E; }
.zone { display: flex; flex-direction: column; gap: 12px; }
.zone__h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.zone__h h2 { display: flex; align-items: baseline; gap: 10px; }
.zone__n { font-size: 12.5px; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.zone--p1 { background: var(--z1); color: var(--z1-ink); border-radius: 22px; padding: 22px 24px 24px; box-shadow: 0 22px 44px -26px rgb(15 17 21 / 60%); }
.zone--p1 .zone__h h2 { font-size: 18px; line-height: 24px; font-weight: 640; letter-spacing: -.012em; color: var(--z1-ink); }
.zone--p1 .zone__n, :is(.zone--p1, .focus) .t-3 { color: var(--z1-ink-3); }
.zone--p1 .focus { background: var(--z1-card); box-shadow: inset 0 0 0 1px var(--z1-line); }
:is(.zone--p1, .focus) .focus__title { color: var(--z1-ink); }
:is(.zone--p1, .focus) .focus__sub { color: var(--z1-ink-2); }
:is(.zone--p1, .focus) .status { color: var(--z1-ink-2); }
:is(.zone--p1, .focus) .status[data-s="clarify"] { color: var(--z1-warn); }
:is(.zone--p1, .focus) .status[data-s="clarify"]::before { background: var(--z1-warn); }
.cg :is(.zone--p1, .focus) .cta { background: #FFFFFF; color: #0F1115; box-shadow: none; }
.cg :is(.zone--p1, .focus) .cta:hover { background: #E8EAEE; }
:is(.zone--p1, .focus) .cta__ar { background: rgb(15 17 21 / 9%); }
.cg :is(.zone--p1, .focus) .btn--ghost { color: var(--z1-ink-2); }
.cg :is(.zone--p1, .focus) .btn--ghost:hover { background: var(--z1-card-2); color: var(--z1-ink); }
:is(.zone--p1, .focus) .kbd { color: var(--z1-ink-3); box-shadow: inset 0 0 0 1px var(--z1-line); }
:is(.zone--p1, .focus) .src > summary { text-decoration-color: var(--z1-ink-3); }
.zone--p2 { background: var(--z2); border-radius: 22px; padding: 20px 22px 22px; }
.zone--p2 .zone__h h2 { font-size: 15px; line-height: 22px; font-weight: 620; }
.zone--p2 .zone__h, .zone--p2 .zone__n { color: var(--z2-ink); }
.zone--p2 .folds { background: var(--z2-tile); border-radius: 14px; padding: 0 16px; border-top: 0; }
.zone--p2 .fold:last-child { border-bottom: 0; }
.zone--p3 { padding-top: 6px; }
.zone--p3 .zone__h h2 { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink-3); }
.zone--p3 .card { background: var(--surface); box-shadow: 0 0 0 1px var(--line-strong); }
/* Niveau 1 sur toutes les pages : le bloc de décision (.focus) est graphite ; dans un bloc graphite, il devient une carte. */
.cg { --z1-link: #8DB6FF; }
.focus { background: var(--z1); color: var(--z1-ink); box-shadow: 0 18px 40px -26px rgb(15 17 21 / 60%); padding: 18px 20px; }
.zone--p1 .focus { box-shadow: inset 0 0 0 1px var(--z1-line); }
:is(.zone--p1, .focus) .tile { background: var(--z1-card-2); color: var(--z1-ink); box-shadow: none; }
.focus .tile[class*="warn"] { color: var(--z1-warn); }
:is(.zone--p1, .focus) .prov { color: var(--z1-ink-2); }
:is(.zone--p1, .focus) .prov b { color: var(--z1-ink); }
:is(.zone--p1, .focus) .prov[data-c="observe"]::before { background: var(--z1-ink-2); }
:is(.zone--p1, .focus) .prov[data-c="estime"]::before { border-color: var(--z1-ink-3); }
:is(.zone--p1, .focus) .prov--pill { background: var(--z1-card-2); }
:is(.zone--p1, .focus) .gate { background: var(--z1-card-2); color: var(--z1-ink-2); }
.cg :is(.zone--p1, .focus) .btn--primary { background: #FFFFFF; color: #0F1115; box-shadow: none; }
.cg :is(.zone--p1, .focus) .btn--primary:hover { background: #E8EAEE; }
.cg :is(.zone--p1, .focus) .btn--secondary { background: var(--z1-card-2); color: var(--z1-ink); box-shadow: inset 0 0 0 1px var(--z1-line); }
.cg .focus .linkbtn, .cg .zone--p1 .linkbtn, .cg .focus__sub a { color: var(--z1-link); }
.cg .focus .btn:disabled, .cg .focus .btn[disabled] { background: var(--z1-card-2); color: var(--z1-ink-3); }
/* Niveau 3 : cartes blanches cernées d'un trait net */
.card { box-shadow: 0 0 0 1px var(--line-strong); }
/* Les fenêtres d'explication restent blanches dans un bloc graphite : elles reprennent l'encre du clair */
:is(.zone--p1, .focus) :is(.src__pop, .src__p) { color: var(--ink); }
:is(.zone--p1, .focus) :is(.src__pop, .src__p) .prov { color: var(--ink-3); }
:is(.zone--p1, .focus) :is(.src__pop, .src__p) .prov b { color: var(--ink-2); }
:is(.zone--p1, .focus) :is(.src__pop, .src__p) .prov[data-c="observe"]::before { background: var(--ink-2); }
:is(.zone--p1, .focus) :is(.src__pop, .src__p) .prov[data-c="estime"]::before { border-color: var(--ink-3); }
:is(.zone--p1, .focus) :is(.src__pop, .src__p) .prov--pill { background: var(--surface-2); }

/* app : Graphite automatique quand le système est en sombre ; data-theme="clair" l'empêche. */
@media (prefers-color-scheme: dark) {
:where(.cg:not([data-theme="clair"])) {
  color-scheme: dark;
  --canvas: #08090B;
  --surface: #111317;
  --surface-2: #171A1F;
  --surface-3: #1F232A;
  --line: rgb(255 255 255 / 7%);
  --line-strong: rgb(255 255 255 / 13%);
  --ink: #F1F2F4;
  --ink-2: #BABEC6;
  --ink-3: #8E949F;
  --ink-4: #5E646E;

  --nav: #08090B;
  --nav-2: rgb(255 255 255 / 5%);
  --nav-3: rgb(255 255 255 / 9%);
  --nav-ink: #F1F2F4;
  --nav-ink-2: #8A909B;
  --nav-active: rgb(255 255 255 / 8%);
  --nav-active-ring: inset 0 0 0 1px rgb(255 255 255 / 6%);

  --primary: #F1F2F4;
  --primary-hover: #FFFFFF;
  --on-primary: #0B0C0F;

  --role: #4D8EFF;
  --role-strong: #7AAAFF;
  --role-soft: rgb(77 142 255 / 14%);
  --role-ink: #8DB6FF;
  --on-role: #0B0C0F;

  --done: #43B97C;   --done-soft: rgb(67 185 124 / 12%);
  --clarify: #E8A055; --clarify-soft: rgb(232 160 85 / 12%);
  --late: #F2685E;   --late-soft: rgb(242 104 94 / 12%);
  --todo: #8E949F;   --todo-soft: rgb(255 255 255 / 6%);

  --sheet-shadow: 0 0 0 1px rgb(255 255 255 / 7%), inset 0 1px 0 rgb(255 255 255 / 4%), 0 24px 48px -20px rgb(0 0 0 / 70%);
  --shadow-pop: 0 0 0 1px rgb(255 255 255 / 9%), 0 16px 40px -8px rgb(0 0 0 / 70%);
  --shadow-lift: inset 0 0 0 1px rgb(255 255 255 / 8%);
  --ring: 0 0 0 3px rgb(77 142 255 / 30%);
  --cover-ring: rgb(255 255 255 / 10%);
  --scrim: rgb(8 9 11 / 72%);
  --display-weight: 600;
}
:where(.cg:not([data-theme="clair"]))[data-role="prestataire"], :where(.cg:not([data-theme="clair"])) [data-role="prestataire"] { --role-ink: #FFC24D; --role-soft: rgb(245 164 0 / 16%); }
:where(.cg:not([data-theme="clair"]))[data-role="admin"], :where(.cg:not([data-theme="clair"])) [data-role="admin"] { --role: #2DB8A8; --role-ink: #5FD3C5; --role-soft: rgb(45 184 168 / 14%); }
.cg:not([data-theme="clair"]) { --z1: #2B2F37; --z1-card: #363B45; --z1-card-2: #414752; --z1-line: rgb(255 255 255 / 10%); --z1-ink: #F6F7F9; --z1-ink-2: #C9CDD4; --z1-ink-3: #A1A7B1; --z2: #1A1D22; --z2-ink: #C3C8D0; --z2-tile: #23272E; }
.cg:not([data-theme="clair"]) .cta__ar { background: rgb(0 0 0 / 8%); }
}

/* app : un titre sans classe hérite de son contexte ; sa taille vient toujours d'une classe du système (.t-page, .t-display…). */
:where(.cg) h1 { font-size: inherit; line-height: inherit; letter-spacing: inherit; }

/* ---------- app : comportements que les maquettes simulent par des cases cochées ---------- */
/* Arbre : un vrai bouton aria-expanded ; data-open sur .nav__node remplace la case masquée. */
.cg button.nav__tw { border: 0; padding: 0; background: transparent; font: inherit; }
.nav__node[data-open] > .nav__row .nav__tw svg { transform: rotate(90deg); }
.nav__node[data-open] > .nav__kids { grid-template-rows: 1fr; visibility: visible; transition: grid-template-rows var(--dur-base) var(--ease-out), visibility 0s; }
.nav__st[data-s="late"] { background: var(--late); box-shadow: 0 0 0 2px var(--canvas); border-radius: 1.5px; transform: rotate(45deg) scale(.9); }
.cg button.nav__item, .cg button.nav__search, .cg button.nav__switch, .cg button.nav__account { border: 0; font: inherit; width: 100%; text-align: left; cursor: pointer; }
.cg button.nav__item, .cg button.nav__account { background: transparent; }
.cg .nav__switch:not(button) { cursor: default; }
.cg .nav__switch:not(button):hover { background: transparent; }

/* Menus du compte et de l'espace : popover natif, ancré en bas ou en haut de la navigation. */
.cg-menu { margin: 0; padding: 6px; min-width: 220px; border: 0; color: var(--ink); font-family: var(--font); font-size: 13.5px; }
.cg-menu--foot { inset: auto auto 60px 18px; }
.cg-menu--top { inset: 130px auto auto 18px; }
.cg-menu a, .cg-menu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-weight: 520; text-align: left; text-decoration: none; cursor: pointer; }
.cg-menu a:hover, .cg-menu button:hover { background: var(--surface-2); text-decoration: none; }
.cg-menu a[aria-current] { font-weight: 650; }
.cg-menu form { margin: 0; }
.cg-menu hr { height: 1px; margin: 6px 4px; border: 0; background: var(--line); }
.cg-menu .cg-menu__id { padding: 6px 10px 8px; color: var(--ink-3); font-size: 12px; line-height: 16px; overflow-wrap: anywhere; }

/* Compagnon : data-open sur .bot remplace la case #bot-open. */
.cg button.bot__btn { border: 0; padding: 0; font: inherit; }
.bot[data-open] .bot__btn .bot__spark { display: none; }
.bot[data-open] .bot__btn .bot__x { display: block; }
.bot[data-open] .bot__tip { display: none; }
.bot[data-open] .bot__panel { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out), visibility 0s; }
.cg:has(dialog[open]) .bot { display: none; }
.bot-thread { display: flex; flex-direction: column; gap: 10px; }
.bot-q { align-self: flex-end; max-width: 85%; padding: 8px 12px; border-radius: 14px 14px 4px 14px; background: var(--primary); color: var(--on-primary); font-size: 13px; line-height: 18px; animation: cg-rise var(--dur-base) var(--ease-out) both; }
.bot-think { font-size: 12.5px; font-weight: 550; background: linear-gradient(90deg, var(--ink-3) 0 35%, var(--ink) 50%, var(--ink-3) 65%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: bot-shim 1.1s linear infinite; }
@keyframes bot-shim { to { background-position: -250% 0; } }
.bot-a { display: flex; flex-direction: column; gap: 8px; font-size: 13px; line-height: 19px; color: var(--ink); white-space: pre-line; animation: cg-rise var(--dur-panel) var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) { .bot-think { animation: none; color: var(--ink-3); } .bot-a, .bot-q { animation: none; } }

/* Recherche ⌘K (planche Editeur-Recherche) : dialogue natif, instantané. */
.rch-pop { position: fixed; inset: 120px auto auto 50%; translate: -50% 0; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 160px); margin: 0; padding: 0; border: 0; overflow: hidden; display: flex; flex-direction: column; color: var(--ink); font-family: var(--font); font-size: 13.5px; }
.rch-pop:not([open]) { display: none; }
.rch-pop::backdrop { background: var(--scrim); }
.rch-field { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 60px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.rch-field .ico { color: var(--ink-3); }
.rch-input { flex: 1; min-width: 0; height: 44px; border: 0; outline: 0; background: transparent; font: inherit; font-size: 17px; font-weight: 500; color: var(--ink); letter-spacing: -.01em; }
.rch-results { padding: 8px 8px 10px; overflow-y: auto; }
.rch-gh { padding: 10px 8px 6px; font-size: 12.5px; font-weight: 550; color: var(--ink-3); }
.rch-opt { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 8px; border-radius: var(--r-sm); color: var(--ink); text-decoration: none; cursor: pointer; }
.cg-search .rch-opt:hover { text-decoration: none; }
.rch-opt[aria-selected="true"] { background: var(--z2); box-shadow: inset 0 0 0 1.5px var(--ink); }
.rch-opt__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rch-opt__t { font-size: 14px; font-weight: 600; line-height: 20px; }
.rch-opt__m { font-size: 12.5px; line-height: 18px; color: var(--ink-3); }
.rch-hit { background: color-mix(in srgb, var(--ink) 9%, transparent); color: inherit; font-weight: 700; border-radius: 3px; padding: 0 1px; }
.rch-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); flex-shrink: 0; }
.rch-side { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.rch-empty { padding: 18px 8px; color: var(--ink-3); }
.rch-foot { display: flex; align-items: center; gap: 20px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--z2); font-size: 12.5px; color: var(--z2-ink); flex-shrink: 0; }
.rch-foot .k { display: inline-flex; align-items: center; gap: 6px; }
.rch-opt[aria-selected="true"] .rch-hit { background: color-mix(in srgb, var(--ink) 14%, transparent); }
.rch-foot .kbd, .rch-opt[aria-selected="true"] .kbd, .rch-opt[aria-selected="true"] .rch-opt__m, .rch-opt[aria-selected="true"] .rch-side { color: var(--z2-ink); }

/* Coque responsive : la planche mobile (.m-top, .m-tabbar) remplace la navigation sous 768 px. */
.cg .skip-link { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 8px 12px; border-radius: 8px; background: var(--primary); color: var(--on-primary); }
.cg .skip-link:focus { top: 12px; }
.app .m-top, .app .m-tabbar, .app .cg-nav-scrim { display: none; }
.m-tabbar .badge { border: 0; padding: 0 4px; }
.cg .m-tabbar button { border: 0; background: transparent; font: inherit; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 50px; justify-content: center; font-size: 11px; font-weight: 550; color: var(--ink-3); cursor: pointer; }
@keyframes cg-drawer-l { from { opacity: 0; transform: translateX(-24px); } }
@media (max-width: 767px) {
  .app { display: block; padding: 0; min-height: 100dvh; background: var(--surface); }
  .app .m-top { display: flex; position: sticky; top: 0; z-index: 20; }
  .app .m-tabbar { display: grid; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .app > .nav { display: none; }
  .app[data-nav-open] > .nav { display: flex; position: fixed; inset: 0 auto 0 0; z-index: 40; width: min(300px, 86vw); height: 100dvh; background: var(--canvas); box-shadow: var(--shadow-pop); animation: cg-drawer-l var(--dur-panel) var(--ease-drawer) both; }
  .app[data-nav-open] .cg-nav-scrim { display: block; position: fixed; inset: 0; z-index: 39; border: 0; background: var(--scrim); }
  .app .main { border-radius: 0; box-shadow: none; padding: 16px 16px 96px; min-height: 0; }
  .app .bot { display: none; }
  .app[data-bot-open] .bot { display: flex; right: 12px; left: 12px; bottom: 84px; }
  .app[data-bot-open] .bot__panel { width: 100%; }
  .app .bot__btn { display: none; }
}

.m-tabbar--4 { grid-template-columns: repeat(4, 1fr); }
/* Le focus des champs de la palette et du compagnon se lit sur leur conteneur. */
.cg .rch-input:focus-visible, .cg .bot-in:focus-visible { outline: 0; }
.bot-ask:focus-within { box-shadow: inset 0 0 0 1px var(--line-strong), var(--ring); }

/* En-tête de dossier partagé (planches Editeur-Dossier « dos- » et pages d'étape « rea- », mêmes valeurs). */
.dh-col { padding-top: 20px; display: flex; flex-direction: column; gap: 20px; }
.dh-back { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; min-height: 32px; align-self: flex-start; }
.cg .dh-back { color: var(--ink-3); }
.dh-id { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.dh-title { font-size: 30px; line-height: 36px; }
.dh-ref { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.dh-frise { background: var(--z2); border-radius: 16px; padding: 14px 16px 10px; }
.cg .dh-frise .frise__step:hover { text-decoration: none; }
.dh-frise .frise__step[data-s="todo"] .frise__name { color: var(--ink-2); }
.dh-frise :is(.frise__date, .frise__state) { color: var(--z2-ink); }
.dh-frise .frise__step[data-s="done"] .frise__state { color: color-mix(in srgb, var(--done) 72%, var(--ink)); }
.dh-frise .frise__step[data-s="active"] .frise__state { color: var(--role-ink); }
.dh-frise .frise__step[data-s="clarify"] .frise__state { color: color-mix(in srgb, var(--clarify) 72%, var(--ink)); }
.dh-frise .frise__step[data-s="late"] .frise__state { color: color-mix(in srgb, var(--late) 75%, var(--ink)); }
.cg-cover-ini { display: grid; place-items: center; color: var(--ink-2); font-size: 13px; font-weight: 700; }
.cg .frise__step { color: var(--ink); }
@media (max-width: 767px) {
  .dh-id { grid-template-columns: auto minmax(0, 1fr); }
  .dh-id > .hstack { grid-column: 1 / -1; }
  .dh-title { font-size: 24px; line-height: 30px; }
  .dh-frise { overflow-x: auto; }
  .dh-frise .frise { min-width: 560px; }
}
/* Le conteneur du compagnon ne capte que son bouton et son panneau ouvert : jamais les contrôles de la page sous lui. */
.bot { pointer-events: none; }
.bot__btn, .bot[data-open] .bot__panel { pointer-events: auto; }
.gate .ico { width: 13px; height: 13px; }

/* Compagnon : bouton sombre portant le « c » du logo Cardgo (même marque dans l'en-tête du panneau et la barre mobile). */
.cg-c { display: block; fill: currentColor; }
.cg button.bot__btn { background: var(--z1); color: var(--z1-ink); box-shadow: 0 0 0 1px var(--z1-line), var(--shadow-pop); }
.cg button.bot__btn:hover { background: var(--z1-card); }
.bot-mark { border-radius: 50%; background: var(--z1); color: var(--z1-ink); }
.m-ai__c { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--z1); color: var(--z1-ink); }

/* app : écrans larges — la feuille se partage entre le travail (gauche) et les repères (droite) au lieu d'étirer chaque bloc.
   Sous 1320 px d'écran (feuille ≈ 1080 px), une seule colonne, dans l'ordre de lecture : travail puis repères. */
.cg-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px 32px; align-items: start; }
.cg-cols__main, .cg-cols__side { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 1320px) { .cg-cols { grid-template-columns: minmax(0, 1.65fr) minmax(340px, 1fr); } }
@media (min-width: 1800px) { .cg-cols { grid-template-columns: minmax(0, 1fr) minmax(420px, min(34%, 600px)); gap: 24px 40px; } }
/* La structure en deux colonnes reste la même d'un état à l'autre (les formulaires gardent leur état quand une colonne se remplit) :
   une colonne vide disparaît et l'autre prend toute la largeur. */
.cg-cols__main:empty, .cg-cols__side:empty { display: none; }
.cg-cols:has(> :is(.cg-cols__main, .cg-cols__side):empty) { grid-template-columns: minmax(0, 1fr); }

