:root {
  --bg: #050b1a;
  --surface: #0a1530;
  --raised: #0f1d42;
  --line: #1b2d5c;
  --text: #e6ecfa;
  --muted: #8fa1c7;
  --accent: #4c8dff;
  --accent-soft: #8bc4ff;
  --ok: #5be0b0;
  --on-accent: #04101f;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --font-chat: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1120px;
  --gutter: 20px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Fond numérique discret : lueur bleue + grille très légère */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at 85% -5%, rgba(76, 141, 255, 0.22), transparent 70%),
    linear-gradient(rgba(139, 196, 255, 0.045) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, rgba(139, 196, 255, 0.045) 1px, transparent 1px) 0 0 / 56px 56px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 90%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 35%, transparent 90%);
}

img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; line-height: 1.08; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }
a { color: inherit; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--on-accent);
  padding: 10px 16px; border-radius: 8px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 3px; border-radius: 6px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px;
  background: var(--accent); color: var(--on-accent);
  font: 600 1rem/1 var(--font-body);
  border: 1px solid var(--accent); border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn:hover { background: var(--accent-soft); border-color: var(--accent-soft); }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 0.95rem; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { background: var(--raised); border-color: var(--accent); }

.link { color: var(--accent-soft); text-underline-offset: 4px; font-weight: 500; cursor: pointer; }
.link:hover { color: var(--text); }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 11, 26, 0.78);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: 30px; margin-left: auto; margin-right: 8px; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 0.97rem; transition: color 0.18s ease; }
.nav-links a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; overflow: clip; }
/* Fond de questions : reste en place pendant tout le défilement du hero */
.bgfield { position: sticky; top: 0; height: 100vh; margin-bottom: -100vh; z-index: 0; pointer-events: none; overflow: hidden; }
.bgfield canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.bgfield .veil { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(5, 11, 26, 0.6) 0%, rgba(5, 11, 26, 0.45) 55%, rgba(5, 11, 26, 0) 100%); }
/* La grille est haute : le chat et le texte restent collés à l'écran pendant que la conversation se déroule */
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr; grid-template-rows: auto 1fr; gap: 0; min-height: 380vh; }
.stick { position: sticky; top: 76px; }
.hero-copy .stick { position: static; padding: 36px 0 28px; }
.hero-demo .stick { padding-top: 8px; }
.hint { margin: 10px 0 0; text-align: center; font-size: 0.88rem; color: var(--accent-soft); transition: opacity 0.4s ease; animation: nudge 1.8s ease-in-out infinite; }
.hint.gone { opacity: 0; animation: none; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
.hero h1 { font-size: clamp(2.3rem, 6.4vw, 4.1rem); font-weight: 700; text-wrap: balance; }
.lead { margin-top: 24px; font-size: 1.15rem; color: var(--muted); max-width: 34em; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 28px; }
.engines { margin: 24px 0 0; font-size: 0.92rem; color: var(--muted); }

.caption { margin: 14px 0 0; font-size: 0.85rem; color: var(--muted); }

/* ---------- Démo de chat (le moment fort de la page) ---------- */
.chat {
  background: #0b1224;
  border: 1px solid var(--line);
  border-radius: 20px;
  font-family: var(--font-chat);
  font-size: 0.95rem;
  line-height: 1.5;
  color: #eceff7;
  box-shadow: 0 0 0 1px rgba(76, 141, 255, 0.12), 0 30px 80px -20px rgba(76, 141, 255, 0.35);
  overflow: hidden;
}
.chat-bar { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid #1a2442; }
.chat-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.chat-title { font-weight: 600; }
.replay { margin-left: auto; background: none; border: 1px solid #25325a; color: #aab6d6; border-radius: 999px; padding: 4px 12px; font: 500 0.8rem var(--font-chat); cursor: pointer; transition: color .18s, border-color .18s; }
.replay:hover { color: #fff; border-color: var(--accent); }

.thread { height: clamp(300px, 46vh, 390px); overflow-y: auto; scroll-behavior: smooth; scrollbar-width: none; padding: 20px 18px 8px; display: flex; flex-direction: column; gap: 16px; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16px); mask-image: linear-gradient(to bottom, transparent 0, #000 16px); }
.thread::-webkit-scrollbar { display: none; }
.msg[hidden], .thinking[hidden] { display: none; }
.msg-user { display: flex; justify-content: flex-end; }
.msg-user .bubble { background: #1b2a52; padding: 10px 16px; border-radius: 18px 18px 4px 18px; max-width: 85%; }
.msg-ai { display: flex; gap: 12px; align-items: flex-start; }
.avatar { flex: none; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: #0b1224; display: grid; place-items: center; margin-top: 2px; }
.msg-ai .bubble { flex: 1; min-width: 0; }

.thinking { display: flex; gap: 5px; padding: 6px 2px 6px 40px; }
.thinking i { width: 7px; height: 7px; border-radius: 50%; background: #7f8db3; animation: blink 1.1s infinite ease-in-out; }
.thinking i:nth-child(2) { animation-delay: 0.15s; }
.thinking i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.intro { margin: 0 0 12px; min-height: 1.5em; }
.msg-ai .intro:last-child { margin-bottom: 0; }
.picks { list-style: none; counter-reset: pick; margin: 0; padding: 0; display: grid; gap: 10px; }
.pick {
  counter-increment: pick;
  position: relative;
  padding: 10px 14px 10px 42px;
  border: 1px solid #1d2a4f;
  border-radius: 12px;
  display: none;
  transition: border-color 0.4s ease, background 0.4s ease;
}
.pick::before {
  content: counter(pick);
  position: absolute; left: 12px; top: 10px;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.78rem; font-weight: 600; background: #1b2a52; color: #c5d0ee;
}
.pick.show { display: block; animation: rise 0.4s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pick-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pick p { margin: 2px 0 0; color: #aab6d6; font-size: 0.9rem; }
.tag { font-size: 0.78rem; color: #8fa1c7; }
.pick-top.show.lit { border-color: var(--ok); background: rgba(91, 224, 176, 0.07); }
.pick-top.lit::before { background: var(--ok); color: #04201a; }

.sources { display: none; margin: 12px 0 0; font-size: 0.82rem; color: #7f8db3; }
.sources.show { display: block; animation: rise 0.4s ease; }
.chip-cta { display: none; margin-top: 10px; padding: 8px 16px; border-radius: 999px; background: #fff; color: #0b1224; font-weight: 600; font-size: 0.88rem; }
.chip-cta.show { display: inline-block; animation: rise 0.4s ease; }

.composer { display: flex; align-items: center; gap: 12px; margin: 8px 14px 14px; padding: 10px 10px 10px 18px; border: 1px solid #25325a; border-radius: 999px; background: #0e1730; }
.field { flex: 1; min-width: 0; position: relative; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph { color: #667399; }
.field.has-text .ph { display: none; }
.caret { display: inline-block; width: 1.5px; height: 1.1em; background: #eceff7; vertical-align: text-bottom; margin-left: 1px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.send { flex: none; width: 34px; height: 34px; border-radius: 50%; background: #2a3760; color: #7f8db3; display: grid; place-items: center; transition: background .2s, color .2s; }
.send.ready { background: #fff; color: #0b1224; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section h2 { font-size: clamp(1.9rem, 4.4vw, 3rem); font-weight: 700; text-wrap: balance; }
.section p { color: var(--muted); }
.section-head { max-width: 40em; margin-bottom: 44px; }
.section-head p { margin-top: 14px; }

.split { display: grid; grid-template-columns: 1fr; gap: 44px; align-items: start; }
.split-copy p { margin-top: 18px; max-width: 32em; }
.split-copy h2 + p { margin-top: 22px; }

/* Comparaison avant / après */
.compare { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.tabs { display: inline-flex; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 20px; }
.tab { min-height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 500 0.95rem var(--font-body); cursor: pointer; transition: background .2s, color .2s; }
.tab[aria-selected="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.tab:not([aria-selected="true"]):hover { color: var(--text); }
.panel[hidden] { display: none; }
.q { color: var(--text) !important; font-weight: 500; margin-bottom: 14px; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 10px; }
.row span { font-weight: 500; }
.row em { font-style: normal; font-size: 0.88rem; color: var(--muted); text-align: right; }
.row.ghost { border-style: dashed; border-color: #5a3b4a; }
.row.ghost span { color: var(--muted); }
.row.ghost em { color: #ff9aa8; }
.row.win { border-color: var(--ok); background: rgba(91, 224, 176, 0.07); }
.row.win em { color: var(--ok); }
.panel { animation: panelIn .35s ease; }
@keyframes panelIn { from { opacity: 0; } to { opacity: 1; } }

/* Méthode */
.method { display: grid; grid-template-columns: 1fr; gap: 44px; }
.method-head p { margin-top: 18px; max-width: 28em; }
.steps { --p: 0; list-style: none; margin: 0; padding: 0 0 0 36px; position: relative; display: grid; gap: 56px; }
.steps::before, .steps::after { content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--line); border-radius: 2px; }
.steps::after { background: var(--accent); transform-origin: top; transform: scaleY(var(--p)); box-shadow: 0 0 12px var(--accent); }
.step { position: relative; opacity: 0.45; transition: opacity 0.4s ease; }
.step.on { opacity: 1; }
.node { position: absolute; left: -36px; top: 6px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line); z-index: 1; transition: border-color .3s, background .3s, box-shadow .3s; }
.step.on .node { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.step h3 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; margin-bottom: 10px; }
.step p { max-width: 34em; margin: 0; }

/* Offres */
.plans { display: grid; grid-template-columns: 1fr; gap: 16px; }
.plan { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.plan h3 { font-size: 1.4rem; font-weight: 600; }
.price { margin: 16px 0 6px !important; display: flex; align-items: baseline; gap: 10px; color: var(--text) !important; }
.price strong { font-family: var(--font-display); font-size: 2.3rem; font-weight: 700; letter-spacing: -0.02em; }
.price span { color: var(--muted); font-size: 0.95rem; }
.plan-for { margin: 10px 0 0; }
.plan ul { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 10px; flex: 1; }
.plan h4 { margin: 24px 0 12px; font: 600 0.95rem/1.3 var(--font-body); color: var(--accent-soft); }
.plan .engines-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; flex: none; }
.plan .engines-list li { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: 0.85rem; }
.plan .engines-list li::before { display: none; }
.plan .feat { margin-top: 0; }
.plan li { position: relative; padding-left: 26px; color: var(--text); font-size: 0.98rem; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 0.5em; width: 10px; height: 6px; border-left: 2px solid var(--accent-soft); border-bottom: 2px solid var(--accent-soft); transform: rotate(-45deg); }
.plan-main { background: var(--raised); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 24px 60px -24px rgba(76, 141, 255, 0.5); }

/* Audit */
.audit-grid { display: grid; grid-template-columns: 1fr; gap: 40px; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 32px 24px; }
.audit-grid p { margin-top: 18px; max-width: 28em; }
.form { display: grid; gap: 6px; align-content: start; }
.form label { font-size: 0.92rem; font-weight: 500; margin-top: 10px; }
.form input { width: 100%; min-height: 48px; padding: 0 16px; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 10px; font: inherit; transition: border-color .18s; }
.form input:hover { border-color: #2c4585; }
.form input:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 1px; border-color: var(--accent); }
.form input[aria-invalid="true"] { border-color: #ff9aa8; }
.form .btn { margin-top: 20px; width: 100%; }
.form-msg { min-height: 1.5em; margin: 8px 0 0 !important; font-size: 0.92rem; }
.form-msg.err { color: #ff9aa8 !important; }
.form-msg.ok { color: var(--ok) !important; }

/* Pied de page */
.footer { border-top: 1px solid var(--line); padding: 40px 0 48px; }
.foot-in { display: grid; gap: 22px; color: var(--muted); font-size: 0.93rem; }
.foot-brand { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 28px; }
.foot-brand p { margin: 0; max-width: none; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.foot-in a { text-decoration: none; }
.foot-in a:hover { color: var(--text); }
.logo.small { color: var(--text); font-size: 1.2rem; }

/* ---------- Écrans larges ---------- */
@media (min-width: 720px) {
  :root { --gutter: 32px; }
  .plans { grid-template-columns: repeat(3, 1fr); align-items: stretch; }
  .audit-grid { padding: 48px; }
}

@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.02fr 0.98fr; grid-template-rows: 1fr; column-gap: 64px; min-height: 420vh; }
  .stick { min-height: calc(100vh - 76px); display: flex; flex-direction: column; justify-content: center; }
  .hero-copy .stick { position: sticky; padding: 0; }
  .hero h1 { font-size: clamp(2.6rem, 3.9vw, 3.5rem); }
  .bgfield .veil { background: radial-gradient(ellipse 48% 60% at 26% 50%, rgba(5, 11, 26, 0.55), rgba(5, 11, 26, 0) 100%); }
  .split { grid-template-columns: 0.9fr 1.1fr; gap: 72px; }
  .method { grid-template-columns: 0.8fr 1.2fr; gap: 72px; }
  .method-head { position: sticky; top: 120px; align-self: start; }
  .audit-grid { grid-template-columns: 1fr 1fr; gap: 64px; }
  .section { padding: 112px 0; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-in { justify-content: space-between; }
  .thread { height: clamp(320px, 50vh, 440px); }
  .lead { margin-top: 18px; font-size: 1.05rem; }
  .cta-row { margin-top: 24px; }
  .engines { margin-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .hint { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- Surlignage, urgence ---------- */
.mark {
  --h: 1;
  background: linear-gradient(rgba(139, 196, 255, 0.4), rgba(139, 196, 255, 0.4)) no-repeat 0 88% / calc(var(--h) * 100%) 78%;
  padding: 0 0.14em; margin: 0 -0.14em;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  color: var(--text);
}
.section .big { font-size: clamp(2.6rem, 9.5vw, 6.5rem); line-height: 1; font-weight: 700; letter-spacing: -0.035em; text-wrap: balance; max-width: 13em; }
.change-cols { display: grid; gap: 22px; margin-top: 40px; }
.change-cols p { margin: 0; max-width: 32em; }
.urgent { border-block: 1px solid var(--line); background: linear-gradient(to bottom, rgba(10, 21, 48, 0.55), rgba(10, 21, 48, 0)); }
.urgent-cols { display: grid; gap: 32px; margin-top: 48px; }
.urgent-lead { margin: 0; font-family: var(--font-display); font-size: clamp(1.4rem, 2.8vw, 2rem); line-height: 1.22; letter-spacing: -0.01em; color: var(--text) !important; }
.urgent-text p { max-width: 34em; }
.urgent-text .btn { margin-top: 10px; }
@media (min-width: 960px) {
  .change-cols { grid-template-columns: 1fr 1fr; gap: 64px; }
  .urgent-cols { grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
}

/* ---------- Pages légales ---------- */
.legal { max-width: 760px; padding-block: 64px 88px; }
.legal h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; margin-bottom: 8px; }
.legal h2 { font-size: 1.3rem; font-weight: 600; margin: 40px 0 10px; }
.legal p, .legal li { color: var(--muted); }
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--text); font-weight: 600; }
.legal a { color: var(--accent-soft); text-underline-offset: 3px; }
.legal .updated { font-size: 0.92rem; margin-bottom: 32px; }
.fineprint { margin: 10px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: 0.76rem; line-height: 1.5; max-width: none; color: #6f82ab; }
.form-note { margin: 12px 0 0 !important; font-size: 0.85rem; }
.form-note a { color: var(--accent-soft); }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form .btn:disabled { opacity: 0.6; cursor: wait; }
