/* ==========================================================================
   numa.ma — parcours « Demander une démo » (page-templates/demo.php)
   Un écran, une question. Barre haute, question centrée, « chemin » en bas
   qui défile pour garder l'étape en cours au centre. Nuit violette de la charte.
   Feuille autonome : main.css n'est pas chargée sur cette page.
   ========================================================================== */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/plus-jakarta-sans-latin-wght.woff2") format("woff2-variations"), url("../fonts/plus-jakarta-sans-latin-wght.woff2") format("woff2");
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("../fonts/dm-sans-latin-wght.woff2") format("woff2-variations"), url("../fonts/dm-sans-latin-wght.woff2") format("woff2");
}

:root {
  --navy: #010066; --navy-mid: #1a0a8a; --violet: #7E46FF; --violet-dark: #5A2FCC;
  --lavender: #F1EBFF; --lavender-bar: #C9B6FF;
  --fg: #fff; --fg-70: rgba(255, 255, 255, .74); --fg-50: rgba(255, 255, 255, .52); --fg-25: rgba(255, 255, 255, .26);
  --chip: rgba(255, 255, 255, .14); --chip-hover: rgba(255, 255, 255, .24);
  --field: rgba(255, 255, 255, .14); --field-line: rgba(255, 255, 255, .28);
  --card: rgba(255, 255, 255, .10); --card-line: rgba(255, 255, 255, .18);
  --green: #2FBF71; --red-soft: #ffb3b3;
  --font-head: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --radius: 8px; --radius-lg: 12px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100%; background: var(--navy); color: var(--fg); font-family: var(--font-body); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-variant-numeric: tabular-nums; overflow-x: clip; }
