/* LIACE — site officiel (prototype)
   Layout : un canvas WebGL fixe sous des chapitres qui alternent nuit (scènes 3D) et blanc studio (contenu). */
:root {
  --night: #05070b;
  --night-2: #0b1019;
  --paper: #f3f5f8;
  --white: #ffffff;
  --ink: #0c111b;
  --ink-2: #3a4352;
  --mute: #6b7586;
  --silver: #d5dbe3;
  --titanium: #8e97a6;
  --glacier: #cfe6ff;
  --electric: #2e6bff;
  --electric-2: #69b4ff;
  --ok: #138a52;
  --warn: #b5501c;
  --line: rgba(12, 17, 27, .1);
  --line-dark: rgba(255, 255, 255, .14);

  --f-display: "Geist", "SF Pro Display", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-body: "Geist", "SF Pro Text", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --maxw: 1240px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
.reduced, .reduced * { scroll-behavior: auto !important; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 16px/1.55 var(--f-body); -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.has-3d body { background: var(--night); }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--electric); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--white); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: calc(var(--maxw) + 64px); margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
@media (min-width: 900px) { .wrap { padding-left: max(32px, env(safe-area-inset-left, 0px)); padding-right: max(32px, env(safe-area-inset-right, 0px)); } }
.small { font-size: 13px; color: var(--mute); }

/* ---------- Typo ---------- */
.eyebrow { font: 500 12px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--electric); margin: 0 0 18px; }
.eyebrow--dark { color: var(--electric-2); }
.h2 { font: 600 clamp(34px, 5.2vw, 68px)/1.02 var(--f-display); letter-spacing: -.035em; margin: 0; text-wrap: balance; }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.5; color: var(--ink-2); max-width: 34em; margin: 0; }
.note { font-size: 13px; color: var(--mute); margin-top: 28px; }
.note--dark { color: rgba(255,255,255,.55); }

/* ---------- Buttons ---------- */
.btn {
  --mx: 0px; --my: 0px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 500; font-size: 16px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transform: translate(var(--mx), var(--my));
  transition: transform .35s var(--ease), background-color .25s, color .25s, border-color .25s, box-shadow .3s;
}
.btn--small { min-height: 40px; padding: 0 18px; font-size: 14px; }
.btn--wide { width: 100%; }
.btn--solid { background: var(--ink); color: var(--white); }
.btn--solid:hover { background: var(--electric); box-shadow: 0 10px 30px -10px rgba(46,107,255,.6); }
.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover { background: var(--glacier); }
.btn--ghost { border-color: rgba(255,255,255,.35); color: var(--white); background: rgba(255,255,255,.04); backdrop-filter: blur(8px); }
.btn--ghost:hover { border-color: var(--white); background: rgba(255,255,255,.12); }
.btn--ghost-dark { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost-dark:hover { border-color: var(--ink); }
.btn:disabled { opacity: .5; cursor: progress; }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; padding-top: env(safe-area-inset-top, 0px); transition: color .4s, background-color .4s; color: var(--white); }
.nav__inner { display: flex; align-items: center; gap: 28px; height: 72px; max-width: calc(var(--maxw) + 64px); margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
@media (min-width: 900px) { .nav__inner { padding-left: 32px; padding-right: 32px; } }
.nav__brand { display: block; width: 108px; position: relative; }
.nav__brand img { width: 100%; height: auto; transition: opacity .4s; }
.nav__brand .logo-ink { position: absolute; inset: 0; opacity: 0; }
.nav[data-tone="light"] { color: var(--ink); }
.nav[data-tone="light"] .logo-white { opacity: 0; }
.nav[data-tone="light"] .logo-ink { opacity: 1; }
.nav.is-scrolled { background: color-mix(in srgb, var(--night) 55%, transparent); backdrop-filter: blur(14px) saturate(1.4); }
.nav.is-scrolled[data-tone="light"] { background: color-mix(in srgb, var(--paper) 72%, transparent); }
.nav__links { display: flex; gap: 26px; margin-left: auto; font-size: 14px; }
.nav__links a { text-decoration: none; opacity: .75; transition: opacity .2s; }
.nav__links a:hover { opacity: 1; }
.nav[data-tone="dark"] .nav__cta { background: var(--white); color: var(--ink); }
.nav__burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.nav__burger span { position: absolute; left: 11px; right: 11px; height: 1.5px; background: currentColor; transition: transform .3s; }
.nav__burger span:first-child { top: 18px; } .nav__burger span:last-child { top: 25px; }
.nav__burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.mobile-menu { display: grid; gap: 4px; padding: 8px var(--gutter-r) 24px var(--gutter); background: var(--paper); color: var(--ink); }
.mobile-menu a { padding: 14px 0; font-size: 22px; text-decoration: none; border-bottom: 1px solid var(--line); }
@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: block; }
}

