/* ============================================================
   FORGE — LIVING LIGHT v3 (design source of truth: forge-living-light)
   Light is the material. Ink structures. Flux communicates.
   ============================================================ */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/space-grotesk.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/assets/fonts/instrument-sans.woff2') format('woff2-variations');
}

:root {
  /* Ground — the luminous workshop */
  --bg: #f5f7fd; --bg-2: #eaeefa; --surface: #ffffff;
  --frost: rgba(255, 255, 255, 0.66);
  /* Ink */
  --ink: #101321; --ink-2: #4c5268; --ink-3: #666e8c;
  /* Flux — spectral light */
  --violet: #7c5cff; --blue: #3f6ef7; --cyan: #2fd4e6;
  --flux-ink: #2d53cf; /* AA-safe blue for small text */
  --grad: linear-gradient(105deg, #3f6ef7 0%, #7c5cff 55%, #2fd4e6 120%);
  --flux-soft: linear-gradient(140deg, rgba(63,110,247,.10), rgba(124,92,255,.10) 50%, rgba(47,212,230,.08));
  /* Meaning */
  --ok: #17b877; --ok-bg: #e4f7ef; --warn: #b26e08; --warn-bg: #fdf3e0;
  --line: rgba(28,34,66,.10); --line-2: rgba(28,34,66,.06);
  /* Depth — layered light */
  --sh-card: 0 0 0 1px rgba(28,34,66,.04), 0 1px 2px rgba(16,19,33,.04), 0 8px 24px rgba(83,92,145,.08);
  --sh-mid: 0 0 0 1px rgba(28,34,66,.06), 0 2px 6px rgba(16,19,33,.06), 0 18px 48px rgba(83,92,145,.18);
  --sh-pop: 0 0 0 1px rgba(28,34,66,.06), 0 8px 20px rgba(16,19,33,.07), 0 32px 80px rgba(83,92,145,.26);
  --glow: 0 0 0 1px rgba(63,110,247,.22), 0 4px 24px rgba(63,110,247,.25);
  --r-xl: 24px; --r-lg: 18px; --r-md: 13px; --r-sm: 10px;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-ui: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'JetBrains Mono', monospace;
  --spring: cubic-bezier(.34,1.35,.4,1); --ease: cubic-bezier(.23,1,.32,1);
  --t1: 150ms; --t2: 320ms; --t3: 650ms;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
[tabindex="-1"]:focus { outline: none; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 15px/1.55 var(--font-ui);
  color: var(--ink); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(760px 760px at 108% -12%, rgba(124,92,255,.14), transparent 62%),
    radial-gradient(760px 760px at -14% 112%, rgba(47,212,230,.11), transparent 62%),
    var(--bg);
  background-attachment: fixed;
}
h1,h2,h3,h4 { margin: 0 0 .35em; letter-spacing: -.022em; line-height: 1.1; font-family: var(--font-display); text-wrap: balance; }
h1 { font-size: clamp(2.3rem,5.2vw,3.9rem); font-weight: 700; }
h2 { font-size: clamp(1.35rem,2.6vw,1.8rem); font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; color: var(--ink-2); text-wrap: pretty; }
.small { font-size: .84rem; color: var(--ink-3); }
a { color: inherit; text-decoration: none; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- icons (inline svg) ---------- */
.ic { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.s { width: 16px; height: 16px; }
.tile {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  color: #fff; flex: none;
}
.tile.v { background: linear-gradient(135deg,#8a63ff,#6f4bff); }
.tile.b { background: linear-gradient(135deg,#4d8bff,#2f6bf0); }
.tile.o { background: linear-gradient(135deg,#ff9a4d,#f97316); }
.tile.g { background: linear-gradient(135deg,#20c98a,#0ea86e); }
.tile.k { background: linear-gradient(135deg,#3a3f4d,#1d2027); }
.tile.c { background: linear-gradient(135deg,#38d2e6,#0fb5cc); }

/* ---------- topbar ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(245,247,253,.85); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line-2); }
.topbar .shell { display: flex; align-items: center; gap: 26px; height: 66px; }
.logo { display: flex; align-items: center; gap: 9px; font-family: var(--font-display); font-weight: 700; letter-spacing: .18em; font-size: 1rem; }
.brandimg { height: 38px; display: block; }
.side .brandimg { height: 26px; }
/* ---- marteau officiel (loader) ---- */
.forge-loader { display: grid; place-items: center; padding: 26px 0 6px; }
.fl-svg { width: 130px; height: 98px; overflow: visible; }
.fl-hammer { transform-origin: 55px 46px; animation: flStrike 1.15s cubic-bezier(.5,0,.6,1) infinite; }
@keyframes flStrike {
  0%, 18% { transform: rotate(-38deg); }
  42% { transform: rotate(0deg); }
  50%, 58% { transform: rotate(2deg); }
  100% { transform: rotate(-38deg); }
}
.sp { opacity: 0; }
.fl-sparks .sp { animation: flSpark 1.15s ease-out infinite; }
.fl-sparks .sp2 { animation-delay: .03s; }
.fl-sparks .sp3 { animation-delay: .06s; }
@keyframes flSpark {
  0%, 44% { opacity: 0; transform: translate(0,0) scale(.6); }
  50% { opacity: 1; }
  74% { opacity: 0; transform: translate(7px,-7px) scale(1.15); }
  100% { opacity: 0; }
}
.fl-label { animation: blink 2.1s ease infinite; margin-top: 4px; }
.fl-mini { width: 30px; height: 26px; }
.fl-mini .fl-hammer { animation-duration: 1.6s; }
@media (prefers-reduced-motion: reduce) { .fl-hammer { transform: rotate(-12deg); } }
.nav { display: flex; gap: 22px; font-size: .9rem; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.spacer { flex: 1; }
@media (max-width: 860px) { .nav { display: none; } }

/* ---------- layout ---------- */
.shell { max-width: 1200px; margin: 0 auto; padding: 0 26px; }
main { padding: 44px 0 90px; }
.grid { display: grid; gap: 22px; }
@media (min-width: 940px) { .cols-2 { grid-template-columns: 1fr 1fr; } .cols-32 { grid-template-columns: 1.15fr .85fr; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .92rem; cursor: pointer;
  border-radius: 999px; padding: 11px 20px; border: 1px solid transparent; min-height: 42px;
  transition: transform var(--t1) var(--spring), box-shadow var(--t1), background var(--t1), border var(--t1);
}
.btn:active { transform: scale(.97); }
.btn:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn-dark { background: #101321; color: #fff; box-shadow: 0 6px 18px rgba(16,19,33,.24); }
.btn-dark:hover { box-shadow: 0 10px 26px rgba(16,19,33,.32); background: #1d2236; }
.btn-primary { color: #fff; background: var(--grad); background-size: 150% 150%; box-shadow: var(--glow); }
.btn-primary:hover { background-position: 90% 30%; box-shadow: 0 0 0 1px rgba(63,110,247,.3), 0 8px 32px rgba(63,110,247,.35); }
.btn-ghost { background: var(--surface); border-color: transparent; box-shadow: var(--sh-card); }
.btn-ghost:hover { box-shadow: var(--sh-mid); transform: translateY(-1px); }
.btn-soft { background: var(--bg-2); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.wide { width: 100%; }

/* ---------- inputs ---------- */
input, textarea {
  font: inherit; color: var(--ink); width: 100%; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-md); padding: 13px 16px;
  transition: border var(--t1), box-shadow var(--t1);
}
input:focus, textarea:focus { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(124,92,255,.12); }
textarea { resize: vertical; }
label { display: block; font-weight: 600; font-size: .88rem; margin: 14px 0 6px; }
.field-err { color: #e5484d; font-size: .84rem; margin-top: 6px; min-height: 1.1em; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--sh-card); }
.card.xl { border-radius: var(--r-xl); padding: 28px; }
.card.pop { box-shadow: var(--sh-pop); }
.card.float { transition: transform var(--t2) var(--spring), box-shadow var(--t2); }
.card.float:hover { transform: translateY(-3px); box-shadow: var(--sh-pop); }

/* ---------- pills / badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 15px; font-size: .84rem; font-weight: 600; color: var(--ink-2); box-shadow: var(--sh-card); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 680; padding: 5px 11px; border-radius: 999px; }
.badge.ok { color: var(--ok); background: var(--ok-bg); }
.badge.run { color: var(--flux-ink); background: #e8f0ff; }
.badge.warn { color: var(--warn); background: var(--warn-bg); }
.badge.idle { color: var(--ink-3); background: var(--bg-2); }
.dot-ic { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* ---------- category chips (maquette) ---------- */
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; }
.cat {
  display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center;
  background: var(--surface); border: 1.5px solid var(--line-2); border-radius: var(--r-md);
  padding: 16px 10px 13px; cursor: pointer; font: inherit; font-weight: 600; font-size: .86rem;
  box-shadow: var(--sh-card);
  transition: transform var(--t1) var(--spring), border var(--t1), box-shadow var(--t1);
}
.cat .ic { width: 24px; height: 24px; color: var(--blue); }
.cat small { font-weight: 500; color: var(--ink-3); font-size: .72rem; }
.cat:hover { transform: translateY(-2px); box-shadow: var(--sh-mid); }
.cat[aria-pressed="true"] { border-color: var(--violet); background: #f6f3ff; box-shadow: 0 0 0 3px rgba(124,92,255,.12); }
.cat[aria-pressed="true"] .ic { color: var(--violet); }

/* ---------- idea box (maquette) ---------- */
.idea-box { background: var(--surface); border: 1.5px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--sh-card); overflow: hidden; transition: border var(--t1), box-shadow var(--t1); }
.idea-box:focus-within { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(124,92,255,.12); }
.idea-box textarea { border: 0; box-shadow: none !important; padding: 16px 18px 6px; min-height: 86px; }
.idea-box .bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; }
.idea-box .bar .mini { display: inline-flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--ink-2); padding: 8px 12px; border-radius: 9px; cursor: pointer; background: transparent; border: 0; font-weight: 570; }
.idea-box .bar .mini:hover { background: var(--bg-2); }

/* ---------- HERO (halo + carte flottante) ---------- */
.hero { position: relative; display: grid; gap: 40px; align-items: center; padding: 34px 0 10px; }
@media (min-width: 980px) { .hero { grid-template-columns: 1.05fr .95fr; } }
.hero-right { position: relative; min-height: 480px; }
.halo { position: absolute; inset: -8% -14%; pointer-events: none; z-index: 0;
  background:
    radial-gradient(46% 42% at 60% 42%, rgba(124,92,255,.2), transparent 70%),
    radial-gradient(36% 34% at 40% 66%, rgba(47,212,230,.17), transparent 70%),
    radial-gradient(40% 36% at 74% 70%, rgba(63,110,247,.16), transparent 70%);
  filter: blur(6px); animation: halo 22s var(--ease) infinite alternate; }
.halo::after { content: ""; position: absolute; inset: 12%; border: 1.5px solid rgba(124,92,255,.22); border-radius: 50%;
  mask: linear-gradient(120deg, #000 30%, transparent 75%); animation: spin 34s linear infinite; }
@keyframes halo { to { transform: translate3d(2%,2%,0) scale(1.05); } }
@keyframes spin { to { transform: rotate(360deg); } }
.float-card { position: relative; z-index: 2; animation: bob 7s var(--ease) infinite alternate; }
@keyframes bob { to { transform: translateY(-10px); } }
.float-mini { position: absolute; z-index: 3; }
.check-row { display: flex; align-items: center; gap: 11px; padding: 8px 0; font-weight: 600; font-size: .92rem; }
.check-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); flex: none; }
.check-row.todo { color: var(--ink-3); font-weight: 550; }
.check-row.todo .check-dot { background: var(--bg-2); color: var(--ink-3); }
.script { font-family: "Segoe Script","Bradley Hand",cursive; color: var(--ink-2); transform: rotate(-4deg); font-size: 1rem; }
.avatars { display: flex; }
.avatars span { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; margin-left: -8px; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: .7rem; font-weight: 700; }
.stars { color: #f5a623; letter-spacing: 2px; }

/* ---------- sidebar app layout (maquette dashboard) ---------- */
.app-wrap { display: grid; min-height: calc(100vh - 0px); }
@media (min-width: 980px) { .app-wrap { grid-template-columns: 232px 1fr; } }
.side { background: var(--surface); border-right: 1px solid var(--line-2); padding: 20px 14px; display: none; flex-direction: column; gap: 4px; }
@media (min-width: 980px) { .side { display: flex; } }
.side .logo { padding: 4px 10px 18px; }
.side a.item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 11px; font-weight: 600; font-size: .92rem; color: var(--ink-2); }
.side a.item:hover { background: var(--bg-2); color: var(--ink); }
.side a.item.on { background: #f1edff; color: #5233d6; } /* violet AA sur fond lavande */
.side .pro { margin-top: auto; background: linear-gradient(160deg,#f4f0ff,#eef4ff); border: 1px solid #e4dcff; border-radius: var(--r-md); padding: 14px; }
.content { padding: 26px clamp(18px, 3.4vw, 44px) 70px; }
.apphead { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.search { flex: 1; max-width: 330px; position: relative; }
.search input { padding-left: 38px; border-radius: 999px; background: var(--surface); }
.search .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .8rem; }

/* ---------- project rows (maquette) ---------- */
.proj-row { display: flex; align-items: center; gap: 14px; padding: 14px 6px; border-bottom: 1px solid var(--line-2); }
.proj-row:last-child { border-bottom: 0; }
.proj-row .meta { min-width: 0; }
.proj-row .meta b { display: block; }
.proj-row .meta span { font-size: .82rem; color: var(--ink-3); }
.progress { width: 120px; height: 6px; border-radius: 6px; background: var(--bg-2); overflow: hidden; flex: none; }
.progress i { display: block; height: 100%; border-radius: 6px; background: var(--grad); transition: width var(--t3) var(--ease); }
.progress.done i { background: var(--ok); }
.when { font-size: .8rem; color: var(--ink-3); width: 74px; text-align: right; flex: none; }
@media (max-width: 720px) { .progress, .when { display: none; } }

/* ---------- tabs (projet) ---------- */
.tabs { display: flex; gap: 20px; font-weight: 600; font-size: .92rem; color: var(--ink-3); border-bottom: 1px solid var(--line-2); margin: 4px 0 22px; }
.tabs a { padding: 10px 2px; border-bottom: 2px solid transparent; }
.tabs a.on { color: var(--flux-ink); border-color: var(--blue); }

/* ============================================================
   BUILD EXPERIENCE — le Flux + la chambre de matérialisation
   (source of truth: forge-living-light — approuvé humainement)
   ============================================================ */
.bx-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.bx-head h2 { font-size: clamp(1.5rem,3vw,2.05rem); margin: 0; }
.bx-head .sub { margin: 6px 0 0; }
.elapsed { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px 0 12px; border-radius: var(--r-md); background: var(--surface); box-shadow: var(--sh-card); flex: none; }
.elapsed .ebolt { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: rgba(63,110,247,.12); color: var(--blue); }
.elapsed .etxt { display: flex; flex-direction: column; line-height: 1.2; }
.elapsed .etxt .small { font-size: .72rem; }
.elapsed .etxt b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: .92rem; }

.build-grid { display: grid; gap: 34px; align-items: start; }
@media (min-width: 940px) { .build-grid { grid-template-columns: minmax(260px, .62fr) 1.38fr; gap: 44px; } }

/* — Rail des étapes sur le Flux (aussi utilisé par l'écran d'intake) — */
.steps { display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: 24px 1fr; gap: 14px; align-items: start; padding: 12px 0; position: relative; }
.step .rail { position: absolute; left: 11px; top: 36px; height: calc(100% - 26px); width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, rgba(63,110,247,.5), rgba(124,92,255,.35)); overflow: hidden; }
.step.pending .rail { background: var(--line); }
.step.done .rail { background: var(--ok); opacity: .55; }
.step.active .rail::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, #7cd8ff, var(--violet), transparent);
  animation: flow 1.6s var(--ease) infinite; }
@keyframes flow { from { transform: translateY(-100%);} to { transform: translateY(100%);} }
.step .sdot { grid-column: 1; grid-row: 1 / span 2; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: 1px;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink-3); font-size: .72rem; font-weight: 700;
  transition: all var(--t2) var(--spring); }
.step.pending .sdot, .step.active .sdot { font-size: 0; } /* jalons sans numéros, comme la référence */
.step.done .sdot { border-color: var(--ok); background: var(--ok); color: #fff; box-shadow: 0 2px 8px rgba(23,184,119,.35); }
.step.active .sdot { border-color: var(--blue); background: #fff; color: var(--flux-ink); animation: breath 3s var(--ease) infinite; }
@keyframes breath { 50% { box-shadow: 0 0 0 3px rgba(63,110,247,.16), 0 4px 34px rgba(63,110,247,.5); } }
.step .lbl { grid-column: 2; grid-row: 1; font-weight: 500; color: var(--ink-3); transition: color var(--t2); }
.step.done .lbl { color: var(--ink-2); }
.step.active .lbl { color: var(--ink); font-weight: 650; }
.step .st { grid-column: 2; grid-row: 2; font-size: .8rem; color: var(--ink-3); }
.step.done .st { color: var(--ink-3); }
.step.active .st { color: var(--flux-ink); font-weight: 500; }

/* — Chambre de matérialisation — */
.chamber { position: relative; border-radius: var(--r-xl); background: var(--surface);
  box-shadow: var(--sh-mid), 0 0 0 1px rgba(124,92,255,.08); overflow: hidden;
  min-height: 470px; display: flex; flex-direction: column; }
.chamber-atmo { position: absolute; inset: 0;
  background:
    radial-gradient(560px 320px at 78% 18%, rgba(124,92,255,.22), transparent 68%),
    radial-gradient(480px 300px at 22% 88%, rgba(47,212,230,.16), transparent 66%),
    radial-gradient(700px 420px at 50% 55%, rgba(63,110,247,.07), transparent 70%),
    var(--flux-soft); }
.chamber.settled .chamber-atmo {
  background:
    radial-gradient(560px 320px at 78% 18%, rgba(47,212,230,.18), transparent 68%),
    radial-gradient(480px 300px at 22% 88%, rgba(23,184,119,.1), transparent 66%),
    var(--flux-soft); }
.chamber-ring { position: absolute; top: -2%; left: 2%; width: 96%; height: 84%; pointer-events: none; }
.chamber.running .chamber-ring { animation: ring-pulse 6s var(--ease) infinite; }
@keyframes ring-pulse { 50% { opacity: .62; } }
.chamber-pourin { position: absolute; top: 32%; left: -30px; width: 240px; height: 110px;
  background: linear-gradient(95deg, rgba(63,110,247,.32), rgba(124,92,255,.1) 60%, transparent);
  filter: blur(30px); opacity: 0; transition: opacity .6s var(--ease); }
.chamber.running .chamber-pourin { opacity: .9; animation: pour 4s ease-in-out infinite; }
@keyframes pour { 50% { opacity: .4; } }
.chamber-stack { position: relative; flex: 1; display: flex; align-items: center; justify-content: center;
  min-height: 300px; padding: 52px 40px 18px; }
.chamber-emblem { position: absolute; top: 34px; left: 20%; width: 46px; height: 46px; border-radius: 14px;
  background: var(--grad); color: #fff; display: grid; place-items: center; box-shadow: var(--glow); z-index: 11;
  animation: bob 5s var(--ease) infinite alternate; }

/* plans translucides — le produit se condense hors du Flux */
.plane { position: absolute; width: min(440px, 78%); aspect-ratio: 10/6.4; border-radius: var(--r-lg);
  background: rgba(255,255,255,.82); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,.85); box-shadow: var(--sh-mid);
  padding: 20px 20px 16px; display: flex; flex-direction: column; gap: 10px; overflow: hidden;
  animation: plane-in .8s var(--spring) both; }
@keyframes plane-in { from { opacity: 0; transform: translateY(56px) scale(.92); } }
.plane.p1 { transform: translate(24px,-34px) scale(.95) rotate(-.8deg); opacity: .55; z-index: 1; }
.plane.p2 { transform: translate(48px,-68px) scale(.9) rotate(.4deg); opacity: .32; z-index: 0; }
.plane.p0 { transform: rotate(-2deg); z-index: 2; }
.plane.p0.glowing { box-shadow: var(--sh-mid), 0 0 0 1px rgba(63,110,247,.14), 0 0 54px rgba(63,110,247,.26); }
.chamber.settled .plane.p0 { transform: none; }
.chamber.settled .plane.p1 { transform: translate(12px,-14px) scale(.97); }
.chamber.settled .plane.p2 { transform: translate(24px,-28px) scale(.94); }
.plane .pm { width: 100%; height: 46%; border-radius: 10px; flex: none;
  background: radial-gradient(90% 120% at 22% 8%, rgba(255,255,255,.4), transparent 55%),
    linear-gradient(118deg, #8ba2fa, #a290ff 55%, #85dcec); }
.plane .pr { height: 9px; border-radius: 5px; background: var(--bg-2); }
.plane .pc { position: absolute; right: 18px; bottom: 16px; width: 60px; height: 20px; border-radius: 999px; background: var(--grad); opacity: .85; }
.plane.seed { background: rgba(255,255,255,.4); border: 1.5px dashed rgba(63,110,247,.28); box-shadow: none; }
.plane.seed::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(124,92,255,.08) 50%, transparent 70%);
  animation: shim 2.6s var(--ease) infinite; }

/* légende + barre de flux */
.chamber-caption { position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 26px; padding: 14px 28px 24px; flex-wrap: wrap; }
.chamber-caption .cline { font-weight: 650; font-size: .98rem; color: var(--ink); margin: 0; }
.fluxbar { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 220px; max-width: 380px; }
.pbar { height: 7px; border-radius: 7px; background: var(--bg-2); overflow: hidden; flex: 1; }
.pbar i { display: block; position: relative; height: 100%; background: var(--grad); border-radius: 7px; overflow: hidden;
  transition: width var(--t3) var(--ease); }
.chamber.running .pbar i::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 20%, rgba(255,255,255,.55) 50%, transparent 80%);
  animation: shim 2.6s ease-in-out infinite; }
.fluxbar b { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: .85rem; font-weight: 500; color: var(--ink-2); }

/* attention (blocage / avis client) — ancrée dans la composition */
.attention-card { position: relative; margin: 0 28px 22px; padding: 16px 20px 16px 24px; border-radius: var(--r-md);
  background: rgba(255,255,255,.9); backdrop-filter: blur(16px);
  box-shadow: var(--sh-card), 0 0 0 1px rgba(232,147,12,.22), 0 0 50px rgba(232,147,12,.1); overflow: hidden; }
.attention-card::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 3px;
  background: linear-gradient(180deg, #e8930c, rgba(232,147,12,.15)); }
.attention-card .eyebrow { font-size: .72rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--warn); }
.attention-card p { margin: 5px 0 0; font-weight: 500; font-size: .92rem; color: var(--ink); }
.chamber.paused .chamber-stack { opacity: .45; filter: saturate(.75); }
.chamber .chamber-stack { transition: opacity var(--t3) var(--ease), filter var(--t3) var(--ease); }

/* panneau terminal (aperçu prêt) — couronné du Flux */
.chamber-ready { position: relative; margin: 0 28px 26px; padding: 24px 28px; border-radius: var(--r-md);
  background: rgba(255,255,255,.9); backdrop-filter: blur(16px); box-shadow: var(--sh-pop); overflow: hidden;
  animation: reveal .85s var(--spring) both; }
.chamber-ready::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--grad); }
.chamber-ready::after { content: ""; position: absolute; top: -80px; right: -50px; width: 300px; height: 230px;
  background: radial-gradient(circle, rgba(23,184,119,.24), rgba(47,212,230,.1) 55%, transparent 70%); pointer-events: none; }
.chamber-ready h3 { font-size: 1.35rem; letter-spacing: -.015em; }
.chamber-ready .btn { position: relative; z-index: 1; }

/* note IA (bandeau discret) */
.ai-note { display: flex; align-items: center; gap: 12px; margin-top: 20px; color: var(--ink-2); font-size: .86rem; }
.ai-note .spark-tile { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px;
  background: var(--surface); box-shadow: var(--sh-card); color: var(--violet); flex: none; }

@media (max-width: 939px) {
  .chamber { min-height: 380px; order: -1; }
  .chamber-stack { min-height: 235px; padding: 36px 18px 10px; }
  .plane { width: min(340px, 90%); }
  .chamber-emblem { left: auto; right: 18px; top: 16px; width: 38px; height: 38px; }
  .chamber-ring { top: -4%; left: -6%; width: 112%; height: 78%; }
  .bx-head h2 { font-size: 1.4rem; }
}

/* ---------- device mockups (preview) ---------- */
.laptop { border: 10px solid #1b1e27; border-radius: 16px; background: #fff; box-shadow: var(--sh-pop); overflow: hidden; }
.laptop .scr { padding: 18px; min-height: 220px; background: linear-gradient(160deg,#fafbff,#f2f4fd); }
.phone { width: 128px; border: 8px solid #1b1e27; border-radius: 24px; background: #fff; box-shadow: var(--sh-pop); overflow: hidden; position: absolute; right: -6px; bottom: -18px; }
.phone .scr { padding: 12px 10px; min-height: 200px; background: linear-gradient(170deg,#ffffff,#f2f4fd); font-size: .68rem; }

/* ---------- delivery ---------- */
.dl-row { display: flex; align-items: center; gap: 13px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.dl-row:last-child { border-bottom: 0; }
.dl-row .meta { flex: 1; min-width: 0; }
.dl-row .meta b { display: block; font-size: .94rem; }
.dl-row .meta span { font-size: .8rem; color: var(--ink-3); }

/* ---------- motion utils ---------- */
.enter { animation: enter var(--t3) var(--spring) both; }
.enter.d1{animation-delay:70ms}.enter.d2{animation-delay:150ms}.enter.d3{animation-delay:230ms}
@keyframes enter { from { opacity: 0; transform: translateY(14px) scale(.99);} }
.screen-swap { animation: swap var(--t2) var(--ease) both; }
@keyframes swap { from { opacity: 0; transform: translateY(8px);} }
.reveal { animation: reveal .85s var(--spring) both; }
@keyframes reveal { 0%{opacity:0;transform:scale(.94) translateY(16px)} 60%{transform:scale(1.01)} 100%{opacity:1;transform:none} }
.skel { position: relative; overflow: hidden; background: var(--bg-2); border-radius: var(--r-sm); min-height: 13px; }
.skel::after { content:""; position:absolute; inset:0; background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.9) 50%,transparent 70%); animation: shim 1.4s var(--ease) infinite; }
@keyframes shim { from{transform:translateX(-100%)} to{transform:translateX(100%)} }
#toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 90; }
.toast { background: #101321; color: #fff; padding: 12px 17px; border-radius: var(--r-md); box-shadow: var(--sh-pop); animation: enter var(--t2) var(--spring) both; max-width: 340px; font-size: .9rem; }
.toast.err { background: #e5484d; }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; } }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
