/* CZ Trade — DA CZ Control : « régie de nuit » graphite × matière Aura.
   Gris neutres, CTA blanc, statuts emerald / orange / rose, télémétrie en cyan Aura.
   Le thème clair transpose la même structure sur papier. Polices locales, aucune ressource réseau. */

@font-face { font-family: Inter; src: url("/fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url("/fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: Inter; src: url("/fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Inter; src: url("/fonts/inter-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: Inter, system-ui, sans-serif;
  --code: ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sidebar: 228px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --gap: 20px;

  /* Surfaces (CZ Dash / CZ Control) */
  --bg: #101010;
  --card: #171717;
  --card-2: #1c1c1c;
  --surface-3: #292929;
  --tile-a: #242424;
  --tile-b: #181818;
  --line: rgba(255, 255, 255, .085);
  --line-2: rgba(255, 255, 255, .06);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #f5f5f5;
  --ink-2: #b3b3b3;
  --muted: #949494;
  --faint: #6f6f6f;
  --focus: #d4d4d4;
  --cta: #fafafa;
  --cta-ink: #141414;
  --cta-hover: #e5e5e5;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-float: 0 24px 60px rgba(0, 0, 0, .5);
  --glass: rgba(20, 21, 26, .82);
  --scrim: rgba(0, 0, 0, .55);

  /* Statuts */
  --ok: #34d399;
  --warn: #fb923c;
  --bad: #fb7185;

  /* Matière Aura */
  --aura: #72f8fb;
  --aura-glow: 106, 218, 246;
  --aura-violet: #b49af1;
  --halo-a: .09;
  --grain: .045;

  /* Palette des graphiques (noms historiques lus par le canvas) */
  --teal: #72f8fb;
  --teal-ink: #34d399;
  --red: #fb7185;
  --green: #34d399;
  --yellow: #facc15;
  --yellow-ink: #facc15;
  --pink: #f49dba;
  --blue: #60a5fa;
  --cyan: #72f8fb;
  --orange: #fb923c;
  --purple: #b49af1;
  --slate: #a3a3a3;
  --v-a: #72f8fb;
  --v-b: #f49dba;
  --v-c: #b49af1;
  --v-d: #efb979;
  --risk-zone: rgba(251, 113, 133, .1);
  --ridge-fill: #171717;
  --ridge-line: rgba(245, 245, 245, .42);
  --grid: rgba(255, 255, 255, .05);
  color-scheme: dark;
}

/* Thème clair : même structure, papier et encre. */
:root[data-theme="light"] {
  --bg: #f3f3f2;
  --card: #ffffff;
  --card-2: #f7f7f6;
  --surface-3: #ececea;
  --tile-a: #ffffff;
  --tile-b: #f6f6f5;
  --line: rgba(0, 0, 0, .085);
  --line-2: rgba(0, 0, 0, .055);
  --line-strong: rgba(0, 0, 0, .16);
  --text: #141414;
  --ink-2: #3f3f3f;
  --muted: #6a6a6a;
  --faint: #959595;
  --focus: #404040;
  --cta: #141414;
  --cta-ink: #fafafa;
  --cta-hover: #2a2a2a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05);
  --shadow-float: 0 24px 60px rgba(0, 0, 0, .14);
  --glass: rgba(255, 255, 255, .78);
  --scrim: rgba(20, 20, 20, .3);
  --ok: #059669;
  --warn: #ea580c;
  --bad: #e11d48;
  --aura: #0891b2;
  --aura-glow: 8, 145, 178;
  --aura-violet: #7c3aed;
  --halo-a: .07;
  --grain: .03;
  --teal: #0891b2;
  --teal-ink: #059669;
  --red: #e11d48;
  --green: #059669;
  --yellow: #ca8a04;
  --yellow-ink: #a16207;
  --pink: #db2777;
  --blue: #2563eb;
  --cyan: #0891b2;
  --orange: #ea580c;
  --purple: #7c3aed;
  --slate: #737373;
  --v-a: #0891b2;
  --v-b: #db2777;
  --v-c: #7c3aed;
  --v-d: #b45309;
  --risk-zone: rgba(225, 29, 72, .07);
  --ridge-fill: #ffffff;
  --ridge-line: rgba(20, 20, 20, .45);
  --grid: rgba(0, 0, 0, .06);
  color-scheme: light;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-theme="light"]) {
    --bg: #f3f3f2; --card: #ffffff; --card-2: #f7f7f6; --surface-3: #ececea; --tile-a: #ffffff; --tile-b: #f6f6f5;
    --line: rgba(0, 0, 0, .085); --line-2: rgba(0, 0, 0, .055); --line-strong: rgba(0, 0, 0, .16);
    --text: #141414; --ink-2: #3f3f3f; --muted: #6a6a6a; --faint: #959595; --focus: #404040;
    --cta: #141414; --cta-ink: #fafafa; --cta-hover: #2a2a2a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .05); --shadow-float: 0 24px 60px rgba(0, 0, 0, .14);
    --glass: rgba(255, 255, 255, .78); --scrim: rgba(20, 20, 20, .3);
    --ok: #059669; --warn: #ea580c; --bad: #e11d48;
    --aura: #0891b2; --aura-glow: 8, 145, 178; --aura-violet: #7c3aed; --halo-a: .07; --grain: .03;
    --teal: #0891b2; --teal-ink: #059669; --red: #e11d48; --green: #059669; --yellow: #ca8a04; --yellow-ink: #a16207;
    --pink: #db2777; --blue: #2563eb; --cyan: #0891b2; --orange: #ea580c; --purple: #7c3aed; --slate: #737373;
    --v-a: #0891b2; --v-b: #db2777; --v-c: #7c3aed; --v-d: #b45309;
    --risk-zone: rgba(225, 29, 72, .07); --ridge-fill: #ffffff; --ridge-line: rgba(20, 20, 20, .45); --grid: rgba(0, 0, 0, .06);
    color-scheme: light;
  }
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; background: var(--bg); }
body {
  margin: 0; min-width: 320px; background: var(--bg); color: var(--text);
  font: 400 14px/1.45 var(--font); font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; font-synthesis: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
svg { flex-shrink: 0; }
::selection { background: rgba(148, 148, 148, .38); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.num, .mono { font-variant-numeric: tabular-nums; }
.code { font-family: var(--code); font-size: 12px; }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: -60px; left: 16px; z-index: 100; background: var(--cta); color: var(--cta-ink); padding: 10px 14px; border-radius: var(--r-sm); font-weight: 500; }
.skip:focus { top: 12px; }
.pos, .c-teal, .c-green { color: var(--ok); }
.neg, .c-red { color: var(--bad); }
.c-orange { color: var(--warn); }
.c-blue { color: var(--aura); }

/* Fond Aura : halo cyan très bas qui dérive et grain graphite. */
.backdrop { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.halo { position: absolute; left: calc(var(--sidebar) + 28%); top: -20vh; width: 70vw; height: 62vh; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(var(--aura-glow), var(--halo-a)), rgba(var(--aura-glow), calc(var(--halo-a) / 3)) 55%, transparent);
  filter: blur(40px); animation: drift 18s ease-in-out infinite alternate; }
.grain { position: absolute; inset: 0; opacity: var(--grain); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
@keyframes drift { from { transform: translate3d(-4%, 0, 0) scale(1); } to { transform: translate3d(6%, 4vh, 0) scale(1.08); } }

/* Lampes de statut */
.lamp { display: inline-block; width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--muted); }
.lamp.ok { background: var(--ok); box-shadow: 0 0 8px color-mix(in srgb, var(--ok) 55%, transparent); }
.lamp.warn { background: var(--warn); box-shadow: 0 0 8px color-mix(in srgb, var(--warn) 55%, transparent); }
.lamp.bad { background: var(--bad); box-shadow: 0 0 8px color-mix(in srgb, var(--bad) 60%, transparent); animation: lamp-pulse 1.8s ease-in-out infinite; }
.lamp.aura { background: var(--aura); box-shadow: 0 0 8px rgba(var(--aura-glow), .6); }
.lamp.off { background: transparent; box-shadow: inset 0 0 0 1.5px var(--faint); }
@keyframes lamp-pulse { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 18%, transparent), 0 0 12px color-mix(in srgb, var(--bad) 60%, transparent); } }

