/* ==========================================================================
   Patrimoine Système — Simulateur d'éligibilité
   DA : Noir obsidienne #0B0C0E · Graphite #262A2F · Argent platine · Blanc glacier #F4F5F6
   Règles : zéro-scroll, animations en transform uniquement (jamais de fondu),
            aucune couleur hors DA.
   ========================================================================== */

:root {
  --obsidian: #0B0C0E;
  --graphite: #262A2F;
  --graphite-2: #3A3F46;
  --steel: #6B717A;
  --steel-2: #8E949C;
  --glacier: #F4F5F6;
  --white: #FFFFFF;
  --text-2: #565C64;
  --hair: rgba(11, 12, 14, .08);
  --hair-2: rgba(11, 12, 14, .13);

  /* Matières */
  --ink: linear-gradient(178deg, #30343A 0%, #15171A 34%, #0B0C0E 62%, #1B1E22 100%);
  --silver-ink: linear-gradient(100deg, #3A3F46 0%, #737982 22%, #B4B9C0 40%, #7C828A 56%, #3F444B 78%, #5D636B 100%);
  --brushed: repeating-linear-gradient(0deg, rgba(255,255,255,.22) 0 .5px, rgba(11,12,14,.016) .5px 1.5px);
  --metal-tile: linear-gradient(150deg, #FFFFFF 0%, #E3E5E8 24%, #F7F8F9 44%, #B9BEC5 70%, #E8EAED 88%, #CDD1D6 100%);

  --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.15' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --ease-spring: cubic-bezier(.34, 1.36, .64, 1);

  --pad-x: clamp(16px, 4vw, 48px);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--obsidian);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background-color: var(--glacier);
  background-image:
    radial-gradient(70% 55% at 50% 0%, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%),
    radial-gradient(45% 40% at 100% 52%, rgba(38,42,47,.045) 0%, rgba(38,42,47,0) 100%),
    radial-gradient(40% 40% at 0% 100%, rgba(38,42,47,.05) 0%, rgba(38,42,47,0) 100%),
    linear-gradient(180deg, #F9F9FA 0%, #F4F5F6 50%, #EEEFF1 100%);
  position: relative;
}
/* Texture papier, très légère */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: var(--grain-dark);
  opacity: .05;
  pointer-events: none;
  z-index: 0;
}

button { font: inherit; color: inherit; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* --------------------------------------------------------------------------
   Décor — courbes architecturales
   -------------------------------------------------------------------------- */
.decor { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.decor-curves { position: absolute; inset: 0; width: 100%; height: 100%; }
@media (max-width: 767px) {
  .decor { display: none; }
}

/* --------------------------------------------------------------------------
   Entête
   -------------------------------------------------------------------------- */
.topbar {
  position: relative;
  z-index: 3;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: clamp(18px, 2.8vh, 28px) var(--pad-x) 0;
}
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--obsidian); }
.brand-mark { width: 38px; height: auto; display: block; filter: drop-shadow(0 1px 0 rgba(255,255,255,.9)); }
.brand-divider { width: 1px; height: 32px; background: linear-gradient(180deg, transparent, rgba(11,12,14,.26) 20%, rgba(11,12,14,.26) 80%, transparent); }
.brand-word { display: flex; flex-direction: column; line-height: 1; font-family: "Montserrat", "Manrope", sans-serif; }
.brand-word-1 {
  font-weight: 600; font-size: 16px; letter-spacing: .09em;
  background: var(--ink); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-word-2 { margin-top: 5px; font-weight: 500; font-size: 10px; letter-spacing: .36em; color: var(--steel); }

.pill-time {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 15px 8px 12px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: -.005em;
  color: var(--graphite);
  background:
    linear-gradient(180deg, #FFFFFF, #F7F8F9) padding-box,
    linear-gradient(160deg, rgba(11,12,14,.18), rgba(11,12,14,.05) 45%, rgba(11,12,14,.14)) border-box;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(11,12,14,.04), 0 8px 18px -10px rgba(11,12,14,.18);
}
.pill-time svg { width: 16px; height: 16px; fill: none; stroke: var(--obsidian); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* --------------------------------------------------------------------------
   Progression — 4 segments minimalistes
   -------------------------------------------------------------------------- */
.progress {
  position: relative;
  z-index: 3;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: clamp(14px, 2.4vh, 22px) var(--pad-x) 0;
}
.progress-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: min(300px, 62vw); }
.seg {
  position: relative;
  height: 3px;
  border-radius: 3px;
  background: rgba(11,12,14,.09);
  box-shadow: inset 0 .5px 1px rgba(11,12,14,.08);
  overflow: hidden;
}
.seg i {
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #0B0C0E 0%, #262A2F 70%, #6B717A 100%);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .8s var(--ease-out);
}
.seg.is-done i { transform: scaleX(1); }
.seg.is-current i::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.75) 50%, transparent 100%);
  transform: translateX(-100%);
  animation: seg-sheen 2.8s 1.1s var(--ease-io) infinite;
}
@keyframes seg-sheen { 0% { transform: translateX(-100%); } 45%, 100% { transform: translateX(100%); } }
.progress-count {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  color: var(--steel-2);
  min-width: 26px;
}
.progress-current { color: var(--obsidian); font-weight: 700; }
.progress-sep { margin: 0 1px; }

/* --------------------------------------------------------------------------
   Scène & vues — glissement type app + parallaxe interne (transform uniquement)
   -------------------------------------------------------------------------- */
.stage { position: relative; z-index: 2; flex: 1 1 auto; min-height: 0; overflow: hidden; }
.view {
  position: absolute; inset: 0;
  overflow-x: hidden; overflow-y: auto;
  scrollbar-width: none;
  transform: translate3d(100%, 0, 0);
  visibility: hidden;
  transition: transform .72s var(--ease-io), visibility 0s linear .72s;
  will-change: transform;
}
.view::-webkit-scrollbar { display: none; }
.view.is-active { transform: translate3d(0, 0, 0); visibility: visible; transition: transform .72s var(--ease-io), visibility 0s; }
.view.is-left { transform: translate3d(-100%, 0, 0); }
.view.is-instant { transition: none !important; }

.view-inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 3.6vh, 40px) var(--pad-x) clamp(28px, 5.4vh, 56px);
  text-align: center;
}

