/* Le shell réutilisable des démos cliquables : jetons, bandeau, bande « À essayer », rail
   du produit (repliable), barre et boutons, atomes (boutons, pilules, badges, cases),
   chips et onglets, popover, tiroir, modale, toast. Valeurs MESURÉES sur la SERP de prod
   le 2026-09-08 (voir le skill /demo-cliquable § 4). Préfixe dm- ; rien de partagé avec
   le produit. Une démo ajoute sa propre feuille pour son écran. */
@font-face { font-family: Archivo; src: url("/assets/fonts/archivo-v25-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/jetbrains-mono-v24-latin.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }
/* Les jetons sont dans theme.css (2026-09-18) : ce fichier n'en declare plus. */
body.rail-open { --rail: 216px; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.5 var(--font-sans); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--blue-600); outline-offset: 2px; }
h1, h2, h3, h4, p { margin: 0; }
.i { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
mark { background: #fff1c2; color: inherit; padding: 0 .15em; border-radius: 3px; }
.k { font: 700 10.5px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dark-text-faint); }
.mono { font-family: var(--font-mono); }
[hidden] { display: none !important; }

/* ── Bandeau de démo ─────────────────────────────────────── */
.dm-banner { display: none; }
.dm-banner b { color: var(--on-accent); font-weight: 600; }
.dm-banner .k { color: #94a3b8; }
.dm-banner .dm-cta { margin-left: auto; }
.dm-cta { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px; border-radius: 999px; background: var(--dark-panel); color: var(--ink); font-weight: 600; font-size: 12.5px; white-space: nowrap; }
.dm-cta.blue { background: var(--blue-600); color: var(--on-accent); }
.dm-cta:hover { filter: brightness(.96); }

/* ── À essayer : une bande sous le bandeau, jamais par-dessus l'écran ── */
.dm-todo { position: sticky; top: 0; z-index: 39; background: var(--dark-panel); border-bottom: 1px solid var(--line); }
.dm-todo-hd { display: flex; align-items: center; gap: 12px; width: 100%; padding: 7px 18px; text-align: left; font-size: 13px; }
.dm-todo-hd b { font-weight: 600; }
.dm-todo-hd .n { font: 11.5px var(--font-mono); color: var(--blue-700); }
.dm-todo-hd .hint { color: var(--dark-text-faint); font-size: 12px; }
.dm-todo-hd > svg { width: 14px; height: 14px; color: var(--dark-text-faint); margin-left: auto; transition: transform .2s; }
.dm-todo.open .dm-todo-hd > svg { transform: rotate(180deg); }
.dm-todo-bar { display: inline-block; width: 140px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.dm-todo-bar i { display: block; height: 100%; background: var(--blue-600); width: var(--w); transition: width .4s; }
.dm-todo-list { display: none; flex-wrap: wrap; gap: 6px; padding: 2px 18px 12px; }
.dm-todo.open .dm-todo-list { display: flex; }
.dm-todo-item { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 7px; border-radius: 999px; border: 1px solid var(--line); background: var(--dark-panel); font-size: 12px; color: var(--dark-text); line-height: 1.3; text-align: left; }
.dm-todo-item:hover { border-color: var(--blue-ring); background: var(--dark-inset); }
.dm-todo-item.done { color: var(--dark-text-faint); text-decoration: line-through; text-decoration-color: rgba(10, 16, 32, .25); border-color: transparent; background: var(--dark-inset); }
.dm-todo-item .num { font: 10.5px var(--font-mono); color: var(--dark-text-faint); }
.dm-todo-item .dm-cb { width: 14px; height: 14px; }
.dm-todo-item .dm-cb svg { width: 9px; height: 9px; }
.dm-todo-ft { flex-basis: 100%; font-size: 12px; color: var(--dark-text-faint); padding-top: 4px; }
.dm-todo-ft a { color: var(--blue-700); font-weight: 600; cursor: pointer; }

/* ── L'application : le rail du produit (nav.app-rail de prod, mesuré le 2026-09-08) ──
   44 px replié / 216 px ouvert · la tête (marque + poussoir) · « TOUT LE BÂTI » et ses
   entrées · un espace · le pied « VOTRE ORGANISATION » à fond propre · le compte et son
   menu. « Agents IA » ouvre un panneau au survol ; replié, chaque entrée a son infobulle. */
.dm-app { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100%; transition: grid-template-columns .15s ease; }
.dm-rail { position: sticky; top: 40px; height: calc(100vh - 40px); background: var(--surface-soft); border-right: 1px solid var(--line); padding: 10px 5px; display: flex; flex-direction: column; align-items: stretch; gap: 2px; width: var(--rail-w); transition: width .15s ease; z-index: 31; }
body.rail-open .dm-rail { padding: 10px; }
.dm-rail-tete { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 2px 0 10px; }
body.rail-open .dm-rail-tete { flex-direction: row; justify-content: space-between; gap: 6px; padding: 2px 2px 10px 8px; }
.dm-brand { font: 800 19px/1 var(--font-sans); letter-spacing: -.02em; color: var(--ink); white-space: nowrap; overflow: hidden; }
.dm-brand .reste { display: none; }
body.rail-open .dm-brand .reste { display: inline; }
.dm-brand b { color: var(--blue-700); }
.dm-rail-toggle { display: flex; align-items: center; justify-content: center; width: 33px; height: 33px; border-radius: 50%; color: var(--dark-text); transition: color .15s, background .15s; }
.dm-rail-toggle:hover { color: var(--ink); background: color-mix(in srgb, var(--ink-strong) 6%, transparent); }
.dm-rail-toggle svg { width: 16px; height: 16px; stroke-width: 1.7; }
.dm-rail-title { display: none; margin: 6px 0 2px; padding: 0 10px; font: 700 10px/16px var(--font-sans); letter-spacing: .07em; text-transform: uppercase; color: var(--dark-text-faint); }
body.rail-open .dm-rail-title { display: block; }
.dm-rail-item { position: relative; }
.dm-rail-link { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; width: 100%; aspect-ratio: 1 / 1; padding: 0; border-radius: 50%; border: 1px solid transparent; color: var(--dark-text); text-align: left; cursor: pointer; transition: color .15s, background .15s, border-color .15s; }
body.rail-open .dm-rail-link { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 8px 10px; aspect-ratio: auto; border-radius: 9px; }
.dm-rail-link svg { width: 15px; height: 15px; stroke-width: 1.6; }
.dm-rail-link:hover, .dm-rail-item:focus-within > .dm-rail-link { background: color-mix(in srgb, var(--ink-strong) 6%, transparent); color: var(--ink); }
.dm-rail-link.on, .dm-rail-link.on:hover { color: var(--blue-800); background: color-mix(in srgb, var(--blue-600) 12%, transparent); border-color: color-mix(in srgb, var(--blue-600) 35%, transparent); }
.dm-rail-link.on svg { color: var(--blue-700); }
.dm-rail-link .lbl { display: none; min-width: 0; font-size: .8rem; font-weight: 500; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.rail-open .dm-rail-link .lbl { display: block; }
.dm-rail-link.on .lbl { color: var(--ink); }
.dm-rail-link .n { display: none; margin-left: auto; font: 11px var(--font-mono); color: var(--dark-text-faint); }
body.rail-open .dm-rail-link .n { display: inline; }
.dm-rail-item .tip { position: absolute; left: calc(100% + 10px); top: 50%; z-index: 5; transform: translateY(-50%); padding: 5px 9px; border-radius: 7px; background: var(--ink-strong); color: var(--on-accent); font-size: 12px; font-weight: 500; line-height: 1.25; letter-spacing: -.005em; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; box-shadow: 0 8px 24px -12px color-mix(in srgb, var(--ink-strong) 55%, transparent); }
.dm-rail-item:hover > .tip, .dm-rail-item:focus-within > .tip { opacity: 1; }
body.rail-open .dm-rail-item .tip { display: none; }
.dm-rail-fill { flex: 1 1 auto; }
.dm-rail-pied { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; padding: 4px 0 6px; border-bottom: 1px solid var(--line-soft); background: var(--surface-soft); border-radius: 10px; }
.dm-rail-pied .dm-rail-title { margin: 2px 0 4px; }
/* Le compte, tout en bas, et son menu à droite */
.dm-rail-account-btn { background: color-mix(in srgb, var(--ink-strong) 6%, transparent); }
.dm-rail-account:hover > .dm-rail-account-btn, .dm-rail-account:focus-within > .dm-rail-account-btn { background: color-mix(in srgb, var(--ink-strong) 12%, transparent); }
.dm-rail-pop { position: absolute; left: calc(100% + 8px); bottom: 0; z-index: 60; display: none; width: 238px; padding: 7.2px; background: var(--dark-panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 60px -30px rgba(15, 23, 42, .4); }
.dm-rail-account:hover > .dm-rail-pop, .dm-rail-account:focus-within > .dm-rail-pop { display: block; animation: dm-panel-in .18s cubic-bezier(.16, 1, .3, 1); }
.dm-rail-account::after { content: ""; position: absolute; left: 100%; top: 0; width: 10px; height: 100%; }
.dm-rail-row { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 7px 9px; border-radius: 8px; font-size: 12.8px; color: var(--dark-text); }
.dm-rail-row svg { width: 15px; height: 15px; stroke-width: 1.8; }
.dm-rail-row:hover { background: color-mix(in srgb, var(--ink-strong) 5%, transparent); color: var(--ink); }
.dm-rail-row.out { margin-top: 4px; border-top: 1px solid var(--line-soft); border-radius: 0 0 8px 8px; color: #e11d48; }
.dm-rail-row.out:hover { background: rgba(225, 29, 72, .06); color: #e11d48; }
/* Le panneau au survol d'une entrée à menu (« Agents IA ») */
.dm-rail-panel { position: absolute; left: calc(100% + 8px); top: -6px; z-index: 60; display: none; width: 320px; padding: 16px; background: var(--dark-panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 24px 70px -36px rgba(15, 23, 42, .4); text-align: left; }
.dm-rail-panel.mid { top: 50%; transform: translateY(-50%); }
.dm-rail-item--menu:hover::after, .dm-rail-item--menu:focus-within::after { content: ""; position: absolute; left: 100%; top: 0; width: 10px; height: 100%; }
.dm-rail-item--menu:hover > .dm-rail-panel, .dm-rail-item--menu:focus-within > .dm-rail-panel { display: block; animation: dm-panel-in .18s cubic-bezier(.16, 1, .3, 1); }
.dm-rail-panel-title { margin: 0 0 .6rem; font-size: .9rem; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.dm-rail-panel .col { margin: .85rem 0 .35rem; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--dark-text-faint); }
.dm-rail-panel ul { list-style: none; margin: 0; padding: 0; }
.dm-nav-link { display: flex; align-items: flex-start; gap: 10px; width: 100%; text-align: left; padding: 8px; border-radius: 8px; color: var(--blue-700); transition: background .15s, transform .15s; }
.dm-nav-link:hover { background: color-mix(in srgb, var(--ink-strong) 5%, transparent); transform: translateY(-1px); }
.dm-nav-link .ic { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-top: 2px; border-radius: 6px; color: var(--blue-800); flex: 0 0 auto; transition: background .15s, transform .15s; }
.dm-nav-link .ic svg { width: 14px; height: 14px; }
.dm-nav-link:hover .ic { background: color-mix(in srgb, var(--ink-strong) 6%, transparent); color: #1e40af; transform: translateY(-2px); }
.dm-nav-link .t { flex: 1 1 auto; min-width: 0; }
.dm-nav-link .title { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--ink); }
.dm-nav-link .desc { display: block; margin-top: 1.6px; font-size: 11px; line-height: 1.6; color: var(--dark-text-faint); }
.dm-nav-link:hover .desc { color: var(--dark-text-dim); }
.dm-nav-link > svg { width: 14px; height: 14px; margin-top: 6px; color: rgba(15, 23, 42, .3); opacity: 0; transform: translateX(-3px) scale(.9); transition: opacity .15s, transform .15s, color .15s; flex: 0 0 auto; }
.dm-nav-link:hover > svg { opacity: 1; transform: none; color: var(--blue-800); }
@keyframes dm-panel-in { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; } }
.dm-rail-panel.mid { animation-name: dm-panel-in-mid; }
@keyframes dm-panel-in-mid { from { opacity: 0; transform: translate(-4px, -50%); } to { opacity: 1; transform: translateY(-50%); } }
.dm-body { min-width: 0; overflow-x: clip; }

/* ── La barre, ses boutons (.srch-bar de prod : 38 px, ombre, l'aide et le bouton bleu dedans) ── */
.dm-top { position: sticky; top: 40px; z-index: 30; display: flex; align-items: center; gap: 8px; padding: 12px 20px 10px; background: var(--paper); }
.dm-search { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 5px 0 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--dark-panel); box-shadow: 0 10px 30px -24px color-mix(in srgb, var(--ink-strong) 35%, transparent); }
.dm-search:focus-within { border-color: var(--blue-600); box-shadow: 0 0 0 3px var(--blue-tint), 0 10px 30px -24px color-mix(in srgb, var(--ink-strong) 35%, transparent); }
.dm-search > svg { color: #6b7689; width: 15px; height: 15px; }
.dm-search input { flex: 1 1 0; width: 100%; border: 0; outline: 0; font: 15px var(--font-sans); color: var(--dark-text-strong); background: transparent; min-width: 0; padding: 0; }
.dm-search input::placeholder { color: var(--dark-text-faint); }
.dm-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.dm-help { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; background: var(--line-soft); color: var(--dark-text-dim); font: italic 600 13px Georgia, "Times New Roman", serif; flex: 0 0 auto; }
.dm-help:hover { background: var(--line); color: var(--ink); }
.dm-go { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: var(--blue-600); color: var(--on-accent); flex: 0 0 auto; }
.dm-go:hover { background: var(--blue-700); }
.dm-go svg { width: 15px; height: 15px; }
.dm-topicons { display: flex; gap: 6px; }
.dm-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 999px; color: var(--dark-text-faint); position: relative; }
.dm-ic svg { width: 16px; height: 16px; }
.dm-ic:hover { background: rgba(148, 163, 184, .18); color: var(--ink); }
.dm-ic.blue { background: var(--blue-600); color: var(--on-accent); }
.dm-ic.blue:hover { background: var(--blue-700); color: var(--on-accent); }
.dm-ic .dot { position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--amber-wash); border: 2px solid var(--paper); }
#main { padding: 0 20px 40px; }
.dm-demo-overview { max-width: 1100px; margin: 0 auto; padding: var(--space-32) 0; }
.dm-demo-overview > h1 { margin: var(--space-8) 0 var(--space-12); font: 700 var(--fs-24)/1.2 var(--font-display); color: var(--ink); }
.dm-demo-overview > p:not(.k) { max-width: 60ch; color: var(--dark-text); font-size: var(--fs-16); }
.dm-demo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: var(--space-12); margin-top: var(--space-24); }
.dm-demo-card { position: relative; display: flex; flex-direction: column; gap: var(--space-8); min-height: 130px; padding: var(--space-16) var(--space-24); border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--page); }
.dm-demo-card:hover { border-color: var(--blue-600); }
.dm-demo-card strong { color: var(--ink); font-size: var(--fs-16); }
.dm-demo-card span { color: var(--dark-text); }
.dm-demo-card b { position: absolute; right: var(--space-16); bottom: var(--space-12); color: var(--blue-700); }

/* ── Atomes du produit : boutons, pilules, badges, étiquettes, cases ── */
.dm-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--dark-border); background: var(--dark-inset); font-size: 12.5px; font-weight: 600; color: var(--dark-text-dim); white-space: nowrap; }
.dm-btn svg { width: 13px; height: 13px; }
.dm-btn:hover { border-color: #c7d2e2; color: var(--ink); }
.dm-btn.pri { background: var(--blue-tint); border-color: rgba(127, 176, 255, .3); color: var(--blue-700); }
.dm-btn.blue { background: var(--blue-600); border-color: var(--blue-600); color: var(--on-accent); }
.dm-btn.blue:hover { background: var(--blue-700); color: var(--on-accent); }
.dm-btn.done { background: var(--blue-100); border-color: var(--blue-ring); color: var(--blue-700); }
.dm-btn.done svg { fill: currentColor; }
.dm-btn.claude { color: var(--violet); }
.dm-btn.ghost { background: transparent; }
.dm-btn.sm { height: 26px; padding: 0 10px; font-size: 12px; }
.dm-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dm-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ink-strong) 10%, transparent); background: var(--dark-panel); font-size: 12px; color: var(--dark-text-dim); white-space: nowrap; }
.dm-pill svg { width: 12px; height: 12px; }
.dm-pill.on { background: var(--blue-100); border-color: var(--blue-ring); color: var(--blue-700); }
.dm-badge { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--blue-100); color: var(--blue-700); white-space: nowrap; }
.dm-badge svg { width: 12px; height: 12px; }
.dm-badge.green { background: var(--green-bg); color: var(--emerald); }
.dm-badge.amber { background: var(--amber-bg); color: var(--amber); }
.dm-badge.red { background: var(--red-bg); color: var(--red); }
.dm-badge.grey { background: #eef2f7; color: var(--dark-text-dim); }
.dm-kind { display: inline-block; padding: 3px 8px; border-radius: 6px; background: var(--blue-100); color: var(--blue-700); font: 700 9.5px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.dm-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 8px; }
.dm-tag { padding: 3px 9px; border-radius: 999px; background: var(--paper); font-size: 11.5px; color: var(--dark-text); }
.dm-box { background: var(--dark-panel); border: 1px solid var(--dark-border); border-radius: 16px; }
.dm-rc { background: var(--dark-panel); border: 1px solid var(--dark-border); border-radius: 12px; padding: 14px; box-shadow: 0 1px 2px color-mix(in srgb, var(--ink-strong) 4%, transparent); }
.dm-rc-hd { display: flex; align-items: center; gap: 6.4px; padding: 0 0 10px; font: 700 10px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dark-text-strong); }
.dm-rc-hd > svg { width: 11px; height: 11px; color: var(--blue-600); }
.dm-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 14px; margin-bottom: 10px; }
.dm-fields .k { display: block; margin-bottom: 4px; }
.dm-fields span { font-size: 13.5px; color: var(--ink); }
.dm-fields small { display: block; font-size: 11.5px; color: var(--dark-text-faint); }
.dm-meta { font-size: 12.5px; color: var(--dark-text-faint); margin-bottom: 10px; }
.dm-empty { padding: 26px 20px; border-radius: 16px; border: 1px dashed color-mix(in srgb, var(--ink-strong) 18%, transparent); color: var(--dark-text-dim); font-size: 13.5px; background: var(--dark-panel); }
.dm-empty b { display: block; color: var(--ink); margin-bottom: 4px; }
.dm-empty a { color: var(--blue-700); cursor: pointer; font-weight: 600; }
.dm-cb { width: 16px; height: 16px; border-radius: 4px; border: 1px solid color-mix(in srgb, var(--ink-strong) 28%, transparent); display: grid; place-items: center; flex: 0 0 auto; background: var(--dark-panel); }
.dm-cb.on { background: var(--blue-600); border-color: var(--blue-600); color: var(--on-accent); }
.dm-cb.half { background: var(--dark-panel); border-color: var(--blue-600); color: var(--blue-600); }
.dm-cb svg { width: 11px; height: 11px; stroke-width: 3; }
.dm-radio { width: 16px; height: 16px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--ink-strong) 28%, transparent); display: grid; place-items: center; flex: 0 0 auto; }
.dm-radio.on { border-color: var(--blue-600); }
.dm-radio.on::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue-600); }

