/*
 * Devis NEMI-3 / MABC-3 (/devis-pearson) : une question par écran, le devis qui se remplit à droite.
 * Chargé par layout-immersive.html seulement ; s'appuie sur les variables et composants de site.css.
 */

.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;
}

body.immersive {
  background:
    radial-gradient(60rem 36rem at 12% -10%, rgba(108, 99, 255, 0.11), transparent 70%),
    radial-gradient(44rem 30rem at 100% 100%, rgba(237, 128, 134, 0.09), transparent 70%),
    var(--mist);
  min-height: 100vh;
}

.qx { --bar-h: 64px; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* ── Barre du haut ────────────────────────────────────────────────────── */

.qx-bar {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  height: var(--bar-h); padding-inline: var(--gutter);
  background: rgba(246, 245, 254, 0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
}
.qx-bar__logo img { height: 28px; width: auto; }
.qx-bar__quit {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: var(--pill);
  color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 0.9375rem;
}
.qx-bar__quit:hover { background: var(--paper); color: var(--ink); }
.qx-bar__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--line); }
.qx-bar__progress > span {
  display: block; height: 100%; width: 0; background: var(--violet-600);
  border-radius: 0 3px 3px 0; transition: width 0.5s var(--ease);
}

.qx-chapters {
  display: flex; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none;
  font-size: 0.875rem; font-weight: 600; color: var(--ink-3);
}
.qx-chapters li { display: flex; align-items: center; gap: 6px; }
.qx-chapters li + li::before { content: ""; width: 18px; height: 1px; background: var(--line-2); }
.qx-chapters span { padding: 5px 11px; border-radius: var(--pill); transition: background-color 0.3s, color 0.3s; }
.qx-chapters .is-current span { background: var(--paper); color: var(--violet-ink); box-shadow: var(--shadow-s); }
.qx-chapters .is-done span { color: var(--ink-2); }
@media (max-width: 860px) {
  .qx-chapters li:not(.is-current) { display: none; }
  .qx-chapters li + li::before { display: none; }
}

/* ── Scène ────────────────────────────────────────────────────────────── */

.qx-body {
  flex: 1; display: grid; grid-template-columns: minmax(0, 1fr);
  width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter);
}
@media (min-width: 1080px) {
  .qx-body { grid-template-columns: minmax(0, 1fr) 360px; gap: clamp(32px, 4vw, 64px); }
}

.qx-stage {
  display: flex; flex-direction: column; justify-content: center;
  min-height: calc(100dvh - var(--bar-h)); padding-block: clamp(28px, 6vh, 72px) 24px;
  min-width: 0;
}
.qx-step { width: 100%; max-width: 640px; margin-inline: auto; display: grid; gap: 18px; }
.qx-step--wide { max-width: 860px; }
.qx-step:focus { outline: none; }
.qx-step.is-entering { animation: qx-in 0.46s var(--ease) both; }
.qx-step.is-entering-back { animation: qx-in-back 0.46s var(--ease) both; }
@keyframes qx-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes qx-in-back { from { opacity: 0; transform: translateY(-22px); } to { opacity: 1; transform: none; } }

.qx-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 650; letter-spacing: 0.11em; text-transform: uppercase; color: var(--violet-ink);
}
.qx-kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.qx-title {
  font-family: var(--font-display); font-weight: 700; color: var(--ink);
  font-size: clamp(1.7rem, 1.2rem + 1.8vw, 2.45rem); line-height: 1.12; letter-spacing: -0.028em;
}
.qx-title--xl { font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.4rem); line-height: 1.06; }
.qx-lead { font-size: var(--step-1); line-height: 1.55; color: var(--ink-2); max-width: 36em; }
.qx-help { color: var(--ink-3); margin-top: -6px; }
.qx-note { color: var(--ink-3); font-size: 0.9375rem; font-style: italic; }
.qx-legal { color: var(--ink-3); font-size: 0.875rem; }
.qx-logos img { height: 24px; }
.qx-logos img.nemi__nb { height: 30px; }

