/* Clinip — site vitrine. Jetons repris de react/src/styles/tokens.css ; composition décrite dans design/. */
@font-face { font-family: "Manrope"; src: url("fonts/manrope-latin-wght-normal.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("fonts/dm-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }

:root {
  --background: #f7f9fc; --foreground: #17213a; --card: #ffffff;
  --primary: #1119c5; --primary-hover: #0a108f; --primary-foreground: #ffffff;
  --accent: #eef0ff; --accent-foreground: #0a108f;
  --muted: #eff2f6; --muted-foreground: #667085; --border: #dce2ec;
  --success: #16845b; --success-soft: #e8f5ee;
  --info: #0f6470; --info-soft: #e8f5f7; --info-border: #c9e4e8;
  --warning-foreground: #8a3f08; --warning-soft: #fff1e4;
  --surface-subtle: #fbfcfe; --surface-track: #f1f3f6; --text-subtle: #475467;
  --selection-border: #d9dcff; --focus-soft: rgba(17, 25, 197, 0.24); --primary-halo: rgba(17, 25, 197, 0.08);
  --shadow: 0 24px 80px rgba(23, 33, 58, 0.12);
  --radius: 8px; --radius-control: 6px; --max: 1160px; --header: 72px;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-head: "Manrope", "DM Sans", system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 72px); }
body { margin: 0; color: var(--foreground); background: var(--background); font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.65; text-rendering: optimizeLegibility; overflow-x: clip; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.7rem); font-weight: 800; line-height: 1.06; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.35rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--selection-border); }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--primary); color: var(--primary-foreground); padding: 0.7rem 1rem; border-radius: var(--radius); font-weight: 700; }
.skip:focus { top: 1rem; color: var(--primary-foreground); }
.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Barre de lecture : segments de chapitres (rail du haut) */
.reading { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; background: transparent; pointer-events: none; }
.reading i { display: block; height: 100%; background: var(--primary); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
@supports (animation-timeline: scroll()) {
  .reading i { transform: scaleX(0); animation: lecture linear both; animation-timeline: scroll(root block); }
  @keyframes lecture { to { transform: scaleX(1); } }
}

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.bar { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header); }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--foreground); font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; letter-spacing: -0.03em; }
.brand img { width: 30px; height: auto; }
.brand:hover { color: var(--foreground); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 0.25rem; }
.nav a { color: var(--foreground); text-decoration: none; padding: 0.55rem 0.8rem; border-radius: var(--radius); font-weight: 600; font-size: 0.97rem; }
.nav a:hover { background: var(--muted); color: var(--foreground); }
.nav a[aria-current="page"] { color: var(--accent-foreground); background: var(--accent); }
.nav a.btn { margin-left: 0.5rem; color: var(--primary-foreground); background: var(--primary); padding: 0.6rem 1.1rem; }
.nav a.btn:hover { background: var(--primary-hover); color: var(--primary-foreground); }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--border); border-radius: var(--radius); padding: 0.55rem 0.8rem; font: inherit; font-weight: 700; color: var(--foreground); cursor: pointer; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.85rem 1.4rem; border-radius: var(--radius); font-weight: 700; text-decoration: none; border: 1.5px solid var(--primary); background: var(--primary); color: var(--primary-foreground); font-family: var(--font-body); font-size: 1rem; cursor: pointer; transition: background 0.15s, transform 0.15s; }
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-foreground); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--primary); }
.btn.ghost:hover { background: var(--accent); color: var(--accent-foreground); }
.btn svg { width: 18px; height: 18px; }
.actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.6rem; }

/* Sections, kicker « CLINIP / 01 », filet-titre */
section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.alt { background: var(--card); border-block: 1px solid var(--border); }
.eyebrow { display: inline-flex; align-items: center; gap: 0.7rem; font-family: var(--font-head); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent-foreground); margin-bottom: 1rem; }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--primary); border-radius: 2px; }
.lede { font-size: 1.2rem; color: var(--text-subtle); max-width: 60ch; }
.head { max-width: 760px; margin-bottom: 2.5rem; }
em.acc { font-style: normal; color: var(--primary); }