/* ── Chips de filtre et onglets (switcher blanc) ─────────── */
.dm-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.dm-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--dark-panel); font-size: 11.84px; line-height: 1.6; color: var(--dark-text); white-space: nowrap; }
.dm-chip svg { width: 12px; height: 12px; }
.dm-chip:hover { border-color: #c7d2e2; }
.dm-chip.on { background: var(--blue-100); border-color: var(--blue-ring); color: var(--blue-700); font-weight: 600; }
.dm-chip.open { border-color: var(--blue-600); }
.dm-chip .val { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.dm-chip.watch::after { content: "surveillé"; font: 9.5px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--emerald); margin-left: 2px; }
.dm-tabs { display: flex; gap: 2px; align-items: center; padding: 2px; margin-bottom: 18px; border-radius: 999px; border: 1px solid var(--dark-border); background: var(--dark-panel); overflow-x: auto; scrollbar-width: none; }
.dm-tab { display: inline-flex; align-items: center; gap: 6.4px; height: 28px; padding: 0 15px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--dark-text); white-space: nowrap; flex: 0 0 auto; transition: background .15s, color .15s; }
.dm-tab i { font: 11px var(--font-mono); font-style: normal; color: inherit; opacity: .85; }
.dm-tab:hover { background: var(--dark-inset); color: var(--ink); }
.dm-tab.on { background: var(--blue-100); color: var(--blue-800); font-weight: 600; }
.dm-tab.lock svg { width: 11px; height: 11px; color: var(--dark-text-faint); }

