/* OD-LAYOUT-PRIMITIVES v1 — structure only: display, flex/grid, overflow, wrapping, ratio, geometry.
   Put this @layer first; product CSS outside the layer wins ordinary layout rules.
   Native hidden and closed-dialog states take precedence over component display rules. */
@layer od-layout {
  [hidden]:not([hidden="until-found" i]) { display: none !important; }
  dialog:not([open]) { display: none !important; }

  :where(.od-stack,.od-row,.od-row-top,.od-cluster,.od-grid,.od-field,.od-stat,.od-cell,.od-tile) > :where(*) { min-width: 0; }

  /* containers */
  .od-stack   { display: flex; flex-direction: column; gap: var(--od-gap, 8px); }
  .od-row     { display: flex; align-items: center; gap: var(--od-gap, 8px); }
  .od-row-top { display: flex; align-items: flex-start; gap: var(--od-gap, 8px); }
  .od-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--od-gap, 8px); }
  .od-fill    { flex: 1 1 0; min-width: 0; }
  .od-fixed   { flex: none; }
  .od-grid    { display: grid; gap: var(--od-gap, 12px); grid-template-columns: repeat(var(--od-cols, 3), minmax(0, 1fr)); }

  /* stacked information: each piece is its own line — never sibling inline spans */
  .od-stat, .od-field, .od-cell { display: grid; gap: var(--od-gap, 2px); }
  :where(.od-stat,.od-field,.od-cell) > :where(*) { display: block; }
  .od-tile { display: grid; grid-template-rows: auto 1fr; }
  :where(.od-tile) > :where(*) { display: block; }

  .od-media { display: block; width: 100%; height: auto; aspect-ratio: var(--od-ratio, auto); }
  .od-media-cover { object-fit: cover; }

  /* functional inline SVG icons opt into bounded geometry; content SVGs keep their own */
  .od-icon { display: inline-block; inline-size: var(--od-icon-size, 1em); block-size: var(--od-icon-size, 1em); flex: none; }

  .od-truncate { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  .od-clamp-2, .od-clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
  .od-clamp-2 { -webkit-line-clamp: 2; }
  .od-clamp-3 { -webkit-line-clamp: 3; }
  .od-lines-2 { min-height: calc(2 * 1.4em); }
  .od-nowrap  { white-space: nowrap; }
  .od-keep    { word-break: keep-all; overflow-wrap: anywhere; }

  .od-screen { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
  .od-scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }

  .od-rail { display: flex; gap: var(--od-gap, 8px); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
             padding-inline: var(--od-rail-pad, 16px); scroll-padding-inline: var(--od-rail-pad, 16px); }
  .od-rail::-webkit-scrollbar { display: none; }
  :where(.od-rail) > :where(*) { flex: none; scroll-snap-align: start; }
  :where(.od-rail) > :where(:last-child) { margin-inline-end: var(--od-rail-pad, 16px); }

  .od-spacer { flex: none; visibility: hidden; pointer-events: none; }
  .od-touch  { min-width: 44px; min-height: 44px; }
}
:root [hidden]:where(:not([hidden="until-found" i])) { display: none; }
/* /OD-LAYOUT-PRIMITIVES v1 */

/* ---------- Police (auto-hébergée, OFL) ---------- */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('assets/fonts/plus-jakarta-sans-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('assets/fonts/plus-jakarta-sans-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Jetons Donavrix ---------- */
:root {
  --navy: #000037;
  --navy-2: #1A1A5C;
  --magenta: #C1008A;
  --magenta-on-dark: #FF5CD6;
  --magenta-ink: #8A0063;
  --magenta-tint: #FCE8F6;
  --bg: #F7F7FA;
  --surface: #FFFFFF;
  --stage: #ECECF3;
  --border: #E1E0E9;
  --border-strong: #BEBDCF;
  --muted: #595873;
  --soft: #F3F3F8;

  /* Verdicts : sobres, distincts du magenta, toujours avec icône + libellé. */
  --go: #1E6B47;            --go-bg: #E5F2EA;
  --cond: #0E6474;          --cond-bg: #E1F0F2;
  --rework: #8A5300;        --rework-bg: #FBEFDB;
  --nogo: #A23B2A;          --nogo-bg: #F8E6E2;
  --nee: #454A66;           --nee-bg: #ECEDF3;

  --font: 'Plus Jakarta Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r-sm: 8px; --r-md: 10px; --r-lg: 16px;
  --t-fast: 160ms; --t-med: 260ms; --t-exit: 180ms;
  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --ease-in: cubic-bezier(.5, 0, .75, 0);
  --focus: 0 0 0 3px var(--surface), 0 0 0 5px var(--magenta);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--navy);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
.od-icon { --od-icon-size: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: none; box-shadow: var(--focus); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s4); top: -60px; z-index: 10; padding: var(--s2) var(--s4); background: var(--navy); color: #fff; border-radius: var(--r-sm); }
.skip:focus { top: var(--s2); }

.wrap { max-width: 1360px; margin-inline: auto; padding-inline: clamp(16px, 3vw, 40px); }

/* ---------- En-tête ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; gap: var(--s5); min-height: 64px; }
.brand { display: block; flex: none; border-radius: var(--r-sm); }
.brand img { display: block; height: 32px; width: auto; }
.site-nav { display: flex; gap: var(--s5); margin-left: auto; }
.site-nav a { text-decoration: none; font-weight: 600; font-size: 15px; color: var(--navy); padding: var(--s2) 0; border-bottom: 2px solid transparent; }
.header-cta { flex: none; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 0 var(--s4); border-radius: var(--r-md);
  border: 1px solid transparent; font-weight: 650; font-size: 15px; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.btn.small { min-height: 40px; padding: 0 var(--s3); font-size: 14px; }
.btn.primary { background: var(--navy); color: #fff; }
.btn.ghost { background: var(--surface); color: var(--navy); border-color: var(--border-strong); }
.btn:disabled { background: #D6D5E2; color: #47465F; border-color: transparent; cursor: not-allowed; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--navy); cursor: pointer;
  transition: background-color var(--t-fast) var(--ease-out);
}
.icon-btn:disabled { color: #8F8EA8; cursor: not-allowed; background: var(--soft); }
.icon-btn[aria-pressed="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
@media (hover: hover) {
  .btn.primary:hover:not(:disabled) { background: var(--navy-2); }
  .btn.ghost:hover:not(:disabled) { background: var(--soft); border-color: var(--navy); }
  .icon-btn:hover:not(:disabled):not([aria-pressed="true"]) { background: var(--soft); border-color: var(--navy); }
  .site-nav a:hover { border-bottom-color: var(--magenta); }
}

/* ---------- Héros ---------- */
.hero { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s4); padding-top: var(--s3); padding-bottom: var(--s2); }
.hero h1 { font-size: clamp(22px, 2vw, 30px); line-height: 1.15; font-weight: 750; letter-spacing: -0.02em; flex: none; }
.promise { max-width: 80ch; font-size: 16px; color: var(--muted); flex: 1 1 420px; }
/* La scène est prioritaire : elle prend toute la largeur utile de l'écran. */
.hero.wrap, .stage.wrap, .links.wrap { max-width: 1760px; }