/* ---------- Canvas & overlays ---------- */
#gl { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }
.no-3d #gl { display: none; }
.iris { position: fixed; inset: 0; z-index: 2; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 50%, #fff 0%, #eaf4ff calc(var(--r, 0) * 1%), rgba(234,244,255,0) calc(var(--r, 0) * 1% + 30%)); }
.no-3d .iris { display: none; }
.hover-label { position: fixed; z-index: 30; pointer-events: none; opacity: 0; transform: translate(-50%, calc(-100% - 18px)); transition: opacity .2s;
  background: var(--ink); color: var(--white); padding: 10px 14px; border-radius: 12px; font-size: 14px; line-height: 1.3; white-space: nowrap; }
.hover-label small { display: block; font: 500 10px/1.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--electric-2); }
.hover-label.is-on { opacity: 1; }

/* ---------- Dots ---------- */
.dots { position: fixed; right: max(18px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); z-index: 40; display: grid; gap: 14px; }
.dots a { width: 10px; height: 10px; border-radius: 50%; border: 1px solid currentColor; opacity: .45; position: relative; transition: opacity .3s, background-color .3s, transform .3s; color: var(--white); }
.dots[data-tone="light"] a { color: var(--ink); }
.dots a.is-active { background: currentColor; opacity: 1; transform: scale(1.15); }
.dots a::after { content: attr(data-label); position: absolute; right: 22px; top: 50%; transform: translateY(-50%) translateX(6px); font: 500 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; opacity: 0; transition: .25s; pointer-events: none; }
.dots a:hover::after, .dots a:focus-visible::after { opacity: 1; transform: translateY(-50%); }
@media (max-width: 860px) { .dots { display: none; } }

/* ---------- Sections ---------- */
main > section { position: relative; z-index: 1; }
.sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.poster { display: none; }