/* ── Popover des chips ───────────────────────────────────── */
.dm-pop { position: absolute; z-index: 35; width: 340px; background: var(--dark-panel); border: 1px solid color-mix(in srgb, var(--ink-strong) 10%, transparent); border-radius: 14px; box-shadow: 0 24px 60px -24px color-mix(in srgb, var(--ink-strong) 35%, transparent); padding: 12px; }
.dm-pop-in { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--dark-inset); margin-bottom: 8px; }
.dm-pop-in input { flex: 1; border: 0; outline: 0; background: transparent; font: 13px var(--font-sans); min-width: 0; }
.dm-pop-in svg { width: 14px; height: 14px; color: var(--dark-text-faint); }
.dm-pop .k { display: block; padding: 8px 6px 4px; }
.dm-opt { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 6px 6px; border-radius: 8px; font-size: 13px; color: var(--ink); }
.dm-opt:hover { background: var(--dark-inset); }
.dm-opt i { margin-left: auto; font: 11px var(--font-mono); font-style: normal; color: var(--dark-text-faint); }
.dm-opt.sub { padding-left: 30px; font-size: 12.5px; }
.dm-pop-cols { display: grid; grid-template-columns: 1fr 1fr; }
.dm-pop-ft { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dark-text-faint); }
.dm-pop-ft .dm-btn { margin-left: auto; }
.dm-pop-note { padding: 8px 6px 2px; font-size: 12px; color: var(--dark-text-faint); line-height: 1.45; }
.dm-pop-note b { color: var(--ink); font-weight: 600; }
.dm-pop-depts { margin: 4px 6px 0; font-size: 12px; color: var(--blue-700); line-height: 1.45; }
.dm-rules { list-style: none; padding: 0; margin: 4px 0 0; }
.dm-rules li { display: flex; gap: 10px; padding: 8px 6px; border-top: 1px solid var(--line); font-size: 13px; }
.dm-rules li:first-child { border-top: 0; }
.dm-rules code { font: 12px var(--font-mono); background: var(--dark-inset); padding: 2px 6px; border-radius: 5px; white-space: nowrap; }
.dm-scroll { max-height: 300px; overflow: auto; }