/* ---------- Scène : onglets ---------- */
.stage { padding-bottom: var(--s4); }
.stage:focus { outline: none; }
.tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
.tab {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: var(--s3);
  min-height: 44px; padding: var(--s2) var(--s3); text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  transition: background-color var(--t-fast) var(--ease-out), border-color var(--t-fast) var(--ease-out);
}
.tab-k {
  display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--soft); color: var(--navy); font-weight: 750; font-size: 14px;
}
.tab-t { display: block; font-weight: 650; font-size: 15px; line-height: 1.3; }
.tab[aria-selected="true"] { background: var(--navy); color: #fff; border-color: var(--navy); }
.tab[aria-selected="true"] .tab-k { background: var(--magenta-on-dark); color: var(--navy); }
@media (hover: hover) {
  .tab:hover:not([aria-selected="true"]) { border-color: var(--navy); }
}

/* La scène occupe toute la largeur ; le compte rendu passe dessous. */
.stage-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s4); margin-top: var(--s2); }

/* ---------- Scène : carte ---------- */
.scene-card {
  position: relative;
  background: var(--stage); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden;
}
.scene-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2) var(--s4);
  padding: var(--s3) var(--s4); background: var(--surface); border-bottom: 1px solid var(--border);
}
.demo-flag { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s3); font-size: 16px; line-height: 1.4; color: var(--muted); min-width: 0; flex: 1 1 360px; }
.demo-flag strong { color: var(--navy); font-weight: 750; font-size: 18px; letter-spacing: -0.01em; }
.flag-dot { width: 12px; height: 12px; border-radius: 3px; background: var(--magenta); flex: none; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.seg button { min-width: 44px; height: 38px; border: 0; background: transparent; font-weight: 700; font-size: 14px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }

.scene-body { --scene-h: clamp(560px, calc(100vh - 230px), 1000px); display: grid; grid-template-columns: minmax(0, 1fr); }
.scene-body.with-ai { grid-template-columns: minmax(0, 1fr) minmax(340px, 400px); }
.svg-wrap { width: 100%; height: var(--scene-h); min-width: 0; }
#scene { display: block; width: 100%; height: 100%; font-family: var(--font); user-select: none; -webkit-user-select: none; }
#scene.can-pan { cursor: grab; touch-action: none; }
#scene.can-pan:active { cursor: grabbing; }

/* ---------- Scène : matériaux ---------- */
.box polygon { stroke: rgba(0, 0, 55, .16); stroke-width: .8; stroke-linejoin: round; }
.m-floor .ft { fill: #FFFFFF; } .m-floor .fl { fill: #E2E1EB; } .m-floor .fr { fill: #D2D1DE; }
.grid { stroke: #EEEDF4; stroke-width: 1; fill: none; }
.track { fill: #EAE9F2; }
.zone { fill: rgba(0, 0, 55, .035); stroke: rgba(0, 0, 55, .28); stroke-width: 1; stroke-dasharray: 5 4; }
.shadow { fill: #000037; opacity: .11; filter: url(#soft); }

.m-socle .ft { fill: #FBFBFD; } .m-socle .fl { fill: #E7E6F0; } .m-socle .fr { fill: #D6D5E2; }
.m-sheet .ft { fill: #FFFFFF; } .m-sheet .fl { fill: #E4E3EE; } .m-sheet .fr { fill: #D0CFDD; }
.m-crate .ft { fill: #DCDBE8; } .m-crate .fl { fill: #C7C6D8; } .m-crate .fr { fill: #B3B2C7; }
.m-paper .ft { fill: #FFFFFF; } .m-paper .fl { fill: #FFFFFF; } .m-paper .fr { fill: #E4E3EE; }
.cyl-body { fill: url(#cylShade); stroke: rgba(0, 0, 55, .2); stroke-width: .8; }
.cyl-top { fill: #FFFFFF; stroke: rgba(0, 0, 55, .2); stroke-width: .8; }
.rows { fill: none; stroke: rgba(0, 0, 55, .3); stroke-width: .9; }

.glass { stroke: rgba(0, 0, 55, .4); stroke-width: 1; stroke-linejoin: round; }
.glass.back { fill: rgba(0, 0, 55, .04); }
.glass.front { fill: rgba(214, 228, 248, .16); }
.glass.top { fill: rgba(255, 255, 255, .22); }
.glint { stroke: #FFFFFF; stroke-width: 2; stroke-linecap: round; opacity: .9; }
.vault-lit .glass { stroke: var(--magenta); stroke-width: 1.5; }
.vault-lit .zone { stroke: var(--magenta); fill: rgba(193, 0, 138, .05); }

.m-barrier .ft { fill: #24236A; } .m-barrier .fl { fill: #0E0D48; } .m-barrier .fr { fill: #000037; }
.slit { stroke: var(--magenta-on-dark); stroke-width: 1.4; stroke-linecap: round; }
.obj.active .m-barrier .ft { fill: var(--magenta); }

.m-pedestal .ft { fill: #F4F4F8; } .m-pedestal .fl { fill: #DEDDE8; } .m-pedestal .fr { fill: #CDCCDA; }
.m-table .ft { fill: #FFFFFF; } .m-table .fl { fill: #E9E8F1; } .m-table .fr { fill: #D9D8E5; }
.m-tile .ft { fill: #2C2B6E; } .m-tile .fl { fill: #17164F; } .m-tile .fr { fill: #0A0A3C; }
.m-tile.just .ft { fill: var(--magenta); } .m-tile.just .fl { fill: #9A006E; } .m-tile.just .fr { fill: #760054; }
.m-tile.just { animation: pop var(--t-med) var(--ease-out); transform-box: fill-box; }
.cell-missing { fill: rgba(0, 0, 55, .03); stroke: #6E6D88; stroke-width: 1.3; stroke-dasharray: 4 3; }
.cell-missing.blocking { fill: rgba(162, 59, 42, .1); stroke: var(--nogo); stroke-width: 1.8; }
.cell-unmeasured { fill: url(#hatch); stroke: var(--nee); stroke-width: 1.2; stroke-dasharray: 1.5 3; }

.m-plateau .ft { fill: #F7F7FA; } .m-plateau .fl { fill: #DEDDE8; } .m-plateau .fr { fill: #CDCCDA; }
.m-module .ft { fill: #FFFFFF; } .m-module .fl { fill: #F0EFF6; } .m-module .fr { fill: #DCDBE7; }
.m-band .ft { fill: #F2F1F8; } .m-band .fl { fill: #1B1A55; } .m-band .fr { fill: #0E0D45; }
.m-glyph .ft { fill: #CFCEE3; } .m-glyph .fl { fill: #B5B4CF; } .m-glyph .fr { fill: #9F9EBE; }
.module.sel .m-band .fl { fill: var(--magenta); } .module.sel .m-band .fr { fill: #9A006E; } .module.sel .m-band .ft { fill: var(--magenta-tint); }

.m-console .ft { fill: #1E1D5C; } .m-console .fl { fill: #11104B; } .m-console .fr { fill: #06063A; }
.m-joint .ft { fill: #2A2970; } .m-joint .fl { fill: #13124F; } .m-joint .fr { fill: #05053A; }
.socket { fill: #2E2D70; }
.g-ok .ft { fill: #63B88E; } .g-ok .fl { fill: #2F8A5E; } .g-ok .fr { fill: var(--go); }
.g-watch .ft { fill: #F1BC66; } .g-watch .fl { fill: #C98A2B; } .g-watch .fr { fill: var(--rework); }
.g-bad .ft { fill: #E58471; } .g-bad .fl { fill: #BF5240; } .g-bad .fr { fill: var(--nogo); }
.g-none polygon { fill: none; stroke: #A9A8C4; stroke-dasharray: 3 3; stroke-width: 1.2; }
.badge circle { fill: var(--nogo); stroke: #FFFFFF; stroke-width: 2; }
.badge text { fill: #FFFFFF; font-weight: 800; }

.plate { --vc: var(--muted); --vbg: #F3F3F7; }
.plate.v-GO { --vc: var(--go); --vbg: var(--go-bg); }
.plate.v-GO_WITH_CONDITIONS { --vc: var(--cond); --vbg: var(--cond-bg); }
.plate.v-REWORK { --vc: var(--rework); --vbg: var(--rework-bg); }
.plate.v-NO_GO { --vc: var(--nogo); --vbg: var(--nogo-bg); }
.plate.v-NOT_ENOUGH_EVIDENCE { --vc: var(--nee); --vbg: var(--nee-bg); }
.m-plate .ft { fill: #E9E8F1; } .m-plate .fl { fill: var(--vbg); transition: fill var(--t-med) var(--ease-out); } .m-plate .fr { fill: #CFCEDC; }
.plate-eyebrow { fill: var(--navy); opacity: .75; font-weight: 700; letter-spacing: .14em; }
.plate-word { fill: var(--vc); font-weight: 800; }
.plate-ico path, .plate-ico circle { fill: none; stroke: var(--vc); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.conduit path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.tube-edge { stroke: #000037; stroke-width: 15; }
.tube { stroke: #FFFFFF; stroke-width: 10.5; }
.tube-flow { stroke: var(--magenta); stroke-width: 2.5; stroke-dasharray: 2 12; animation: flow 1.6s linear infinite; }
.conduit.busy .tube-flow { stroke-width: 3.2; animation-duration: .6s; }

/* Objets interactifs de la scène */
.obj { cursor: pointer; }
.obj:focus { outline: none; box-shadow: none; }
.ring { fill: none; stroke: transparent; stroke-width: 3; stroke-linejoin: round; pointer-events: none; }
.obj.lit .ring { stroke: var(--magenta); stroke-width: 2.5; stroke-dasharray: 5 4; }
.obj.sel .ring { stroke: var(--magenta); stroke-width: 2.5; stroke-dasharray: none; }
@media (hover: hover) { .obj:hover .ring { stroke: rgba(0, 0, 55, .5); stroke-width: 2; } }
.obj:focus-visible .ring { stroke: var(--magenta); stroke-width: 4; stroke-dasharray: none; }

/* Étiquettes de la scène */
.co rect { fill: #FFFFFF; stroke: var(--border); stroke-width: 1; }
.co text { fill: var(--navy); font-weight: 550; }
.co text.b { font-weight: 700; }
.co text.sub { fill: var(--muted); font-weight: 550; }
.co text.accent { fill: var(--magenta); }
.co text.deny { fill: var(--nogo); }
.co text.allow { fill: var(--go); }
.lead { stroke: var(--muted); stroke-width: 1; }
.lead-dot { fill: var(--muted); }
.co.dark rect { fill: var(--navy); stroke: none; }
.co.dark text { fill: #FFFFFF; }
.co.policy rect { stroke: var(--navy); stroke-width: 1.2; }
.co.insp rect { stroke: var(--magenta); stroke-width: 1.6; }
.co.insp .lead, .co.policy .lead { stroke: var(--magenta); stroke-width: 1.4; }
.co.insp .lead-dot { fill: var(--magenta); }
.co.pill.miss rect { stroke: #8F8EA8; stroke-dasharray: 3 2; }
.co.pill.miss text { fill: var(--nee); }
.co.pill.alert rect { fill: var(--nogo-bg); stroke: var(--nogo); }
.co.pill.alert text { fill: #7E2A1C; }
.co.pill.ok rect { fill: var(--go-bg); stroke: var(--go); }
.co.pill.ok text { fill: #17573A; }

/* Animation du profilage */
.fx-row rect { fill: #FFFFFF; stroke: var(--nogo); stroke-width: 1.5; }
.fx-row line { stroke: var(--nogo); stroke-width: 1.2; }
.fx-refused rect { fill: var(--nogo); }
.fx-refused text { fill: #FFFFFF; font-weight: 700; }
.fx-chip rect { fill: var(--navy); stroke: var(--magenta-on-dark); stroke-width: 1.2; }
.fx-chip text { fill: #FFFFFF; font-weight: 650; }

@keyframes flow { to { stroke-dashoffset: -28; } }
@keyframes pop { from { transform: translateY(-10px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Panneau de décision ---------- */
.panel { scroll-margin-top: var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s5); }
#panel-body { display: flex; flex-direction: column; gap: var(--s4); }
.report-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s1) var(--s3); }
.report-h { font-size: 22px; font-weight: 750; letter-spacing: -0.01em; }
.report-sub { color: var(--muted); }
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--s5); align-items: start; }
.rcol { display: flex; flex-direction: column; gap: var(--s4); min-width: 0; }

/* ---------- Guide d'étape au-dessus de la scène ---------- */
.guide {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5);
  padding: var(--s3) var(--s4); background: var(--navy); color: #fff;
}
.guide-step { display: flex; align-items: center; gap: var(--s3); flex: 1 1 360px; min-width: 0; }
.guide-n {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%;
  background: var(--magenta-on-dark); color: var(--navy); font-size: 20px; font-weight: 800;
}
.guide-n .od-icon { --od-icon-size: 22px; stroke-width: 2.6; }
.guide-copy { display: grid; min-width: 0; }
.guide-k { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #C9C8E6; }
.guide-t { font-size: clamp(18px, 1.5vw, 22px); font-weight: 700; line-height: 1.3; animation: rise var(--t-med) var(--ease-out); }
.guide-dots { display: flex; gap: 6px; }
.guide-dots li { width: 28px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .25); }
.guide-dots li.current { background: var(--magenta-on-dark); }
.guide-dots li.done { background: #8FD3AE; }
.guide-cta { display: flex; flex-wrap: wrap; gap: var(--s2); }
.guide .btn.primary { background: var(--magenta-on-dark); color: var(--navy); }
.guide .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.guide :focus-visible { box-shadow: 0 0 0 3px var(--navy), 0 0 0 5px var(--magenta-on-dark); }
@media (hover: hover) {
  .guide .btn.primary:hover { background: #FF85E0; }
  .guide .btn.ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
}

/* ---------- Scène : actions, verdict, repères ---------- */
.sbtn-bg { fill: var(--navy); }
.sbtn text { fill: #FFFFFF; font-weight: 700; }
.sbtn-ico path, .sbtn-ico rect, .sbtn-ico circle { fill: none; stroke: var(--magenta-on-dark); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sbtn.is-disabled { cursor: not-allowed; }
.sbtn.is-disabled .sbtn-bg { fill: #D6D5E2; }
.sbtn.is-disabled text { fill: #47465F; }
.sbtn.is-disabled .sbtn-ico * { stroke: #47465F; }
@media (hover: hover) { .sbtn:not(.is-disabled):hover .sbtn-bg { fill: var(--navy-2); } }

.avg rect { fill: #FFFFFF; stroke: var(--border-strong); }
.avg .avg-v { fill: var(--navy); font-weight: 750; }
.avg .avg-why { fill: var(--go); font-weight: 700; }
.avg.blocked .avg-v { fill: var(--muted); }
.avg.blocked .avg-why { fill: var(--nogo); }
.strike { stroke: var(--nogo); stroke-width: 2.5; stroke-linecap: round; }

.board { --vc: var(--muted); --vbg: #FFFFFF; }
.board.v-GO { --vc: var(--go); --vbg: var(--go-bg); }
.board.v-GO_WITH_CONDITIONS { --vc: var(--cond); --vbg: var(--cond-bg); }
.board.v-REWORK { --vc: var(--rework); --vbg: var(--rework-bg); }
.board.v-NO_GO { --vc: var(--nogo); --vbg: var(--nogo-bg); }
.board.v-NOT_ENOUGH_EVIDENCE { --vc: var(--nee); --vbg: var(--nee-bg); }
.board-bg { fill: var(--vbg); stroke: var(--vc); stroke-width: 2; transition: fill var(--t-med) var(--ease-out); }
.board-eyebrow { fill: var(--navy); font-weight: 750; letter-spacing: .14em; }
.board-word { fill: var(--vc); font-weight: 800; letter-spacing: -0.01em; }
.board-sub { fill: var(--navy); font-weight: 650; }
.board-ico path, .board-ico circle { fill: none; stroke: var(--vc); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.board-lead { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 4 3; }

.g-score { fill: #FFFFFF; font-weight: 800; paint-order: stroke; stroke: var(--navy); stroke-width: 3px; }

.pin { pointer-events: none; }
.pin-stem { stroke: var(--magenta); stroke-width: 2.5; stroke-linecap: round; }
.pin-dot { fill: var(--magenta); stroke: #FFFFFF; stroke-width: 3; }
.pin-pulse { fill: var(--magenta); opacity: .3; transform-box: fill-box; transform-origin: center; animation: pulse 1.4s var(--ease-out) infinite; }
.pin text { fill: #FFFFFF; font-weight: 800; }
.rpin circle { fill: #FFFFFF; stroke: var(--magenta); stroke-width: 2; }
.rpin text { fill: var(--magenta-ink); font-weight: 800; }
@keyframes pulse { from { transform: scale(1); opacity: .35; } to { transform: scale(2); opacity: 0; } }
.m-step { display: none; }
.step-n {
  display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: var(--soft); color: var(--navy); font-size: 12px; font-weight: 750;
}
.step-n .od-icon { --od-icon-size: 14px; stroke-width: 2.4; }
.steps { display: flex; flex-wrap: wrap; gap: 6px; }
.steps li {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px;
  border-radius: 999px; background: var(--soft); color: var(--muted); font-size: 14px; font-weight: 600; line-height: 1.3;
  border: 1px solid transparent;
}
.steps li.current { background: var(--magenta-tint); color: var(--magenta-ink); border-color: var(--magenta); }
.steps li.current .step-n { background: var(--magenta); color: #fff; }
.steps li.done { color: var(--go); }
.steps li.done .step-n { background: var(--go); color: #fff; }

.panel-h { font-size: 20px; font-weight: 750; letter-spacing: -0.01em; }

.verdict-card {
  --vc: var(--muted); --vbg: var(--soft);
  padding: var(--s4); border-radius: var(--r-md); background: var(--vbg); border: 1px solid var(--vc);
}
.verdict-card.enter { animation: rise var(--t-med) var(--ease-out); }
.verdict-card.v-GO { --vc: var(--go); --vbg: var(--go-bg); }
.verdict-card.v-GO_WITH_CONDITIONS { --vc: var(--cond); --vbg: var(--cond-bg); }
.verdict-card.v-REWORK { --vc: var(--rework); --vbg: var(--rework-bg); }
.verdict-card.v-NO_GO { --vc: var(--nogo); --vbg: var(--nogo-bg); }
.verdict-card.v-NOT_ENOUGH_EVIDENCE { --vc: var(--nee); --vbg: var(--nee-bg); }
.eyebrow { font-size: 13px; font-weight: 650; color: var(--muted); }
.verdict { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s1); font-size: clamp(22px, 2vw, 28px); line-height: 1.2; font-weight: 800; color: var(--vc); }
.verdict .od-icon { --od-icon-size: 28px; stroke-width: 2.2; }
.verdict:focus-visible { border-radius: var(--r-sm); }
.verdict-code { margin-top: 2px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; color: var(--vc); }
.verdict-why { margin-top: var(--s2); }

.criteria h3, .block h3, .policy h3 { font-size: 15px; font-weight: 750; margin-bottom: var(--s2); }
.criteria ul { display: grid; gap: 6px; }
.crit {
  display: grid; grid-template-columns: minmax(0, 1fr) 72px auto; grid-template-areas: "name bar score" "status status status";
  align-items: center; gap: 2px var(--s3); width: 100%; padding: var(--s2) var(--s3);
  text-align: left; cursor: pointer; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  transition: border-color var(--t-fast) var(--ease-out), background-color var(--t-fast) var(--ease-out);
}
.crit > span { display: block; }
.crit-name { grid-area: name; font-weight: 650; font-size: 15px; line-height: 1.3; }
.crit-bar { grid-area: bar; height: 8px; border-radius: 4px; background: #E9E8F1; overflow: hidden; }
.crit-bar > span { display: block; height: 100%; width: 100%; background: currentColor; transform-origin: left; transform: scaleX(calc(var(--v) / 100)); transition: transform var(--t-med) var(--ease-out); }
.crit-score { grid-area: score; font-weight: 750; font-variant-numeric: tabular-nums; text-align: right; min-width: 2.5ch; }
.partial { font-weight: 550; font-size: 13px; color: var(--muted); }
.crit-status { grid-area: status; display: flex !important; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; }
.crit-status .od-icon { --od-icon-size: 16px; }
.crit.s-ok { color: var(--go); } .crit.s-watch { color: var(--rework); } .crit.s-insufficient { color: var(--nogo); } .crit.s-unmeasured { color: var(--nee); }
.crit .crit-name, .crit .crit-score { color: var(--navy); }
.crit.s-insufficient { background: var(--nogo-bg); border-color: var(--nogo); }
.crit.s-unmeasured { border-style: dashed; }
.crit.is-focus { box-shadow: 0 0 0 2px var(--magenta); border-color: var(--magenta); }
@media (hover: hover) { .crit:hover { border-color: var(--navy); } }
.average { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px var(--s2); margin-top: var(--s3); font-size: 15px; color: var(--muted); }
.avg-v { font-weight: 700; color: var(--navy); text-decoration: line-through; text-decoration-color: var(--nogo); text-decoration-thickness: 2px; }
.avg-tag { font-size: 12px; font-weight: 650; padding: 1px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.average strong { color: var(--navy); font-weight: 700; }

.block .list li, .policy li { padding: var(--s2) 0; border-top: 1px solid var(--border); }
.list .li-title { display: block; font-weight: 650; font-size: 15px; }
.li-body { display: block; color: var(--muted); font-size: 15px; }
.owner { display: inline-block; margin-top: 4px; font-size: 13px; font-weight: 650; padding: 1px 8px; border-radius: 999px; background: var(--soft); color: var(--navy); }
.tag { display: inline-flex; align-items: center; gap: 4px; margin: 2px 0; font-size: 12px; font-weight: 700; padding: 1px 8px 1px 6px; border-radius: 999px; }
.tag .od-icon { --od-icon-size: 14px; }
.tag-block { background: var(--nogo-bg); color: #7E2A1C; }
.plan { counter-reset: plan; }
.plan li { counter-increment: plan; display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: var(--s2); }
.plan li::before { content: counter(plan); grid-row: span 4; display: grid; place-items: center; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 12px; font-weight: 750; }
.plan li > * { grid-column: 2; }
.block.emph h3 { color: var(--magenta-ink); }
.block.ok h3 { color: var(--go); }
.avoided p { color: var(--navy); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
.hint { font-size: 14px; color: var(--muted); }
.empty { padding: var(--s4); border: 1px dashed var(--border-strong); border-radius: var(--r-md); color: var(--muted); }

.picker { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: var(--s2); margin-top: var(--s3); }
.pick {
  display: grid; gap: 0; min-height: 52px; padding: var(--s2) var(--s3); text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md);
}
.pick > span { display: block; }
.pick-name { font-weight: 650; font-size: 15px; line-height: 1.3; }
.pick-sub { font-size: 13px; color: var(--muted); }
.pick.is-sel { border: 2px solid var(--magenta); background: var(--magenta-tint); padding: calc(var(--s2) - 1px) calc(var(--s3) - 1px); }
@media (hover: hover) { .pick:hover:not(.is-sel) { border-color: var(--navy); } }
.b-head .actions, .c-head + .verdict-card { margin-top: var(--s3); }

.cap { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 650; }
.cap > span { display: block; }
.cap-code { font-family: var(--mono); font-weight: 700; letter-spacing: .03em; }
.cap-VALIDATING { background: var(--cond-bg); color: var(--cond); }
.cap-PLANNED, .cap-NOT_AVAILABLE { background: var(--nee-bg); color: var(--nee); }
.cap-AVAILABLE { background: var(--go-bg); color: var(--go); }

.counters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); margin: 0; }
.counter { padding: var(--s2) var(--s3); border-radius: var(--r-md); background: var(--soft); }
.counter dt { font-size: 13px; color: var(--muted); line-height: 1.3; }
.counter dd { margin: 2px 0 0; font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; }
.counter.strong dd { font-size: 26px; line-height: 1.1; }
.policy h3 { display: flex; align-items: center; gap: 6px; }
.policy li { display: flex; align-items: flex-start; gap: var(--s2); font-size: 15px; }
.policy li .od-icon { margin-top: 2px; }
.policy .deny { color: #7E2A1C; } .policy .deny .od-icon { color: var(--nogo); }
.policy .allow { color: #17573A; } .policy .allow .od-icon { color: var(--go); }

.table-wrap { overflow-x: auto; }
.profile { width: 100%; border-collapse: collapse; font-size: 14px; animation: rise var(--t-med) var(--ease-out); }
.profile caption { text-align: left; font-weight: 750; font-size: 15px; padding-bottom: var(--s2); }
.profile th, .profile td { text-align: left; padding: 6px var(--s2) 6px 0; border-top: 1px solid var(--border); vertical-align: middle; }
.profile thead th { font-size: 13px; color: var(--muted); font-weight: 650; }
.profile code { font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.compl { display: flex; align-items: center; gap: var(--s2); }
.meter { display: block; width: 56px; height: 6px; border-radius: 3px; background: #E9E8F1; overflow: hidden; flex: none; }
.meter > span { display: block; height: 100%; background: var(--navy); transform-origin: left; transform: scaleX(calc(var(--v) / 100)); }
.unmeasured { color: var(--nee); font-style: italic; }

.ev-detail { padding: var(--s3); border: 1px solid var(--magenta); border-radius: var(--r-md); background: #FDF5FB; animation: rise var(--t-med) var(--ease-out); }
.ev-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s2); }
.ev-head h3 { font-size: 15px; font-weight: 750; }
.ev-status { display: flex; align-items: center; gap: 6px; margin: 4px 0; font-weight: 650; font-size: 14px; }
.ev-detail.s-missing .ev-status { color: var(--nogo); }
.ev-detail.s-present .ev-status { color: var(--go); }
.ev-detail.s-unmeasured .ev-status { color: var(--nee); }

.cta { padding: var(--s4); border-radius: var(--r-md); background: var(--navy); color: #fff; animation: rise var(--t-med) var(--ease-out); }
.cta p { font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s3); }
.cta .btn.primary { background: var(--magenta-on-dark); color: var(--navy); }
.cta .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .55); }
.cta :focus-visible { box-shadow: 0 0 0 3px var(--navy), 0 0 0 5px var(--magenta-on-dark); }
@media (hover: hover) {
  .cta .btn.primary:hover { background: #FF85E0; }
  .cta .btn.ghost:hover { background: rgba(255, 255, 255, .1); border-color: #fff; }
}

.caps summary { cursor: pointer; font-size: 14px; font-weight: 650; padding: 4px 0; border-radius: var(--r-sm); }
.caps ul { display: grid; gap: 6px; margin-top: var(--s2); }
.caps li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px var(--s2); font-size: 14px; }
.caps .hint { margin-top: var(--s2); font-size: 13px; }
.det-note { display: flex; gap: var(--s2); font-size: 13px; color: var(--muted); }
.det-note .od-icon { --od-icon-size: 16px; margin-top: 2px; }

/* ---------- Parcours vertical (mobile) ---------- */
.mobile-chain { display: none; }
.mstep { padding: var(--s4); border-top: 1px solid var(--border); background: var(--surface); }
.mstep:first-child { border-top: 0; }
.mstep h2 { display: flex; align-items: center; gap: var(--s2); font-size: 18px; font-weight: 750; margin-bottom: var(--s3); }
.lock { display: flex; gap: var(--s2); padding: var(--s3); border-radius: var(--r-md); background: var(--soft); font-size: 15px; font-weight: 600; margin-bottom: var(--s3); }
.lock .od-icon { color: var(--magenta); margin-top: 2px; }
.msrc, .mev { display: grid; gap: var(--s2); }
.msrc .pick { width: 100%; }
.ev {
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2px var(--s2);
  width: 100%; min-height: 52px; padding: var(--s2) var(--s3); text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md);
}
.ev .od-icon { grid-row: span 2; }
.ev-label { display: block; font-weight: 650; font-size: 15px; line-height: 1.3; }
.ev-state { display: block; grid-column: 2; font-size: 13px; color: var(--muted); }
.ev.s-present .od-icon { color: var(--go); }
.ev.s-missing { border-style: dashed; }
.ev.s-unmeasured { border-style: dotted; }
.ev.blocking { border: 2px solid var(--nogo); background: var(--nogo-bg); }
.ev.blocking .ev-state, .ev.blocking .od-icon { color: #7E2A1C; }
.ev.lit, .ev[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--magenta); }

/* ---------- Repli sans JavaScript ---------- */
.static-chain { display: none; }
.no-js .interactive { display: none; }
.no-js .static-chain { display: block; margin-top: var(--s3); padding: var(--s5); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.chain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); margin-top: var(--s4); }
.chain li { padding: var(--s4); border-radius: var(--r-md); background: var(--soft); }
.chain h2 { font-size: 16px; font-weight: 750; margin-bottom: 4px; }
.chain p { color: var(--muted); }
.static-cta { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }

/* ---------- Liens sous la scène ---------- */
.links { padding-bottom: var(--s6); }
.links ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
.links a {
  display: grid; gap: 2px; height: 100%; padding: var(--s3) var(--s4); text-decoration: none;
  border-top: 2px solid var(--navy); background: var(--surface); border-radius: 0 0 var(--r-md) var(--r-md);
}
.links a > span { display: block; }
.link-t { font-weight: 700; }
.link-s { font-size: 15px; color: var(--muted); }
@media (hover: hover) { .links a:hover { border-top-color: var(--magenta); } .links a:hover .link-t { text-decoration: underline; text-underline-offset: 3px; } }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-row { display: flex; align-items: center; gap: var(--s3); padding-block: var(--s4); font-size: 14px; color: var(--muted); }
.footer-mark { height: 22px; width: auto; flex: none; }

/* ---------- Points de rupture ---------- */
@media (max-width: 1180px) {
  .stage-grid { grid-template-columns: minmax(0, 1fr) minmax(280px, 300px); }
  .tab-t { font-size: 14px; }
}
@media (max-width: 980px) {
  .stage-grid { grid-template-columns: minmax(0, 1fr); }
  .svg-wrap { height: auto; aspect-ratio: 1140 / 684; }
  .panel { padding: var(--s4); }
  .site-nav { display: none; }
  .header-cta { margin-left: auto; }
}
@media (max-width: 759px) {
  .hero { padding-top: var(--s4); }
  .promise { font-size: 16px; }
  .tabs { grid-template-columns: minmax(0, 1fr); }
  .svg-wrap, .desk-tool, .desk-only { display: none; }
  .mobile-chain { display: block; }
  .scene-card { background: var(--surface); }
  .m-step { display: flex; align-items: center; gap: var(--s2); font-size: 18px; font-weight: 750; }
  .counters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .counters .counter:last-child { grid-column: span 2; }
  .links ul, .chain { grid-template-columns: minmax(0, 1fr); }
  .btn { white-space: normal; text-align: left; }
}
@media (max-width: 420px) {
  .header-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .tube-flow { stroke-dasharray: 2 12; }
}

/* ---------- Parcours D : chemin vers l'IA et assistant ---------- */
.milestones { flex: 1 1 100%; display: grid; gap: var(--s2); padding-top: var(--s3); border-top: 1px solid rgba(255, 255, 255, .18); }
.ms-k { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #C9C8E6; }
.milestones ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s2); }
.milestones li {
  display: flex; align-items: center; gap: var(--s2); min-height: 44px; padding: var(--s2) var(--s3);
  border-radius: var(--r-md); border: 1px dashed rgba(255, 255, 255, .35); color: #C9C8E6; font-weight: 650; font-size: 15px;
}
.ms-n { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .45); font-size: 13px; font-weight: 800; }
.ms-n .od-icon { --od-icon-size: 16px; stroke-width: 2.6; }
.ms-t { display: block; }
.milestones.on li { border-style: solid; border-color: rgba(143, 211, 174, .6); color: #fff; animation: rise var(--t-med) var(--ease-out); }
.milestones.on li:nth-child(2) { animation-delay: 40ms; } .milestones.on li:nth-child(3) { animation-delay: 80ms; } .milestones.on li:nth-child(4) { animation-delay: 120ms; }
.milestones.on .ms-n { background: #8FD3AE; border-color: #8FD3AE; color: var(--navy); }

.ai-pane {
  display: flex; flex-direction: column; gap: var(--s3); height: var(--scene-h); min-width: 0; overflow: hidden;
  padding: var(--s4); background: var(--surface); border-left: 1px solid var(--border);
}
.ai-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s2); }
.ai-title { font-size: 20px; font-weight: 750; }
.ai-modes { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border-strong); border-radius: var(--r-md); overflow: hidden; }
.ai-modes button { min-height: 44px; border: 0; background: var(--surface); font-weight: 700; font-size: 15px; cursor: pointer; }
.ai-modes button + button { border-left: 1px solid var(--border-strong); }
.ai-modes button[aria-pressed="true"] { background: var(--navy); color: #fff; }
@media (hover: hover) { .ai-modes button:not([aria-pressed="true"]):hover { background: var(--soft); } }
.ai-sees { display: flex; gap: var(--s2); padding: var(--s2) var(--s3); border-radius: var(--r-md); font-size: 15px; font-weight: 600; }
.ai-sees .od-icon { margin-top: 2px; }
.mode-before .ai-sees { background: var(--nee-bg); color: var(--nee); }
.mode-after .ai-sees { background: var(--magenta-tint); color: var(--magenta-ink); }
.ai-thread { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: var(--s2); padding-right: 2px; }
.ai-empty { flex: 1 1 auto; display: grid; place-items: center; text-align: center; padding: var(--s4); color: var(--muted); border: 1px dashed var(--border-strong); border-radius: var(--r-md); }
.msg { display: grid; gap: 4px; max-width: 92%; padding: var(--s2) var(--s3); border-radius: 12px; animation: rise var(--t-med) var(--ease-out); }
.msg p { font-size: 15px; line-height: 1.5; }
.msg-who { display: block; font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.msg-q { align-self: flex-end; background: var(--soft); }
.msg-a { align-self: flex-start; background: var(--surface); border: 1px solid var(--border-strong); }
.msg-a.mode-after { border-color: var(--magenta); }
.msg-a.thinking p { color: var(--muted); font-style: italic; }
.ai-tag { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 2px 10px 2px 8px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.ai-tag .od-icon { --od-icon-size: 15px; }
.tag-ungrounded { background: var(--nee-bg); color: var(--nee); }
.tag-unsafe { background: var(--nogo-bg); color: #7E2A1C; }
.tag-grounded { background: var(--go-bg); color: #17573A; }
.tag-unmeasured { background: var(--nee-bg); color: var(--nee); }
.tag-refused { background: var(--cond-bg); color: var(--cond); }
.ai-cites { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 2px; }
.ai-cites-k { font-size: 12px; font-weight: 700; color: var(--muted); }
.cite {
  display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 2px 10px 2px 6px; cursor: pointer;
  border: 1px solid var(--magenta); border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 650;
}
.cite .od-icon { --od-icon-size: 15px; }
.cite.s-present .od-icon { color: var(--go); }
.cite.s-missing { border-style: dashed; }
@media (hover: hover) { .cite:hover { background: var(--magenta-tint); } }
.ai-ask { font-size: 14px; font-weight: 750; }
.ai-questions { display: grid; gap: 6px; }
.ai-q {
  display: flex; align-items: flex-start; gap: var(--s2); width: 100%; min-height: 44px; padding: var(--s2) var(--s3);
  text-align: left; cursor: pointer; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-md); font-size: 15px; font-weight: 600; line-height: 1.35;
}
.ai-q .od-icon { margin-top: 2px; color: var(--magenta); }
.ai-q.is-asked { background: var(--soft); }
.ai-q.is-asked .od-icon { color: var(--go); }
.ai-q:disabled { cursor: wait; opacity: .7; }
@media (hover: hover) { .ai-q:not(:disabled):hover { border-color: var(--navy); } }
.ai-scripted { font-size: 13px; color: var(--muted); }

/* Poste « Assistant IA » dans la scène */
.m-kiosk .ft { fill: #24236A; } .m-kiosk .fl { fill: #13124F; } .m-kiosk .fr { fill: #06063A; }
.m-screen .ft { fill: #2A2970; } .m-screen .fl { fill: #0B0A3E; } .m-screen .fr { fill: #000037; }
.screen-ink rect { fill: #FFFFFF; } .screen-ink rect.b2 { fill: var(--magenta-on-dark); }
.kiosk.is-before .m-kiosk .ft, .kiosk.is-before .m-kiosk .fl, .kiosk.is-before .m-kiosk .fr { fill: #8F8EA8; }
.kiosk.is-before .m-screen .fl { fill: #5F5E78; }
.kiosk.is-before .screen-ink rect { fill: #B9B8CC; }
.screen-ink text { fill: #FFFFFF; font-weight: 800; }
.feed-off { fill: none; stroke: #8F8EA8; stroke-width: 2; stroke-dasharray: 5 5; }
.feed .tube-edge { stroke-width: 11; } .feed .tube { stroke-width: 7; }
.feed path { fill: none; stroke-linecap: round; }
.feed.busy .tube-flow { stroke-width: 3.2; animation-duration: .5s; }
.conduit.off .tube-flow { display: none; }
.conduit.off .tube-edge { stroke: #8F8EA8; }

@media (max-width: 1180px) {
  .tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .milestones ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .scene-body.with-ai { grid-template-columns: minmax(0, 1fr); }
  .ai-pane { height: auto; max-height: none; border-left: 0; border-top: 1px solid var(--border); }
  .ai-thread { max-height: 420px; }
}
@media (max-width: 759px) {
  .tabs { grid-template-columns: minmax(0, 1fr); }
  .milestones ol { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .milestones.on li, .msg { animation: none !important; }
}

/* ======================================================================
   Expérience d'abord : plein écran à l'ouverture, produit ensuite.
   ====================================================================== */
.immersive {
  display: flex; flex-direction: column; height: 100vh; height: 100dvh; min-height: 640px;
  padding: var(--s2) var(--s3) var(--s3); gap: var(--s2); background: var(--bg);
}
.immersive:focus { outline: none; }
.topbar {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s2) var(--s4);
  padding: var(--s2) var(--s3); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
}
.topbar-id { display: flex; align-items: center; gap: var(--s3); min-width: 0; }
.topbar-mark { display: block; height: 26px; width: auto; flex: none; }
.topbar h1 { font-size: clamp(18px, 1.5vw, 22px); line-height: 1.2; font-weight: 750; letter-spacing: -0.015em; }
.topbar .demo-flag { flex: initial; font-size: 15px; }
.topbar .demo-flag strong { font-size: 16px; }
.tabs-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); padding-top: var(--s2); border-top: 1px solid var(--border); }
.tabs-k { font-size: 14px; font-weight: 650; color: var(--muted); }
.topbar .tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.topbar .tab { min-height: 40px; padding: 4px var(--s3) 4px 6px; grid-template-columns: auto auto; gap: var(--s2); }
.topbar .tab-k { width: 26px; height: 26px; font-size: 13px; }
.topbar .tab-t { font-size: 14px; }

.immersive .scene-card { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.immersive .scene-body { --scene-h: 100%; flex: 1 1 auto; min-height: 0; grid-template-rows: minmax(0, 1fr); }
.immersive .scene-body.with-ai { grid-template-columns: minmax(0, 55fr) minmax(400px, 45fr); }
.immersive .svg-wrap, .immersive .ai-pane { height: 100%; }
.immersive .guide { padding: var(--s2) var(--s4); }
.immersive .milestones { padding-top: var(--s2); }
.immersive .milestones li { min-height: 40px; padding: 6px var(--s3); font-size: 14px; }

/* Comparateur Avant / Avec */
.ai-pane { overflow-y: auto; }
.ai-questions { grid-template-columns: 1fr 1fr; }
.ai-q.is-current { border: 2px solid var(--magenta); background: var(--magenta-tint); padding: calc(var(--s2) - 1px) calc(var(--s3) - 1px); }
.cmp { display: flex; flex-direction: column; gap: var(--s2); flex: 1 1 auto; min-height: 0; }
.cmp-q { display: grid; gap: 2px; padding: var(--s2) var(--s3); border-radius: var(--r-md); background: var(--navy); color: #fff; }
.cmp-q > span { display: block; }
.cmp-q-k { font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: #C9C8E6; }
.cmp-q-t { font-size: 17px; font-weight: 700; line-height: 1.35; }
.cmp-q.empty { background: var(--soft); color: var(--muted); border: 1px dashed var(--border-strong); }
.cmp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); align-items: stretch; }
.cmp-col { display: flex; flex-direction: column; gap: var(--s2); min-width: 0; padding: var(--s3); border-radius: var(--r-md); animation: rise var(--t-med) var(--ease-out); }
.col-before { background: var(--soft); border: 1px solid var(--border-strong); }
.col-after { background: var(--surface); border: 2px solid var(--magenta); }
.cmp-k { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; }
.col-before .cmp-k { color: var(--nee); }
.col-after .cmp-k { color: var(--magenta-ink); }
.cmp-text, .cmp-sees { font-size: 15px; line-height: 1.5; }
.col-before .cmp-text { color: #3F3E58; }
.cmp-sees { color: var(--muted); }
.cmp-text.thinking { color: var(--muted); font-style: italic; }
.cite[aria-pressed="true"] { background: var(--magenta-tint); box-shadow: 0 0 0 2px var(--magenta); }
.ai-foot { display: grid; gap: var(--s2); padding-top: var(--s2); border-top: 1px solid var(--border); }
.switch { display: inline-flex; align-items: center; gap: var(--s2); min-height: 44px; padding: 0; border: 0; background: none; cursor: pointer; font-weight: 650; font-size: 15px; text-align: left; justify-self: start; border-radius: var(--r-sm); }
.switch-track { position: relative; width: 40px; height: 24px; flex: none; border-radius: 12px; background: #CFCEDC; transition: background-color var(--t-fast) var(--ease-out); }
.switch-track > span { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform var(--t-fast) var(--ease-out); }
.switch[aria-pressed="true"] .switch-track { background: var(--navy); }
.switch[aria-pressed="true"] .switch-track > span { transform: translateX(16px); }

/* Le produit, après l'expérience */
.product { border-top: 1px solid var(--border); }
.hero h2 { font-size: clamp(26px, 2.6vw, 36px); line-height: 1.15; font-weight: 750; letter-spacing: -0.02em; flex: none; }
.report-wrap { padding-bottom: var(--s5); }
.no-js .js-only { display: none; }
.no-js .immersive { height: auto; min-height: 0; }
.static-h { font-size: 20px; font-weight: 750; margin-top: var(--s5); }
.static-h:first-child { margin-top: 0; }
.static-sub { margin-top: 4px; color: var(--muted); font-size: 15px; }
.static-cmp { display: grid; gap: var(--s2); margin-top: var(--s3); }
.sc-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1.4fr); gap: var(--s3); padding: var(--s3); border-radius: var(--r-md); background: var(--soft); }
.sc-row p { color: var(--navy); }
.sc-head { background: var(--navy); color: #fff; font-weight: 700; }
.sc-tag { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-style: normal; font-size: 13px; font-weight: 700; }
.t-bad { background: var(--nogo-bg); color: #7E2A1C; } .t-ok { background: var(--go-bg); color: #17573A; } .t-mid { background: var(--nee-bg); color: var(--nee); }
.chain-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.chain h3 { font-size: 16px; font-weight: 750; margin-bottom: 4px; }

@media (max-width: 1280px) {
  .ai-questions { grid-template-columns: 1fr; }
  .immersive .scene-body.with-ai { grid-template-columns: minmax(0, 1fr) minmax(380px, 46fr); }
}
@media (max-width: 1100px) {
  .topbar { grid-template-columns: minmax(0, 1fr) auto; }
  .topbar .demo-flag { grid-column: 1 / -1; grid-row: 2; }
}
@media (max-width: 980px) {
  .immersive { height: auto; min-height: 0; }
  .immersive .scene-body, .immersive .scene-body.with-ai { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; }
  .immersive .svg-wrap { height: auto; aspect-ratio: 1140 / 684; }
  .immersive .ai-pane { height: auto; }
  .cmp-cols { grid-template-columns: minmax(0, 1fr); }
  .sc-row, .chain-4 { grid-template-columns: minmax(0, 1fr); }
  .sc-head { display: none; }
}
@media (max-width: 759px) {
  .topbar { grid-template-columns: minmax(0, 1fr); }
  .topbar .demo-flag { grid-row: auto; }
  .immersive { padding: var(--s2); }
}