.qx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 8px; }
.qx-hint { color: var(--ink-3); font-size: 0.875rem; }
@media (hover: none), (max-width: 640px) { .qx-hint { display: none; } }
.qx-link {
  background: none; border: 0; padding: 0; font: inherit; color: var(--violet-ink);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.qx-resume { font-size: 0.9375rem; color: var(--ink-3); }
.qx-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Les trois temps, sur l'accueil */
.qx-promise { display: grid; gap: 10px; margin: 6px 0 0; padding: 0; list-style: none; }
@media (min-width: 700px) { .qx-promise { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.qx-promise li {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-s);
}
.qx-promise strong { display: block; color: var(--ink); }
.qx-promise li > span:last-child { font-size: 0.9375rem; color: var(--ink-3); line-height: 1.4; }
.qx-promise__n {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--violet-soft); color: var(--violet-ink); font-weight: 700; font-size: 0.875rem;
}

/* ── Champs ───────────────────────────────────────────────────────────── */

.qx-fields { display: grid; gap: 16px; }
@media (min-width: 640px) {
  .qx-fields--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qx-fields--address { grid-template-columns: 160px minmax(0, 1fr); }
  .qx-field--wide { grid-column: 1 / -1; }
}
.qx-field { display: grid; gap: 7px; min-width: 0; }
.qx-field > span { font-weight: 600; color: var(--ink); font-size: 0.9375rem; }
.qx-field small { font-weight: 500; color: var(--ink-3); font-size: 0.8125rem; margin-left: 4px; }
.qx-field input {
  width: 100%; min-height: 56px; padding: 0 18px;
  font: inherit; font-size: 1.125rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line-2); border-radius: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.qx-field input::placeholder { color: #a3a6c2; }
.qx-field input:hover { border-color: rgba(108, 99, 255, 0.4); }
.qx-field input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.16); }
.qx-field input[aria-invalid="true"] { border-color: var(--coral-ink); }
.qx-field--reveal { animation: qx-in 0.35s var(--ease) both; }
.qx-error { color: var(--coral-ink); font-size: 0.9rem; font-style: normal; font-weight: 600; }

