:root {
  --bg: #ffffff;
  --surface: #f5f5fa;
  --surface-2: #e8edf6;
  --text: #1b1b2f;
  --muted: #5f5f78;
  --line: #e4e4ee;
  --primary: #1d4ed8;
  --primary-2: #0ea5e9;
  --on-primary: #ffffff;
  --coral: #ff6b4a;
  --ok: #14683a;
  --ok-bg: #ddf5e7;
  --danger: #c32b45;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12121d;
    --surface: #1b1b2b;
    --surface-2: #24243a;
    --text: #f1f1f8;
    --muted: #a8a8bf;
    --line: #2a2a40;
    --primary: #60a5fa;
    --primary-2: #38bdf8;
    --on-primary: #0b1530;
    --ok: #8fe0b0;
    --ok-bg: #163b27;
    --danger: #ff8199;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: var(--primary); }
.todo { color: var(--danger); }

/* En-tête */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 20px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; color: var(--text); text-decoration: none; letter-spacing: -.3px; }
.logo b { color: var(--primary); }
.mark { width: 30px; height: 30px; border-radius: 9px; background: var(--primary); color: var(--on-primary); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.top nav { display: flex; align-items: center; gap: 18px; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.top nav a.btn { color: var(--on-primary); }
@media (max-width: 640px) { .top nav a:not(.btn):not(#espace-link) { display: none; } .top nav { gap: 12px; } }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 14px 22px;
  font: inherit; font-weight: 700; background: var(--primary); color: var(--on-primary); text-decoration: none; cursor: pointer; }
.btn.small { padding: 9px 16px; border-radius: 11px; font-size: 14px; }
.btn.ghost { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.btn:disabled { opacity: .6; cursor: default; }

/* Accueil avec 3D */
.hero { position: relative; overflow: hidden; color: #fff; padding: 72px 20px 84px;
  background: radial-gradient(circle at 70% 35%, #2563eb 0%, #1e3a8a 60%, #0b1a3f 100%); }
#hero-3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-text { position: relative; max-width: 620px; margin: 0 auto 0 max(0px, calc((100vw - 1100px) / 2)); }
.eyebrow { font-weight: 700; font-size: 13px; letter-spacing: .4px; opacity: .85; margin-bottom: 14px; }
.hero h1 { font-size: clamp(30px, 5.2vw, 52px); line-height: 1.08; letter-spacing: -1.4px; font-weight: 800; }
.lead { margin-top: 18px; font-size: 18px; opacity: .92; max-width: 540px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero .btn:not(.ghost) { background: #fff; color: #1e3a8a; }
.note { margin-top: 22px; font-size: 14px; opacity: .85; display: flex; gap: 8px; align-items: flex-start; }
@media (max-width: 760px) {
  /* Sur téléphone, la 3D passe sous le texte au lieu de passer derrière */
  .hero { padding: 40px 20px 8px; display: flex; flex-direction: column-reverse; }
  .hero-text { margin: 0 auto; }
  #hero-3d { position: relative; inset: auto; height: 300px; margin-top: 12px; }
}

/* Blocs */
.block { max-width: 1100px; margin: 0 auto; padding: 64px 20px; }
.block.alt { max-width: none; background: var(--surface); }
.block.alt > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.block h2 { font-size: clamp(24px, 3.6vw, 34px); letter-spacing: -.8px; font-weight: 800; }
.sub { margin-top: 8px; color: var(--muted); }
.steps, .grid, .offer-demo { display: grid; gap: 16px; margin-top: 28px; }
.steps { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.offer-demo { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.steps article, .grid article, .offer { border: 1px solid var(--line); border-radius: 20px; padding: 22px; background: var(--bg); }
.block.alt .grid article { background: var(--bg); }
.n { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; background: var(--primary); color: var(--on-primary); align-items: center; justify-content: center; font-weight: 800; margin-bottom: 12px; }
.steps h3, .grid h3, .offer h3 { font-size: 18px; letter-spacing: -.3px; margin-bottom: 6px; }
.steps p, .grid p, .offer p { color: var(--muted); font-size: 15px; }
.grid i { font-size: 30px; color: var(--primary); display: block; margin-bottom: 10px; }
.tag { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); color: var(--primary); font-weight: 700; font-size: 13px; padding: 4px 10px; border-radius: 8px; margin-bottom: 12px; }

/* Vidéo */
.video-block { padding-top: 40px; padding-bottom: 8px; }
.video { aspect-ratio: 16 / 9; border-radius: 24px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; }
.video iframe, .video video { width: 100%; height: 100%; border: 0; display: block; }
.video-empty { text-align: center; color: var(--muted); }
.video-empty i { font-size: 52px; color: var(--primary); display: block; margin-bottom: 6px; }

/* Formulaire */
.form-block { max-width: 720px; }
.form-card { border: 1px solid var(--line); border-radius: 26px; padding: 28px; background: var(--surface); }
form { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
input, select, textarea { font: inherit; font-weight: 400; color: var(--text); background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); }
.more { border: 1px dashed var(--line); border-radius: 16px; padding: 4px 16px 16px; }
.more > summary { padding: 12px 0; font-size: 15px; }
.more > .hint, .more fieldset .hint { color: var(--muted); font-size: 13px; font-weight: 400; margin: 0 0 8px; }
.more > label, .more > .row, .more > fieldset { margin-top: 14px; }
fieldset { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 14px; min-width: 0; }
legend { font-weight: 700; font-size: 14px; padding: 0 6px; }
.days { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 12px; }
.day { flex-direction: row; gap: 0; }
.day input { position: absolute; opacity: 0; width: 0; height: 0; }
.day span { padding: 8px 12px; border: 1.5px solid var(--line); border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; background: var(--bg); }
.day input:checked + span { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.row.three { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.offer-row { grid-template-columns: 2fr 1fr; margin-top: 8px; }
.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--muted); }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.err { color: var(--danger); font-weight: 600; font-size: 14px; min-height: 0; }
.err:empty { display: none; }
.done { text-align: center; padding: 24px 8px; }
.done i { font-size: 56px; color: var(--ok); }
.done h3 { font-size: 22px; margin: 6px 0; }

/* Questions et légal */
details { border-bottom: 1px solid var(--line); padding: 16px 0; }
summary { cursor: pointer; font-weight: 700; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--primary); font-size: 22px; line-height: 1; }
details[open] summary::after { content: '–'; }
details p { margin-top: 10px; color: var(--muted); }
.contact { text-align: center; padding-top: 24px; }
.next { text-align: left; max-width: 420px; margin: 14px auto 0; color: var(--muted); padding-left: 22px; }
.next li { margin-top: 6px; }
/* Pages légales */
.doc { max-width: 760px; margin: 0 auto; padding: 40px 20px 64px; }
.doc h1 { font-size: 32px; letter-spacing: -.8px; font-weight: 800; }
.doc h2 { font-size: 19px; margin-top: 30px; letter-spacing: -.2px; }
.doc p, .doc li { color: var(--muted); margin-top: 10px; }
.doc ul { padding-left: 22px; margin: 0; }
.doc .meta { margin-top: 12px; font-size: 14px; }
.doc b { color: var(--text); }
.foot { border-top: 1px solid var(--line); padding: 24px 20px; display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; color: var(--muted); font-size: 14px; }
.foot a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