/* ------------------------------------------------------------------ barre latérale */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 40; display: flex; flex-direction: column; overflow-y: auto;
  padding: 26px 14px 16px; border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; margin-bottom: 30px; }
.brand-mark { font-weight: 700; font-size: 22px; letter-spacing: -1.2px; line-height: 1; }
.brand-mark i { font-style: normal; color: var(--aura); text-shadow: 0 0 10px rgba(var(--aura-glow), .6); }
.brand-word { font-size: 12px; font-weight: 500; letter-spacing: 3.5px; color: var(--ink-2); margin-top: 2px; }
.nav { position: relative; display: grid; gap: 2px; }
.nav-pill { position: absolute; left: 0; right: 0; top: 0; height: 36px; border-radius: var(--r-sm); background: var(--surface-3);
  box-shadow: inset 0 1px rgba(255, 255, 255, .05), 0 4px 14px color-mix(in srgb, #000 calc(var(--grain) * 500%), transparent); opacity: 0;
  transition: transform .34s var(--ease), opacity .2s var(--ease); pointer-events: none; }
.nav-link { position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; height: 36px; padding: 0 10px; border-radius: var(--r-sm);
  color: var(--muted); font-size: 13.5px; transition: color .16s var(--ease), background-color .16s var(--ease); }
.nav-link:hover { color: var(--text); background: color-mix(in srgb, var(--text) 4%, transparent); }
.nav-link[aria-current="true"] { color: var(--text); background: transparent; }
.nav-link svg, .icon-btn svg, .profile svg, .select-wrap svg, .button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.side-section { margin-top: 26px; }
.side-label { font-size: 11px; color: var(--faint); padding: 0 10px; margin-bottom: 8px; }
.strategies { display: grid; gap: 2px; }
.strategy { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--r-sm);
  color: var(--ink-2); font-size: 13px; transition: background-color .16s var(--ease), color .16s var(--ease); }
.strategy:hover { background: color-mix(in srgb, var(--text) 4%, transparent); color: var(--text); }
.strategy[aria-current="true"] { background: var(--surface-3); color: var(--text); }
.strategy .sw { width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.strategy small { display: block; font-size: 11px; color: var(--faint); margin-top: 1px; }
.strategy .val { font-size: 12px; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 7px; }
.side-bottom { margin-top: auto; padding-top: 22px; }
.side-note { font-size: 11px; color: var(--faint); padding: 0 10px 12px; line-height: 1.5; }
.profile { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; border-top: 1px solid var(--line); padding: 14px 8px 2px; color: var(--text); border-radius: 0; }
.profile:hover .avatar { border-color: var(--line-strong); box-shadow: 0 0 14px rgba(var(--aura-glow), .2); }
.profile[disabled] { cursor: default; }
.profile[disabled] > svg { display: none; }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 13px; font-weight: 500;
  background: radial-gradient(ellipse at top right, rgba(var(--aura-glow), .2), color-mix(in srgb, var(--text) 6%, transparent)); transition: box-shadow .2s var(--ease), border-color .2s var(--ease); }