/* Éléments : arrivée décalée (parallaxe) à l'entrée d'une vue, montée douce au chargement */
.reveal {
  transform: translate3d(0, 0, 0);
  transition: transform .95s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 65ms + 80ms);
}
.view.is-prep .reveal { transform: translate3d(var(--enter, 64px), 0, 0); transition: none; }
.is-booting .reveal { transform: translate3d(0, 16px, 0); transition: none; }

/* --------------------------------------------------------------------------
   Titre
   -------------------------------------------------------------------------- */
.eyebrow {
  margin: 0 0 clamp(12px, 1.8vh, 16px);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--steel);
  display: inline-flex; align-items: center; gap: 12px;
}
.eyebrow::before, .eyebrow::after { content: ""; width: 22px; height: 1px; background: linear-gradient(90deg, transparent, rgba(11,12,14,.3)); }
.eyebrow::after { transform: scaleX(-1); }

.q-title {
  margin: 0;
  font-weight: 760;
  font-size: clamp(28px, 3.6vw, 49px);
  line-height: 1.08;
  letter-spacing: -.034em;
  text-wrap: balance;
}
.q-title > .ink { display: block; }
/* Laisse la place aux jambages (g, p, q) : le texte en dégradé est découpé sur la boîte */
.q-title .ink, .q-title .silver { padding-bottom: .14em; margin-bottom: -.14em; }
.q-title > .ink:not(:first-child) { margin-top: 0; }
.q-title .ink {
  background-image: var(--grain-light), var(--ink);
  background-size: 140px 140px, 100% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.q-title .silver {
  background-image: var(--silver-ink);
  background-size: 240% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  animation: silver-sweep 2.4s .45s var(--ease-out) both;
}
@keyframes silver-sweep { from { background-position: 100% 0; } to { background-position: 8% 0; } }

/* --------------------------------------------------------------------------
   Cartes de réponse
   -------------------------------------------------------------------------- */
.choices {
  margin-top: clamp(26px, 4.4vh, 44px);
  width: 100%;
  max-width: 540px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(12px, 1.6vw, 20px);
}

.choice {
  --mx: 50%; --my: 0%; --x: 50%; --y: 50%;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(12px, 1.8vh, 16px);
  min-height: clamp(160px, 22vh, 196px);
  padding: 22px 16px 20px;
  border-radius: 24px;
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, #FFFFFF 0%, #FAFAFB 55%, #F3F4F6 100%) padding-box,
    linear-gradient(165deg, #FFFFFF 0%, #C9CDD2 18%, #EDEFF1 42%, #A9AEB6 70%, #DADDE1 100%) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -1px 0 rgba(11,12,14,.04),
    0 1px 1px rgba(11,12,14,.04),
    0 3px 6px -2px rgba(11,12,14,.06),
    0 14px 28px -12px rgba(11,12,14,.16),
    0 34px 60px -30px rgba(11,12,14,.22);
  transform: translate3d(0, 0, 0);
  transition:
    transform .55s var(--ease-out),
    box-shadow .55s var(--ease-out),
    color .3s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

/* Reflet intérieur (haut de la carte) */
.choice::after {
  content: "";
  position: absolute; inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.7) 0%, rgba(255,255,255,0) 40%);
  pointer-events: none;
}

/* Remplissage obsidienne depuis le point de contact (échelle, pas de fondu) */
.choice::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: var(--x); top: var(--y);
  width: 300%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    var(--grain-light),
    radial-gradient(circle at 50% 50%, #2A2E34 0%, #16181B 30%, #0B0C0E 62%);
  background-size: 140px 140px, 100% 100%;
  transform: translate(-50%, -50%) scale(0);
  transition: transform .7s var(--ease-out);
}

/* Liseré argent qui suit le curseur */
.choice-rim {
  position: absolute; inset: -1px;
  z-index: 3;
  border-radius: inherit;
  padding: 1.25px;
  background: radial-gradient(200px 150px at var(--mx) var(--my), rgba(38,42,47,.9), rgba(110,116,124,.4) 45%, rgba(255,255,255,0) 75%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
  visibility: hidden;
}

/* Médaille métallique (argent usiné, reflet anisotrope) */
.medal {
  position: relative;
  z-index: 2;
  width: clamp(62px, 8.6vh, 76px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid; place-items: center;
  box-shadow:
    0 1px 0 rgba(255,255,255,.9),
    0 0 0 1px rgba(11,12,14,.08),
    0 6px 10px -4px rgba(11,12,14,.22),
    0 16px 26px -12px rgba(11,12,14,.32);
  transition: transform .6s var(--ease-spring);
}
.medal-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,0) 0 1.2px, rgba(11,12,14,.035) 1.2px 2px),
    conic-gradient(from 210deg, #F8F9FA, #B4B9C0 11%, #EEF0F2 23%, #9EA4AC 36%, #F6F7F8 50%, #B0B5BC 63%, #ECEEF0 76%, #A3A9B1 89%, #F8F9FA);
  transition: transform 1.1s var(--ease-out);
}
.medal-face {
  position: absolute; inset: 6px;
  border-radius: 50%;
  background:
    radial-gradient(120% 90% at 30% 18%, rgba(255,255,255,.95) 0%, rgba(255,255,255,0) 46%),
    radial-gradient(90% 90% at 70% 92%, rgba(11,12,14,.10) 0%, rgba(11,12,14,0) 60%),
    linear-gradient(160deg, #FDFDFD 0%, #E6E8EB 38%, #CDD1D6 72%, #EEF0F2 100%);
  box-shadow:
    inset 0 1px 1px rgba(255,255,255,1),
    inset 0 -1.5px 2px rgba(11,12,14,.14),
    0 0 0 .5px rgba(11,12,14,.18),
    0 1px 1px rgba(255,255,255,.8);
}
.medal-icon { position: relative; width: 44%; height: 44%; overflow: visible; }
.medal-icon path, .benefit-icon path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.medal-icon .hl { stroke: rgba(255,255,255,.95); stroke-width: 2.5; transform: translateY(.8px); }
.medal-icon .ink { stroke: url(#engrave); stroke-width: 2.5; stroke-dasharray: 100; stroke-dashoffset: 0; }
.medal-icon path.ko { fill: #E3E6E9; stroke: none; }
.medal-icon--people .hl, .medal-icon--people .ink { stroke-width: 1.7; }
.medal-icon--fine .hl, .medal-icon--fine .ink { stroke-width: 1.9; }

.choice-label {
  position: relative; z-index: 2;
  font-size: clamp(19px, 2.4vh, 22px);
  font-weight: 760;
  letter-spacing: -.02em;
  color: var(--obsidian);
  transition: color .3s var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .choice:hover {
    transform: translate3d(0, -4px, 0);
    box-shadow:
      inset 0 1px 0 rgba(255,255,255,1),
      inset 0 -1px 0 rgba(11,12,14,.04),
      0 2px 3px rgba(11,12,14,.05),
      0 8px 14px -4px rgba(11,12,14,.08),
      0 24px 40px -14px rgba(11,12,14,.22),
      0 48px 80px -34px rgba(11,12,14,.30);
  }
  .choice:hover .choice-rim { visibility: visible; }
  .choice:hover .medal { transform: translateY(-2px) scale(1.04); }
  .choice:hover .medal-ring { transform: rotate(38deg); }
}

.choice.is-pressed { transform: translate3d(0, 0, 0) scale(.975); transition-duration: .18s; }
.choice:focus-visible { outline: none; }
.choice:focus-visible .choice-rim { visibility: visible; background: linear-gradient(var(--graphite), var(--graphite)); }

/* Sélection */
.choice.is-selected {
  transform: translate3d(0, -3px, 0) scale(1.015);
  background:
    linear-gradient(180deg, #FFFFFF 0%, #F3F4F6 100%) padding-box,
    linear-gradient(165deg, #FFFFFF 0%, #8E949C 30%, #E6E8EB 52%, #5F656D 78%, #C4C8CE 100%) border-box;
  box-shadow:
    0 2px 3px rgba(11,12,14,.08),
    0 14px 24px -8px rgba(11,12,14,.28),
    0 40px 70px -30px rgba(11,12,14,.45);
}
.choice.is-selected::before { transform: translate(-50%, -50%) scale(1); }
.choice.is-selected::after { background: linear-gradient(180deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,0) 40%); }
.choice.is-selected .choice-rim { visibility: hidden; }
.choice.is-selected .choice-label { color: #FFFFFF; }
.choice.is-selected .medal { transform: scale(1.06); }
.choice.is-selected .medal-ring { transform: rotate(120deg); }
.choice.is-selected .medal-icon .ink { animation: draw .55s .12s var(--ease-out) both; }
@keyframes draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
.choices.has-selection .choice:not(.is-selected) { transform: scale(.965); box-shadow: 0 1px 2px rgba(11,12,14,.05), 0 8px 16px -10px rgba(11,12,14,.14); }

/* --------------------------------------------------------------------------
   Variantes de grilles (5 et 4 réponses), note, champ « Autre », résultat
   -------------------------------------------------------------------------- */
.choices--5 { max-width: var(--col, 1000px); grid-template-columns: repeat(5, 1fr); }
.choices--4 { max-width: 860px; grid-template-columns: repeat(4, 1fr); }
.choices--5 .choice, .choices--4 .choice { min-height: clamp(150px, 21vh, 184px); padding: 20px 12px 18px; }
.choices--5 .choice { justify-content: flex-start; padding-top: clamp(22px, 3.2vh, 28px); }
.choices--5 .choice-label { font-size: 15.5px; line-height: 1.25; font-weight: 720; letter-spacing: -.012em; max-width: 15ch; min-height: 2.5em; display: flex; align-items: center; justify-content: center; text-wrap: balance; }
.choices--4 .choice-label { font-size: clamp(17px, 2.2vh, 19px); }
/* Icône seule (sans médaille) — questions 2 et 3 */
.glyph {
  position: relative; z-index: 2;
  display: grid; place-items: center;
  width: clamp(44px, 6.2vh, 54px);
  aspect-ratio: 1;
  filter: drop-shadow(0 1px 0 rgba(255,255,255,.9)) drop-shadow(0 4px 6px rgba(11,12,14,.10));
  transition: transform .55s var(--ease-spring);
}
.glyph--people { width: clamp(54px, 7.6vh, 66px); }
.glyph svg { width: 100%; height: 100%; overflow: visible; }
.glyph path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.glyph .hl { display: none; }
.glyph .ink { stroke: url(#engrave); stroke-width: 1.55; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke .3s; }
.glyph--people .ink { stroke-width: 1.35; }
.glyph path.ko { fill: #FAFAFB; stroke: none; transition: fill .3s; }
@media (hover: hover) and (pointer: fine) {
  .choice:hover .glyph { transform: translateY(-3px) scale(1.05); }
}
.choice.is-selected .glyph { transform: scale(1.06); filter: drop-shadow(0 2px 6px rgba(0,0,0,.35)); }
.choice.is-selected .glyph .ink { stroke: url(#engraveLight); animation: draw .55s .12s var(--ease-out) both; }
.choice.is-selected .glyph path.ko { fill: #15171A; }

.q-title--long { max-width: 22ch; }

.q-note {
  margin: clamp(14px, 2vh, 18px) 0 0;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 10px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: -.003em;
  color: var(--graphite);
  background: rgba(255,255,255,.7);
  border: 1px solid var(--hair);
  box-shadow: inset 0 1px 0 #fff;
}
.q-note svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--steel); stroke-width: 1.7; stroke-linecap: round; }
.q-note + .choices { margin-top: clamp(18px, 3vh, 30px); }

/* Champ « Autre » : se déplie par glissement (clip + transform, pas de fondu) */
.other-field {
  width: 100%;
  max-width: 560px;
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .55s var(--ease-out), margin-top .55s var(--ease-out);
  margin-top: 0;
}
.other-field.is-open { grid-template-rows: 1fr; margin-top: clamp(14px, 2.2vh, 20px); }
.other-inner {
  min-height: 0;
  overflow: hidden;
  display: flex; gap: 10px;
  padding: 0 4px;                 /* fermé : hauteur strictement nulle */
  visibility: hidden;             /* fermé : rien ne dépasse (ombres, bordures) */
  transform: translate3d(0, -12px, 0);
  transition: transform .55s var(--ease-out), padding .55s var(--ease-out), visibility 0s linear .55s;
}
.other-field.is-open .other-inner {
  padding: 4px;
  visibility: visible;
  transform: translate3d(0, 0, 0);
  transition: transform .55s var(--ease-out), padding .55s var(--ease-out), visibility 0s;
}
.field-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 54px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, #FFFFFF, #FAFAFB) padding-box,
    linear-gradient(165deg, #D5D8DC, #EEF0F2 45%, #B5BAC1) border-box;
  box-shadow: inset 0 1px 2px rgba(11,12,14,.05), 0 6px 16px -10px rgba(11,12,14,.2);
  font: inherit;
  font-size: 16px;          /* évite le zoom iOS */
  font-weight: 600;
  color: var(--obsidian);
  outline: none;
  transition: box-shadow .3s var(--ease-out);
}
.field-input::placeholder { color: #9298A0; font-weight: 500; }
.field-input:focus {
  background:
    linear-gradient(180deg, #FFFFFF, #FFFFFF) padding-box,
    linear-gradient(165deg, #6B717A, #C9CDD2 45%, #3A3F46) border-box;
  box-shadow: 0 0 0 4px rgba(38,42,47,.07), 0 8px 18px -10px rgba(11,12,14,.25);
}
.other-field .btn-next { min-height: 54px; padding: 0 22px; flex: none; }
.btn-next[disabled] { cursor: not-allowed; color: #8E949C; background: linear-gradient(180deg, #F1F2F4 0%, #E4E6E9 100%); box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(11,12,14,.10); }
.btn-next[disabled]:hover { transform: none; }

.nowrap { white-space: nowrap; }
.q-note { text-wrap: balance; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Écran de résultat (non éligible) */
.result-medal { display: block; margin-bottom: clamp(18px, 3vh, 26px); }
.result-medal .medal { width: 76px; }
.result-text {
  margin: clamp(14px, 2.2vh, 20px) 0 0;
  max-width: 46ch;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Formulaire de coordonnées
   -------------------------------------------------------------------------- */
.q-sub {
  margin: clamp(10px, 1.6vh, 14px) 0 0;
  max-width: 44ch;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--text-2);
  text-wrap: balance;
}
.lead-form {
  width: 100%;
  max-width: 460px;
  margin-top: clamp(20px, 3.4vh, 32px);
  display: flex;
  flex-direction: column;
  text-align: left;
}
.field + .field, .field + .field-row, .field-row .field + .field { margin-top: clamp(10px, 1.6vh, 14px); }
@media (min-width: 768px) {
  .lead-form { max-width: 600px; }
  .field-row { display: grid; grid-template-columns: 1.15fr 1fr; column-gap: 14px; margin-top: clamp(12px, 1.8vh, 16px); }
  .field-row .field + .field { margin-top: 0; }
}
@media (min-width: 768px) and (max-height: 760px) {
  .q-sub { margin-top: 8px; font-size: 14px; }
  .lead-form { margin-top: 16px; }
  .field-box { height: 50px; }
  .consent { margin-top: 12px; padding: 10px 14px; }
  .btn-submit { margin-top: 14px; min-height: 52px; }
  .view-inner:has(.field-error.is-shown) .eyebrow { display: none; }
}
.field-label {
  display: block;
  margin: 0 0 6px 4px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .01em;
  color: var(--graphite);
}
.field-box {
  position: relative;
  display: flex;
  align-items: center;
  height: 54px;
  border-radius: 16px;
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, #FFFFFF, #FAFAFB) padding-box,
    linear-gradient(165deg, #D3D6DA, #EEF0F2 45%, #B3B8BF) border-box;
  box-shadow: inset 0 1px 2px rgba(11,12,14,.05), 0 1px 0 rgba(255,255,255,.9), 0 8px 18px -12px rgba(11,12,14,.22);
  transition: box-shadow .3s var(--ease-out), transform .3s var(--ease-out);
}
.field-box:focus-within {
  background:
    linear-gradient(180deg, #FFFFFF, #FFFFFF) padding-box,
    linear-gradient(165deg, #6B717A, #C9CDD2 45%, #3A3F46) border-box;
  box-shadow: 0 0 0 4px rgba(38,42,47,.07), 0 10px 22px -12px rgba(11,12,14,.3);
}
.field.is-invalid .field-box {
  background:
    linear-gradient(180deg, #FFFFFF, #FAFAFB) padding-box,
    linear-gradient(165deg, #0B0C0E, #6B717A 50%, #0B0C0E) border-box;
}
.field.is-valid .field-box::after {
  content: "";
  position: absolute; right: 16px; top: 50%;
  width: 16px; height: 16px;
  margin-top: -8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B0C0E' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.5l4.2 4.2 8.8-9.2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.field-icon {
  flex: none;
  width: 19px; height: 19px;
  margin-left: 16px;
  fill: none; stroke: var(--steel); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.field-control {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0 44px 0 12px;
  border: 0;
  background: transparent;
  outline: none;
  font: inherit;
  font-size: 16px;          /* évite le zoom iOS */
  font-weight: 600;
  letter-spacing: -.005em;
  color: var(--obsidian);
}
.field-control::placeholder { color: #9AA0A7; font-weight: 500; }
.field-control:-webkit-autofill { -webkit-text-fill-color: var(--obsidian); transition: background-color 9999s ease-out 0s; }
.tel-prefix {
  flex: none;
  display: inline-flex; align-items: center;
  height: 34px;
  margin-left: 8px;
  padding: 0 12px 0 10px;
  border-radius: 10px;
  font-size: 15.5px; font-weight: 700; letter-spacing: .01em;
  color: var(--obsidian);
  background: var(--brushed), var(--metal-tile);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 .5px rgba(11,12,14,.2), 0 3px 6px -3px rgba(11,12,14,.3);
  font-variant-numeric: tabular-nums;
}
.field-box--tel .field-control { letter-spacing: .03em; font-variant-numeric: tabular-nums; }
.field-error {
  margin: 0;
  max-height: 0;
  overflow: hidden;
  padding-left: 4px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--obsidian);
  transition: max-height .35s var(--ease-out), margin .35s var(--ease-out);
}
.field-error.is-shown { max-height: 40px; margin-top: 6px; }
.field.is-shake .field-box { animation: shake .42s var(--ease-out); }
@keyframes shake { 20% { transform: translateX(-5px); } 40% { transform: translateX(4px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

.consent {
  margin-top: clamp(14px, 2.2vh, 18px);
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.6);
  border: 1px solid var(--hair);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.consent input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.consent-box {
  flex: none;
  width: 22px; height: 22px;
  margin-top: 1px;
  border-radius: 7px;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #FFFFFF, #F1F2F4);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(11,12,14,.22), 0 2px 4px -2px rgba(11,12,14,.25);
  transition: background .25s var(--ease-out), box-shadow .25s var(--ease-out), transform .3s var(--ease-spring);
}
.consent-box svg { width: 15px; height: 15px; fill: none; stroke: #FFFFFF; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; transition: stroke-dashoffset .35s var(--ease-out); }
.consent input:checked + .consent-box { background: linear-gradient(180deg, #2E3238, #0B0C0E); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 0 0 1px #0B0C0E; transform: scale(1.06); }
.consent input:checked + .consent-box svg { stroke-dashoffset: 0; }
.consent input:focus-visible + .consent-box { outline: 2px solid var(--obsidian); outline-offset: 2px; }
.consent-text { font-size: 13px; font-weight: 500; line-height: 1.45; color: var(--graphite); }
.field-error--consent { padding-left: 6px; }

.btn-submit { margin-top: clamp(16px, 2.6vh, 22px); width: 100%; justify-content: center; min-height: 56px; }
.btn-submit.is-loading { pointer-events: none; }
.btn-submit.is-loading svg { animation: nudge .9s var(--ease-io) infinite; }
@keyframes nudge { 50% { transform: translateX(4px); } }
.form-error { margin: 10px 0 0; text-align: center; font-size: 13px; font-weight: 600; color: var(--obsidian); }
.form-error:empty { display: none; }
.nav-buttons--tight { margin-top: clamp(14px, 2.4vh, 22px); }
.merci-name:empty { display: none; }
/* En cas d'erreurs, la phrase d'introduction s'efface pour garder tout à l'écran */
.view-inner:has(.field-error.is-shown) .q-sub { display: none; }

/* --------------------------------------------------------------------------
   Bénéfices — bandeau compact
   -------------------------------------------------------------------------- */
.benefits {
  position: relative;
  list-style: none;
  margin: clamp(30px, 5.2vh, 52px) 0 0;
  padding: clamp(18px, 2.8vh, 26px) 0 0;
  width: 100%;
  max-width: var(--col, 1000px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  text-align: left;
}
.benefits::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(11,12,14,.13) 16%, rgba(11,12,14,.13) 84%, transparent);
}
.benefit {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 14px;
  align-items: start;
  padding: 0 clamp(16px, 1.8vw, 26px);
}
.benefit + .benefit::before {
  content: "";
  position: absolute; left: 0; top: 2px; bottom: 2px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(11,12,14,.12) 22%, rgba(11,12,14,.12) 78%, transparent);
}
.benefit-icon {
  position: relative;
  width: 38px; height: 38px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--brushed), var(--metal-tile);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,1),
    inset 0 -1px 2px rgba(11,12,14,.12),
    0 0 0 .5px rgba(11,12,14,.22),
    0 1px 0 rgba(255,255,255,.9),
    0 6px 12px -6px rgba(11,12,14,.32);
}
.benefit-icon svg { width: 20px; height: 20px; overflow: visible; }
.benefit-icon .hl { stroke: rgba(255,255,255,.95); stroke-width: 1.8; transform: translateY(.7px); }
.benefit-icon .ink { stroke: url(#engrave); stroke-width: 1.8; }
.benefit-body { display: flex; flex-direction: column; padding-top: 1px; }
.benefit-title {
  font-size: 14.5px;
  font-weight: 720;
  line-height: 1.32;
  letter-spacing: -.012em;
  color: var(--obsidian);
  text-wrap: balance;
}
.benefit-text {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-2);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Boutons Retour / Suivant (bas, centrés)
   -------------------------------------------------------------------------- */
.nav-buttons { margin-top: clamp(28px, 5vh, 48px); display: flex; flex-direction: column; align-items: center; gap: 14px; }
.btn-next {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 0 30px;
  border: 0; border-radius: 16px; cursor: pointer;
  color: #FFFFFF; font-size: 16px; font-weight: 700; letter-spacing: -.01em;
  background: var(--grain-light), linear-gradient(180deg, #2E3238 0%, #16181B 55%, #0B0C0E 100%);
  background-size: 140px 140px, 100% 100%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 10px 24px -10px rgba(11,12,14,.55), 0 0 0 1px #0B0C0E;
  transition: transform .35s var(--ease-out);
}
.btn-next:hover { transform: translateY(-2px); }
.btn-next:active { transform: scale(.97); }
.btn-next svg, .btn-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 18px 0 12px;
  border-radius: 999px;
  border: 1px solid var(--hair-2);
  background: rgba(255,255,255,.75);
  box-shadow: inset 0 1px 0 #fff, 0 4px 12px -8px rgba(11,12,14,.25);
  cursor: pointer;
  font-size: 14px; font-weight: 650; color: var(--graphite);
  transition: transform .35s var(--ease-out), border-color .35s;
}
.btn-back:hover { transform: translateX(-2px); border-color: rgba(11,12,14,.28); }
.btn-back:active { transform: scale(.96); }

/* --------------------------------------------------------------------------
   Mobile (trafic Meta majoritaire)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .topbar { justify-content: center; padding-top: 14px; }
  .pill-time { display: none; }
  .brand { gap: 11px; }
  .brand-mark { width: 30px; }
  .brand-divider { height: 26px; }
  .brand-word-1 { font-size: 14px; }
  .brand-word-2 { font-size: 8.5px; margin-top: 4px; }

  .progress { padding-top: 14px; gap: 10px; }
  .progress-steps { width: 200px; gap: 5px; }
  .progress-count { font-size: 11px; min-width: 22px; }

  .view-inner { justify-content: flex-start; padding: clamp(18px, 3vh, 26px) 18px clamp(18px, 3vh, 30px); }

  .eyebrow { font-size: 10px; letter-spacing: .2em; gap: 9px; margin-bottom: 10px; }
  .eyebrow::before, .eyebrow::after { width: 16px; }
  .q-title { font-size: clamp(23px, 6.4vw, 28px); letter-spacing: -.03em; max-width: 15.5em; }
  .q-title > .ink { display: inline; }

  .choices { margin-top: clamp(20px, 3.4vh, 30px); gap: 12px; max-width: 420px; }
  .choice { min-height: clamp(132px, 20.5vh, 178px); border-radius: 22px; padding: 18px 10px 16px; gap: 12px; }
  .medal { width: clamp(56px, 8.4vh, 70px); }
  .choice-label { font-size: 19px; }

  .benefits {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-top: clamp(22px, 3.8vh, 36px);
    padding-top: 0;
  }
  .benefits::before { display: none; }
  .benefit { padding: clamp(11px, 1.8vh, 15px) 2px; column-gap: 13px; align-items: center; }
  .benefit::after {
    content: "";
    position: absolute; left: 0; right: 0; top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(11,12,14,.11) 12%, rgba(11,12,14,.11) 88%, transparent);
  }
  .benefit + .benefit::before { display: none; }
  .benefit-icon { width: 34px; height: 34px; border-radius: 10px; }
  .benefit-icon svg { width: 18px; height: 18px; }
  .benefit-title { font-size: 13.5px; line-height: 1.3; text-wrap: pretty; }
  .benefit-text { margin-top: 2px; font-size: 12px; line-height: 1.4; }
}

@media (max-width: 767px) {
  /* 5 réponses : liste en lignes */
  .choices--5 { grid-template-columns: 1fr; gap: 8px; max-width: 420px; }
  .choices--5 .choice {
    flex-direction: row;
    justify-content: flex-start;
    gap: 14px;
    min-height: clamp(54px, 7.6vh, 62px);
    padding: 7px 16px 7px 8px;
    border-radius: 18px;
  }
  .choices--5 .glyph { width: 40px; margin-left: 6px; }
  .choices--5 .choice { justify-content: flex-start; }
  .choices--5 .choice-label { font-size: 15.5px; max-width: none; min-height: 0; justify-content: flex-start; text-align: left; }

  /* 4 réponses : grille 2 × 2 */
  .choices--4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .choices--4 .choice { min-height: clamp(104px, 15.5vh, 132px); padding: 14px 10px 12px; gap: 9px; border-radius: 20px; }
  .choices--4 .glyph { width: clamp(34px, 5vh, 40px); }
  .choices--4 .choice-label { font-size: 16.5px; }

  .q-note { font-size: 12px; line-height: 1.35; padding: 7px 12px 7px 10px; margin-top: 12px; border-radius: 12px; text-align: left; max-width: 340px; }
  .q-note svg { width: 14px; height: 14px; }
  .other-field { max-width: 420px; }
  .other-field .btn-next { padding: 0 16px; font-size: 15px; }
  .field-input { height: 52px; padding: 0 14px; }

  .nav-buttons { margin-top: clamp(18px, 3vh, 28px); }
  .result-text { font-size: 14.5px; }
}

@media (max-width: 767px) {
  .q-sub { font-size: 13.5px; margin-top: 8px; }
  .lead-form { margin-top: 18px; max-width: 420px; }
  .field-box { height: 52px; }
  .field-label { font-size: 12px; margin-bottom: 5px; }
  .consent { padding: 10px 12px; margin-top: 12px; }
  .consent-text { font-size: 12.5px; }
  .btn-submit { margin-top: 14px; }
  .field-error { font-size: 12px; }
  .field-error.is-shown { margin-top: 4px; }
}
@media (max-width: 767px) and (max-height: 700px) {
  .q-sub { display: none; }
  .field-box { height: 48px; }
  .field + .field { margin-top: 8px; }
  .field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

@media (max-width: 379px) {
  .q-title { font-size: 22px; }
  .benefit-text { font-size: 11.5px; }
}
@media (max-width: 767px) and (max-height: 700px) {
  .eyebrow { display: none; }
  .choice { min-height: 122px; }
  .benefit { padding: 9px 2px; }
  .benefit-text { display: none; }
}

/* Ordinateur : tout est calé sur la colonne centrale (largeur du bandeau de bénéfices) */
@media (min-width: 768px) {
  :root { --col: 1000px; }
  .topbar { width: 100%; max-width: calc(var(--col) + 2 * var(--pad-x)); margin: 0 auto; }
  .view-inner { justify-content: flex-start; padding-top: clamp(26px, 4.6vh, 46px); }
}

/* Ordinateur peu haut */
@media (min-width: 768px) and (max-height: 760px) {
  .q-title { font-size: clamp(28px, 5vh, 42px); }
  .choice { min-height: 148px; }
  .benefits { margin-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