/* ── Tiroir (fiches), modales, toast ─────────────────────── */
.dm-scrim { position: fixed; inset: 0; z-index: 45; background: color-mix(in srgb, var(--ink-strong) 28%, transparent); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.dm-scrim.on { opacity: 1; visibility: visible; }
.dm-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 46; width: min(640px, 96vw); background: var(--paper); box-shadow: -30px 0 60px -40px rgba(10, 16, 32, .5); transform: translateX(102%); transition: transform .28s cubic-bezier(.2, .7, .2, 1); overflow: auto; }
.dm-drawer.on { transform: none; }
.dm-drawer-hd { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 10px; padding: 14px 20px; background: var(--paper); border-bottom: 1px solid var(--line); }
.dm-drawer-hd .dm-kind { flex: 0 0 auto; }
.dm-drawer-hd .x { margin-left: auto; }
.dm-drawer-in { padding: 18px 20px 30px; }
.dm-drawer h2 { font: 700 21px/1.2 var(--font-display); letter-spacing: -.02em; color: var(--dark-text-strong); margin: 4px 0 14px; }
.dm-sec { background: var(--dark-panel); border: 1px solid var(--dark-border); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.dm-sec > .k { display: block; margin-bottom: 10px; }
.dm-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.dm-kv div .k { display: block; margin-bottom: 3px; }
.dm-kv span { font-size: 13.5px; }
.dm-kv small { display: block; font-size: 11.5px; color: var(--dark-text-faint); }
.dm-list { list-style: none; margin: 0; padding: 0; }
.dm-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.dm-list li:first-child { border-top: 0; padding-top: 0; }
.dm-list li .n { margin-left: auto; font: 12px var(--font-mono); color: var(--dark-text-faint); }
.dm-list li .dm-btn { margin-left: auto; }
.dm-quote { padding: 12px 14px; border-left: 3px solid var(--blue-600); background: var(--dark-inset); border-radius: 0 10px 10px 0; font-size: 13.5px; line-height: 1.55; color: var(--dark-text); }
.dm-quote .k { display: block; margin-bottom: 6px; }
.dm-drawer .dm-actions { margin-top: 14px; }
.dm-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: rgba(10, 16, 32, .45); padding: 20px; opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
.dm-modal.on { opacity: 1; visibility: visible; }
.dm-modal-box { width: min(560px, 100%); background: var(--dark-panel); border-radius: 20px; padding: 24px 26px; box-shadow: 0 40px 80px -40px rgba(10, 16, 32, .6); max-height: 90vh; overflow: auto; }
.dm-modal-box.dark { background: var(--dark); color: #e6e9f2; }
.dm-modal-box.dark .k { color: #94a3b8; }
.dm-modal-box h2 { font: 700 24px/1.15 var(--font-display); letter-spacing: -.03em; margin: 8px 0 8px; }
.dm-modal-box h2 em { display: block; font-style: italic; font-weight: 500; color: var(--dark-text-faint); }
.dm-modal-box.dark h2 { color: var(--on-accent); }
.dm-modal-box.dark h2 em { color: #a4aebe; }
.dm-modal-box p { font-size: 14px; line-height: 1.6; color: var(--dark-text); margin-bottom: 12px; }
.dm-modal-box.dark p { color: #cbd5e1; }
.dm-modal-box .dm-actions { margin-top: 16px; }
.dm-modal-box .x { float: right; color: var(--dark-text-faint); }
.dm-code { font: 12.5px/1.6 var(--font-mono); background: #0f1320; color: #cbd5e1; border-radius: 12px; padding: 14px 16px; white-space: pre-wrap; margin: 10px 0; border: 1px solid #1c2333; }
.dm-code b { color: #9fc2ff; font-weight: 600; }
.dm-code .c { color: var(--emerald-wash); }
.dm-field { margin: 10px 0; }
.dm-field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; }
.dm-field input, .dm-field select { width: 100%; height: 36px; border-radius: 10px; border: 1px solid var(--line); padding: 0 12px; font: 13.5px var(--font-sans); background: var(--dark-panel); }
.dm-field .val { padding: 9px 12px; border-radius: 10px; background: var(--dark-inset); font-size: 13.5px; }
.dm-seg { display: inline-flex; padding: 2px; border-radius: 999px; background: var(--dark-inset); border: 1px solid var(--dark-border); }
.dm-seg button { height: 28px; padding: 0 13px; border-radius: 999px; font-size: 13px; color: var(--dark-text-dim); }
.dm-seg button.on { background: var(--dark-panel); color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px color-mix(in srgb, var(--ink-strong) 10%, transparent); }
.dm-progress { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; margin: 10px 0; }
.dm-progress i { display: block; height: 100%; background: var(--blue-600); width: 0; transition: width 1.1s ease; }
.dm-toast { position: fixed; left: 50%; bottom: 24px; z-index: 60; transform: translate(-50%, 20px); display: inline-flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 12px; background: var(--ink); color: var(--on-accent); font-size: 13.5px; box-shadow: 0 20px 40px -20px rgba(10, 16, 32, .6); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s; max-width: min(560px, 92vw); }
.dm-toast.on { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.dm-toast svg { width: 15px; height: 15px; color: var(--amber-wash); flex: 0 0 auto; }
.dm-toast b { color: var(--on-accent); }

/* ── Responsive du shell ─────────────────────────────────── */
@media (max-width: 900px) {
  :root, body.rail-open { --rail: 0px; }
  .dm-app { grid-template-columns: 1fr; }
  .dm-rail { display: none; }
  .dm-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dm-todo-hd .hint, .dm-todo-bar { display: none; }
  .dm-banner { font-size: 12px; gap: 8px; }
  .dm-banner .k { display: none; }
  #main { padding: 0 12px 120px; }
  .dm-top { padding: 10px 12px 8px; }
  .dm-topicons .dm-ic:not(.blue) { display: none; }
  .dm-help { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
