/* GaitVision : styles du site */
:root{
  --void:#03050c; --ink:#e8f1f6; --muted:#8ea5b5; --faint:rgba(232,241,246,.14);
  --signal:#8fe3ff; --lilac:#b9a6ff; --warm:#ffb02e;
  --display:"Bricolage Grotesque","Avenir Next","Segoe UI",system-ui,sans-serif;
  --text:"Instrument Sans","Helvetica Neue",Arial,system-ui,sans-serif;
  box-sizing:border-box;
  padding-top:env(safe-area-inset-top,0px); padding-bottom:env(safe-area-inset-bottom,0px);
  color-scheme:dark;
}
/* The scene is a dark instrument in both themes; tokens are set for each so contrast never breaks. */
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]){ --void:#03050c; --ink:#e8f1f6; --muted:#8ea5b5; } }
:root[data-theme="dark"]{ --void:#03050c; --ink:#e8f1f6; --muted:#8ea5b5; }
:root[data-theme="light"]{ --void:#03050c; --ink:#e8f1f6; --muted:#9bb0bf; }

*,*::before,*::after{ box-sizing:inherit; }
html{ height:100%; scroll-padding-top:env(safe-area-inset-top,0px); background:var(--void); }
body{ margin:0; height:100%; overflow:hidden; background:var(--void); color:var(--ink); font-family:var(--text); font-size:16px; line-height:1.55; -webkit-font-smoothing:antialiased; }
#stage{ position:fixed; inset:0; width:100%; height:100%; display:block; touch-action:none; cursor:grab; z-index:0; }
#stage:active{ cursor:grabbing; }
#tags{ position:fixed; inset:0; pointer-events:none; z-index:1; }
.tag{ position:absolute; left:0; top:0; transform:translate(-50%,-130%); white-space:nowrap; font-size:.8125rem;
      padding:5px 10px; border-radius:14px; background:rgba(3,5,12,.72); border:1px solid rgba(232,241,246,.2);
      backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); opacity:0; font-variant-numeric:tabular-nums; }
.tag b{ font-weight:600; }
.tag.pain{ border-color:rgba(255,255,255,.55); }

main{ position:relative; z-index:2; }
section{ position:relative; min-height:100vh; min-height:100svh; padding:clamp(20px,3vw,44px); }
.sec{ display:flex; align-items:center; }
.sec::before{ content:""; position:absolute; inset:0; pointer-events:none;
              background:linear-gradient(90deg, rgba(3,5,12,.8) 0%, rgba(3,5,12,.45) 36%, transparent 60%); }
.sec > *{ position:relative; }
.col{ max-width:34rem; }

h1,h2{ font-family:var(--display); margin:0; }
h1{ font-weight:700; font-size:clamp(2.5rem,6.6vw,6rem); line-height:.93; letter-spacing:-.045em; font-variation-settings:"opsz" 96; margin-bottom:16px; }
h1 .line{ display:block; }
h1 .line + .line{ font-weight:300; letter-spacing:-.035em; color:transparent; -webkit-text-stroke:1px rgba(232,241,246,.8); }
h2{ font-weight:650; font-size:clamp(2rem,4.2vw,3.4rem); line-height:1; letter-spacing:-.035em; font-variation-settings:"opsz" 72; margin-bottom:16px; }
h2.big{ font-size:clamp(3rem,8.5vw,8rem); line-height:.92; letter-spacing:-.05em; font-weight:700; margin-bottom:18px; }
h2.big + .lede{ font-family:var(--display); font-size:clamp(1.25rem,2.2vw,1.75rem); font-weight:300; letter-spacing:-.015em; color:#d3e0e8; }
.step{ display:flex; align-items:baseline; gap:12px; color:var(--muted); font-size:.9375rem; margin-bottom:14px; }
.step span{ font-family:var(--display); font-size:1.5rem; font-weight:300; color:var(--signal); }
p{ margin:0 0 18px; }
.lede{ max-width:32rem; color:#c2d2dc; font-size:clamp(.95rem,1.3vw,1.075rem); }
.note{ font-size:.8125rem; color:#6f8797; margin-top:10px; }

/* hero */
#hero{ display:grid; grid-template-rows:auto 1fr auto; }
#hero::after{ content:""; position:absolute; inset:auto 0 0 0; height:60%; pointer-events:none; z-index:-1;
              background:linear-gradient(to top, rgba(3,5,12,.93), rgba(3,5,12,.45) 50%, transparent); }
.top{ display:flex; justify-content:space-between; align-items:center; gap:16px; }
.brand{ display:flex; align-items:center; gap:10px; font-family:var(--display); font-weight:650; font-size:1.25rem; letter-spacing:-.01em; }
.brand svg{ width:26px; height:26px; }
.status{ display:flex; align-items:center; gap:10px; font-size:.875rem; color:var(--muted); }
.pulse{ width:8px; height:8px; border-radius:50%; background:var(--warm); box-shadow:0 0 12px var(--warm); animation:pulse 2.4s ease-in-out infinite; }
@keyframes pulse{ 50%{ opacity:.35; } }
.readout{ align-self:center; justify-self:end; width:min(240px,40vw); display:grid; gap:16px; font-variant-numeric:tabular-nums; }
.metric{ display:grid; gap:1px; padding-left:14px; border-left:1px solid var(--faint); }
.metric .k{ font-size:.8125rem; color:var(--muted); }
.metric .v{ font-family:var(--display); font-weight:500; font-size:1.5rem; line-height:1.15; letter-spacing:-.01em; }
.metric .v small{ font-family:var(--text); font-size:.8125rem; font-weight:400; color:var(--muted); margin-left:6px; letter-spacing:0; }
.metric.phase .v{ color:var(--signal); }
.chart{ padding-left:14px; border-left:1px solid var(--faint); }
.chart canvas{ width:100%; display:block; }
.legend-lines{ display:flex; flex-wrap:wrap; gap:6px 14px; font-size:.75rem; color:var(--muted); margin-top:6px; }
.legend-lines i{ display:inline-block; width:14px; height:2px; vertical-align:middle; margin-right:6px; border-radius:2px; }
.hero-bottom{ display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:24px; }

form{ display:flex; gap:8px; max-width:31rem; flex-wrap:wrap; }
.field{ flex:1 1 220px; }
.sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
input[type=email]{ width:100%; height:50px; padding:0 18px; border-radius:25px; border:1px solid rgba(143,227,255,.3);
  background:rgba(3,5,12,.55); color:var(--ink); font:inherit; font-size:1rem; backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); }
input[type=email]::placeholder{ color:#6f8797; }
input[type=email]:focus{ outline:none; border-color:var(--signal); box-shadow:0 0 0 3px rgba(143,227,255,.18); }
button.cta{ height:50px; padding:0 24px; border-radius:25px; border:0; cursor:pointer; font:inherit; font-weight:600; background:var(--signal); color:#03131c; transition:transform .15s, box-shadow .2s; }
button.cta:hover{ box-shadow:0 0 28px rgba(143,227,255,.45); }
button.cta:active{ transform:scale(.97); }
button:focus-visible, a:focus-visible{ outline:2px solid var(--warm); outline-offset:3px; }
.msg{ min-height:1.5em; margin:10px 0 0; font-size:.875rem; color:var(--muted); }
.msg.ok{ color:var(--signal); } .msg.err{ color:#ff9b7d; }
.scrollcue{ font-size:.8125rem; color:#6f8797; text-decoration:none; }
.scrollcue:hover{ color:var(--ink); }

/* pressure scale — the same bands used on real pressure platforms */
.scale{ display:grid; gap:6px; }
.scale .k{ font-size:.75rem; color:var(--muted); }
.bands{ display:grid; grid-template-columns:repeat(8, 1fr); gap:2px; width:min(300px,100%); }
.bands span{ height:10px; }
.bands-lbl{ display:grid; grid-template-columns:repeat(8, 1fr); width:min(300px,100%); font-size:.6875rem; color:var(--muted); font-variant-numeric:tabular-nums; }

/* questionnaire sheet */
.sheet{ margin-top:22px; display:grid; gap:0; border-top:1px solid var(--faint); max-width:30rem; }
.row{ display:grid; grid-template-columns:9.5rem 1fr; gap:14px; padding:12px 0; border-bottom:1px solid var(--faint); align-items:center; }
.row .q{ font-size:.8125rem; color:var(--muted); }
.row .a{ font-size:.9375rem; }
.eva{ display:grid; grid-template-columns:1fr auto; gap:10px; align-items:center; }
.eva .bar{ position:relative; height:6px; border-radius:3px; background:linear-gradient(90deg,#2d4b5c,#8fe3ff 45%,#ffffff); opacity:.9; }
.eva .bar i{ position:absolute; top:50%; width:14px; height:14px; border-radius:50%; background:#fff; transform:translate(-50%,-50%); box-shadow:0 0 0 4px rgba(255,255,255,.18); }
.eva b{ font-family:var(--display); font-weight:600; font-size:1.125rem; font-variant-numeric:tabular-nums; }
.quote{ font-family:var(--display); font-weight:400; font-size:1.0625rem; letter-spacing:-.01em; }

/* live measure block */
.angles{ display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:22px 0 14px; font-variant-numeric:tabular-nums; max-width:30rem; }
.angles .metric .v{ font-size:1.75rem; }
.corr{ margin:18px 0; padding:14px 16px; border-radius:14px; border:1px solid rgba(255,255,255,.28); background:rgba(3,5,12,.55); max-width:30rem; font-size:.9375rem; }
.corr b{ font-family:var(--display); font-weight:600; font-size:1.125rem; font-variant-numeric:tabular-nums; }


#fin{ display:flex; align-items:center; justify-content:center; text-align:center; }
#fin::before{ content:""; position:absolute; inset:0; pointer-events:none; background:radial-gradient(ellipse at 50% 60%, rgba(3,5,12,.85), rgba(3,5,12,.35) 70%); }
#fin .col{ position:relative; max-width:40rem; display:grid; justify-items:center; }
#fin form{ justify-content:center; }
footer{ position:absolute; bottom:20px; left:0; right:0; text-align:center; font-size:.8125rem; color:#5f7686; }

.reveal{ opacity:0; transition:opacity 1.4s ease; }
body.ready .reveal{ opacity:1; }
body.ready .reveal.late{ transition-delay:.5s; }
.fallback{ position:fixed; inset:0; display:none; place-items:center; text-align:center; padding:24px; color:var(--muted); z-index:5; }

@media (max-width: 900px){
  .app{ grid-template-columns:1fr; }
  .app > div + div{ border-left:0; border-top:1px solid var(--faint); }
}
@media (max-width: 760px){
  #hero{ grid-template-rows:auto auto 1fr auto; }
  .readout{ grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
  .readout .chart, .readout .hide-m{ display:none; }
  .metric{ padding-left:10px; }
  .readout .metric .v{ font-size:1.05rem; }
  .readout .metric .v small{ display:block; margin:0; font-size:.7rem; }
  .metric .k{ font-size:.72rem; }
  .hero-bottom{ grid-row:4; grid-template-columns:1fr; }
  .sec{ align-items:flex-end; padding-top:48vh; }
  .sec::before{ background:linear-gradient(to top, rgba(3,5,12,.95) 0%, rgba(3,5,12,.82) 55%, transparent 80%); }
  .row{ grid-template-columns:7.5rem 1fr; }
  .angles .metric .v{ font-size:1.3rem; }
}
@media (prefers-reduced-motion: reduce){ .pulse{ animation:none; } .reveal{ transition:none; } html{ scroll-behavior:auto; } }


.rightcol{ align-self:center; justify-self:end; width:min(300px,40vw); display:grid; }
.rightcol > .panel{ grid-area:1/1; opacity:0; visibility:hidden; transform:translateX(10px);
  transition:opacity .45s ease, transform .45s ease, visibility 0s linear .45s; }
.rightcol > .panel.on{ opacity:1; visibility:visible; transform:none; transition:opacity .45s ease .15s, transform .45s ease .15s, visibility 0s; }
.rightcol .readout{ width:100%; align-self:center; }
.panel h3{ margin:0 0 8px; font-family:var(--display); font-weight:600; font-size:1.0625rem; letter-spacing:-.01em; }
.panel h3 small{ font-family:var(--text); font-weight:400; font-size:.8125rem; color:var(--muted); margin-left:6px; }
.panel .h3b{ margin-top:14px; }
.panel canvas{ width:100%; height:auto; display:block; }
.legend-lines i.dash{ background:repeating-linear-gradient(90deg,#cfdbe3 0 4px,transparent 4px 7px); }
.delta{ margin:12px 0 0; font-family:var(--display); font-size:1.125rem; font-weight:400; letter-spacing:-.01em; color:var(--signal); }
.dossier{ margin:0; display:grid; border-top:1px solid var(--faint); }
.dossier div{ padding:11px 0; border-bottom:1px solid var(--faint); }
.dossier dt{ font-size:.8125rem; color:var(--muted); }
.dossier dd{ margin:2px 0 0; font-size:.9375rem; }
#pPression, #pBio, #pClin{ padding:16px 18px; border-radius:18px; background:rgba(3,5,12,.6); border:1px solid rgba(143,227,255,.16);
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); }
@media (max-width: 760px){
  .rightcol{ grid-row:2; justify-self:stretch; width:100%; margin-top:12px; }
  #pPression, #pBio, #pClin{ padding:12px 14px; }
  #pBio canvas{ max-height:70px; }
  #pBio .h3b, #curveB2{ display:none; }
  #pPression canvas{ max-height:80px; }
  .dossier div{ padding:7px 0; display:grid; grid-template-columns:6.5rem 1fr; gap:8px; }
  .dossier dd{ margin:0; font-size:.875rem; }
}

#openWait{ margin-top:4px; padding:0 30px; }

/* Formulaire « Me prévenir » : le formulaire Tally du site, dans une fenêtre aux couleurs du site */
dialog#wait{ width:min(560px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); padding:0; margin:auto; overflow:auto;
  border:1px solid rgba(143,227,255,.16); border-radius:18px; background:rgba(3,5,12,.86); color:var(--ink);
  backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px); box-shadow:0 30px 90px rgba(0,0,0,.55); }
dialog#wait::backdrop{ background:rgba(2,4,10,.55); backdrop-filter:blur(3px); -webkit-backdrop-filter:blur(3px); }
dialog#wait[open]{ animation:pop .35s ease; }
@keyframes pop{ from{ opacity:0; transform:translateY(10px); } }
#waitBox{ display:grid; padding:24px 26px 18px; }
#waitBox .eyebrow{ display:flex; align-items:center; gap:10px; font-size:.8125rem; color:var(--muted); margin-bottom:12px; }
#waitBox h2{ font-family:var(--display); font-weight:300; font-size:clamp(1.6rem,4vw,2rem); line-height:1.05; letter-spacing:-.025em; margin:0 0 8px; }
#waitBox .sub{ margin:0; color:var(--muted); font-size:.9375rem; max-width:26rem; }
#waitBox .tally{ margin:18px 0 0; padding-top:14px; border-top:1px solid var(--faint); min-height:200px; }
#waitBox .tally iframe{ display:block; width:100%; border:0; color-scheme:normal; }
#waitBox .tally-off{ margin:18px 0 0; padding:18px; border:1px solid var(--faint); border-radius:14px; display:grid; gap:12px; justify-items:start; }
#waitBox .tally-off[hidden]{ display:none; }
#waitBox .tally-off p{ margin:0; color:var(--muted); font-size:.9375rem; }
#waitBox .tally-off a.cta{ display:inline-flex; align-items:center; text-decoration:none; height:50px; padding:0 26px; border-radius:25px; background:var(--signal); color:#03131c; font-weight:600; }
#waitBox .alt{ margin:10px 0 0; font-size:.8125rem; color:var(--muted); }
#waitBox .alt a{ color:var(--signal); }
#waitBox .actions{ display:flex; justify-content:flex-end; margin-top:12px; }
button.ghost{ height:50px; padding:0 20px; border-radius:25px; cursor:pointer; font:inherit; background:transparent; color:var(--muted); border:1px solid var(--faint); }
button.ghost:hover{ color:var(--ink); }
@media (max-width:560px){
  dialog#wait{ width:100%; max-width:100%; margin:auto 0 0; border-radius:20px 20px 0 0; border-bottom:0; max-height:92dvh; }
  dialog#wait[open]{ animation:sheet .4s ease; }
  @keyframes sheet{ from{ transform:translateY(40px); opacity:0; } }
  #waitBox{ padding:22px 18px calc(18px + env(safe-area-inset-bottom,0px)); }
  #waitBox .actions button{ flex:1; }
}

/* Téléphone : quand une vue est choisie, le titre se replie pour laisser voir la scène */
@media (max-width:760px){
  .hero-bottom h1{ transition:font-size .4s ease; }
  body.mode-on .hero-bottom h1{ font-size:clamp(1.5rem,7.5vw,2rem); margin-bottom:6px; }
  body.mode-on .hero-bottom .lede{ display:none; }
  .joints{ margin-bottom:8px; } .joints button{ padding:6px 4px; font-size:.8125rem; }
  #pBio h3{ font-size:.9375rem; margin-bottom:4px; }
  #pBio canvas{ max-height:56px; }
  #pBio .delta{ font-size:.9375rem; margin-top:6px; }
  #pBio .legend-lines{ margin-top:2px; }
  .rightcol > .panel:not(.on){ position:absolute; top:0; left:0; right:0; }   /* la place suit le panneau affiché */
}

/* Articulation affichée en vue Biomécanique */
.joints{ display:grid; grid-template-columns:repeat(3,1fr); gap:4px; padding:4px; margin:0 0 14px; border-radius:22px;
  background:rgba(3,5,12,.5); border:1px solid rgba(232,241,246,.14); }
.joints button{ font:inherit; font-size:.875rem; font-weight:500; padding:7px 6px; border-radius:18px; border:0; cursor:pointer;
  background:transparent; color:#c2d2dc; transition:background .2s,color .2s,box-shadow .2s; }
.joints button:hover{ color:var(--ink); }
.joints button[aria-pressed="true"]{ background:var(--signal); color:#03131c; box-shadow:0 0 18px rgba(143,227,255,.3); }
#pBio .h3b[hidden], #curveB2[hidden]{ display:none; }

/* Porte d'entrée : trois modes, choisis par <meta name="gaitvision-acces"> */
html[data-acces="libre"] #gate{ display:none; }
html[data-acces="bienvenue"] .pw-only{ display:none; }
html:not([data-acces="bienvenue"]) .welcome-only{ display:none; }
.lock .enter{ width:100%; margin-top:4px; }

/* Les panneaux gardent leur propre hauteur (pas d’espace vide sous les courbes) */
.rightcol > .panel{ align-self:center; }
/* Grand écran : la colonne des vues a une largeur fixe et la légende garde deux lignes, pour que le titre et
   « Me prévenir » ne bougent pas quand on change de vue */
@media (min-width:761px){
  .side{ width:min(25rem,44vw); }
  .caption{ min-height:2.6em; line-height:1.3; text-wrap:balance; display:flex; align-items:flex-end; justify-content:flex-end; }
}
/* Écrans peu hauts : la page tient toujours dans l’écran, les panneaux se resserrent */
@media (min-width:761px){
  #hero{ grid-template-rows:auto minmax(0,1fr) auto; }
  .rightcol{ max-height:100%; }
}
@media (min-width:761px) and (max-height:860px){
  .hero-bottom .scale{ display:none; }
  #pBio canvas, #pPression canvas{ max-height:70px; }
  .readout .chart canvas{ max-height:56px; }
  .rightcol .panel h3{ margin-bottom:4px; }
  .panel .h3b{ margin-top:8px; }
  .joints{ margin-bottom:8px; }
  #pBio .delta{ margin-top:6px; font-size:.9375rem; }
}
@media (min-width:761px) and (max-height:700px){
  #pBio canvas, #pPression canvas{ max-height:52px; }
  .dossier div{ padding:4px 0; }
  .hero-bottom .lede{ display:none; }
}

/* Vues : libellé court sur téléphone */
.modes .sm{ display:none; }
/* Téléphone : la scène d’abord. Boutons de vue sur une ligne ; une fois une vue choisie, le titre, la phrase
   et la légende s’effacent, « Me prévenir » devient compact et les panneaux se resserrent */
@media (max-width:760px){
  .side .modes{ grid-template-columns:repeat(3,1fr); gap:6px; }
  .side .modes button:first-child{ grid-column:auto; }
  .side .modes button{ font-size:.8125rem; padding:8px 6px; border-radius:18px; }
  .modes .lg{ display:none; } .modes .sm{ display:inline; }
  body.mode-on .hero-bottom h1, body.mode-on .hero-bottom .lede, body.mode-on .side .caption{ display:none; }
  body.mode-on #openWait{ height:40px; padding:0 20px; font-size:.9375rem; }
  body.mode-on .hero-bottom{ gap:10px; }
  body.mode-on .hero-bottom > div:first-child{ display:flex; justify-content:flex-start; }
  .side{ gap:8px; }
  .side .caption{ font-size:.9375rem; min-height:0; }
  #pPression, #pBio, #pClin{ padding:10px 12px; border-radius:14px; }
  .rightcol .panel h3{ font-size:.9375rem; margin-bottom:6px; }
  .rightcol .panel h3 small{ font-size:.75rem; }
  .dossier div{ padding:5px 0; grid-template-columns:5.6rem 1fr; gap:6px; }
  .dossier dt{ font-size:.75rem; }
  .dossier dd{ font-size:.8125rem; line-height:1.35; }
  #pBio canvas{ max-height:56px; }
  #pPression canvas{ max-height:64px; }
  .joints{ margin-bottom:6px; } .joints button{ padding:5px 4px; font-size:.78rem; }
  #pBio .delta{ font-size:.875rem; margin-top:4px; }
  .legend-lines{ font-size:.72rem; }
}

/* ===== Boutons en verre : blancs translucides, flous derrière, texte blanc ===== */
main button.cta, #gate button.cta, #waitBox .tally-off a.cta, #waitBox button.ghost,
main .side .modes button, main .panel .joints button{
  background:rgba(255,255,255,.08); color:#fff; border:1px solid rgba(255,255,255,.22);
  backdrop-filter:blur(14px) saturate(140%); -webkit-backdrop-filter:blur(14px) saturate(140%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.18), 0 8px 24px rgba(0,0,0,.25);
  transition:background .2s, border-color .2s, box-shadow .2s, transform .15s;
}
main button.cta, #gate button.cta, #waitBox .tally-off a.cta{ background:rgba(255,255,255,.16); border-color:rgba(255,255,255,.34); font-weight:600; }
main button.cta:hover, #gate button.cta:hover, #waitBox .tally-off a.cta:hover, #waitBox button.ghost:hover,
main .side .modes button:hover, main .panel .joints button:hover{ background:rgba(255,255,255,.2); border-color:rgba(255,255,255,.45); color:#fff; }
main .side .modes button[aria-pressed="true"], main .panel .joints button[aria-pressed="true"]{
  background:rgba(255,255,255,.3); border-color:rgba(255,255,255,.6); color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.35), 0 0 22px rgba(190,235,255,.28);
}
main .panel .joints{ background:rgba(255,255,255,.04); border-color:rgba(255,255,255,.14); }
main .panel .joints button{ box-shadow:none; border-color:transparent; backdrop-filter:none; -webkit-backdrop-filter:none; background:transparent; }

/* ===== Fenêtre « Me prévenir » : textes blancs ===== */
#waitBox h2, #waitBox .sub, #waitBox .eyebrow, #waitBox .tally-off p, #waitBox .alt{ color:#fff; }
#waitBox .sub, #waitBox .alt{ opacity:.85; }
/* Le formulaire Tally est dessiné par Tally (texte foncé sur fond transparent). On l’inverse pour qu’il soit en blanc
   sur le fond sombre du site. Si vous passez le formulaire en thème sombre dans Tally, supprimez cette ligne. */
#waitBox .tally iframe{ filter:invert(1) hue-rotate(180deg); }

/* ===== Téléphone : le mouvement au milieu, les boutons de vue puis le titre en bas ===== */
@media (max-width:760px){
  .hero-bottom .side{ order:-1; }
  .hero-bottom{ gap:14px; }
  body.mode-on .hero-bottom h1{ display:block; font-size:clamp(1.35rem,6.5vw,1.75rem); margin:0 0 8px; }
  body.mode-on .hero-bottom > div:first-child{ display:block; }
  .hero-bottom h1{ font-size:clamp(1.8rem,8.6vw,2.4rem); }
}

/* Ordinateur : certains navigateurs de bureau effacent les éléments à flou d’arrière-plan au-dessus de la 3D.
   Les boutons y gardent l’aspect verre sans ce flou : fond translucide plus présent, bord clair, texte blanc. */
@media (hover:hover) and (pointer:fine), (min-width:761px){
  main button.cta, #gate button.cta, #waitBox .tally-off a.cta, #waitBox button.ghost, main .side .modes button{
    backdrop-filter:none; -webkit-backdrop-filter:none;
    background:linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.08)), rgba(16,24,36,.72);
    border-color:rgba(255,255,255,.38); color:#fff;
  }
  main .side .modes button[aria-pressed="true"]{
    background:linear-gradient(180deg, rgba(255,255,255,.42), rgba(255,255,255,.22)), rgba(30,44,60,.8);
    border-color:rgba(255,255,255,.7);
  }
  main button.cta:hover, #gate button.cta:hover, main .side .modes button:hover{
    background:linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,.14)), rgba(20,30,44,.78);
  }
  #pPression, #pBio, #pClin{ backdrop-filter:none; -webkit-backdrop-filter:none; background:rgba(5,9,18,.78); }
}

/* Boutons : verre teinté du bleu GaitVision ; bouton choisi et « Me prévenir » en bleu plein */
html body main .side .modes button, html body main .panel .joints button, html body #waitBox button.ghost{
  background:linear-gradient(180deg, rgba(74,163,255,.24), rgba(74,163,255,.08)), rgba(6,14,28,.6);
  border:1px solid rgba(120,190,255,.42); color:#fff;
  box-shadow:inset 0 1px 0 rgba(200,230,255,.22), 0 8px 22px rgba(0,0,0,.28);
}
html body main .panel .joints button{ border-color:transparent; box-shadow:none; background:transparent; }
html body main .side .modes button:hover, html body main .panel .joints button:hover, html body #waitBox button.ghost:hover{
  background:linear-gradient(180deg, rgba(74,163,255,.38), rgba(74,163,255,.16)), rgba(6,14,28,.6); border-color:rgba(150,205,255,.65);
}
html body main .side .modes button[aria-pressed="true"], html body main .panel .joints button[aria-pressed="true"],
html body main button.cta, html body #gate button.cta, html body #waitBox .tally-off a.cta{
  background:linear-gradient(180deg, rgba(110,185,255,.92), rgba(56,140,240,.78)); border:1px solid rgba(190,225,255,.85); color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.45), 0 0 26px rgba(74,163,255,.45), 0 10px 26px rgba(0,0,0,.3);
  text-shadow:0 1px 2px rgba(0,30,70,.35);
}
html body main button.cta:hover, html body #gate button.cta:hover, html body #waitBox .tally-off a.cta:hover{
  background:linear-gradient(180deg, rgba(130,198,255,.96), rgba(70,152,245,.86)); box-shadow:inset 0 1px 0 rgba(255,255,255,.5), 0 0 34px rgba(74,163,255,.6);
}
html body main .panel .joints{ background:rgba(74,163,255,.08); border-color:rgba(120,190,255,.3); }
@media (max-width:760px) and (hover:none){
  html body main .side .modes button, html body main button.cta{ backdrop-filter:blur(14px) saturate(140%); -webkit-backdrop-filter:blur(14px) saturate(140%); }
}

/* GaitVision brand */
.brand img{ width:54px; height:auto; display:block; filter:drop-shadow(0 0 10px rgba(80,170,255,.35)); }
.wordmark{ font-family:"Montserrat", var(--display); font-weight:700; letter-spacing:-.01em; font-size:1.375rem; line-height:1; }
.wordmark .w1{ color:#4aa3ff; }
.wordmark .w2{ color:#b9c7d2; }
.lock{ grid-template-columns:minmax(0,1fr); }
.lock .lockicon{ width:150px; height:auto; margin:-6px 0 2px; filter:drop-shadow(0 0 18px rgba(80,170,255,.35)); }
.lock .lockmark{ font-size:1.75rem; margin-bottom:14px; }
.lock .lockmark + h2{ font-size:1.125rem; font-weight:500; color:var(--ink); }
@media (max-width:760px){ .brand img{ width:44px; } .wordmark{ font-size:1.2rem; } }
/* single screen */
main{ height:100%; }
#hero{ height:100%; min-height:0; }
.side{ display:grid; gap:14px; justify-items:end; }
.modes{ display:grid; grid-template-columns:1fr 1fr; gap:8px; width:min(330px,100%); }
.modes button:first-child{ grid-column:1 / -1; }
.modes button{ font:inherit; font-size:.9375rem; font-weight:500; padding:10px 18px; border-radius:22px; cursor:pointer;
  background:rgba(3,5,12,.55); color:#c2d2dc; border:1px solid rgba(232,241,246,.2);
  backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); transition:color .2s,border-color .2s,background .2s,box-shadow .2s; }
.modes button:hover{ color:var(--ink); border-color:rgba(143,227,255,.5); }
.modes button[aria-pressed="true"]{ color:#03131c; background:var(--signal); border-color:var(--signal); box-shadow:0 0 26px rgba(143,227,255,.35); }
.caption{ min-height:1.5em; font-family:var(--display); font-weight:300; font-size:1.125rem; letter-spacing:-.01em; color:#d3e0e8; text-align:right; max-width:26rem; transition:opacity .35s; }
.scale.dim{ opacity:.35; transition:opacity .4s; }
.scale{ transition:opacity .4s; }

/* the gate */
#gate{ position:fixed; inset:0; z-index:10; perspective:1600px; overflow:hidden; }
.leaf{ position:absolute; top:0; bottom:0; width:50.2%; overflow:hidden; backface-visibility:hidden;
  background:
    repeating-linear-gradient(90deg, rgba(143,227,255,.028) 0 1px, transparent 1px 22px),
    radial-gradient(ellipse at 50% 50%, #0a1426 0%, #04070f 70%);
  transition:transform 1.9s cubic-bezier(.75,0,.2,1) .45s, filter 1.9s ease .45s; }
.leaf.l{ left:0; transform-origin:left center; box-shadow:inset -1px 0 0 rgba(143,227,255,.25); }
.leaf.r{ right:0; transform-origin:right center; box-shadow:inset 1px 0 0 rgba(143,227,255,.25); }
.print{ position:absolute; top:50%; height:min(86vh,760px); aspect-ratio:1/2; transform:translateY(-50%); opacity:.9; }
.leaf.l .print{ left:calc(50vw - min(43vh,380px) / 2); }
.leaf.r .print{ left:calc(-1 * min(43vh,380px) / 2); }
.print svg{ width:100%; height:100%; display:block; }
.seam{ position:absolute; left:50%; top:0; bottom:0; width:2px; transform:translateX(-50%);
  background:linear-gradient(to bottom, transparent, rgba(143,227,255,.9) 30%, rgba(255,255,255,.95) 50%, rgba(143,227,255,.9) 70%, transparent);
  box-shadow:0 0 18px 2px rgba(143,227,255,.45); animation:seam 3.2s ease-in-out infinite; transition:opacity .8s ease 1.4s; }
@keyframes seam{ 50%{ opacity:.45; } }
.flash{ position:absolute; inset:0; pointer-events:none; opacity:0;
  background:radial-gradient(ellipse 30% 70% at 50% 50%, rgba(200,240,255,.55), rgba(143,227,255,.12) 45%, transparent 70%); }
.lock{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:min(380px,calc(100vw - 40px));
  display:grid; justify-items:center; text-align:center; gap:4px; padding:30px 26px 22px; border-radius:24px;
  background:rgba(4,8,18,.72); border:1px solid rgba(143,227,255,.22); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
  transition:opacity .45s ease, transform .6s ease; }
.lock svg{ width:34px; height:34px; margin-bottom:8px; }
.lock h2{ font-size:1.625rem; margin:0; letter-spacing:-.02em; }
.lock p{ margin:0 0 14px; color:var(--muted); font-size:.9375rem; }
.lockrow{ display:flex; gap:8px; width:100%; }
.lockrow input{ flex:1; min-width:0; height:50px; padding:0 18px; border-radius:25px; border:1px solid rgba(143,227,255,.3);
  background:rgba(3,5,12,.6); color:var(--ink); font:inherit; font-size:1rem; letter-spacing:.08em; }
.lockrow input::placeholder{ letter-spacing:0; color:#6f8797; }
.lockrow input:focus{ outline:none; border-color:var(--signal); box-shadow:0 0 0 3px rgba(143,227,255,.18); }
.lock .msg{ margin-top:10px; }
.lock.shake{ animation:shake .45s; }
@keyframes shake{ 20%,60%{ transform:translate(calc(-50% - 8px),-50%); } 40%,80%{ transform:translate(calc(-50% + 8px),-50%); } }
#gate.open .lock{ opacity:0; transform:translate(-50%,-50%) scale(.94); pointer-events:none; }
#gate.open .leaf.l{ transform:rotateY(92deg); filter:brightness(1.8); }
#gate.open .leaf.r{ transform:rotateY(-92deg); filter:brightness(1.8); }
#gate.open .seam{ opacity:0; animation:none; }
#gate.open .flash{ animation:flash 1.8s ease .3s forwards; }
@keyframes flash{ 0%{ opacity:0; } 30%{ opacity:1; } 100%{ opacity:0; } }
#gate.open{ pointer-events:none; }
@media (prefers-reduced-motion: reduce){
  .leaf{ transition:opacity .6s ease .2s; } #gate.open .leaf.l, #gate.open .leaf.r{ transform:none; opacity:0; } .seam{ animation:none; }
}
@media (max-width: 760px){
  .side{ justify-items:start; }
  .modes{ width:100%; }
  .modes button{ font-size:.875rem; padding:9px 14px; }
  .caption{ text-align:left; font-size:1rem; }
  .hero-bottom .scale{ display:none; }
}

/* La scène 3D se tourne à la souris ou au doigt : le texte laisse passer le geste, sauf sur les boutons et les panneaux */
main{ pointer-events:none; }
main a, main button, main input, main .panel, main .modes, main .scale{ pointer-events:auto; }

/* Chaque panneau garde la hauteur de son contenu (pas de grand vide sous la courbe) */
.rightcol > .panel{ align-self:center; }
/* La légende réserve toujours deux lignes : le bouton « Me prévenir » ne bouge plus quand on change de vue */
.caption{ min-height:2.9em; line-height:1.45; display:flex; align-items:flex-end; justify-content:flex-end; }
@media (max-width:760px){ .caption{ justify-content:flex-start; } }
