:root {
  --bg: #07090c;
  --bg-alt: #0b0f14;
  --surface: #10161d;
  --surface-2: #151d26;
  --line: #1f2a35;
  --text: #e8edf2;
  --muted: #8996a3;
  --accent: #8cffc1;
  --accent-ink: #04210f;
  --amber: #ffb454;
  --blue: #6aa8ff;
  --radius: 14px;
  --display: 'Bricolage Grotesque', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.65 var(--body); -webkit-font-smoothing: antialiased;
}
img, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--accent-ink); }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.two > *, .stack-grid > *, .book > *, .pipe-panel > * { min-width: 0; } /* évite qu'un enfant scrollable élargisse la grille */

/* ---------- progress + nav ---------- */
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--accent)); }

.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 max(20px, calc((100% - 1120px) / 2));
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.scrolled { border-color: var(--line); }
.logo { text-decoration: none; font: 700 18px var(--mono); display: flex; align-items: center; }
.logo .mono { color: var(--accent); }
.caret { width: 9px; height: 18px; background: var(--accent); margin-left: 4px; animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.nav nav { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.nav nav a:hover { color: var(--text); }
.nav nav a.btn { color: var(--accent-ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); font: 600 16px var(--body);
  text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -10px var(--accent); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); box-shadow: none; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: grid; align-items: center; overflow: hidden; padding: 110px 0 90px; }
#flow { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { /* fondu pour la lisibilité du texte à gauche */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--bg) 0%, color-mix(in srgb, var(--bg) 70%, transparent) 38%, transparent 70%),
              linear-gradient(0deg, var(--bg), transparent 22%);
}
.hero-inner { position: relative; z-index: 2; width: min(1120px, 100% - 40px); margin-inline: auto; }
.hero-inner > * { max-width: 680px; }
.pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; border: 1px solid var(--line);
  border-radius: 999px; background: color-mix(in srgb, var(--surface) 80%, transparent); font-size: 14px; color: var(--muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { font-size: clamp(42px, 7.2vw, 88px); font-weight: 800; margin: 26px 0 24px; }
.h1-line { display: block; overflow: hidden; }
.h1-line > *, .h1-line { animation: rise .9s cubic-bezier(.2,.7,.2,1) both; }
.h1-line:nth-child(2) { animation-delay: .12s; } .h1-line:nth-child(3) { animation-delay: .24s; }
@keyframes rise { from { transform: translateY(100%); opacity: 0; } }
.hero em { font-style: normal; }
.hero .chaos { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--amber) 70%, transparent); text-decoration-thickness: 3px; }
.hero .order { color: var(--accent); }
.lead { font-size: clamp(18px, 2vw, 21px); color: #b8c3ce; max-width: 560px; }
.lead strong { color: var(--text); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.badges { list-style: none; padding: 0; margin: 40px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font: 400 14px var(--mono); color: var(--muted); }
.badges b { color: var(--accent); font-weight: 500; }
.gates {
  position: absolute; z-index: 1; bottom: 28px; left: 0; right: 0; display: flex; font-size: 11px; letter-spacing: .2em; color: #4d5a67; pointer-events: none;
}
.gates span { position: absolute; transform: translateX(-50%); }
.gates span:nth-child(1) { left: 40%; } .gates span:nth-child(2) { left: 62%; } .gates span:nth-child(3) { left: 84%; }

/* ---------- sections ---------- */
.section { padding: clamp(80px, 11vw, 140px) 0; }
.section.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.eyebrow { color: var(--accent); font-size: 14px; margin-bottom: 18px; }
.section h2 { font-size: clamp(32px, 4.6vw, 56px); font-weight: 700; max-width: 18ch; }
.section .sub { color: var(--muted); max-width: 60ch; margin-top: 20px; font-size: 18px; }
.mini { font: 600 13px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 30px 0 12px; }

.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- pipeline explorer ---------- */
.pipe { margin-top: 56px; }
.pipe-nodes { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.pipe-nodes::before { /* le “tuyau” */
  content: ''; position: absolute; left: 4%; right: 4%; top: 24px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 14px);
  animation: dash 1.2s linear infinite;
}
@keyframes dash { to { background-position: 14px 0; } }
.node {
  position: relative; background: none; border: 0; color: var(--muted); cursor: pointer; font: 500 14px var(--body);
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 0 4px; text-align: center; transition: color .2s;
}
.node b {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--surface);
  border: 1px solid var(--line); font: 500 14px var(--mono); color: var(--muted); transition: all .25s;
}
.node:hover { color: var(--text); }
.node:hover b { border-color: var(--accent); }
.node[aria-selected="true"] { color: var(--text); }
.node[aria-selected="true"] b { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transform: translateY(-4px); box-shadow: 0 12px 30px -12px var(--accent); }
.node.is-ai[aria-selected="true"] b { background: var(--amber); border-color: var(--amber); box-shadow: 0 12px 30px -12px var(--amber); }
.pipe-panel {
  margin-top: 36px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; padding: clamp(24px, 4vw, 44px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; min-height: 280px;
}
.pipe-panel h3 { font-size: clamp(24px, 3vw, 34px); }
.pipe-panel p { color: #b8c3ce; margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; padding: 0; list-style: none; }
.chips li { font: 400 13px var(--mono); padding: 5px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface-2); color: #c8d2dc; }
.deliver h4 { font: 600 13px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); margin: 0 0 14px; }
.deliver ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.deliver li { padding-left: 26px; position: relative; color: #d3dce5; }
.deliver li::before { content: '→'; position: absolute; left: 0; color: var(--accent); font-family: var(--mono); }
.pipe-panel.swap > * { animation: fade .45s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }

/* ---------- cards ---------- */
.grid { display: grid; gap: 18px; margin-top: 56px; }
.offers { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.projects { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card {
  --mx: 50%; --my: 0%;
  position: relative; padding: 30px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface);
  overflow: hidden; display: flex; flex-direction: column; gap: 14px; transition: border-color .25s, transform .25s;
}
.card::before {
  content: ''; position: absolute; inset: 0; opacity: 0; transition: opacity .3s; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%);
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); transform: translateY(-3px); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; }
.card .num { font: 500 14px var(--mono); color: var(--accent); }
.card h3 { font-size: 24px; }
.card .dur { font: 400 13px var(--mono); color: var(--amber); }
.card p { color: #b8c3ce; font-size: 16px; }
.card ul.ideal { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 15px; color: #c3ced8; }
.card ul.ideal li { padding-left: 22px; position: relative; }
.card ul.ideal li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); }
.card .out { margin-top: auto; padding-top: 16px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--muted); }
.card .out b { color: var(--text); font-weight: 500; }
.tag { align-self: flex-start; font: 500 12px var(--mono); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tag.example { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); }

.proj dl { margin: 0; display: grid; gap: 12px; }
.proj dt { font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--accent); }
.proj dd { margin: 2px 0 0; color: #c3ced8; font-size: 15.5px; }
.proj dd.res { color: var(--text); font-weight: 500; }

/* ---------- IA ---------- */
.two { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.ai h2 { max-width: 16ch; }
.pillars { display: grid; gap: 20px; margin-top: 40px; }
.pillar { padding-left: 20px; border-left: 2px solid var(--line); transition: border-color .25s; }
.pillar:hover { border-color: var(--amber); }
.pillar h3 { font-size: 20px; margin-bottom: 4px; }
.pillar p { color: var(--muted); font-size: 16px; }
.agent { position: sticky; top: 96px; background: #05070a; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.agent-bar, .term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); font-size: 12px; color: var(--muted); }
.agent-bar i, .term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #2a3541; }
.agent-bar span, .term-bar span { margin-left: 8px; }
.trace { list-style: none; margin: 0; padding: 22px; display: grid; gap: 14px; font-size: 13.5px; min-height: 340px; align-content: start; }
.trace li { opacity: 0; transform: translateX(-8px); transition: all .5s; display: grid; grid-template-columns: 84px 1fr; gap: 10px; }
.trace li.on { opacity: 1; transform: none; }
.trace .k { font-weight: 700; }
.trace .observe .k { color: var(--blue); } .trace .plan .k { color: var(--amber); } .trace .act .k { color: var(--accent); } .trace .verify .k { color: #ff8fb1; }
.trace .v { color: #c3ced8; word-break: break-word; }
.agent-note { padding: 14px 22px 18px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* ---------- stack / certs / terminal ---------- */
.stack-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 56px); margin-top: 50px; align-items: start; }
.stack { display: grid; gap: 22px; }
.stack .g h3 { font: 600 13px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 10px; }
.stack .chips { margin-top: 0; }
.stack .chips li { transition: all .2s; cursor: default; }
.stack .chips li:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.certs { display: grid; gap: 12px; }
.cert { display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding: 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); }
.cert .seal { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); font: 700 18px var(--mono); }
.cert h4 { margin: 0; font: 600 17px var(--display); }
.cert small { display: block; color: var(--accent); font: 400 12.5px var(--mono); margin: 2px 0 6px; }
.cert p { font-size: 14.5px; color: var(--muted); line-height: 1.5; }
.cert.is-example { border-style: dashed; opacity: .8; }

.term { background: #05070a; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; position: sticky; top: 96px; }
.term-body { height: 380px; overflow-y: auto; padding: 18px; font-size: 13.5px; line-height: 1.6; color: #c3ced8; white-space: pre-wrap; word-break: break-word; }
.term-body .cmd { color: var(--accent); }
.term-body .err { color: #ff8fb1; }
.term-body .hl { color: var(--amber); }
.term-body .dim { color: var(--muted); }
.term-body button { all: unset; cursor: pointer; color: var(--blue); text-decoration: underline dotted; }
.term-in { display: flex; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--accent); }
.term-in input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font: inherit; min-width: 0; }

/* ---------- contact ---------- */
.tabs { display: inline-flex; margin-top: 40px; padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.tab { border: 0; background: none; color: var(--muted); padding: 10px 22px; border-radius: 999px; font: 500 15px var(--body); cursor: pointer; transition: all .2s; }
.tab[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }
.panel { margin-top: 26px; padding: clamp(22px, 4vw, 44px); border-radius: 22px; border: 1px solid var(--line); background: var(--surface); }
.panel[hidden] { display: none; }
.book { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(28px, 4vw, 56px); }
.book .mini:first-child, .form .mini:first-child { margin-top: 0; }
.tz { text-transform: none; letter-spacing: 0; margin-left: 6px; color: var(--amber); font-weight: 400; }
.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; scroll-snap-type: x proximity; }
.day {
  flex: 0 0 auto; width: 88px; padding: 12px 6px; text-align: center; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); cursor: pointer; font: 500 13px var(--body); scroll-snap-align: start; transition: all .15s;
}
.day small { display: block; color: var(--muted); font: 400 11px var(--mono); text-transform: uppercase; }
.day strong { display: block; font: 700 24px var(--display); margin: 2px 0; }
.day em { font: normal 400 11px var(--mono); color: var(--accent); }
.day:hover { border-color: var(--accent); }
.day[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.day[aria-selected="true"] small, .day[aria-selected="true"] em { color: var(--accent-ink); }
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.time { padding: 11px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); font: 500 15px var(--mono); cursor: pointer; transition: all .15s; }
.time:hover { border-color: var(--accent); }
.time[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.form { display: grid; gap: 14px; align-content: start; }
.form.wide { max-width: 720px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.form .opt { opacity: .7; }
.form input, .form textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg);
  color: var(--text); font: 400 16px var(--body); transition: border-color .2s;
}
.form input:focus, .form textarea:focus { outline: 0; border-color: var(--accent); }
.form textarea { resize: vertical; }
.hp { position: absolute !important; left: -9999px; opacity: 0; height: 0; padding: 0 !important; border: 0 !important; }
.chosen { font-size: 13.5px; color: var(--amber); padding: 10px 14px; border: 1px dashed var(--line); border-radius: 10px; }
.chosen.ok { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.form-msg { min-height: 24px; font-size: 15px; }
.form-msg.err { color: #ff8fb1; } .form-msg.ok { color: var(--accent); }
.success { display: grid; gap: 12px; padding: 12px 0; }
.success h3 { font-size: 30px; color: var(--accent); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: 13px; }
.foot-in { display: flex; flex-wrap: wrap; gap: 14px 30px; justify-content: space-between; }
.foot a { text-decoration: none; margin-left: 18px; } .foot a:hover { color: var(--accent); }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .two, .stack-grid, .book { grid-template-columns: 1fr; }
  .agent, .term { position: static; }
  .pipe-panel { grid-template-columns: 1fr; gap: 28px; }
  .pipe-nodes { grid-template-columns: repeat(7, 84px); overflow-x: auto; padding-bottom: 10px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
  .pipe-nodes::before { right: auto; width: 560px; }
  .gates { display: none; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .hero::after { background: linear-gradient(0deg, var(--bg) 8%, color-mix(in srgb, var(--bg) 62%, transparent) 70%, color-mix(in srgb, var(--bg) 82%, transparent)); }
  .form .row { grid-template-columns: 1fr; }
  .tabs { display: flex; } .tab { flex: 1; padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .trace li { opacity: 1; transform: none; }
}

/* ---------- sélecteur de langue ---------- */
.nav nav a.lang { font-size: 13px; padding: 4px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); transition: border-color .2s, color .2s; }
.nav nav a.lang:hover { border-color: var(--accent); color: var(--accent); }
.langbar {
  position: fixed; z-index: 70; left: 20px; bottom: 20px; max-width: calc(100% - 40px);
  display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 18px; font-size: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 14px 40px -12px #000;
}
.langbar button { background: none; border: 0; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 6px; }
.langbar button:hover { color: var(--text); }
@media (max-width: 720px) {
  .nav nav a:not(.btn):not(.lang) { display: none; }
  .nav nav { gap: 12px; }
  .langbar { left: 12px; right: 12px; bottom: 12px; border-radius: 16px; flex-wrap: wrap; }
}

/* ---------- bandeau clients défilant ---------- */
.clients { padding: 34px 0 38px; border-block: 1px solid var(--line); background: var(--bg-alt); overflow: hidden; }
.clients-label { text-align: center; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 22px; }
.marquee { -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.track { display: flex; width: max-content; margin: 0; padding: 0; list-style: none; animation: marquee 60s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.client { flex: none; display: flex; align-items: center; height: 40px; padding: 0 clamp(28px, 4vw, 56px); color: #6d7a88; transition: color .25s; }
.client:hover { color: var(--text); }
.client::after { content: ''; width: 5px; height: 5px; margin-left: clamp(28px, 4vw, 56px); border-radius: 50%; background: var(--line); }
.client .wordmark { font: 700 clamp(18px, 2vw, 24px) var(--display); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.client img { height: 28px; width: auto; max-width: 150px; object-fit: contain; filter: grayscale(1) brightness(0) invert(.55); opacity: .9; transition: filter .25s; }
.client:hover img { filter: grayscale(1) brightness(0) invert(1); }
@media (prefers-reduced-motion: reduce) {
  .track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; row-gap: 8px; }
  .track .dup { display: none; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
}
