/* Formulaire de qualification IMJ Design — moteur repris de LevelFunnel, habillé en bleu cobalt IMJ. */
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 500; font-display: swap; src: url("../assets/fonts/PlusJakartaSans-500.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-display: swap; src: url("../assets/fonts/PlusJakartaSans-600.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-display: swap; src: url("../assets/fonts/PlusJakartaSans-700.woff2") format("woff2"); }
  :root {
    --ink: #0a0f24; --gray: #3c4560; --muted: #5f6985;
    --blue: #1d3bf2; --blue-text: #1d3bf2; --sky: #8fb0ff;
    --ice: #ebeeff; --bg: #f6f7fb; --line: #dde1ef; --outline: #c2ccff;
    --ok: #10B981; --ko: #c8323a;
    --shadow: 0 14px 40px -18px rgba(20,41,184,.18), 0 1px 2px rgba(20,41,184,.04);
    --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  }
  * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
  html, body { margin: 0; min-height: 100%; }
  body { background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
  body::before { content: ""; position: fixed; inset: -20% -40% auto auto; width: 620px; height: 620px; border-radius: 50%;
    background: #a9bcff; filter: blur(110px); opacity: .42; pointer-events: none; z-index: 0; }

  .app { position: relative; z-index: 1; min-height: 100dvh; display: flex; flex-direction: column; max-width: 640px; margin: 0 auto;
    padding: max(16px, env(safe-area-inset-top)) 20px max(20px, env(safe-area-inset-bottom)); }

  header { display: flex; align-items: center; justify-content: space-between; height: 44px; }
  header img { height: 26px; display: block; }
  .count { font-size: 14px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
  .bar { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 10px; opacity: 0; transition: opacity .3s; }
  .bar.on { opacity: 1; }
  .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--sky)); border-radius: 4px; transition: width .45s cubic-bezier(.2,.7,.2,1); }

  main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 28px 0 12px; }
  .step { display: none; }
  .step.on { display: block; animation: in .42s cubic-bezier(.2,.7,.2,1) both; }
  .step.back { animation-name: inBack; }
  @keyframes in { from { opacity: 0; transform: translateY(18px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
  @keyframes inBack { from { opacity: 0; transform: translateY(-18px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
  @media (prefers-reduced-motion: reduce) { .step.on { animation: none; } }

  /* Intro */
  .chip { display: inline-flex; align-items: center; gap: 10px; background: var(--ice); color: var(--blue-text); border: 1.5px solid var(--outline);
    font-weight: 700; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; padding: 8px 16px; border-radius: 999px; }
  .chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(29,59,242,.18); }
  h1 { font-size: clamp(46px, 13vw, 76px); line-height: .98; letter-spacing: -0.045em; font-weight: 800; margin: 22px 0 18px; }
  h1 b, h2 b { color: var(--blue-text); font-weight: inherit; }
  .lede { font-size: 19px; line-height: 1.45; color: var(--gray); margin: 0 0 26px; font-weight: 500; }
  .perks { list-style: none; padding: 0; margin: 0 0 30px; display: grid; gap: 12px; }
  .perks li { display: flex; gap: 12px; align-items: flex-start; font-size: 17px; font-weight: 600; line-height: 1.35; }
  .perks li::before { content: ""; flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%;
    background: var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center/14px no-repeat; }
  .perks span { color: var(--gray); font-weight: 500; }
  .meta { margin-top: 14px; font-size: 14px; color: var(--muted); font-weight: 500; text-align: center; }

  /* Questions */
  .q-num { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--blue-text); margin-bottom: 12px; }
    h2 { font-size: clamp(26px, 7vw, 34px); line-height: 1.15; letter-spacing: -0.025em; font-weight: 750; margin: 0 0 10px; }
  .hint { font-size: 16px; line-height: 1.45; color: var(--gray); margin: 0 0 22px; font-weight: 500; }
  .hint:empty { display: none; }

  input[type=text], input[type=email], input[type=tel], textarea {
    width: 100%; font: 500 19px/1.4 var(--font); color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 16px;
    padding: 16px 18px; outline: none; transition: border-color .2s, box-shadow .2s; -webkit-appearance: none; appearance: none; }
  textarea { min-height: 150px; resize: vertical; }
  input:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(29,59,242,.14); }
  input::placeholder, textarea::placeholder { color: #68718c; }
  .prefix { position: relative; }
  .prefix span { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); font-size: 19px; color: var(--muted); font-weight: 600; pointer-events: none; }
  .prefix input { padding-left: 40px; }
  .chars { text-align: right; font-size: 13px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }

  .opts { display: grid; gap: 10px; }
  .opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; font: 600 17px/1.3 var(--font); color: var(--ink);
    background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 15px 16px; cursor: pointer; transition: border-color .15s, background .15s, transform .1s; }
  .opt:active { transform: scale(.985); }
  .opt .k { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 1.5px solid var(--line); display: grid; place-items: center;
    font-size: 13px; font-weight: 700; color: var(--muted); background: var(--bg); }
  .opt.sel { border-color: var(--blue); background: var(--ice); }
  .opt.sel .k { background: var(--blue); border-color: var(--blue); color: #fff; }
  .other { margin-top: 10px; display: none; }
  .other.on { display: block; }

  .err { color: var(--ko); font-size: 15px; font-weight: 600; margin-top: 12px; min-height: 20px; }

  /* Boutons */
  .nav { display: flex; gap: 10px; align-items: center; padding-top: 8px; }
  .btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 58px; border: 0; cursor: pointer; text-decoration: none;
    font: 700 18px var(--font); color: #fff; background: var(--ink); border-radius: 999px; padding: 8px 8px 8px 28px; transition: transform .1s, opacity .2s; }
  .btn:active { transform: scale(.98); }
  .btn i { width: 44px; height: 44px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; margin-left: auto; }
  .btn svg { width: 20px; stroke: #fff; fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
  .btn[disabled] { opacity: .55; cursor: default; }
  .btn-back { flex: none; width: 58px; height: 58px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; }
  .btn-back svg { width: 22px; stroke: var(--ink); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
  .btn-back[hidden], .nav[hidden], .kbd[hidden], footer[hidden] { display: none !important; }
  #start, #confirm, .sched .btn { width: 100%; }
  .kbd { display: none; font-size: 13px; color: var(--muted); font-weight: 500; text-align: center; margin-top: 10px; }
  @media (hover: hover) and (pointer: fine) { .kbd { display: block; } }

  /* Écrans de fin */
  .done .tick { width: 72px; height: 72px; border-radius: 50%; background: var(--blue); display: grid; place-items: center; box-shadow: 0 16px 40px -12px rgba(29,59,242,.6); margin-bottom: 24px; }
  .done .tick svg { width: 34px; stroke: #fff; fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
  .done .tick.soft { background: var(--ice); box-shadow: none; border: 1.5px solid var(--outline); }
  .done .tick.soft svg { stroke: var(--blue-text); }
  .done .btn { margin-top: 8px; }
  .done .btn.light { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
  .links { display: grid; gap: 10px; margin-top: 22px; }

  /* Calendrier maison */
  .sched { margin-top: 22px; }
  .sched-msg { color: var(--gray); font-weight: 600; text-align: center; padding: 26px 0; }
  .sched-msg.err { color: var(--ko); }
  .days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scrollbar-width: none; }
  .days::-webkit-scrollbar { display: none; }
  .day { flex: 1 0 auto; min-width: 84px; text-align: center; font: 700 15px/1.25 var(--font); color: var(--ink); background: #fff; border: 1.5px solid var(--line);
    border-radius: 16px; padding: 12px 10px; cursor: pointer; transition: border-color .15s, background .15s; }
  .day small { display: block; font-weight: 600; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
  .day.sel { background: var(--ink); border-color: var(--ink); color: #fff; }
  .day.sel small { color: #aab4d8; }
  .slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 8px; }
  .slot { font: 700 18px var(--font); color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 14px; height: 54px; cursor: pointer;
    transition: border-color .15s, background .15s, transform .1s; font-variant-numeric: tabular-nums; }
  .slot:active { transform: scale(.97); }
  .slot.sel { background: var(--blue); border-color: var(--blue); color: #fff; }
  .tz { font-size: 13px; color: var(--muted); font-weight: 500; text-align: center; margin: 4px 0 16px; }
  .booked { background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); padding: 20px; }
  .booked .when { font-size: 22px; font-weight: 750; letter-spacing: -.02em; line-height: 1.25; }
  .booked .when::first-letter { text-transform: uppercase; }
  .booked .when span { display: block; font-size: 16px; font-weight: 600; color: var(--blue-text); text-transform: none; margin-top: 4px; }
  .booked p { color: var(--gray); font-size: 16px; line-height: 1.45; margin: 12px 0 0; font-weight: 500; }
  .booked .test { font-size: 13px; color: #8A5A00; background: #FFF4D6; border-radius: 10px; padding: 8px 12px; margin-top: 14px; }
  .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
  footer { text-align: center; font-size: 12px; color: var(--muted); padding-top: 14px; line-height: 1.5; }

/* ===== 18/11 : optimisation mobile ===== */
/* Bouton « Continuer » toujours visible, même quand la question est longue (petit écran, clavier ouvert) */
.nav { position: sticky; bottom: 0; z-index: 5; margin: 0 -20px; padding: 14px 20px max(10px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(246, 247, 251, 0), var(--bg) 26%); }
/* Calendrier : le bouton « Confirmer » reste accroché en bas de l'écran */
.sched #confirm { position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 5; box-shadow: 0 16px 34px -12px rgba(11, 16, 32, .5); }
/* Les 4 jours tiennent sur la largeur du téléphone, sans être coupés */
@media (max-width: 520px) {
  .days { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; gap: 6px; padding: 2px 0 8px; }
  .day { min-width: 0; padding: 10px 4px; font-size: 14px; }
  .done .tick { width: 56px; height: 56px; margin-bottom: 16px; }
  .done .tick svg { width: 26px; }
}
/* Petits écrans en hauteur (iPhone SE…) : page d'accueil plus compacte pour que « Commencer » reste visible */
@media (max-height: 740px) {
  main { padding: 14px 0 8px; }
  h1 { margin: 14px 0 10px; font-size: clamp(40px, 11.5vw, 60px); }
  .lede { font-size: 17px; margin-bottom: 16px; }
  .perks { gap: 8px; margin-bottom: 18px; }
  .perks li { font-size: 16px; }
}

/* ===== 18/11 : on arrive directement sur la question 1 — intro compacte au-dessus ===== */
main { justify-content: flex-start; padding-top: 18px; }
#intro { margin-bottom: 22px; }
#intro .chip { font-size: 12px; padding: 7px 14px; letter-spacing: .1em; }
#intro h1 { font-size: clamp(34px, 9.6vw, 50px); line-height: 1; margin: 14px 0 10px; }
#intro .lede { font-size: 16px; line-height: 1.42; margin: 0 0 14px; }
#intro .perks { margin: 0; gap: 7px; }
#intro .perks li { font-size: 15px; gap: 10px; line-height: 1.35; }
#intro .perks li::before { width: 18px; height: 18px; background-size: 11px; margin-top: 1px; }
@media (max-height: 740px) {
  main { padding-top: 10px; }
  #intro { margin-bottom: 14px; }
  #intro h1 { font-size: clamp(32px, 9vw, 42px); margin: 10px 0 8px; }
  #intro .lede { font-size: 15px; margin-bottom: 10px; }
  #intro .perks { gap: 5px; }
  #intro .perks li { font-size: 14px; }
}

/* Page 1 : prénom, téléphone, e-mail sur le même écran (19/11/2026) */
.group { display: grid; gap: 12px; }
.gfield { display: grid; gap: 6px; }
.gfield span { font-size: 14px; font-weight: 700; color: var(--ink); }
.gfield input { font-size: 18px; padding: 14px 16px; }
.gfield input.bad { border-color: #c8323a; box-shadow: 0 0 0 4px rgba(200, 50, 58, .12); }
.notice { margin: 14px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); font-weight: 500; }
@media (max-height: 740px) { .group { gap: 8px; } .gfield input { padding: 12px 14px; font-size: 17px; } }
/* Détection de l'auto-remplissage du navigateur (déclenche la lecture des champs) */
@keyframes imj-autofill { from { opacity: 1; } to { opacity: 1; } }
.gfield input:-webkit-autofill { animation: imj-autofill 1ms; }
.gfield input:autofill { animation: imj-autofill 1ms; }
/* Logo + « Academy » dessous, comme sur levelfunnel.fr/academy (19/11/2026) */
header .brand { display: flex; flex-direction: column; align-items: flex-end; text-decoration: none; }
header .brand img { height: 20px; width: auto; }
header .brand small { margin-top: 3px; margin-right: -.2em; font-size: 11px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--blue-text); line-height: 1; }
/* Petits écrans (iPhone SE…) : l'intro se réduit pour laisser voir les 3 champs de la page 1 */
@media (max-height: 700px) {
  #intro .lede { display: none; }
  #intro h1 { font-size: 26px; margin-bottom: 4px; }
  .step[data-id="contact"] h2 { font-size: 22px; }
  .step[data-id="contact"] .hint { margin-bottom: 10px; font-size: 14px; }
  .step[data-id="contact"] .q-num { margin-bottom: 6px; }
}
/* Encart d'urgence page 1 : texte + minuteur, barre qui diminue en haut (19/11/2026) */
.fomo { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; padding: 13px 16px; border: 1.5px solid var(--line); border-radius: 16px; background: #fff; overflow: hidden; font-size: 15px; font-weight: 600; }
.fomo-bar { position: absolute; left: 0; top: 0; height: 3px; width: 100%; background: linear-gradient(90deg, #EAF3FF, #1F6BFF 60%, #1543C9); border-radius: 0 3px 3px 0; }
.fomo-t { flex: none; font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
@media (max-height: 740px) { .fomo { padding: 10px 14px; margin-bottom: 10px; font-size: 14px; } .fomo-t { font-size: 16px; } }

/* ===== 25/11/2026 : mobile soigné ===== */
/* La mention sur les données vit dans la barre collée en bas, sous le bouton : toujours visible, une phrase par ligne, centrée */
.nav { flex-wrap: wrap; }
.nav .kbd, .nav footer { flex: 0 0 100%; margin: 0; }
.nav .kbd { margin-top: 2px; }
footer#foot { padding-top: 4px; line-height: 1.45; }
footer#foot span { display: block; text-wrap: balance; }
.lede, .hint { text-wrap: pretty; }
h1, h2 { text-wrap: balance; }
@media (max-width: 520px) {
  #intro { margin-bottom: 16px; }
  .step[data-id="contact"] h2 { margin-bottom: 8px; }
  .step[data-id="contact"] .hint { margin-bottom: 14px; }
  .group { gap: 10px; }
  .nav { padding-top: 10px; row-gap: 8px; }
}

/* 25/11/2026 : le PREMIER écran (intro + coordonnées + bouton) tient dans la fenêtre, sans défiler, sur ordinateur comme sur téléphone.
   L'intro n'est visible qu'à la question 1 (#intro.on) : on resserre seulement cet écran-là. */
main:has(#intro.on) #steps .hint { display: none; }
main:has(#intro.on) #steps .q-num { margin-bottom: 6px; }
main:has(#intro.on) #steps h2 { margin-bottom: 14px; }
main:has(#intro.on) #err:empty { min-height: 0; margin-top: 6px; }
@media (max-height: 900px) {
  main:has(#intro.on) { padding-top: 10px; }
  main:has(#intro.on) #intro { margin-bottom: 12px; }
  main:has(#intro.on) #intro h1 { margin: 6px 0 8px; }
  main:has(#intro.on) #intro .lede { margin-bottom: 4px; }
  main:has(#intro.on) .group { gap: 8px; }
  main:has(#intro.on) .gfield input { padding-top: 12px; padding-bottom: 12px; }
}

/* ===== IMJ Design : même voix que le site (titres en 600, mot d'accent en gras bleu, jamais d'italique) ===== */
::selection { background: var(--blue); color: #fff; }
html { scrollbar-color: #b9c1dc var(--bg); }
body { caret-color: var(--blue); letter-spacing: -0.008em; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
h1, #intro h1 { font-weight: 600; letter-spacing: -0.04em; }
h2 { font-weight: 600; letter-spacing: -0.03em; }
h1 b { font-weight: inherit; }
.q-num { font-weight: 600; font-variant-numeric: tabular-nums; }
.q-num::after { content: none; }
.booked .when { font-weight: 700; }
.fomo-t { font-weight: 700; }
header .brand { flex-direction: row; align-items: center; gap: 12px; color: var(--ink); }
header .brand img { height: 28px; }
header .brand small { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .34em; color: var(--ink); }
.opt, .slot, .day, .btn, .btn-back { font-family: var(--font); }
.btn { font-weight: 600; }
.opt { font-weight: 500; }
.slot, .day { font-weight: 600; }
.done .links .btn { justify-content: flex-start; }
#intro .lede { margin-top: 14px; }
.booked + .links, .booked .links { margin-top: 16px; }

/* Règle de marque : aucun texte en italique. */
i, em, address, cite { font-style: normal; }

#foot a { color: inherit; text-decoration: underline; text-underline-offset: 0.2em; }

/* Boutons d'action : dégradé cobalt → bleu nuit, comme les cartes du site */
.btn:not(.light) {
  background: linear-gradient(110deg, #1d36d6 0%, #13227f 38%, #0a0f24 80%); background-size: 100% 100%;
  box-shadow: inset 0 0 0 1px rgb(143 176 255 / 0.28), inset 0 1px 0 rgb(255 255 255 / 0.2), 0 14px 30px -14px rgb(20 41 184 / 0.75);
  transition: transform .1s, opacity .2s, filter .35s cubic-bezier(.2,.8,.2,1);
}
@media (hover: hover) { .btn:not(.light):not([disabled]):hover { filter: brightness(1.12); } }