.profile-text { display: grid; line-height: 1.25; min-width: 0; flex: 1; }
.profile-text strong { font-size: 13px; font-weight: 500; }
.profile-text small { font-size: 11px; color: var(--muted); }
.profile > svg { color: var(--faint); }
.scrim { position: fixed; inset: 0; z-index: 39; background: var(--scrim); backdrop-filter: blur(2px); }

/* ------------------------------------------------------------------ barre haute */
.shell { margin-left: var(--sidebar); min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; min-height: 60px; padding: 10px 34px;
  border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px) saturate(1.2); }
.crumbs { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); min-width: 0; }
.crumbs .slash { color: var(--faint); }
.crumbs .current { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.menu-btn { display: none !important; }
.source-pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong);
  font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.select-wrap { position: relative; display: inline-flex; align-items: center; }
.select { appearance: none; -webkit-appearance: none; height: 34px; max-width: 280px; padding: 0 32px 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--text) 2%, transparent); color: var(--text); font-size: 12.5px; cursor: pointer; text-overflow: ellipsis; }
.select:hover { border-color: color-mix(in srgb, var(--text) 30%, transparent); }
.select option, .select optgroup { background: var(--card); color: var(--text); }
.select-wrap svg { position: absolute; right: 9px; width: 15px; height: 15px; color: var(--muted); pointer-events: none; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; border: 1px solid var(--line); background: color-mix(in srgb, var(--text) 2.5%, transparent); }
.seg button { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 7px; color: var(--muted); font-size: 12px; font-weight: 500;
  transition: background-color .18s var(--ease), color .18s var(--ease), box-shadow .18s var(--ease); }
.seg button:hover:not(:disabled) { color: var(--text); }
.seg button:disabled { opacity: .35; cursor: not-allowed; }
.seg button[aria-checked="true"], .seg button[aria-selected="true"] { background: var(--surface-3); color: var(--text); box-shadow: inset 0 1px rgba(255, 255, 255, .05), 0 2px 8px rgba(0, 0, 0, .18); }
.seg.small button { height: 24px; padding: 0 9px; font-size: 11.5px; }
.seg .sw { width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px color-mix(in srgb, var(--c) 60%, transparent); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; min-width: 34px; padding: 0 9px; border-radius: var(--r-sm);
  color: var(--muted); transition: background-color .16s var(--ease), color .16s var(--ease); }
.icon-btn:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); }
.icon-btn .moon { display: none; }
:root[data-theme="dark"] .icon-btn .sun { display: none; }
:root[data-theme="dark"] .icon-btn .moon { display: block; }
.theme-label { font-size: 12px; }
.clock { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 4px; }

/* ------------------------------------------------------------------ contenu */
main { display: flex; flex-direction: column; gap: var(--gap); padding: 30px 34px 28px; max-width: 1640px; margin: 0 auto; outline: none; overflow-x: clip; }
.grid { display: grid; gap: var(--gap); }
.g-60-40 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.g-40-60 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
.g-50-50 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.reveal { animation: reveal .42s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); filter: blur(5px); } to { opacity: 1; transform: none; filter: none; } }

/* Héros : titre d'état comme point focal, relevés en verre devant un halo teinté par le niveau. */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px 40px; padding: 8px 0 26px; border-bottom: 1px solid var(--line); }
.eyebrow { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.hero h1 { display: flex; align-items: center; gap: 14px; font-size: clamp(28px, 3.2vw, 40px); line-height: 1.12; font-weight: 600; letter-spacing: -.035em; }
.hero-lamp { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--muted); animation: breathe 3.4s ease-in-out infinite; --lc: 148, 148, 148; }
.hero[data-level="ok"] .hero-lamp { background: var(--ok); --lc: 52, 211, 153; }
.hero[data-level="warn"] .hero-lamp { background: var(--warn); --lc: 251, 146, 60; }
.hero[data-level="bad"] .hero-lamp { background: var(--bad); --lc: 251, 113, 133; }
.hero[data-level="demo"] .hero-lamp { background: var(--aura-violet); --lc: 180, 154, 241; }
@keyframes breathe { 50% { box-shadow: 0 0 0 9px rgba(var(--lc), .07), 0 0 26px rgba(var(--lc), .4); } }
.hero-sub { margin-top: 10px; font-size: 14px; color: var(--ink-2); max-width: 680px; line-height: 1.55; }
.hero-actions { display: flex; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 15px; border-radius: var(--r-sm);
  border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--text) 2%, transparent); font-size: 13px; font-weight: 500; white-space: nowrap;
  transition: background-color .16s var(--ease), border-color .16s var(--ease), transform .12s var(--ease), box-shadow .16s var(--ease); }