/* HERO */
.hero { height: 280vh; color: var(--white); }
.hero .sticky { display: flex; align-items: center; }
.hero__copy { position: relative; z-index: 3; padding-top: 72px; }
.pill { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-dark); background: rgba(255,255,255,.04); backdrop-filter: blur(10px); color: rgba(255,255,255,.82); margin: 0 0 28px; }
.pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--electric-2); box-shadow: 0 0 0 4px rgba(105,180,255,.18); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(105,180,255,0); } }
.hero__title { font: 600 clamp(42px, 5.6vw, 88px)/.98 var(--f-display); letter-spacing: -.045em; margin: 0; max-width: 9.5em; }
.hero__title .line { display: block; }
.hero__title .line--soft .w { color: transparent; background: linear-gradient(100deg, #fff 0%, var(--glacier) 45%, var(--electric-2) 130%); -webkit-background-clip: text; background-clip: text; padding-bottom: .06em; }
.hero__title .w { display: inline-block; }
.js .hero__title .w { animation: wordIn 1.1s var(--ease) both; }
.js .hero__title .line:first-child .w:nth-child(2) { animation-delay: .08s; }
.js .hero__title .line--soft .w:nth-child(1) { animation-delay: .22s; }
.js .hero__title .line--soft .w:nth-child(2) { animation-delay: .3s; }
.js .hero__title .line--soft .w:nth-child(3) { animation-delay: .38s; }
@keyframes wordIn { from { opacity: 0; transform: translateY(.45em); filter: blur(8px); } }
.hero__sub { font-size: clamp(17px, 1.6vw, 21px); color: rgba(255,255,255,.72); max-width: 30em; margin: 28px 0 36px; }
.js .hero__sub, .js .hero__actions, .js .pill { animation: fadeUp 1s .5s var(--ease) both; }
.js .pill { animation-delay: .1s; }
.js .hero__actions { animation-delay: .65s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.scroll-hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 3; display: grid; justify-items: center; gap: 10px; font: 500 11px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.scroll-hint i { width: 1px; height: 38px; background: linear-gradient(rgba(255,255,255,.7), transparent); animation: hint 2s infinite; transform-origin: top; }
@keyframes hint { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@media (max-width: 760px) {
  .has-3d .hero .sticky { align-items: flex-end; }
  .has-3d .hero__copy { padding-bottom: 56px; }
  .scroll-hint { display: none; }
  .hero__title { font-size: clamp(38px, 11vw, 52px); }
  .finale__slogan { letter-spacing: .16em; font-size: 15px; white-space: nowrap; }
}
@media (min-width: 1000px) { .hero__copy { max-width: calc(var(--maxw) + 64px); } .hero__title { max-width: 50%; } .hero__sub { max-width: 44%; } }

/* LIBRARY */
.library { color: var(--ink); padding-top: 18vh; }
.library__head, .library__bar { position: relative; z-index: 3; }
.has-3d .library::before { content: ""; position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: calc(18vh + 300px); background: linear-gradient(rgba(243,245,248,0) 0, var(--paper) 14vh, var(--paper) 72%, rgba(243,245,248,0)); pointer-events: none; }
.has-3d .library.view-list::before { display: none; }
.library__head { display: grid; gap: 22px 60px; align-items: end; grid-template-columns: 1fr; }
@media (min-width: 900px) { .library__head { grid-template-columns: 1.1fr 1fr; } }
.library__bar { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; margin-top: 36px; position: relative; z-index: 3; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: rgba(255,255,255,.7); backdrop-filter: blur(10px); padding: 9px 16px; border-radius: 999px; font-size: 14px; cursor: pointer; transition: .2s; }
.chip:hover { border-color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }
.view-toggle { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(12,17,27,.06); }
.vt { border: 0; background: none; padding: 8px 16px; border-radius: 999px; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.vt[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: 0 2px 8px rgba(12,17,27,.1); }
.library__stage { height: 82vh; height: 82svh; position: relative; cursor: default; }
.library__stage.is-hover { cursor: pointer; }
.library__list { display: none; padding-top: 32px; }
.library.view-list .library__stage { display: none; }
.library.view-list .library__list { display: block; }
.library.view-list { background: var(--paper); }
.no-3d .library { background: var(--paper); }
.no-3d .library__stage, .no-3d .view-toggle { display: none; }
.no-3d .library__list { display: block; }
.agent-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 12px; }
.agent-card { width: 100%; text-align: left; border: 1px solid var(--line); background: var(--white); border-radius: 18px; padding: 18px 18px 20px; cursor: pointer; display: grid; gap: 10px; min-height: 148px; transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.agent-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgba(12,17,27,.35); border-color: transparent; }
.agent-card__fam { display: flex; align-items: center; gap: 8px; font: 500 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.agent-card__fam i { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(140deg, var(--electric-2), var(--electric)); }
.agent-card b { font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.agent-card p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.45; }
.agent-card[hidden] { display: none; }

/* CCD */
.ccd { height: 560vh; color: var(--ink); }
.ccd .sticky { display: flex; align-items: center; }
.ccd__steps { position: relative; z-index: 3; height: 100%; }
.step { position: absolute; top: 50%; transform: translateY(-50%); max-width: 420px; transition: opacity .5s var(--ease), transform .6s var(--ease); }
.has-3d .step { opacity: 0; transform: translateY(calc(-50% + 24px)); pointer-events: none; }
.has-3d .step.is-active { opacity: 1; transform: translateY(-50%); pointer-events: auto; }
.step__k { font: 500 12px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--electric); margin: 0 0 16px; }
.step__t { font: 600 clamp(48px, 5.9vw, 90px)/.95 var(--f-display); letter-spacing: -.05em; margin: 0 0 20px; }
.step__p { font-size: clamp(17px, 1.4vw, 20px); color: var(--ink-2); margin: 0; }
.ccd.is-dark { color: var(--white); }
.ccd.is-dark .step__p { color: rgba(255,255,255,.72); }
.ccd.is-dark .step__k { color: var(--electric-2); }
.config-cards { display: none; list-style: none; padding: 0; margin: 24px 0 0; gap: 10px; }
.config-cards li { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 4px; }
.config-cards span { font: 500 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.rail { position: absolute; z-index: 3; left: 50%; bottom: 34px; transform: translateX(-50%); display: flex; gap: 26px; list-style: none; padding: 0; margin: 0; }
.rail li { display: grid; gap: 8px; font: 500 11px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; opacity: .45; transition: opacity .3s; }
.rail li i { display: block; width: 92px; height: 2px; background: currentColor; opacity: .25; position: relative; overflow: hidden; }
.rail li i::after { content: ""; position: absolute; inset: 0; background: var(--electric); transform: scaleX(var(--p, 0)); transform-origin: left; }
.rail li.is-active { opacity: 1; }
.deploy-ui { position: absolute; z-index: 3; right: max(40px, 3.5vw); top: 50%; width: min(420px, 33vw); transform: translateY(-50%) translateY(30px) scale(.96); opacity: 0; transition: opacity .6s var(--ease), transform .8s var(--ease); pointer-events: none; }
.deploy-ui.is-on { opacity: 1; transform: translateY(-50%); }
.win { background: rgba(250,252,255,.97); color: var(--ink); border-radius: 20px; box-shadow: 0 40px 90px -30px rgba(46,107,255,.6), 0 0 0 1px rgba(255,255,255,.6); overflow: hidden; }
.win__bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; color: var(--mute); }
.win__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--silver); }
.win__bar span { margin-left: 8px; }
.win__body { padding: 8px 16px; }
.dep-row { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); opacity: 0; transform: translateX(16px); transition: .5s var(--ease); }
.dep-row:last-child { border-bottom: 0; }
.deploy-ui.is-on .dep-row { opacity: 1; transform: none; }
.deploy-ui.is-on .dep-row:nth-child(2) { transition-delay: .15s; } .deploy-ui.is-on .dep-row:nth-child(3) { transition-delay: .3s; } .deploy-ui.is-on .dep-row:nth-child(4) { transition-delay: .45s; }
.dep-row p { margin: 0; font-size: 14px; }
.dep-row em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--ok); }
.dep-row em.wait { color: var(--warn); }
.tag { font: 500 10px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; padding: 6px 8px; border-radius: 6px; color: var(--white); }
.tag--x { background: #1f7a4c; } .tag--o { background: #1d5fbf; } .tag--t { background: #5157b8; } .tag--b { background: var(--ink-2); }
.win__foot { margin: 0; padding: 10px 16px 14px; font-size: 12px; color: var(--mute); }
@media (min-width: 900px) { .ccd__steps .step { left: max(32px, env(safe-area-inset-left, 0px)); } }
@media (max-width: 899px) {
  .has-3d .ccd .step { top: auto; bottom: 110px; transform: translateY(24px); }
  .has-3d .ccd .step.is-active { transform: none; }
  .step__t { font-size: 52px; }
  .deploy-ui { right: 50%; width: min(440px, calc(100vw - 32px)); top: 18%; transform: translateX(50%) translateY(20px); }
  .deploy-ui.is-on { transform: translateX(50%); }
  .has-3d .ccd .step[data-step="2"].is-active { opacity: 0; }
}

/* DEMO */
.demo, .contact { background: var(--paper); color: var(--ink); padding-block: clamp(90px, 14vh, 160px); }
.demo__head { display: grid; gap: 24px 60px; align-items: end; margin-bottom: 48px; }
@media (min-width: 900px) { .demo__head { grid-template-columns: 1.1fr 1fr; } }
.badge-demo { display: inline-block; margin: 18px 0 0; padding: 7px 12px; border-radius: 8px; background: #fff4e5; color: #8a4a00; font-size: 13px; font-weight: 500; }
.demo__grid { display: grid; gap: 24px; }
@media (min-width: 1000px) { .demo__grid { grid-template-columns: 320px 1fr; } }
.demo__side { display: grid; gap: 18px; align-content: start; }
.missions { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.missions legend { font-weight: 600; margin-bottom: 10px; }
.mission { position: relative; display: block; cursor: pointer; }
.mission input { position: absolute; opacity: 0; }
.mission span { display: grid; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); transition: .2s; }
.mission small { color: var(--mute); font-size: 13px; }
.mission input:checked + span { border-color: var(--electric); box-shadow: 0 0 0 3px rgba(46,107,255,.14); }
.mission input:focus-visible + span { outline: 2px solid var(--electric); outline-offset: 2px; }
.stages { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; counter-reset: s; }
.stages li { counter-increment: s; display: flex; gap: 12px; align-items: center; font-size: 14px; color: var(--mute); padding: 6px 0; }
.stages li::before { content: counter(s); width: 24px; height: 24px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); font: 500 11px/1 var(--f-mono); }
.stages li.is-done { color: var(--ink); }
.stages li.is-done::before { content: "✓"; background: var(--ink); color: var(--white); border-color: var(--ink); }
.stages li.is-now { color: var(--electric); font-weight: 500; }
.stages li.is-now::before { border-color: var(--electric); box-shadow: 0 0 0 4px rgba(46,107,255,.14); }
.demo__app { background: var(--white); border-radius: 24px; border: 1px solid var(--line); box-shadow: 0 50px 100px -50px rgba(12,17,27,.35); overflow: hidden; min-width: 0; display: flex; flex-direction: column; min-height: 560px; }
.app__bar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.app__dots { display: flex; gap: 6px; } .app__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--silver); }
.app__title { font-size: 14px; font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app__badge { font: 500 10px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; padding: 6px 8px; border-radius: 6px; background: #fff4e5; color: #8a4a00; }
.app__screen { position: relative; flex: 1; padding: clamp(18px, 3vw, 32px); min-width: 0; }
.app__idle { height: 100%; display: grid; align-content: center; justify-items: start; gap: 8px; max-width: 30em; }
.app__idle p { margin: 0; }
.app__idle-k { font: 600 40px/1 var(--f-display); letter-spacing: -.03em; }
.screen-in { animation: screenIn .6s var(--ease) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; font-size: 14px; min-width: 520px; }
.tbl th { text-align: right; font: 500 11px/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); padding: 10px 12px; border-bottom: 1px solid var(--line); background: #f7f9fb; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl td { text-align: right; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.tbl tr { animation: rowIn .45s var(--ease) both; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-10px); } }
.tbl .pos { color: var(--ok); } .tbl .neg { color: #c0392b; }
.tbl tr.hl td { background: rgba(46,107,255,.07); }
.xl-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; font-size: 14px; color: var(--ink-2); }
.xl-head .tag { font-size: 10px; }
.proc { display: grid; gap: 18px; align-content: center; height: 100%; max-width: 560px; }
.proc__bar { height: 6px; border-radius: 6px; background: rgba(12,17,27,.08); overflow: hidden; }
.proc__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--electric-2), var(--electric)); transition: width .3s linear; }
.proc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font: 400 14px/1.4 var(--f-mono); color: var(--ink-2); }
.proc li { animation: rowIn .4s var(--ease) both; }
.proc li::before { content: "› "; color: var(--electric); }
.dash { display: grid; gap: 16px; }
.dash__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; align-items: baseline; }
.dash__top h3 { margin: 0; font-size: 16px; font-weight: 600; }
.dash__top span { font-size: 13px; color: var(--mute); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.kpi { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 6px; animation: screenIn .5s var(--ease) both; }
.kpi:nth-child(2) { animation-delay: .08s; } .kpi:nth-child(3) { animation-delay: .16s; } .kpi:nth-child(4) { animation-delay: .24s; }
.kpi span { font-size: 12px; color: var(--mute); }
.kpi b { font: 600 26px/1 var(--f-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi em { font-style: normal; font-size: 12px; color: var(--ok); }
.kpi em.neg { color: #c0392b; }
.kpi--hero { background: var(--ink); color: var(--white); border-color: var(--ink); }
.kpi--hero span { color: rgba(255,255,255,.6); } .kpi--hero em { color: #7fe0a8; }
.chart { border: 1px solid var(--line); border-radius: 14px; padding: 14px 14px 6px; min-width: 0; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart__legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--mute); margin: 0 0 6px; }
.chart__legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.report { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
@media (min-width: 760px) { .report { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.doc { border: 1px solid var(--line); border-radius: 14px; padding: 22px; background: linear-gradient(#fff, #fbfcfe); box-shadow: 0 20px 40px -30px rgba(12,17,27,.3); }
.doc h4 { margin: 0 0 4px; font-size: 18px; }
.doc .small { margin: 0 0 14px; }
.doc p { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.doc .typed::after { content: "▍"; color: var(--electric); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.mail { border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: grid; gap: 10px; font-size: 14px; align-content: start; }
.mail__row { display: flex; gap: 8px; color: var(--mute); border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.mail__row b { color: var(--ink); font-weight: 500; }
.attach { display: inline-flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 10px; background: #f2f5f9; font-size: 13px; }
.gate { margin-top: 4px; border-radius: 14px; padding: 16px; background: #0c111b; color: #fff; display: grid; gap: 12px; }
.gate p { margin: 0; }
.gate__k { font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: #ffb27a; }
.gate__actions { display: flex; gap: 8px; flex-wrap: wrap; }
.gate .btn--ghost-dark { color: #fff; border-color: rgba(255,255,255,.3); }
.gate.is-ok { background: #0f3d27; }
.gate.is-ok .gate__k { color: #7fe0a8; }

/* CONTROL */
.control { background: var(--night); color: var(--white); padding-block: clamp(90px, 14vh, 160px); overflow: hidden; }
.control .lead { color: rgba(255,255,255,.7); margin-top: 22px; }
.control__head { margin-bottom: 48px; }
.control__grid { display: grid; gap: 22px; }
@media (min-width: 1000px) { .control__grid { grid-template-columns: 330px minmax(0, 1fr) 280px; align-items: start; } }
.perms { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.perm { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; text-align: left; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-dark); background: rgba(255,255,255,.03); cursor: pointer; color: var(--white); transition: .25s; }
.perm:hover { border-color: rgba(255,255,255,.35); }
.perm b { font-weight: 500; font-size: 15px; }
.perm small { grid-column: 1; font-size: 12px; color: rgba(255,255,255,.55); }
.perm small.req { color: #ffb27a; }
.switch { grid-row: 1 / span 2; grid-column: 2; width: 42px; height: 24px; border-radius: 12px; background: rgba(255,255,255,.15); position: relative; transition: .25s; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .3s var(--ease); }
.perm[aria-pressed="true"] { border-color: rgba(105,180,255,.6); background: rgba(46,107,255,.12); }
.perm[aria-pressed="true"] .switch { background: var(--electric); }
.perm[aria-pressed="true"] .switch::after { transform: translateX(18px); }
.graph { position: relative; border-radius: 22px; border: 1px solid var(--line-dark); background: var(--night-2); min-width: 0; }
.graph svg { width: 100%; height: auto; display: block; }
.graph .link { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 1.5; transition: stroke .4s; }
.graph .flow { fill: none; stroke: var(--electric-2); stroke-width: 2.5; stroke-dasharray: 6 14; opacity: 0; transition: opacity .4s; }
.graph .is-on .flow { opacity: 1; animation: dash 1.1s linear infinite; }
.graph .is-on .link { stroke: rgba(105,180,255,.35); }
.graph .is-pending .flow { stroke: #ffb27a; opacity: 1; animation: dash 1.1s linear infinite; }
.graph .is-blocked .flow { stroke: #ff6b6b; opacity: .8; animation: none; stroke-dasharray: 2 8; }
@keyframes dash { to { stroke-dashoffset: -40; } }
.graph .node rect { fill: rgba(255,255,255,.05); stroke: rgba(255,255,255,.2); }
.graph .node text { fill: #fff; font: 500 14px var(--f-body); }
.graph .node .sub { fill: rgba(255,255,255,.5); font: 500 10px var(--f-mono); letter-spacing: .08em; }
.graph .is-on .node rect { stroke: var(--electric-2); fill: rgba(46,107,255,.16); }
.graph .core circle.c1 { fill: url(#coreGrad); }
.graph .core circle.ring { fill: none; stroke: rgba(105,180,255,.5); }
.graph .core text { fill: #fff; font: 600 14px var(--f-body); text-anchor: middle; }
.approval { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(92%, 400px); background: var(--white); color: var(--ink); border-radius: 18px; padding: 18px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); animation: screenIn .4s var(--ease); }
.approval__k { margin: 0 0 6px; font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--warn); }
.approval__t { margin: 0 0 14px; font-size: 15px; }
.approval__actions { display: flex; gap: 8px; justify-content: flex-end; }
.journal { border: 1px solid var(--line-dark); border-radius: 18px; padding: 16px; min-width: 0; }
.journal__k { margin: 0 0 12px; font-weight: 500; display: flex; justify-content: space-between; gap: 8px; }
.journal__k span { font: 500 10px/1.8 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.45); }
.journal ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 13px; max-height: 360px; overflow: auto; }
.journal li { display: grid; gap: 2px; animation: rowIn .35s var(--ease) both; padding-bottom: 10px; border-bottom: 1px solid var(--line-dark); }
.journal li time { font: 500 11px var(--f-mono); color: rgba(255,255,255,.45); }
.journal .ok { color: #7fe0a8; } .journal .no { color: #ff8f8f; } .journal .wait { color: #ffb27a; }
.journal__empty { color: rgba(255,255,255,.45); border: 0 !important; }

/* FINALE */
.finale { height: 240vh; color: var(--ink); }
.finale .sticky { display: grid; place-items: center; }
.finale__copy { position: relative; z-index: 3; text-align: center; display: grid; justify-items: center; gap: 22px; }
.finale__logo { margin: 0; width: min(560px, 76vw); }
.finale__logo img { width: 100%; height: auto; }
.finale__slogan { margin: 0; font: 400 clamp(17px, 2vw, 26px)/1 var(--f-display); letter-spacing: .3em; color: var(--ink-2); padding-left: .3em; }
.finale__slogan span { display: inline-block; }
.finale__cta { margin: 18px 0 4px; font-size: clamp(18px, 1.6vw, 22px); color: var(--ink-2); }
.has-3d .finale__copy > * { opacity: var(--o, 0); transform: translateY(calc((1 - var(--o, 0)) * 18px)); }
.has-3d .finale__logo { opacity: var(--o1, 0); transform: scale(calc(.94 + var(--o1, 0) * .06)); filter: blur(calc((1 - var(--o1, 0)) * 10px)); }
.has-3d .finale__slogan { --o: var(--o2); } .has-3d .finale__cta, .has-3d .finale__copy > .btn { --o: var(--o3); }

/* CONTACT */
.contact { background: var(--white); }
.contact__grid { display: grid; gap: 48px; }
@media (min-width: 960px) { .contact__grid { grid-template-columns: 1fr 1fr; gap: 80px; } }
.contact .lead { margin-top: 22px; }
.contact__points { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.contact__points li { padding-left: 26px; position: relative; color: var(--ink-2); }
.contact__points li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 2px; background: var(--electric); }
.form { display: grid; gap: 16px; background: var(--paper); border-radius: 24px; padding: clamp(20px, 3vw, 36px); min-width: 0; }
.field { display: grid; gap: 6px; min-width: 0; }
.field-row { display: grid; gap: 16px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field label { font-size: 14px; font-weight: 500; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); background: var(--white); border-radius: 12px; padding: 13px 14px; min-height: 48px; transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--electric); box-shadow: 0 0 0 3px rgba(46,107,255,.15); }
.field [aria-invalid="true"] { border-color: #c0392b; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--electric); }
.form__status { margin: 0; font-size: 14px; min-height: 1.4em; }
.form__status.err { color: #c0392b; } .form__status.ok { color: var(--ok); }

/* FOOTER */
.footer { position: relative; z-index: 1; background: var(--white); border-top: 1px solid var(--line); padding-block: 48px calc(48px + env(safe-area-inset-bottom, 0px)); }
.footer__inner { display: grid; gap: 10px; }
.footer img { width: 96px; height: auto; margin-bottom: 8px; }
.footer p { margin: 0; color: var(--ink-2); font-size: 14px; }

/* SHEET (fiche agent) */
.sheet { border: 0; border-radius: 26px; padding: clamp(22px, 4vw, 40px); width: min(620px, calc(100vw - 32px)); max-height: calc(100svh - 48px); background: var(--white); color: var(--ink); box-shadow: 0 60px 120px -40px rgba(12,17,27,.55); }
.sheet::backdrop { background: rgba(5,7,11,.35); backdrop-filter: blur(6px); }
.sheet[open] { animation: sheetIn .55s var(--ease); }
@keyframes sheetIn { from { opacity: 0; transform: translateY(30px) scale(.97); } }
.sheet__close-form { position: absolute; right: 16px; top: 16px; margin: 0; }
.sheet__close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); font-size: 22px; line-height: 1; cursor: pointer; }
.sheet__family { margin: 0 0 10px; font: 500 12px/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--electric); }
.sheet__name { margin: 0 0 12px; font: 600 clamp(28px, 4vw, 40px)/1.05 var(--f-display); letter-spacing: -.03em; padding-right: 40px; }
.sheet__mission { font-size: 18px; color: var(--ink-2); margin: 0 0 24px; }
.sheet__cols { display: grid; gap: 22px; }
@media (min-width: 560px) { .sheet__cols { grid-template-columns: 1fr 1fr; } }
.sheet h4 { margin: 0 0 10px; font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }
.sheet h4 + p { margin: 0; }
.sheet ul { margin: 0 0 18px; padding-left: 18px; display: grid; gap: 6px; }
.sheet__apps { list-style: none; padding: 0 !important; display: flex !important; flex-wrap: wrap; gap: 6px !important; }
.sheet__apps li { padding: 6px 10px; border-radius: 8px; background: var(--paper); font-size: 13px; }
.sheet__note { margin: 22px 0 0; padding: 10px 12px; border-radius: 10px; background: #fff4e5; color: #8a4a00; font-size: 13px; }
.sheet__actions { margin-top: 20px; }

/* ---------- Sans 3D / animations réduites ---------- */
.no-3d .hero, .no-3d .ccd, .no-3d .finale { height: auto; }
.no-3d .sticky { position: relative; height: auto; min-height: 0; overflow: visible; }
.no-3d .hero { background: var(--night); }
.no-3d .hero .sticky { min-height: 92svh; padding-block: 110px 80px; }
.no-3d .hero .poster { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.no-3d .hero .sticky::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,7,11,.92) 0%, rgba(5,7,11,.4) 70%); }
.no-3d .scroll-hint { display: none; }
.no-3d .library { padding-block: 110px 80px; }
.no-3d .ccd { background: var(--white); padding-block: 100px; }
.no-3d .ccd .sticky { display: block; }
.no-3d .rail { display: none; }
.no-3d .ccd__steps { display: grid; gap: 48px; height: auto; }
@media (min-width: 900px) { .no-3d .ccd__steps { grid-template-columns: repeat(3, 1fr); } }
.no-3d .step { position: static; transform: none; max-width: none; }
.no-3d .step__t { font-size: clamp(40px, 4.5vw, 64px); }
.no-3d .config-cards { display: grid; }
.no-3d .deploy-ui { position: relative; inset: auto; transform: none; opacity: 1; width: auto; max-width: 560px; margin: 48px auto 0; padding-inline: 16px; }
.no-3d .dep-row { opacity: 1; transform: none; }
.no-3d .finale { background: var(--paper); padding-block: 120px; }
.no-3d .finale .sticky { display: grid; place-items: center; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