/* Fond de papier quadrillé (filet bleu très pâle) */
.paper { position: relative; isolation: isolate; }
.paper::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(17,25,197,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(17,25,197,.055) 1px, transparent 1px);
  background-size: 34px 34px; -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent); }

.hero { padding-top: clamp(2.5rem, 6vw, 5rem); padding-bottom: clamp(3rem, 6vw, 5rem); background: radial-gradient(900px 420px at 85% -10%, var(--accent), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.02fr; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
.hero-grid > * { min-width: 0; }
.page-head { padding: clamp(2.5rem, 6vw, 4.5rem) 0 1.2rem; background: radial-gradient(800px 320px at 90% -20%, var(--accent), transparent 70%); }
.page-head + section { padding-top: 2rem; }
.page-head h1 { max-width: 20ch; }
.page-head .lede { margin-bottom: 0; }

/* Pastilles d'état — comme dans l'app */
.badge { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font-head); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.22rem 0.6rem; border-radius: var(--radius-control); background: var(--info-soft); color: var(--info); border: 1px solid var(--info-border); white-space: nowrap; }
.badge.b-accent { background: var(--accent); color: var(--accent-foreground); border-color: var(--selection-border); }
.badge.b-ok { background: var(--success-soft); color: #0f6a49; border-color: #c4e6d4; }
.badge.b-warn { background: var(--warning-soft); color: var(--warning-foreground); border-color: #f4d6b8; }

/* Cartes */
.grid { display: grid; gap: 1.25rem; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.7rem; position: relative; transition: border-color 0.2s, background 0.2s; }
.card:hover { border-color: var(--selection-border); }
.alt .card { background: var(--background); }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--text-subtle); }
.card .badge { position: absolute; top: 1.3rem; right: 1.3rem; }
.icon { width: 48px; height: 48px; border-radius: 10px; background: var(--accent); color: var(--primary); display: grid; place-items: center; margin-bottom: 1.1rem; }
.icon svg { width: 24px; height: 24px; }

/* Maquette de l'écran de pilotage (HTML/CSS, données fictives) */
.mock { background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; font-size: 0.8rem; line-height: 1.4; }
.mock-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); background: var(--card); }
.mock-top .m-brand { display: inline-flex; align-items: center; gap: 0.4rem; font-family: var(--font-head); font-weight: 800; font-size: 1rem; color: var(--primary); letter-spacing: -0.03em; }
.mock-top .m-brand img { width: 18px; height: auto; }
.mock-top .m-search { flex: 1; max-width: 220px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface-subtle); padding: 0.28rem 0.6rem; color: var(--muted-foreground); }
.mock-top .m-user { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-foreground); display: grid; place-items: center; font-weight: 800; font-size: 0.65rem; }
.mock-body { display: grid; grid-template-columns: 0.78fr 1.5fr; }
.mock-list { border-right: 1px solid var(--border); background: var(--surface-subtle); }
.k { font-family: var(--font-head); font-size: 0.64rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-foreground); }
.mock-list .k { display: block; padding: 0.8rem 0.9rem 0.5rem; }
.m-row { padding: 0.6rem 0.9rem 0.7rem; border-left: 3px solid transparent; border-top: 1px solid var(--border); }
.m-row b { display: block; font-family: var(--font-head); font-size: 0.78rem; }
.m-row small { display: block; color: var(--text-subtle); font-size: 0.68rem; }
.m-row .bar-t { height: 4px; border-radius: 4px; background: var(--surface-track); margin-top: 0.45rem; overflow: hidden; }
.m-row .bar-t i { display: block; height: 100%; background: var(--primary); border-radius: 4px; width: var(--w, 30%); transition: width 0.8s var(--ease); }
.m-row.sel { background: var(--accent); border-left-color: var(--primary); }
.mock-main { padding: 1rem 1.1rem 1.1rem; min-width: 0; }
.m-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.m-title b { font-family: var(--font-head); font-size: 1.05rem; letter-spacing: -0.02em; }
.m-sub { color: var(--text-subtle); margin: 0.15rem 0 0.7rem; }
.m-meta { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem 1rem; padding: 0.7rem 0; border-block: 1px solid var(--border); }
.m-meta span { display: block; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-subtle); font-family: var(--font-head); }
.m-meta b { font-family: var(--font-head); font-size: 0.74rem; }
.m-steps { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); margin: 0.9rem 0 0.2rem; padding: 0; position: relative; }
.m-steps::before { content: ""; position: absolute; left: 8%; right: 8%; top: 12px; height: 2px; background: var(--border); }
.m-steps::after { content: ""; position: absolute; left: 8%; top: 12px; height: 2px; background: var(--primary); width: calc(84% * var(--prog, 0.6)); transition: width 0.9s var(--ease); }
.m-steps li { position: relative; z-index: 1; text-align: center; font-size: 0.62rem; font-weight: 700; color: var(--text-subtle); }
.m-steps li b { display: grid; place-items: center; width: 24px; height: 24px; margin: 0 auto 0.3rem; border-radius: 50%; background: var(--card); border: 2px solid var(--border); font-size: 0.58rem; font-family: var(--font-head); color: var(--text-subtle); transition: background 0.4s var(--ease), border-color 0.4s var(--ease), color 0.4s var(--ease), box-shadow 0.4s var(--ease); }
.m-steps li.done b { background: var(--primary); border-color: var(--primary); color: #fff; }
.m-steps li.cur b { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 4px var(--primary-halo); background: #fff; }
.m-steps li.cur { color: var(--foreground); }
.m-act { margin-top: 0.8rem; display: grid; grid-template-columns: 1.4fr 1fr; gap: 0.7rem; }
.m-box { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.65rem 0.75rem; background: var(--surface-subtle); }
.m-box b { display: block; font-family: var(--font-head); font-size: 0.82rem; margin: 0.25rem 0; }
.m-box.act { border-left: 3px solid var(--primary); background: var(--accent); }
.m-box .m-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.3rem; }
.m-doc { height: 6px; border-radius: 6px; background: var(--surface-track); overflow: hidden; margin-top: 0.4rem; }
.m-doc i { display: block; height: 100%; width: var(--dw, 100%); background: var(--success); border-radius: 6px; transition: width 0.9s var(--ease); }
.mock-note { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 0.9rem; font-size: 0.88rem; color: var(--text-subtle); }
.pause { font: inherit; font-size: 0.88rem; font-weight: 700; color: var(--primary); background: none; border: 1px solid var(--selection-border); border-radius: var(--radius-control); padding: 0.3rem 0.7rem; cursor: pointer; }
.pause:hover { background: var(--accent); }
.no-js .pause, .pause[hidden] { display: none; }

/* Circuit d'une étude : nœuds, connecteurs en pointillés, signal */
.circuit { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 2.2rem; counter-reset: n; }
.node { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 0.9rem 0.9rem 1rem; transition: border-color 0.4s, background 0.4s; min-width: 0; }
.node::before { counter-increment: n; content: "0" counter(n); font-family: var(--font-head); font-weight: 800; font-size: 0.7rem; letter-spacing: 0.1em; color: var(--accent-foreground); }
.node h3 { font-size: 1.02rem; margin: 0.2rem 0 0.7rem; }
.node .nd { display: flex; flex-direction: column; gap: 0.35rem; min-height: 54px; color: var(--text-subtle); font-size: 0.78rem; line-height: 1.3; }
.node::after { content: ""; position: absolute; left: 100%; top: 2.1rem; width: 2.2rem; border-top: 2px dashed var(--selection-border); }
.node:last-child::after { display: none; }
.node .sig { position: absolute; left: 100%; top: calc(2.1rem - 4px); width: 8px; height: 8px; background: var(--primary); border-radius: 1px; opacity: 0; z-index: 2; }
.node:last-child .sig { display: none; }
.node.go .sig { animation: sigx 0.9s var(--ease) forwards; }
@keyframes sigx { 0% { opacity: 1; transform: translateX(0); } 100% { opacity: 1; transform: translateX(2.2rem); } }
.node.done, .node.on { border-color: var(--selection-border); background: var(--surface-subtle); }
.node.on { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-halo); }
.node.done::after, .node.on::after { border-top-color: var(--primary); }
.chip { display: inline-flex; align-items: center; gap: 0.35rem; }
.chip i { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); background: #fff; transition: background 0.4s, border-color 0.4s; position: relative; }
.node.done .chip i, .node.on .chip i { border-color: var(--success); background: var(--success); }
.node.done .chip i::after, .node.on .chip i::after { content: ""; position: absolute; left: 3px; top: 0; width: 3px; height: 7px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.files { display: flex; gap: 0.3rem; }
.files span { width: 22px; height: 28px; border: 1.5px solid var(--foreground); border-radius: 3px; position: relative; background: #fff; }
.files span::after { content: "PDF"; position: absolute; left: -1.5px; right: -1.5px; bottom: 4px; background: var(--primary); color: #fff; font: 800 0.38rem/1.5 var(--font-head); text-align: center; }
.ln { height: 5px; border-radius: 5px; background: var(--surface-track); }
.node.done .ln, .node.on .ln { background: var(--selection-border); }
.ln.s { width: 62%; }
.sign svg { width: 100%; height: 30px; fill: none; stroke: var(--primary); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.sign path { stroke-dasharray: 140; stroke-dashoffset: 140; transition: stroke-dashoffset 1.1s var(--ease); }
.node.done .sign path, .node.on .sign path { stroke-dashoffset: 0; }
.circuit.static .sign path { stroke-dashoffset: 0; }

/* Compteurs */
.counters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.5rem; }
.counter { border-left: 3px solid var(--primary); padding: 0.2rem 0 0.2rem 1.1rem; }
.counter b { display: block; font-family: var(--font-head); font-weight: 800; font-size: clamp(2.6rem, 5vw, 3.6rem); letter-spacing: -0.04em; line-height: 1; color: var(--primary); font-variant-numeric: tabular-nums; }
.counter span { display: block; margin-top: 0.4rem; font-weight: 700; font-family: var(--font-head); }
.counter small { display: block; color: var(--text-subtle); font-size: 0.92rem; }

/* Parcours : rail de chapitres */
.parcours-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.rail-sticky { position: sticky; top: calc(var(--header) + 2rem); }
.rail { list-style: none; margin: 1.6rem 0 0; padding: 0; position: relative; display: grid; gap: 0.15rem; }
.rail::before { content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; background: var(--border); }
.rail::after { content: ""; position: absolute; left: 17px; top: 18px; width: 2px; height: calc((100% - 36px) * var(--rp, 0)); background: var(--primary); transition: height 0.5s var(--ease); }
.rail li { position: relative; z-index: 1; }
.rail a { display: flex; align-items: center; gap: 0.9rem; padding: 0.45rem 0.4rem; border-radius: var(--radius); text-decoration: none; color: var(--text-subtle); font-weight: 700; font-family: var(--font-head); }
.rail a:hover { color: var(--foreground); }
.rail b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--card); border: 2px solid var(--border); font-size: 0.78rem; color: var(--text-subtle); transition: background 0.35s var(--ease), border-color 0.35s var(--ease), color 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.rail li.done b { background: var(--primary); border-color: var(--primary); color: #fff; }
.rail li.cur b { border-color: var(--primary); color: var(--primary); box-shadow: 0 0 0 5px var(--primary-halo); }
.rail li.cur a { color: var(--foreground); }
.big { font-family: var(--font-head); font-weight: 800; font-size: clamp(5rem, 11vw, 8.5rem); line-height: 0.9; letter-spacing: -0.06em; color: var(--accent); -webkit-text-stroke: 2px var(--selection-border); margin-top: 1.6rem; font-variant-numeric: tabular-nums; }
.steps { display: grid; gap: 1.25rem; }
.step { background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 12px; padding: 1.7rem 1.7rem 1.6rem; min-height: 15rem; display: flex; flex-direction: column; justify-content: center; transition: border-color 0.4s, background 0.4s; }
.step.cur { border-left-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-halo); }
.step .badge { align-self: flex-start; margin-bottom: 0.9rem; }
.step p { color: var(--text-subtle); max-width: 52ch; }
.step .next { margin: 0.4rem 0 0; padding: 0.6rem 0.8rem; background: var(--accent); border-radius: var(--radius); color: var(--accent-foreground); font-size: 0.95rem; font-weight: 600; max-width: none; }
.step .next b { font-family: var(--font-head); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; display: block; }

.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.7rem; }
.checks li { display: flex; gap: 0.7rem; align-items: flex-start; }
.checks li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--success-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316845b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/14px no-repeat; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
.split > * { min-width: 0; }

/* Frise qui défile de côté (fonctionnalités) */
.frieze { list-style: none; margin: 2rem 0 0; padding: 0 0 1rem; display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: thin; }
.frieze li { flex: 0 0 min(260px, 78%); scroll-snap-align: start; background: var(--background); border: 1px solid var(--border); border-radius: 12px; padding: 1.2rem 1.3rem; position: relative; overflow: hidden; }
.frieze .n { position: absolute; right: 0.8rem; top: -0.3rem; font-family: var(--font-head); font-weight: 800; font-size: 4.6rem; line-height: 1; letter-spacing: -0.06em; color: var(--accent); -webkit-text-stroke: 1.5px var(--selection-border); }
.frieze strong, .frieze p, .frieze .badge { position: relative; }
.frieze strong { display: block; font-family: var(--font-head); font-size: 1.1rem; margin: 2.6rem 0 0.3rem; }
.frieze p { margin: 0; color: var(--text-subtle); font-size: 0.95rem; }

/* FAQ */
.faq { display: grid; gap: 0.8rem; max-width: 820px; }
details { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color 0.2s; }
summary { cursor: pointer; list-style: none; padding: 1.1rem 1.3rem; font-weight: 700; font-family: var(--font-head); display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); font-size: 1.3rem; line-height: 1; color: var(--primary); transition: transform 0.25s var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details[open] { border-color: var(--selection-border); }
details > div { padding: 0 1.3rem 1.2rem; color: var(--text-subtle); }
details > div p:last-child { margin-bottom: 0; }

/* Bandeau d'appel */
.cta { background: var(--primary); color: var(--primary-foreground); border-radius: 16px; padding: clamp(2rem, 5vw, 3.5rem); display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; position: relative; overflow: hidden; }
.cta::before { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 34px 34px; -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000); mask-image: linear-gradient(90deg, transparent 30%, #000); pointer-events: none; }
.cta > * { position: relative; }
.cta h2 { margin: 0; color: var(--primary-foreground); max-width: 22ch; }
.cta .btn { background: var(--card); color: var(--primary); border-color: var(--card); }
.cta .btn:hover { background: var(--accent); color: var(--primary-hover); border-color: var(--accent); }
.cta .btn:focus-visible { outline-color: #fff; }

/* Contact & texte */
.contact-box { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1.7rem; }
.contact-box dl { margin: 0; }
.contact-box dt { font-weight: 700; font-family: var(--font-head); margin-top: 1rem; }
.contact-box dt:first-child { margin-top: 0; }
.contact-box dd { margin: 0.2rem 0 0; color: var(--text-subtle); }
form { display: grid; gap: 1rem; }
label { font-weight: 700; display: grid; gap: 0.35rem; font-family: var(--font-head); font-size: 0.95rem; }
input, textarea { font: inherit; font-family: var(--font-body); font-weight: 400; padding: 0.75rem 0.9rem; border: 1.5px solid #98a2b3; border-radius: var(--radius); background: var(--card); color: var(--foreground); width: 100%; }
input:focus, textarea:focus { outline: 3px solid var(--focus-soft); border-color: var(--primary); }
.hint { font-size: 0.92rem; color: var(--text-subtle); font-weight: 400; font-family: var(--font-body); }
.prose { max-width: 760px; }
.prose h2 { font-size: 1.5rem; margin-top: 2.2rem; }

/* Rail de chapitres de la page (points à droite, grands écrans) */
.chap { position: fixed; right: 1.1rem; top: 50%; transform: translateY(-50%); z-index: 40; display: none; flex-direction: column; gap: 0.35rem; }
.chap a { position: relative; display: block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--selection-border); background: var(--card); transition: background 0.25s, border-color 0.25s, transform 0.25s; }
.chap a span { position: absolute; right: 22px; top: 50%; transform: translateY(-50%); white-space: nowrap; background: var(--foreground); color: #fff; font-size: 0.78rem; font-weight: 700; padding: 0.2rem 0.55rem; border-radius: var(--radius-control); opacity: 0; pointer-events: none; transition: opacity 0.2s; }
.chap a:hover span, .chap a:focus-visible span { opacity: 1; }
.chap a.cur { background: var(--primary); border-color: var(--primary); transform: scale(1.2); }
@media (min-width: 1360px) { .chap { display: flex; } }

/* Pied */
.site-footer { background: var(--foreground); color: #e4e8f1; padding: 3rem 0 2rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--selection-border); }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer p.foot-brand { color: #fff; font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; }
.site-footer h2 { font-size: 1rem; color: #fff; margin-bottom: 0.8rem; letter-spacing: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.site-footer p { color: #c7cedd; }
.legal { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid rgba(255, 255, 255, 0.16); font-size: 0.92rem; color: #c7cedd; }

/* ---- Mouvement : uniquement si l'utilisateur l'accepte et que le JS tourne ---- */
@media (prefers-reduced-motion: no-preference) {
  .js .rv { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); transition-delay: calc(var(--d, 0) * 80ms); }
  .js .rv.in { opacity: 1; transform: none; }
  .js [data-compose] .w { display: inline-block; opacity: 0; transform: translateY(0.5em); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); transition-delay: calc(var(--i, 0) * 55ms); }
  .js [data-compose].in .w { opacity: 1; transform: none; }
  .big { transition: opacity 0.25s; }
  .big.swap { opacity: 0; }
  .sig-idle .node::after { border-top-style: dashed; }
  .paused *, .paused *::before, .paused *::after { animation-play-state: paused !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reading { display: none; }
  .circuit .sig { display: none; }
}

@media (max-width: 1000px) {
  .circuit { grid-template-columns: 1fr; gap: 2.2rem; max-width: 460px; }
  .node::after { left: 1.6rem; top: 100%; width: 0; height: 2.2rem; border-top: 0; border-left: 2px dashed var(--selection-border); }
  .node.done::after, .node.on::after { border-left-color: var(--primary); }
  .node .sig { left: calc(1.6rem - 3px); top: 100%; }
  .node.go .sig { animation-name: sigy; }
  @keyframes sigy { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 1; transform: translateY(2.2rem); } }
}
@media (max-width: 900px) {
  .hero-grid, .split, .g3, .g2, .foot, .parcours-grid, .counters { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--card); border-bottom: 1px solid var(--border); flex-direction: column; align-items: stretch; padding: 0.8rem 1.25rem 1.2rem; }
  .nav.open { display: flex; }
  .nav a { padding: 0.8rem; }
  .nav a.btn { margin: 0.5rem 0 0; text-align: center; justify-content: center; }
  /* Rail horizontal collant sur mobile */
  .rail-sticky { position: static; }
  .rail-wrap { position: sticky; top: var(--header); z-index: 30; margin-inline: -1.25rem; padding: 0.6rem 1.25rem; background: rgba(255,255,255,.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
  .rail { margin: 0; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; }
  .rail::before { left: 6%; right: 6%; top: 17px; bottom: auto; width: auto; height: 2px; }
  .rail::after { left: 6%; top: 17px; width: calc(88% * var(--rp, 0)); height: 2px; transition: width 0.5s var(--ease); }
  .rail a { flex-direction: column; gap: 0.2rem; padding: 0; font-size: 0.62rem; text-align: center; }
  .rail a span { display: block; }
  .big { display: none; }
  .step { min-height: 0; }
  .mock-body { grid-template-columns: 1fr; }
  .mock-list { display: none; }
}
@media (max-width: 480px) {
  .m-steps li { font-size: 0.5rem; }
  .m-act { grid-template-columns: 1fr; }
  .mock-top .m-search { display: none; }
}