img, svg { display: block; max-width: 100%; height: auto; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--fg-50); transition: color .2s var(--ease); }
a:hover { color: var(--lavender-bar); }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--lavender-bar); color: var(--navy); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.skip-link { position: absolute; left: 16px; top: -100px; z-index: 100; background: #fff; color: var(--navy); padding: 10px 16px; border-radius: var(--radius); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 16px; }
.demo-icon { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Cadre ---------- */
.demo {
  position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  padding-inline: 24px; padding-block: 0; overflow: hidden;
  background:
    radial-gradient(1000px 640px at 12% 112%, rgba(126, 70, 255, .62), transparent 62%),
    radial-gradient(760px 520px at 104% -14%, rgba(201, 182, 255, .22), transparent 60%),
    linear-gradient(180deg, var(--navy) 0%, var(--navy-mid) 58%, #3a1db0 100%);
}

/* ---------- Barre haute ---------- */
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; min-height: 76px; }
.demo-brand img { width: 109px; height: 24px; }
.demo-bar-right { display: flex; align-items: center; gap: 20px; }
.demo-link { color: var(--fg-70); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--fg-25); padding: 6px 0; }
.demo-link:hover { color: #fff; }
.lang { display: inline-flex; gap: 2px; font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.lang a { padding: 4px 6px; border-radius: 4px; color: var(--fg-50); text-decoration: none; }
.lang a.is-active { color: var(--navy); background: #fff; }

/* ---------- Scène ---------- */
.demo-stage { flex: 1; display: grid; grid-template-columns: 100%; place-items: center; padding-block: 16px 24px; min-width: 0; }
.demo-form, .demo-result { grid-area: 1 / 1; width: 100%; min-width: 0; }
.demo-form { display: grid; grid-template-columns: 100%; justify-items: center; align-items: center; }
.form-notice { grid-area: 1 / 1; align-self: start; justify-self: center; margin: 0; padding: 12px 18px; border-radius: var(--radius); background: #fff; color: var(--navy); font-weight: 500; max-width: 640px; }
.form-notice.is-error { background: #FBE0E0; color: #B42323; }

.demo-step {
  grid-area: 1 / 1; width: 100%; max-width: 980px; min-width: 0; border: 0; padding: 0; margin: 0; text-align: center;
  opacity: 0; visibility: hidden; transform: translateY(18px);
  transition: opacity .45s var(--ease), transform .45s var(--ease), visibility 0s .45s;
}
.demo-step.is-active { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.demo-step.is-leaving { opacity: 0; transform: translateY(-14px); }
.demo-step[hidden] { display: none; }

/* La légende n'est jamais un élément flex : question en bloc, puis un corps flex. */
.demo-q { display: block; width: 100%; padding: 0; margin: 0 0 32px; text-align: center; float: none; outline: none; }
.demo-step-body { display: flex; flex-direction: column; align-items: center; gap: 32px; width: 100%; min-width: 0; }
.demo-q-text { display: inline-block; font-family: var(--font-head); font-weight: 600; font-size: clamp(32px, 5.2vw, 62px); line-height: 1.04; letter-spacing: -.025em; max-width: 20ch; text-wrap: balance; }
.demo-q-sm .demo-q-text { font-size: clamp(28px, 4vw, 46px); }
.demo-hint { margin-top: -16px; color: var(--fg-70); font-size: 17px; max-width: 52ch; text-wrap: balance; min-height: 1.5em; }
.demo-hint b { color: #fff; font-weight: 600; }

/* ---------- Choix ---------- */
.demo-choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 760px; }
.demo-chip {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 150px;
  padding: 17px 28px; border-radius: var(--radius); background: var(--chip); color: #fff;
  font-size: 17px; font-weight: 500; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .2s, transform .2s var(--ease), color .2s; user-select: none;
}
.demo-chip:hover { background: var(--chip-hover); }
.demo-chip:active { transform: scale(.97); }
.demo-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; margin: 0; }
.demo-chip:focus-within { outline: 2px solid #fff; outline-offset: 3px; }
.demo-chip:has(input:focus:not(:focus-visible)) { outline: none; }
.demo-chip .demo-tick { display: none; }
.demo-chip.is-on, .demo-chip:has(input:checked) { background: #fff; color: var(--navy); }
.demo-chip.is-on .demo-tick, .demo-chip:has(input:checked) .demo-tick { display: block; }

/* ---------- Champs et boutons ---------- */
.demo-fields { display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 420px; }
.demo-fields-wide { max-width: 520px; }
.demo-field { width: 100%; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--field-line); background: var(--field); color: #fff; font-size: 17px; transition: border-color .2s, background .2s; }
.demo-field::placeholder { color: var(--fg-50); }
.demo-field:focus { border-color: #fff; background: rgba(255, 255, 255, .18); outline: none; }
.demo-field.is-bad { border-color: var(--red-soft); }
.demo-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.demo-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 28px; border-radius: var(--radius); font-size: 16px; font-weight: 600; transition: transform .2s var(--ease), background .2s, opacity .2s; }
.demo-btn:active { transform: scale(.98); }
.demo-btn-primary { background: #fff; color: var(--navy); }
.demo-btn-primary:hover { background: var(--lavender); }
.demo-btn[disabled] { opacity: .55; cursor: progress; }
.demo-btn-block { width: 100%; }
.demo-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; max-width: 420px; }
.demo-err { color: #ffd1d1; font-size: 14px; min-height: 1.4em; }
.demo-err:empty { display: none; }
.demo-legal { font-size: 13px; color: var(--fg-50); }
.demo-noscript { font-size: 15px; color: var(--fg-70); }

/* ---------- Résultat ---------- */
.demo-result-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 24px; width: 100%; text-align: left; }
.demo-panel { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius-lg); padding: 28px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); min-width: 0; }
.demo-panel-title { font-family: var(--font-head); font-weight: 600; font-size: 20px; letter-spacing: -.01em; margin: 0 0 6px; }
.demo-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--lavender-bar); margin-bottom: 10px; }
.demo-pack { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 6px; }
.demo-pack-name { font-family: var(--font-head); font-weight: 700; font-size: 34px; letter-spacing: -.03em; line-height: 1; }
.demo-pack-price { font-family: var(--font-head); font-weight: 600; font-size: 22px; letter-spacing: -.02em; }
.demo-pack-price small { font-size: 13px; font-weight: 500; color: var(--fg-70); letter-spacing: 0; }
.demo-why { color: var(--fg-70); margin-bottom: 18px; font-size: 15px; }
.demo-inclus { display: flex; flex-direction: column; gap: 9px; }
.demo-inclus li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.demo-inclus .demo-icon { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--green); stroke-width: 2.4; }
.demo-inclus .is-muted { color: var(--fg-70); }
.demo-extra { margin-top: 16px; padding: 12px 14px; border-radius: var(--radius); background: rgba(255, 255, 255, .08); font-size: 14px; color: var(--fg-70); }
.demo-more { margin-top: 18px; font-size: 14px; }
.demo-agenda { margin: 12px 0 10px; border-radius: var(--radius); overflow: hidden; background: #fff; min-height: 320px; }
.demo-agenda iframe { display: block; width: 100%; height: 640px; border: 0; }
.demo-agenda-off { margin: 12px 0; padding: 14px 16px; border-radius: var(--radius); background: rgba(255, 255, 255, .08); font-size: 15px; color: var(--fg-70); }
.demo-alt { margin-top: 10px; font-size: 13px; color: var(--fg-70); }
.demo-alt a { color: #fff; }

/* ---------- Chemin ---------- */
.demo-chemin {
  position: relative; height: 200px; overflow: hidden; margin-inline: -24px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18%, #000 82%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 18%, #000 82%, transparent 100%);
}
.demo-track { position: absolute; top: 0; left: 0; height: 100%; transition: transform .7s var(--ease); will-change: transform; }
.demo-trail { position: absolute; inset: 0; overflow: visible; width: 100%; height: 100%; }
.demo-trail path { fill: none; stroke: rgba(255, 255, 255, .55); stroke-width: 1.5; }
/* Le nœud est un point de 0×0 posé sur la courbe : disque centré dessus, étiquette accrochée dessous. */
.demo-node { position: absolute; width: 0; height: 0; --d: 46px; opacity: 0; transform: scale(.5); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.demo-node.is-near { opacity: .75; transform: scale(.92); }
.demo-node.is-now { opacity: 1; transform: none; --d: 84px; }
.demo-node .demo-disc { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); width: var(--d); height: var(--d); border-radius: 50%; background: rgba(255, 255, 255, .16); border: 1.5px solid transparent; display: grid; place-items: center; transition: width .5s var(--ease), height .5s var(--ease), background .4s, border-color .4s, box-shadow .4s; }
.demo-node .demo-disc svg { width: 22px; height: 22px; transition: width .5s var(--ease), height .5s var(--ease); }
.demo-node.is-now .demo-disc { background: rgba(255, 255, 255, .22); border-color: #fff; box-shadow: 0 20px 50px -20px rgba(1, 0, 102, .8); }
.demo-node.is-now .demo-disc svg { width: 34px; height: 34px; }
.demo-node.is-done .demo-disc { background: #fff; color: var(--navy); }
.demo-node .demo-lbl { position: absolute; left: 0; top: calc(var(--d) / 2 + 10px); transform: translateX(-50%); font-size: 12px; color: var(--fg-70); letter-spacing: .02em; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .3s, top .5s var(--ease); }
.demo-node.is-done .demo-lbl, .demo-node.is-now .demo-lbl { color: #fff; font-weight: 600; }
.demo-node.is-now .demo-lbl { font-size: 13px; }

/* ---------- Sans JavaScript : formulaire long, classique ---------- */
html.no-js .demo-stage, html.no-js .demo-form { display: flex; flex-direction: column; align-items: center; gap: 64px; }
html.no-js .demo-step { opacity: 1; visibility: visible; transform: none; }
html.no-js .demo-result, html.no-js .demo-chemin, html.no-js [data-demo-next], html.no-js [data-demo-back], html.no-js [data-demo-restart] { display: none; }

/* ---------- Téléphone ---------- */
@media (max-width: 720px) {
  .demo { padding-inline: 16px; }
  .demo-bar { padding-block: 16px; min-height: 60px; }
  .demo-bar-right { gap: 14px; }
  .demo-q { margin-bottom: 24px; }
  .demo-step-body { gap: 24px; }
  .demo-hint { font-size: 15px; }
  .demo-choices { flex-direction: column; width: 100%; max-width: 420px; }
  .demo-chip { width: 100%; padding: 15px 20px; font-size: 16px; }
  .demo-row2 { grid-template-columns: 1fr; }
  .demo-result-grid { grid-template-columns: 1fr; }
  .demo-panel { padding: 20px; }
  .demo-pack-name { font-size: 28px; }
  .demo-agenda iframe { height: 560px; }
  .demo-chemin { height: 150px; margin-inline: -16px; }
  .demo-node .demo-lbl { max-width: 110px; font-size: 11px; }
  .demo-node.is-now { --d: 66px; }
  .demo-node.is-now .demo-disc svg { width: 28px; height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-step, .demo-track, .demo-node, .demo-node .demo-disc, .demo-node .demo-disc svg, .demo-node .demo-lbl, .demo-chip, .demo-btn { transition-duration: .01ms !important; }
}