/* La lettre qui choisit au clavier */
.qx-key {
  flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px;
  font-family: var(--font-mono); font-size: 0.75rem; font-weight: 500;
  border: 1px solid var(--line-2); background: var(--paper); color: var(--ink-3);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
@media (hover: none) { .qx-key { display: none; } }

/* ── Choix ────────────────────────────────────────────────────────────── */

.qx-choices { display: grid; gap: 10px; }
@media (min-width: 640px) { .qx-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.qx-choice, .qx-test, .qx-offer {
  position: relative; cursor: pointer; background: var(--paper);
  border: 1.5px solid var(--line-2); border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease), background-color 0.2s;
}
.qx-choice input, .qx-test input, .qx-offer input { position: absolute; opacity: 0; pointer-events: none; }
.qx-choice:hover, .qx-test:hover, .qx-offer:hover { border-color: rgba(108, 99, 255, 0.5); box-shadow: var(--shadow-s); transform: translateY(-1px); }
.qx-choice:has(input:focus-visible), .qx-test:has(input:focus-visible), .qx-offer:has(input:focus-visible) {
  outline: 3px solid rgba(108, 99, 255, 0.55); outline-offset: 3px;
}
.qx-choice:has(input:checked), .qx-test:has(input:checked), .qx-offer:has(input:checked) {
  border-color: var(--violet-600); background: #fbfaff; box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.14), var(--shadow-s);
}
:is(.qx-choice, .qx-test, .qx-offer):has(input:checked) .qx-key { background: var(--violet-600); border-color: var(--violet-600); color: #fff; }
.qx-choice.is-pulse, .qx-test.is-pulse, .qx-offer.is-pulse { animation: qx-pulse 0.32s var(--ease); }
@keyframes qx-pulse { 50% { transform: scale(0.985); } }

.qx-choice { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; }
.qx-choice__body { display: grid; gap: 2px; min-width: 0; }
.qx-choice__body strong { color: var(--ink); font-size: 1.0625rem; }
.qx-choice__body > span { color: var(--ink-3); font-size: 0.9375rem; line-height: 1.4; }
.qx-choice--price .qx-choice__body > span { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; }
.qx-choice__save { font-style: normal; font-size: 0.875rem; font-weight: 600; color: var(--mint-ink); }
.qx-choice__save:empty { display: none; }

/* Les deux tests */
.qx-tests { display: grid; gap: 14px; }
@media (min-width: 560px) { .qx-tests { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.qx-test { display: grid; overflow: hidden; }
.qx-test__cover { display: block; aspect-ratio: 16 / 9; background: var(--mist-2); overflow: hidden; }
.qx-test__cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.qx-test:hover .qx-test__cover img { transform: scale(1.03); }
.qx-test__body {
  display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 2px; align-items: center;
  padding: 16px 18px 18px;
}
.qx-test__body strong { font-family: var(--font-display); font-size: 1.35rem; color: var(--ink); letter-spacing: -0.01em; }
.qx-test__body > span:last-child { grid-column: 1 / -1; color: var(--ink-3); font-size: 0.9375rem; line-height: 1.4; }
.qx-tick {
  position: absolute; top: 12px; right: 12px; display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid var(--line-2); color: transparent; transition: all 0.25s var(--ease);
}
.qx-tick .i { width: 18px; height: 18px; stroke-width: 2.6; }
.qx-test:has(input:checked) .qx-tick { background: var(--violet-600); border-color: var(--violet-600); color: #fff; transform: scale(1.06); }

/* Les offres */
.qx-offers { display: grid; gap: 14px; }
/* Une offre par ligne : à gauche son nom et son prix, à droite ce qu'elle contient. Trois colonnes
   à côté du devis ne laissaient que 140 px par offre. */
.qx-offer { display: flex; flex-direction: column; gap: 6px; padding: 20px; }
@media (min-width: 700px) {
  .qx-offer { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); column-gap: 28px; row-gap: 4px; align-content: start; }
  .qx-offer__head, .qx-offer__price, .qx-offer__alt { grid-column: 1; }
  .qx-offer__list { grid-column: 2; grid-row: 1 / span 3; margin: 0; padding: 0 0 0 24px; border-top: 0; border-left: 1px solid var(--line); align-self: center; }
}
.qx-offer--featured { border-color: rgba(108, 99, 255, 0.45); }
.qx-offer__badge {
  position: absolute; top: -12px; left: 18px; padding: 3px 10px; border-radius: var(--pill);
  background: var(--violet-600); color: #fff; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em;
}
.qx-offer__head { display: flex; align-items: center; gap: 10px; }
.qx-offer__head strong { color: var(--ink); font-size: 1.0625rem; }
.qx-offer__price { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.qx-offer__price b {
  font-family: var(--font-display); font-size: 1.85rem; color: var(--ink); letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.qx-offer__price small, .qx-offer__alt { color: var(--ink-3); font-size: 0.875rem; }
.qx-offer__list { display: grid; gap: 8px; margin: 10px 0 0; padding: 12px 0 0; list-style: none; border-top: 1px solid var(--line); font-size: 0.9375rem; line-height: 1.4; }
.qx-offer__list li { display: flex; gap: 8px; align-items: flex-start; }
.qx-offer__list .i { margin-top: 2px; width: 1em; height: 1em; stroke-width: 2.4; }
.qx-offer__list .is-in .i { color: var(--mint-ink); }
.qx-offer__list .is-out { color: var(--ink-3); }

/* Le nombre de personnes */
.qx-qty { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 10px; }
.qx-qty__btn {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--line-2); color: var(--ink); cursor: pointer;
  transition: border-color 0.2s, transform 0.15s var(--ease);
}
.qx-qty__btn:hover { border-color: var(--violet); }
.qx-qty__btn:active { transform: scale(0.94); }
.qx-qty__btn:disabled { opacity: 0.4; cursor: default; }
.qx-qty__value input {
  width: 3.2ch; min-width: 140px; text-align: center; border: 0; background: transparent;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(3.6rem, 3rem + 3vw, 5rem);
  color: var(--ink); letter-spacing: -0.04em; font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: textfield;
}
.qx-qty__value input::-webkit-outer-spin-button, .qx-qty__value input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qx-qty__value input:focus { outline: none; border-bottom: 3px solid var(--violet); }
.qx-qty__label { text-align: center; color: var(--ink-3); font-weight: 600; margin-top: -10px; }

/* Choix rapides du nombre de professionnels (formulaire des structures) */
.qx-qty__presets { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.qx-qty__presets button {
  min-width: 52px; padding: 8px 14px; border-radius: var(--pill); cursor: pointer;
  border: 1.5px solid var(--line-2); background: var(--paper); color: var(--ink-2);
  font: inherit; font-weight: 600; font-variant-numeric: tabular-nums;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}
.qx-qty__presets button:hover { border-color: var(--violet); color: var(--violet-ink); }
.qx-qty__presets button.is-on { background: var(--violet-600); border-color: var(--violet-600); color: #fff; }
.qx-qty__presets button:focus-visible { outline: 3px solid rgba(108, 99, 255, 0.35); outline-offset: 2px; }

/* Le badge d'accueil (formulaire des structures, qui n'a pas de logos partenaires) */
.qx-badge {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; justify-self: start;
  width: max-content; max-width: 100%; padding: 6px 12px; border-radius: var(--pill); background: var(--violet-soft); color: var(--violet-ink);
  font-size: 0.875rem; font-weight: 650;
}
.qx-badge .i { width: 1.1em; height: 1.1em; }

/* La remise des structures, en coupon : le montant en grand sur un tampon violet (texte blanc
   seulement sur #5A51F0), la condition à côté, séparés par un pointillé. */
.qx-perk {
  position: relative; display: flex; align-items: stretch; max-width: 560px;
  border-radius: var(--radius); background: var(--violet-soft);
  border: 1.5px solid var(--violet-150); overflow: hidden;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.qx-perk__stamp {
  flex: none; display: grid; place-content: center; justify-items: center; gap: 2px;
  min-width: 118px; padding: 14px 16px; background: var(--violet-600); color: #fff; text-align: center;
}
.qx-perk__stamp b {
  font-family: var(--font-display); font-size: 1.65rem; line-height: 1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.qx-perk__stamp small { font-size: 0.8125rem; font-weight: 600; opacity: 0.92; white-space: nowrap; }
.qx-perk__text {
  position: relative; display: grid; align-content: center; gap: 2px; min-width: 0;
  padding: 14px 18px 14px 22px; color: var(--ink-2); font-size: 0.9375rem; line-height: 1.45;
}
/* La découpe du coupon : un pointillé et deux demi-cercles, accrochés au bord du texte (le tampon
   s'élargit avec le montant : « −1 200 € »), et rognés par le coupon. */
.qx-perk__text { border-left: 2px dashed rgba(90, 81, 240, 0.35); }
.qx-perk__text::before, .qx-perk__text::after {
  content: ""; position: absolute; left: -9px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--mist); border: 1.5px solid var(--violet-150);
}
.qx-perk__text::before { top: -9px; }
.qx-perk__text::after { bottom: -9px; }
.qx-perk__text strong { color: var(--ink); font-size: 1rem; }
.qx-perk--center { margin: 22px auto 0; }
.qx-perk.is-on { border-color: var(--violet-600); box-shadow: 0 10px 28px -16px rgba(90, 81, 240, 0.55); }
.qx-perk.is-pop .qx-perk__stamp b { animation: qx-perk-pop 0.45s var(--ease); }
@keyframes qx-perk-pop { 40% { transform: scale(1.12); } }
@media (max-width: 420px) {
  .qx-perk__stamp { min-width: 96px; padding: 12px 10px; }
  .qx-perk__stamp b { font-size: 1.35rem; }
  .qx-perk__text { padding: 12px 14px 12px 18px; font-size: 0.875rem; }
}

/* Les options d'une structure : Neurobase toujours compris, puis des cases à cocher */
.qx-included {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center;
  padding: 16px 18px; border-radius: var(--radius); background: var(--violet-soft);
  border: 1.5px solid rgba(108, 99, 255, 0.25);
}
.qx-included__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--paper); color: var(--violet-ink); }
.qx-included__icon .i { width: 22px; height: 22px; }
.qx-included__body { display: grid; gap: 2px; min-width: 0; }
.qx-included__body strong { color: var(--ink); font-size: 1.0625rem; }
.qx-included__body span { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.45; }
.qx-included__tag {
  grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--pill); background: var(--paper); color: var(--mint-ink);
  font-size: 0.8125rem; font-weight: 700;
}
.qx-included__tag .i { width: 1em; height: 1em; stroke-width: 2.6; }
@media (min-width: 640px) {
  .qx-included { grid-template-columns: auto 1fr auto; }
  .qx-included__tag { grid-column: auto; justify-self: end; }
}
.qx-options { display: grid; gap: 12px; margin-top: 14px; }
@media (min-width: 760px) { .qx-options { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.qx-option {
  position: relative; cursor: pointer; display: grid; gap: 12px; align-content: start;
  padding: 18px 18px 20px; background: var(--paper);
  border: 1.5px solid var(--line-2); border-radius: var(--radius);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease), background-color 0.2s;
}
.qx-option input { position: absolute; opacity: 0; pointer-events: none; }
.qx-option:hover { border-color: rgba(108, 99, 255, 0.5); box-shadow: var(--shadow-s); transform: translateY(-1px); }
.qx-option:has(input:focus-visible) { outline: 3px solid rgba(108, 99, 255, 0.35); outline-offset: 2px; }
.qx-option:has(input:checked) { border-color: var(--violet-600); background: #fbfaff; box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.14), var(--shadow-s); }
.qx-option:has(input:checked) .qx-key { background: var(--violet-600); border-color: var(--violet-600); color: #fff; }
.qx-option:has(input:checked) .qx-tick { background: var(--violet-600); border-color: var(--violet-600); color: #fff; transform: scale(1.06); }
.qx-option.is-pulse { animation: qx-pulse 0.32s var(--ease); }
.qx-option__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--violet-soft); color: var(--violet-ink); }
.qx-option__icon .i { width: 22px; height: 22px; }
.qx-option__icon--ai { background: var(--ai); color: #fff; }
.qx-option__icon--coral { background: var(--coral-soft); color: var(--coral-ink); }
.qx-option__body { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; row-gap: 4px; align-items: center; }
.qx-option__body strong { color: var(--ink); font-size: 1.0625rem; }
.qx-option__body > span:last-child { grid-column: 1 / -1; color: var(--ink-3); font-size: 0.9375rem; line-height: 1.45; }
@media (hover: none) { .qx-option__body { grid-template-columns: 1fr; } }

/* ── Récapitulatif ────────────────────────────────────────────────────── */

.qx-recap {
  margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-l);
  box-shadow: var(--shadow-s); overflow: hidden;
}
.qx-recap > div {
  display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) auto; gap: 12px; align-items: baseline;
  padding: 14px 20px;
}
.qx-recap > div + div { border-top: 1px solid var(--line); }
.qx-recap dt { color: var(--ink-3); font-size: 0.9375rem; }
.qx-recap dd { margin: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
.qx-recap dd small { display: block; font-weight: 400; color: var(--ink-3); }
.qx-recap button {
  background: none; border: 0; padding: 4px 8px; border-radius: 8px; font: inherit; font-size: 0.875rem;
  font-weight: 600; color: var(--violet-ink); cursor: pointer;
}
.qx-recap button:hover { background: var(--violet-soft); }
@media (max-width: 560px) {
  .qx-recap > div { grid-template-columns: minmax(0, 1fr) auto; }
  .qx-recap dt { grid-column: 1 / -1; font-size: 0.8125rem; margin-bottom: -8px; }
}

.qx-estimate {
  display: grid; gap: 2px; padding: 18px 20px; border-radius: var(--radius);
  background: var(--violet-soft); border: 1px solid var(--violet-150);
}
.qx-estimate__label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--violet-ink); }
.qx-estimate__amount { font-family: var(--font-display); font-weight: 700; font-size: 1.75rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.qx-estimate__amount small { font-family: var(--font-body); font-weight: 500; font-size: 0.9375rem; color: var(--ink-3); }
.qx-estimate__note { font-size: 0.875rem; color: var(--ink-3); }
@media (min-width: 1080px) { .qx-estimate { display: none; } }

/* ── Navigation entre les questions ───────────────────────────────────── */

.qx-nav {
  display: flex; align-items: center; gap: 16px; width: 100%; max-width: 640px; margin: 28px auto 0;
}
.qx-nav.is-wide { max-width: 860px; }
.qx-nav .btn { margin-left: auto; }
.qx-back {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 12px; margin-left: -12px;
  background: none; border: 0; border-radius: var(--pill); font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.qx-back:hover { background: var(--paper); color: var(--ink); }
.qx-back:disabled { visibility: hidden; }
@media (max-width: 640px) {
  .qx-stage { padding-bottom: 104px; justify-content: flex-start; }
  .qx-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; margin: 0; max-width: none;
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.94); border-top: 1px solid var(--line);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  }
  .qx-nav .btn { flex: 1; }
  .qx-back { margin-left: 0; }
}

/* ── Merci ────────────────────────────────────────────────────────────── */

.qx-step--done { justify-items: start; }
.qx-done__mark {
  display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%;
  background: var(--mint-soft); color: var(--mint-ink); animation: qx-pop 0.6s var(--ease) both;
}
.qx-done__mark .i { width: 36px; height: 36px; stroke-width: 2.6; }
@keyframes qx-pop { 0% { transform: scale(0.4); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: none; } }
.qx-timeline { display: grid; gap: 0; margin: 6px 0 4px; padding: 0; list-style: none; }
.qx-timeline li { display: flex; gap: 14px; align-items: center; position: relative; padding: 8px 0; color: var(--ink-2); }
.qx-timeline li + li::before { content: ""; position: absolute; left: 15px; top: -10px; height: 20px; width: 2px; background: var(--line-2); }
.qx-timeline li > span {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--line-2); font-weight: 700; font-size: 0.875rem; color: var(--ink-3);
}
.qx-timeline li.is-done > span { background: var(--mint-soft); border-color: var(--mint-soft); color: var(--mint-ink); }
.qx-timeline li > span .i { width: 16px; height: 16px; stroke-width: 2.8; }
.qx-payload { width: 100%; background: var(--paper); border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 12px 16px; }
.qx-payload summary { cursor: pointer; font-weight: 600; color: var(--ink-2); }
.qx-payload pre { margin: 10px 0 0; max-height: 320px; overflow: auto; font-family: var(--font-mono); font-size: 0.78rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ── Le devis qui se remplit ──────────────────────────────────────────── */

.qx-ticket { display: none; }
@media (min-width: 1080px) {
  .qx-ticket { display: block; padding-block: clamp(28px, 6vh, 72px); }
  .qx-ticket__paper { position: sticky; top: calc(var(--bar-h) + 28px); }
}
.qx-ticket__paper {
  position: relative; padding: 22px 22px 18px; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: var(--shadow);
}
.qx-ticket__head {
  position: relative; display: grid; gap: 6px; padding-bottom: 16px; margin-bottom: 6px;
  border-bottom: 1.5px dashed var(--line-2);
}
/* Les perforations d'un ticket, au bout du pointillé */
.qx-ticket__head::before, .qx-ticket__head::after {
  content: ""; position: absolute; bottom: -10px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--mist); border: 1px solid var(--line);
}
.qx-ticket__head::before { left: -32px; clip-path: inset(0 0 0 50%); }
.qx-ticket__head::after { right: -32px; clip-path: inset(0 50% 0 0); }
.qx-ticket__title { font-family: var(--font-display); font-weight: 700; color: var(--ink); font-size: 1.15rem; }
.qx-ticket__logos { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 0.8rem; }
.qx-ticket__logos img { height: 14px; width: auto; }
.qx-ticket__logos img + span + img { height: 18px; }
.qx-ticket__lines { margin: 0; }
.qx-ticket__lines > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.qx-ticket__lines dt { color: var(--ink-3); font-size: 0.875rem; }
.qx-ticket__lines dd { margin: 0; color: var(--ink); font-weight: 600; font-size: 0.9375rem; line-height: 1.4; overflow-wrap: anywhere; border-radius: 6px; }
.qx-ticket__lines dd small { display: block; font-weight: 400; color: var(--ink-3); }
[data-empty]:empty::before { content: attr(data-empty); color: #b3b6cf; font-weight: 500; }
.is-fresh { animation: qx-fresh 1.2s var(--ease); }
@keyframes qx-fresh { 0% { background: var(--violet-150); } 100% { background: transparent; } }
.qx-ticket__total { display: grid; gap: 2px; padding-top: 14px; }
.qx-ticket__total > span { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--violet-ink); }
.qx-ticket__total strong { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); line-height: 1.2; font-variant-numeric: tabular-nums; border-radius: 6px; }
.qx-ticket__total strong small { display: block; font-family: var(--font-body); font-size: 0.875rem; font-weight: 500; color: var(--ink-3); }
.qx-ticket__total strong:empty::before { font-size: 1rem; font-family: var(--font-body); }
.qx-ticket__foot { margin-top: 10px; font-size: 0.8125rem; color: var(--ink-3); }

.qx-noscript { max-width: 640px; margin: 40px auto; padding: 0 var(--gutter); }

@media (prefers-reduced-motion: reduce) {
  .qx-step.is-entering, .qx-step.is-entering-back, .qx-field--reveal, .qx-done__mark, .is-fresh,
  .qx-choice.is-pulse, .qx-test.is-pulse, .qx-offer.is-pulse, .qx-option.is-pulse, .qx-perk.is-pop .qx-perk__stamp b { animation: none; }
  .qx-bar__progress > span, .qx-test__cover img, .qx-option { transition: none; }
  .qx-option:hover { transform: none; }
}

/* Les communes du code postal, en boutons sous « Ville » */
.qx-cities { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: -6px; font-size: 0.9375rem; animation: qx-in 0.3s var(--ease) both; }
.qx-cities__label { color: var(--ink-3); width: 100%; }
.qx-cities__pick {
  min-height: 40px; padding: 0 14px; border-radius: var(--pill); cursor: pointer;
  background: var(--paper); border: 1.5px solid var(--line-2); color: var(--ink); font: inherit; font-weight: 600;
  transition: border-color 0.2s, background-color 0.2s;
}
.qx-cities__pick:hover { border-color: var(--violet); background: var(--violet-soft); }
.qx-cities__ok { display: inline-flex; align-items: center; gap: 6px; color: var(--mint-ink); }
.qx-cities__ok strong { color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .qx-cities { animation: none; } }