.button:hover { background: color-mix(in srgb, var(--text) 6%, transparent); border-color: color-mix(in srgb, var(--text) 28%, transparent); }
.button:active { transform: scale(.97) translateY(1px); }
.button.primary { background: var(--cta); color: var(--cta-ink); border-color: transparent; box-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 0 24px rgba(var(--aura-glow), .12); }
.button.primary:hover { background: var(--cta-hover); }
.button .i-pause { display: none; }
.button[aria-pressed="true"] .i-play { display: none; }
.button[aria-pressed="true"] .i-pause { display: block; }
.button.primary svg path.i-play { fill: currentColor; stroke: none; }
.scrubber { display: flex; align-items: center; gap: 12px; flex: 1 1 260px; max-width: 460px; min-width: 200px; }
.scrub { flex: 1; min-width: 0; height: 20px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; --p: 100%; }
.scrub::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--aura) var(--p), var(--line-strong) var(--p)); }
.scrub::-moz-range-track { height: 4px; border-radius: 4px; background: var(--line-strong); }
.scrub::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--aura); }
.scrub::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: var(--text); border: 0; box-shadow: 0 0 0 4px rgba(var(--aura-glow), .18), 0 0 12px rgba(var(--aura-glow), .5); }
.scrub::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 0; box-shadow: 0 0 0 4px rgba(var(--aura-glow), .18), 0 0 12px rgba(var(--aura-glow), .5); }
.scrub-time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 62px; text-align: right; }

.readouts-wrap { position: relative; isolation: isolate; }
.hero-halo { position: absolute; inset: -60px -40px -100px; z-index: -1; border-radius: 50%; pointer-events: none; filter: blur(28px); animation: halo 7s ease-in-out infinite;
  background: radial-gradient(ellipse at 50% 55%, rgba(var(--aura-glow), .2), rgba(var(--aura-glow), .05) 45%, transparent 70%); }
.hero[data-level="warn"] .hero-halo { background: radial-gradient(ellipse at 50% 55%, rgba(251, 146, 60, .14), rgba(251, 146, 60, .04) 45%, transparent 70%); }
.hero[data-level="bad"] .hero-halo { background: radial-gradient(ellipse at 50% 55%, rgba(251, 113, 133, .16), rgba(251, 113, 133, .05) 45%, transparent 70%); }
.hero[data-level="demo"] .hero-halo { background: radial-gradient(ellipse at 50% 55%, rgba(180, 154, 241, .16), transparent 70%); }
@keyframes halo { 50% { opacity: .7; transform: scale(1.04); } }
.readouts { display: grid; grid-template-columns: repeat(4, minmax(0, auto)); margin: 0; border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: var(--glass);
  backdrop-filter: blur(22px); box-shadow: 0 18px 50px rgba(0, 0, 0, .3), inset 0 1px rgba(255, 255, 255, .07); overflow: hidden; }
.readout { padding: 15px 20px 14px; min-width: 132px; border-left: 1px solid var(--line); }
.readout:first-child { border-left: 0; }
.readout dt { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.readout dd { margin: 0; }
.readout-value { font-size: 25px; font-weight: 600; letter-spacing: -.03em; margin: 6px 0 4px !important; white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 1.1; }
.readout-value small { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin-left: 1px; }
.readout-hint { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.readout-hint.warn { color: var(--warn); } .readout-hint.bad { color: var(--bad); } .readout-hint.ok { color: var(--ok); }

/* Panneaux */
.panel { position: relative; min-width: 0; padding: 20px 22px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: flex-start; gap: 14px 18px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head > :last-child:not(:first-child) { margin-left: auto; }
.panel-head h2 { font-size: 15.5px; font-weight: 600; letter-spacing: -.015em; }
.panel-sub { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.legend { display: flex; gap: 4px 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); padding-top: 2px; }
.legend button { display: inline-flex; align-items: center; gap: 7px; padding: 3px 4px; border-radius: 6px; transition: opacity .16s var(--ease); }
.legend button[aria-pressed="false"] { opacity: .4; }
.legend i { width: 14px; height: 3px; border-radius: 2px; background: var(--c); box-shadow: 0 0 6px color-mix(in srgb, var(--c) 55%, transparent); }
.legend i.dash { background: repeating-linear-gradient(90deg, var(--c) 0 4px, transparent 4px 7px); box-shadow: none; }
.canvas-wrap { position: relative; width: 100%; }
.canvas-wrap canvas { display: block; width: 100%; height: 100%; }
.balance-wrap { height: 320px; }
.land-wrap { height: 290px; }
.lattice-wrap { height: 280px; }
.graph-wrap { height: 330px; }
.tip { position: absolute; z-index: 5; pointer-events: none; display: block; min-width: 140px; padding: 9px 11px; border-radius: 10px; font-size: 11.5px; line-height: 1.6; white-space: nowrap;
  background: color-mix(in srgb, var(--card-2) 96%, transparent); border: 1px solid var(--line-strong); box-shadow: 0 14px 34px rgba(0, 0, 0, .4); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tip[hidden] { display: none; }
.tip b { color: var(--text); font-weight: 600; }
.badge { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: color-mix(in srgb, var(--ok) 8%, transparent); }
.badge.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.badge.bad { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); background: color-mix(in srgb, var(--bad) 9%, transparent); }

/* Porte de risque : jauges segmentées lumineuses (Aura · Infrastructure) */
.gate { display: flex; flex-direction: column; }
.meters { display: grid; gap: 18px; margin-top: 4px; }
.meter { display: grid; gap: 8px; min-width: 0; }
.meter-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 12px; color: var(--ink-2); }
.meter-label b { font-size: 13px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.meter-label b small { font-weight: 500; color: var(--muted); }
.meter-track { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; height: 20px; }
.meter-track i { border-radius: 3px; background: color-mix(in srgb, var(--text) 5%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 3%, transparent);
  transition: background-color .35s var(--ease), box-shadow .35s var(--ease); }
.meter-cyan .meter-track i.on { background: linear-gradient(180deg, #c4fdff, #72f8fb 45%, #3fc7e6); box-shadow: 0 0 8px rgba(114, 248, 251, .5), inset 0 1px rgba(255, 255, 255, .6); }
.meter-violet .meter-track i.on { background: linear-gradient(180deg, #e3d8ff, #b49af1 50%, #8f6fe0); box-shadow: 0 0 8px rgba(180, 154, 241, .5), inset 0 1px rgba(255, 255, 255, .5); }
.meter-pearl .meter-track i.on { background: linear-gradient(180deg, #fafafa, #cfcfcf); box-shadow: 0 0 6px rgba(255, 255, 255, .22); }
.meter-hot .meter-track i.on { background: linear-gradient(180deg, #ffd0dc, #fb7185 50%, #e5485f); box-shadow: 0 0 9px rgba(251, 113, 133, .55), inset 0 1px rgba(255, 255, 255, .5); }
.meter-amber .meter-track i.on { background: linear-gradient(180deg, #ffe2c4, #fb923c 50%, #ea6c12); box-shadow: 0 0 9px rgba(251, 146, 60, .5), inset 0 1px rgba(255, 255, 255, .5); }
.meter-track i.limit { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 55%, transparent); }
.meter-detail { font-size: 11px; color: var(--muted); }
.gate-hint { margin-top: auto; padding-top: 18px; font-size: 12px; color: var(--muted); line-height: 1.55; }

/* Relais */
.handoffs { display: flex; flex-direction: column; }
.handoff-current { position: relative; border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 10px; min-height: 60px; font-size: 12.5px; color: var(--ink-2);
  border: 1px solid color-mix(in srgb, var(--c, var(--muted)) 28%, transparent); background: color-mix(in srgb, var(--c, var(--muted)) 7%, transparent); }
.handoff-current b { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--c, var(--text)); }
.feed { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; min-height: 240px; max-height: 300px; font-size: 12px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 20%); mask-image: linear-gradient(to bottom, transparent, #000 20%); }
.feed li { display: grid; grid-template-columns: 82px 66px minmax(0, 1fr) 8px; gap: 10px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--line-2); animation: feed-in .32s var(--ease) both; }
.feed li .t { color: var(--faint); font-variant-numeric: tabular-nums; }
.feed li .r { color: var(--c); font-weight: 600; font-size: 11px; letter-spacing: .02em; }
.feed li .m { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed li .d { width: 6px; height: 6px; border-radius: 50%; justify-self: end; background: var(--c); box-shadow: 0 0 6px color-mix(in srgb, var(--c) 60%, transparent); }
@keyframes feed-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Statistiques en colonnes */
.land { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 22px; }
.stats { margin: 0; display: grid; grid-template-columns: 1fr auto; row-gap: 16px; column-gap: 12px; align-content: start; padding-top: 6px; font-variant-numeric: tabular-nums; }
.stats dt { font-size: 12px; color: var(--muted); }
.stats dd { margin: 0; text-align: right; font-size: 14px; font-weight: 600; }
.stats .note { grid-column: 1 / -1; font-size: 11.5px; font-weight: 400; color: var(--faint); text-align: left; }
.stats.rows { row-gap: 0; }
.stats.rows dt, .stats.rows dd { padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 22px; align-items: center; }
.chord-wrap svg { display: block; width: 100%; height: auto; max-height: 290px; overflow: visible; }
.chord-wrap text { font-family: var(--font); font-size: 9.5px; fill: var(--muted); letter-spacing: .02em; }
.chord-wrap .link { fill: none; stroke-linecap: round; transition: opacity .2s var(--ease); }
.chord-wrap .node-arc { fill: none; stroke-width: 6; stroke-linecap: round; cursor: pointer; filter: drop-shadow(0 0 4px currentColor); }
.dims { display: flex; gap: 6px 16px; flex-wrap: wrap; justify-content: flex-end; margin-top: 10px; font-size: 11.5px; color: var(--muted); }
.dims span { display: inline-flex; align-items: center; gap: 6px; }
.dims span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

/* Graphe des décisions */
.graph-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr) 250px; gap: 22px; }
.graph-side { display: flex; flex-direction: column; gap: 9px; font-size: 12.5px; }
.graph-side .h { font-size: 11.5px; color: var(--faint); margin-top: 6px; }
.graph-side .kv { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; color: var(--muted); padding: 2px 0; }
.graph-side .kv b { color: var(--text); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.graph-side .cls { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.graph-side .cls::first-letter { text-transform: uppercase; }
.graph-side .cls::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 6px color-mix(in srgb, var(--c) 55%, transparent); }
.bar-track { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; height: 14px; margin: 4px 0; }
.bar-track i { border-radius: 2px; background: color-mix(in srgb, var(--text) 6%, transparent); }
.bar-track i.on { background: linear-gradient(180deg, #c4fdff, #72f8fb 45%, #3fc7e6); box-shadow: 0 0 6px rgba(114, 248, 251, .45); }
/* Barres lumineuses (Aura · Opportunity Landscape) */
.bars { display: flex; align-items: flex-end; gap: 8px; height: 96px; padding: 0 4px; border-bottom: 1px solid var(--line);
  filter: drop-shadow(0 0 5px rgba(60, 142, 255, .45)) drop-shadow(0 0 12px rgba(55, 124, 255, .22)); }
.bars div { flex: 1; min-height: 3px; border-radius: 999px 999px 3px 3px; background: linear-gradient(180deg, #c9feff 0%, #72f8fb 18%, #4aa8ff 70%, #2f6ff0 100%); transition: height .35s var(--ease); }
.bars-labels { display: flex; gap: 8px; padding: 5px 4px 0; font-size: 10px; color: var(--faint); }
.bars-labels span { flex: 1; text-align: center; overflow: hidden; }

/* Tableaux */
.table-scroll { overflow: auto; max-width: 100%; }
.table-scroll.tall { max-height: 360px; }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; }
.table th { position: sticky; top: 0; z-index: 1; text-align: right; padding: 9px 10px; font-size: 11.5px; font-weight: 500; color: var(--muted); white-space: nowrap; border-bottom: 1px solid var(--line); background: var(--card); }
.table td { text-align: right; padding: 10px; white-space: nowrap; border-bottom: 1px solid var(--line-2); }
.table th:first-child, .table td:first-child { text-align: left; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click td { transition: background-color .14s var(--ease); }
.table tbody tr.click:hover td { background: color-mix(in srgb, var(--text) 3.5%, transparent); }
.table tr.sel td { background: color-mix(in srgb, var(--text) 5%, transparent); }
.table tr.ref td { color: var(--muted); }
.chip { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11px; font-weight: 500; border: 1px solid color-mix(in srgb, currentColor 40%, transparent); background: color-mix(in srgb, currentColor 8%, transparent); }
.vtag { display: inline-flex; align-items: center; gap: 9px; font-weight: 500; }
.vtag i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 7px color-mix(in srgb, var(--c) 60%, transparent); }
.note { margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.65; }

/* Tests */
.tests-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.tests-summary div { padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: linear-gradient(140deg, var(--tile-a), var(--tile-b)); }
.tests-summary span { display: block; font-size: 11.5px; color: var(--muted); }
.tests-summary b { display: block; margin-top: 4px; font-size: 22px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.quality { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.quality span { padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 11.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tests { list-style: none; margin: 0; padding: 0; font-size: 12.5px; }
.tests li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line-2); color: var(--ink-2); }
.tests li .st { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px color-mix(in srgb, var(--ok) 50%, transparent); }
.tests li.failed .st { background: var(--bad); }
.tests li.skipped .st { background: transparent; box-shadow: inset 0 0 0 1.5px var(--faint); }
.tests li .dur { font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tests li.group { grid-template-columns: 1fr auto; padding-top: 14px; border-bottom: 0; font-size: 11.5px; color: var(--faint); }

/* Équipe : mascottes en tuiles dégradées CZ Dash */
.crew { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.mate { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 14px 14px 16px; border-radius: var(--r-lg);
  border: 1px solid var(--line); background: linear-gradient(140deg, var(--tile-a), var(--tile-b)); cursor: pointer;
  transition: border-color .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease); }
.mate::before { content: ""; position: absolute; inset: -40% -20% auto; height: 80%; z-index: -1; pointer-events: none; opacity: .55; transition: opacity .35s var(--ease);
  background: radial-gradient(ellipse at 50% 0%, color-mix(in srgb, var(--c) 18%, transparent), transparent 70%); }
.mate:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.mate:hover::before { opacity: 1; }
.mate[aria-pressed="true"] { border-color: color-mix(in srgb, var(--c) 60%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 40%, transparent), 0 10px 30px -12px color-mix(in srgb, var(--c) 45%, transparent); }
.mate .n { position: absolute; left: 14px; top: 12px; font-size: 11.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.mate .s { position: absolute; right: 14px; top: 16px; width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px color-mix(in srgb, var(--c) 70%, transparent); }
.mate svg.body { width: 128px; height: 108px; margin-top: 6px; overflow: visible; transition: transform .5s var(--ease); }
.mate .spark { position: absolute; right: 14px; top: 80px; display: flex; align-items: flex-end; gap: 2px; height: 18px; }
.mate .spark i { width: 3px; border-radius: 1px; background: var(--c); opacity: .85; }
.mate .name { margin-top: 6px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.mate .role { margin-top: 3px; font-size: 11.5px; font-weight: 500; color: var(--c); text-align: center; }
.mate .count { margin-top: 3px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mate.active .body { animation: bob .6s var(--ease); }
@keyframes bob { 0%, 100% { transform: none; } 40% { transform: translateY(-5px) scale(1.03, .97); } }

/* Vue « Direct » */
.live { overflow: hidden; isolation: isolate; }
.live::before { content: ""; position: absolute; inset: -40% -10% auto; height: 70%; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 50% 0%, rgba(var(--aura-glow), .12), transparent 70%); }
.live h2 { display: flex; align-items: center; gap: 10px; }
.live-dot, .nav-live { animation: live-pulse 2.4s ease-in-out infinite; }
.nav-link .nav-live { margin-left: auto; }
@keyframes live-pulse { 50% { box-shadow: 0 0 0 5px rgba(var(--aura-glow), .12), 0 0 12px rgba(var(--aura-glow), .7); } }
.price-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.price-tile { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: linear-gradient(140deg, var(--tile-a), var(--tile-b)); transition: border-color .4s var(--ease), box-shadow .4s var(--ease); }
.price-tile b { font-size: 21px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price-tile small { font-size: 11px; color: var(--muted); }
.price-asset { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-2); font-weight: 500; }
.price-tile.up { border-color: color-mix(in srgb, var(--ok) 45%, transparent); box-shadow: 0 0 18px -6px color-mix(in srgb, var(--ok) 60%, transparent); }
.price-tile.down { border-color: color-mix(in srgb, var(--bad) 45%, transparent); box-shadow: 0 0 18px -6px color-mix(in srgb, var(--bad) 60%, transparent); }
.live-table td, .live-table th { text-align: left !important; vertical-align: top; }
.live-table td:first-child small { display: block; font-size: 11px; color: var(--faint); margin-top: 2px; }
.live-cell { min-width: 150px; }
.live-cell small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.live-cell small.pos { color: var(--ok); } .live-cell small.neg { color: var(--bad); }
.live-eq { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.mini { margin-top: 6px; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 11.5px; font-weight: 500; color: var(--cta-ink); background: var(--cta); }
.mini:hover { background: var(--cta-hover); }
.live-feeds { margin-top: 18px; }
.feed-title { font-size: 13px; font-weight: 600; margin: 0 0 8px; color: var(--ink-2); }
.ai-feed, .ev-feed { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow: auto; font-size: 12.5px; }
.ai-feed li, .ev-feed li { display: grid; gap: 4px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); animation: feed-in .32s var(--ease) both; }
.ai-feed li { grid-template-columns: 42px 92px minmax(0, 1fr) auto; }
.ai-feed .ai-why { grid-column: 3 / -1; font-size: 11.5px; color: var(--muted); }
.ev-feed li { grid-template-columns: 82px 74px minmax(0, 1fr); }
.ai-feed li.empty, .ev-feed li.empty { display: block; color: var(--muted); border: 0; }
.ai-time { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 11.5px; }
.ai-who { display: grid; font-weight: 600; }
.ai-who small { font-weight: 400; font-size: 10.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-who.jev { color: var(--pink); } .ai-who.openai { color: var(--aura-violet); }
.ai-what { display: grid; min-width: 0; }
.ai-what small { color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-row.is-error { opacity: .7; }
.chip.ok { color: var(--ok); } .chip.bad { color: var(--bad); } .chip.muted { color: var(--muted); }
.ev-kind { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.ev-msg { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.field textarea { padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--text) 3%, transparent); color: var(--text); font: 14px/1.45 var(--font); resize: vertical; }
.field textarea:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
.nav-link[hidden] { display: none; }

.crosscheck { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: -6px 0 14px; font-size: 11.5px; color: var(--muted); }

/* Bilan des IA */
.live-report-title { margin-top: 18px; }
.live-report { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 10px; }
.rep-card { display: grid; gap: 10px; padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); background: linear-gradient(140deg, var(--tile-a), var(--tile-b)); min-width: 0; }
.rep-head { display: grid; gap: 2px; }
.rep-head b { font-size: 14px; }
.rep-head small, .rep-agree { font-size: 11.5px; color: var(--muted); }
.rep-prov { display: grid; gap: 4px; }
.rep-prov b { font-size: 12px; font-weight: 600; }
.rep-prov small { font-size: 11px; color: var(--muted); }
.rep-bar { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: color-mix(in srgb, var(--text) 6%, transparent); }
.rep-bar i { display: block; min-width: 0; }
.rep-bar .acc { background: var(--ok); } .rep-bar .rej { background: var(--bad); } .rep-bar .abs { background: var(--faint); }
.rep-filter { width: 100%; border-collapse: collapse; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.rep-filter th { text-align: left; font-weight: 500; color: var(--muted); padding: 4px 6px 4px 0; }
.rep-filter td { padding: 4px 6px 4px 0; border-top: 1px solid var(--line-2); white-space: nowrap; }

/* Coûts API */
.cost-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.cost-tile { padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--line); background: linear-gradient(140deg, var(--tile-a), var(--tile-b)); }
.cost-tile span { display: block; font-size: 11.5px; color: var(--muted); }
.cost-tile small { display: block; margin-top: 2px; font-size: 11px; }
.cost-tile b { display: block; margin-top: 4px; font-size: 20px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cost-bars { display: flex; align-items: flex-end; gap: clamp(2px, .6vw, 6px); height: 150px; padding: 0 2px; border-bottom: 1px solid var(--line);
  filter: drop-shadow(0 0 5px rgba(60, 142, 255, .45)) drop-shadow(0 0 12px rgba(55, 124, 255, .22)); }
.cost-slot { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.cost-slot i { width: min(100%, 22px); border-radius: 999px 999px 3px 3px; background: linear-gradient(180deg, #c9feff 0%, #72f8fb 18%, #4aa8ff 70%, #2f6ff0 100%); transition: height .4s var(--ease); }
.cost-axis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--faint); padding-top: 5px; }
.cost-providers { display: grid; gap: 10px; align-content: start; }
.cost-provider { padding: 14px 16px; border-radius: var(--r-md); border: 1px solid var(--line); }
.cost-provider-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.cost-provider-head span { font-weight: 600; font-variant-numeric: tabular-nums; }
.cost-provider.jev .cost-provider-head b { color: var(--pink); } .cost-provider.openai .cost-provider-head b { color: var(--aura-violet); }
.cost-provider dl { display: grid; grid-template-columns: 70px 1fr; gap: 5px 10px; margin: 0; font-size: 12px; }
.cost-provider dt { color: var(--muted); } .cost-provider dd { margin: 0; color: var(--ink-2); }
.cost-provider a { color: inherit; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.cost-provider small { color: var(--faint); }
.live-cell .live-now { color: var(--faint); font-size: 10.5px; }

.footer { padding: 8px 0 4px; text-align: center; font-size: 11.5px; color: var(--faint); }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 60; translate: -50% 0; max-width: min(560px, calc(100vw - 32px)); padding: 12px 16px; border-radius: var(--r-md);
  background: var(--card-2); border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); color: var(--bad); font-size: 13px; box-shadow: var(--shadow-float); }

/* Fenêtre du compte */
.dialog { width: min(440px, calc(100vw - 32px)); padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: var(--card); color: var(--text); box-shadow: var(--shadow-float); }
.dialog[open] { animation: pop .26s var(--ease) both; }
.dialog::backdrop { background: var(--scrim); backdrop-filter: blur(3px); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field > span { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.field > span small { font-weight: 400; color: var(--faint); margin-left: 6px; }
.field input { height: 40px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: color-mix(in srgb, var(--text) 3%, transparent); color: var(--text); font-size: 14px;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease); }
.field input:focus-visible { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 18%, transparent); }
.form-error, .form-ok { min-height: 18px; margin: 0 0 12px; font-size: 12.5px; }
.form-error { color: var(--bad); }
.form-ok { color: var(--ok); }
.form-error.shake { animation: shake .36s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.notice { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--r-sm); font-size: 12.5px; color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 35%, transparent); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 4px; }

/* Connexion */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-wrap { position: relative; width: min(380px, 100%); isolation: isolate; }
.login-wrap .hero-halo { inset: -80px -60px; }
.login-card { padding: 30px 28px 28px; border-radius: var(--r-lg); border: 1px solid var(--line-strong); background: var(--glass); backdrop-filter: blur(22px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .3), inset 0 1px rgba(255, 255, 255, .07); animation: reveal .5s var(--ease) both; }
.login-card .brand { padding: 0; margin-bottom: 22px; }
.login-card h1 { font-size: 24px; font-weight: 600; letter-spacing: -.03em; }
.login-sub { margin: 6px 0 22px; font-size: 13px; color: var(--muted); }
.login-btn { width: 100%; margin-top: 4px; }
.login-btn:disabled { opacity: .6; cursor: progress; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1360px) {
  .hero { grid-template-columns: 1fr; }
  .readouts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .readout { min-width: 0; }
}
@media (max-width: 1180px) {
  .graph-layout { grid-template-columns: 1fr; }
  .graph-side { flex-direction: row; flex-wrap: wrap; gap: 6px 20px; }
  .graph-side .kv { gap: 10px; }
  .crew { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g-40-60 { grid-template-columns: 1fr; }
}
@media (max-width: 1080px) {
  .g-60-40, .g-50-50 { grid-template-columns: 1fr; }
  .source-pill { display: none; }
}
@media (max-width: 860px) {
  :root { --sidebar: 0px; }
  .sidebar { width: 264px; transform: translateX(-100%); transition: transform .3s var(--ease); background: var(--card); box-shadow: var(--shadow-float); }
  .sidebar.open { transform: none; }
  .menu-btn { display: inline-flex !important; }
  .topbar { padding: 10px 16px; flex-wrap: wrap; gap: 10px; }
  .top-actions { width: 100%; justify-content: flex-start; margin-left: 0; }
  .select-wrap { flex: 1 1 100%; }
  .select { width: 100%; max-width: none; }
  .clock { margin-left: auto; }
  main { padding: 22px 16px 24px; gap: 16px; }
  .halo { left: 10%; width: 90vw; }
  .readouts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .readout:nth-child(3) { border-left: 0; }
  .readout:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .land { grid-template-columns: 1fr; }
  .land .stats { grid-template-columns: repeat(2, auto 1fr); row-gap: 10px; }
  html { scroll-padding-top: 116px; }
}
@media (max-width: 640px) {
  .cost-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .price-row { gap: 6px; }
  .price-tile { padding: 10px; }
  .price-tile b { font-size: 14px; }
  .ai-feed li { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .ai-feed .ai-who { grid-column: 2; } .ai-feed .ai-what { grid-column: 1 / -1; } .ai-feed .ai-why { grid-column: 1 / -1; }
  .ev-feed li { grid-template-columns: 1fr; gap: 2px; }
  .panel { padding: 16px; }
  .hero h1 { font-size: 26px; gap: 12px; }
  .hero-actions .button { flex: 1 1 100%; }
  .scrubber { max-width: none; flex-basis: 100%; }
  .split { grid-template-columns: 1fr; }
  .land .stats { grid-template-columns: 1fr auto; }
  .crew { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mate svg.body { width: 104px; height: 90px; }
  .tests-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feed li { grid-template-columns: 40px 60px minmax(0, 1fr) 8px; }
  .balance-wrap, .land-wrap { height: 240px; }
  .readout { padding: 13px 14px; }
  .readout-value { font-size: 21px; }
  .crumbs .crumb-root, .crumbs .slash { display: none; }
}

/* Mouvement réduit : tout s'arrête, les valeurs restent lisibles. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .halo, .hero-halo, .hero-lamp, .lamp.bad, .live-dot, .nav-live { animation: none !important; }
}
