/* Quiz « trois échéances » — feuille unique, aux couleurs d'Optimal Energy, dans l'esprit des questionnaires à la
 * Typeform : une question à la fois dans une carte, des réponses en une colonne, Entrée pour suivre, la navigation
 * et la progression en tête de la carte, une barre en haut pour la marque et le nom du quiz.
 *
 * Direction artistique : fiche « Système de design Optimal Energy » (Connaissances n°64028) et mesures de
 * www.optimal-energy.fr — Nobel, vert #008e37 et vert clair #64b878, encre #161f28, titres en capitales 800
 * soulignés de vert clair, boutons pilule qui passent à l'encre, halo signature des cartes.
 *
 * Nommage : préfixe qz- (le quiz peut être intégré dans une autre page), noms en anglais, un nom par rôle ;
 * les états en is-* (is-selected, is-visible, is-urgent, is-past, is-unavailable, is-ok/check/todo/na) ;
 * les variables --qz-* (le moteur les lit aussi pour colorer ses schémas).
 *
 * Plan : 1. jetons · 2. coquille (barre du haut, feuille et son en-tête de progression, pied) · 3. typographie et niveaux
 * d'information · 4. réponses · 5. boutons · 6. écrans intermédiaires · 7. formulaire · 8. rapport ·
 * 9. barre d'action sur téléphone · 10. animation · 11. écrans étroits · 12. impression.
 */

/* ---- 1. Jetons ---------------------------------------------------------------------------------------------- */
:root {
  --qz-bg: #f8f8f8; --qz-surface: #ffffff; --qz-ink: #161f28; --qz-muted: #5f6873; --qz-line: #e5e7eb;
  --qz-green: #008e37; --qz-green-ink: #008e37; --qz-green-dark: #005b23; --qz-green-soft: #64b878; --qz-green-wash: #eef7f1;
  --qz-ok: #008e37; --qz-mid: #b45309; --qz-bad: #c62828; --qz-on-green: #ffffff; --qz-on-status: #ffffff; --qz-logo: #008e37;
  --qz-ink-solid: #161f28;
  --qz-font: nobel, "Jost", "Century Gothic", ui-sans-serif, system-ui, sans-serif;
  --qz-radius: 10px;
  --qz-halo: 0 0 7px rgba(0, 0, 0, 0.1);
  --qz-focus: 0 0 0 3px rgba(0, 142, 55, 0.18);
  --qz-content: 44rem;       /* largeur du contenu */
  --qz-topbar-h: 64px;
  --qz-bar-bg: rgba(255, 255, 255, 0.9);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --qz-bg: #10161d; --qz-surface: #18212b; --qz-ink: #eef1f3; --qz-muted: #9ba5ae; --qz-line: #2a3541;
    --qz-green-ink: #64b878; --qz-green-wash: #15281d;
    --qz-ok: #64b878; --qz-mid: #fbbf24; --qz-bad: #f87171; --qz-on-status: #10161d; --qz-logo: #ffffff;
    --qz-bar-bg: rgba(24, 33, 43, 0.9); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --qz-bg: #10161d; --qz-surface: #18212b; --qz-ink: #eef1f3; --qz-muted: #9ba5ae; --qz-line: #2a3541;
  --qz-green-ink: #64b878; --qz-green-wash: #15281d;
  --qz-ok: #64b878; --qz-mid: #fbbf24; --qz-bad: #f87171; --qz-on-status: #10161d; --qz-logo: #ffffff;
  --qz-bar-bg: rgba(24, 33, 43, 0.9); color-scheme: dark;
}

/* ---- 2. Coquille -------------------------------------------------------------------------------------------- */
body { margin: 0; background: var(--qz-bg); color: var(--qz-ink); }
.qz-app {
  box-sizing: border-box; /* la marge sous la barre du haut compte dans la hauteur : pas de défilement pour rien */
  font-family: var(--qz-font); font-size: 17px; font-weight: 300; line-height: 1.3; color: var(--qz-ink);
  background: var(--qz-bg); min-height: 100vh; min-height: 100svh; padding-top: calc(var(--qz-topbar-h) + 28px);
}
.qz-app *, .qz-app *::before, .qz-app *::after { box-sizing: border-box; }
.qz-app [hidden] { display: none !important; }
.qz-app strong, .qz-app b { font-weight: 700; }
.qz-app :focus-visible { outline: none; box-shadow: var(--qz-focus); }
.qz-container { width: 100%; max-width: calc(var(--qz-content) + 32px); margin: 0 auto; padding-inline: 16px; }

/* Barre du haut : givrée, comme l'en-tête de la démo et du site */
.qz-topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 6; height: var(--qz-topbar-h);
  background: var(--qz-bar-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--qz-line);
}
.qz-topbar .qz-container { height: 100%; display: flex; align-items: center; gap: 16px; }
.qz-logo { flex: none; color: var(--qz-logo); display: inline-flex; width: 150px; overflow: hidden; }
.qz-logo-img { flex: none; width: 150px; max-width: none; height: auto; display: block; }
/* Nom du quiz, à côté du logo : son titre, puis son secteur en étiquette */
.qz-name { min-width: 0; display: flex; align-items: center; gap: 10px; padding-left: 16px; border-left: 1px solid var(--qz-line); }
.qz-name-title { font-size: 15px; font-weight: 800; line-height: 1.1; text-transform: uppercase; color: var(--qz-ink); white-space: nowrap; }
.qz-name-sector {
  padding: 4px 8px 3px; border-radius: 6px; background: var(--qz-green-wash); color: var(--qz-green-ink);
  font-size: 11px; font-weight: 800; line-height: 1.1; text-transform: uppercase; white-space: nowrap;
}

/* Feuille : pendant le questionnaire, une carte blanche qui encadre l'écran courant, avec en tête la navigation et la
 * progression (collées sous la barre du haut quand l'écran défile). Sur le rapport, la feuille s'efface et ce sont
 * ses blocs qui deviennent des cartes (section 8). Pas de hauteur imposée : le pied de page suit la carte. */
.qz-sheet {
  width: calc(100% - 32px); max-width: calc(var(--qz-content) + 96px); margin: 0 auto;
  background: var(--qz-surface); border: 1px solid var(--qz-line); border-radius: 16px; box-shadow: var(--qz-halo);
}
.qz-stage { padding: 36px 48px 40px; }
.qz-app:has(#qz-progress[hidden]) .qz-sheet {
  width: 100%; max-width: calc(var(--qz-content) + 32px); padding-inline: 16px; background: none; border: 0; box-shadow: none;
}
.qz-app:has(#qz-progress[hidden]) .qz-stage { padding: 0; }

/* En-tête de la carte : retour, progression, pourcentage */
.qz-progress {
  position: sticky; top: var(--qz-topbar-h); z-index: 4; display: flex; align-items: center; gap: 14px;
  padding: 14px 24px; border-bottom: 1px solid var(--qz-line); border-radius: 16px 16px 0 0; background: var(--qz-surface);
}
.qz-progress-track { flex: 1; height: 6px; border-radius: 99px; background: var(--qz-line); overflow: hidden; }
.qz-progress-track span { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--qz-green); transition: width .35s ease; }
.qz-percent { min-width: 3.4em; text-align: right; font-size: 14px; font-weight: 800; color: var(--qz-green-ink); font-variant-numeric: tabular-nums; }
.qz-back {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px 7px; border: 1px solid var(--qz-line); border-radius: 24px;
  background: var(--qz-surface); color: var(--qz-ink); font: inherit; font-size: 12px; font-weight: 800; line-height: 1;
  text-transform: uppercase; cursor: pointer; transition: border-color .2s, color .2s;
}
.qz-back::before { /* flèche dessinée : Nobel n'a pas le glyphe */
  content: ""; width: 6px; height: 6px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
}
.qz-back:hover { border-color: var(--qz-green); color: var(--qz-green-ink); }

.qz-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; padding-block: 24px 32px; font-size: 13px; color: var(--qz-muted); }
.qz-link, .qz-legal-ref a, .qz-cards a { color: var(--qz-green-ink); text-underline-offset: 3px; }

/* ---- 3. Typographie et niveaux d'information -------------------------------------------------------------------
 *   titre d'étape  : accueil, « rapport prêt », formulaire, rapport — 30 px, capitales, barre verte claire
 *   thème          : étiquette verte au-dessus de la question
 *   question       : 26 px en casse de phrase
 *   aide, référence: 15 et 14 px, gris
 * Le moteur rend titres d'étape et questions avec la même balise .qz-heading : l'étape se reconnaît à ce qui suit. */
.qz-heading { font-size: 26px; font-weight: 800; line-height: 1.2; margin: 0 0 12px; text-wrap: balance; outline: none; }
.qz-heading:has(~ .qz-question), .qz-transition .qz-heading, .qz-heading:has(+ .qz-score), .qz-heading:has(~ .qz-form) {
  position: relative; font-size: 30px; line-height: 1.1; text-transform: uppercase; margin-bottom: 36px;
}
.qz-heading:has(~ .qz-question)::after, .qz-transition .qz-heading::after,
.qz-heading:has(+ .qz-score)::after, .qz-heading:has(~ .qz-form)::after {
  content: ""; position: absolute; left: 0; bottom: -14px; width: 30px; height: 3px; border-radius: 2px; background: var(--qz-green-soft);
}
.qz-heading:has(+ .qz-score) { margin-bottom: 30px; }
.qz-theme {
  align-self: flex-start; display: inline-block; margin: 0 0 14px; padding: 5px 10px 4px; border-radius: 6px;
  background: var(--qz-green-wash); color: var(--qz-green-ink); font-size: 12px; font-weight: 800; text-transform: uppercase;
}
.qz-question { font-size: 20px; font-weight: 800; line-height: 1.2; margin: 28px 0 8px; text-wrap: balance; }
.qz-lead { max-width: 40rem; margin: 0 0 4px; color: var(--qz-muted); }
.qz-promise { margin: 0 0 8px; color: var(--qz-green-ink); font-size: 14px; font-weight: 800; text-transform: uppercase; }
.qz-hint { max-width: 40rem; margin: 0 0 6px; font-size: 15px; line-height: 1.4; color: var(--qz-muted); }
.qz-legal-ref { max-width: 40rem; margin: 0 0 6px; font-size: 14px; color: var(--qz-muted); }
.qz-reassurance { margin: 16px 0 0; font-size: 13px; color: var(--qz-muted); }
.qz-small { margin: 0; font-size: 14px; color: var(--qz-muted); }
.qz-review-flag { /* « À valider » : contenu en attente de relecture, visible tant que le quiz est en aperçu */
  display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--qz-bad); border-radius: 4px;
  font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--qz-bad); vertical-align: middle; cursor: help;
}
.qz-preview-notice { margin: 0 0 16px; padding: 8px 12px; border: 1px dashed var(--qz-line); border-radius: 8px; font-size: 13px; color: var(--qz-muted); }

/* ---- 4. Réponses : une colonne, comme un choix Typeform, en vert Optimal Energy -------------------------------- */
.qz-choices { display: grid; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; } /* toute la largeur de la carte */
.qz-group { margin-top: 10px; font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--qz-muted); }
.qz-group:first-child { margin-top: 0; }
.qz-choice {
  position: relative; width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  background: var(--qz-green-wash); border: 1px solid rgba(0, 142, 55, 0.3); border-radius: var(--qz-radius);
  font: inherit; font-size: 17px; font-weight: 400; line-height: 1.3; text-align: left; color: var(--qz-ink); cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.qz-choice:hover { background: rgba(0, 142, 55, 0.14); border-color: var(--qz-green); }
.qz-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.qz-choice:focus-within { box-shadow: var(--qz-focus); }
.qz-choice strong { font-weight: 700; }
.qz-key {
  flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px;
  border: 1px solid rgba(0, 142, 55, 0.45); background: var(--qz-surface); color: var(--qz-green-ink);
  font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.qz-choice::after { /* coche, dessinée, à droite de la réponse retenue */
  content: ""; flex: none; margin-left: auto; width: 6px; height: 12px; margin-right: 4px;
  border-right: 2px solid var(--qz-green); border-bottom: 2px solid var(--qz-green); transform: rotate(45deg) translateY(-2px); opacity: 0;
}
.qz-choice.is-selected, .qz-choice[aria-pressed="true"] { border-color: var(--qz-green); box-shadow: inset 0 0 0 1px var(--qz-green); }
.qz-choice.is-selected .qz-key, .qz-choice[aria-pressed="true"] .qz-key { background: var(--qz-green); border-color: var(--qz-green); color: var(--qz-on-green); }
.qz-choice.is-selected::after, .qz-choice[aria-pressed="true"]::after { opacity: 1; }
.qz-choices + .qz-actions { margin-top: 24px; }
@media (hover: hover) and (pointer: fine) { /* au clavier, Entrée fait suivre (comme le « OK » de Typeform) */
  .qz-choices ~ .qz-actions::after, .qz-transition .qz-actions::after { content: "ou touche Entrée"; font-size: 13px; color: var(--qz-muted); }
}

/* ---- 5. Boutons : pilule verte, capitales, passe à l'encre avec un reflet oblique (bouton du site) ------------- */
.qz-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.qz-button {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 110px; padding: 14px 26px 13px; border: 1.5px solid var(--qz-green); border-radius: 24px;
  background: var(--qz-green); color: var(--qz-on-green); font: inherit; font-size: 12px; font-weight: 800; line-height: 1;
  text-transform: uppercase; text-decoration: none; cursor: pointer; transition: all 0.5s ease-in-out;
}
.qz-button::before {
  content: ""; position: absolute; top: 0; left: -20%; width: 24px; height: 100%; opacity: 0;
  transform: skew(-15deg); transition: all 0.6s ease-in-out;
}
.qz-button:not([disabled]):hover { background: var(--qz-ink-solid); border-color: var(--qz-ink-solid); color: #ffffff; }
.qz-button:not([disabled]):hover::before { left: 120%; opacity: 0.5; background: #ffffff; }
.qz-button[disabled] { opacity: .45; cursor: not-allowed; }
.qz-button.is-ghost { background: var(--qz-surface); color: var(--qz-green-ink); }
.qz-error { margin: 2px 0 0; min-height: 1.2em; font-size: 14px; color: var(--qz-bad); }
.qz-form .qz-error:empty { display: none; } /* réapparaît dès qu'un message s'y écrit */

/* ---- 6. Écrans intermédiaires : encarts, schémas, photos ---------------------------------------------------- */
.qz-transition { display: grid; gap: 18px; }
.qz-transition .qz-heading { margin: 0 0 18px; }
.qz-transition .qz-actions { margin-top: 6px; }
.qz-panel { /* dans la carte de l'écran : un fond gris clair, pas une seconde carte */
  display: flex; flex-direction: column; align-items: stretch; gap: 16px; padding: 20px;
  background: var(--qz-bg); border-radius: var(--qz-radius);
}
.qz-panel p { margin: 0; }
.qz-panel > svg.qz-icon { width: 72px; height: 72px; color: var(--qz-green-ink); }
.qz-panel > svg.qz-diagram { width: 100%; max-width: 34rem; height: auto; display: block; margin: 0 auto; color: var(--qz-green-ink); }
.qz-diagram text, .qz-building text { font-family: var(--qz-font); }
/* Échéancier : l'échéance clé respire, doucement */
@keyframes qz-pulse { from { transform: scale(.7); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
.qz-diagram .qz-pulse { transform-box: fill-box; transform-origin: center; animation: qz-pulse 2.2s ease-out infinite; }
.qz-caption { margin: -6px 0 0 !important; font-size: 13px; text-align: center; color: var(--qz-muted); }
.qz-photo { margin: 0; display: grid; gap: 6px; }
.qz-photo img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; display: block; background: var(--qz-line); }
.qz-photo figcaption, .qz-credit { font-size: 13px; color: var(--qz-muted); }
.qz-credit { margin-top: 6px !important; }

/* ---- 7. Formulaire ------------------------------------------------------------------------------------------ */
.qz-teaser {
  display: flex; align-items: center; gap: 16px; margin-bottom: 32px; padding: 18px 20px;
  background: var(--qz-ink-solid); color: #ffffff; border-radius: var(--qz-radius);
}
.qz-teaser p { margin: 0; }
.qz-big-number { font-size: 42px; font-weight: 800; line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qz-big-number small { font-size: 14px; font-weight: 300; opacity: .75; }
.qz-form { display: grid; gap: 14px; }
.qz-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.qz-field { display: grid; gap: 5px; min-width: 0; align-content: end; }
.qz-field label, .qz-callback label { font-size: 14px; font-weight: 700; }
.qz-field input, .qz-callback input {
  width: 100%; padding: 11px 12px; border: 1.5px solid var(--qz-line); border-radius: var(--qz-radius);
  background: var(--qz-surface); color: var(--qz-ink); font: inherit; font-size: 16px;
}
.qz-field input:focus, .qz-callback input:focus { outline: none; border-color: var(--qz-green); box-shadow: var(--qz-focus); }
.qz-field input[aria-invalid="true"] { border-color: var(--qz-bad); }
.qz-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; } /* piège à robots */
.qz-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--qz-muted); }
.qz-consent input { flex: none; width: 20px; height: 20px; margin-top: 2px; accent-color: var(--qz-green); }
.qz-legal { margin: -4px 0 0; font-size: 12px; line-height: 1.5; color: var(--qz-muted); }
.qz-form .qz-actions { margin-top: 8px; }

/* ---- 8. Rapport ----------------------------------------------------------------------------------------------- */
.qz-score { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 8px; }
.qz-score b { font-size: 56px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.qz-score > span:not(.qz-level) { color: var(--qz-muted); }
.qz-level { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--qz-on-status); }
.qz-verdict { max-width: 40rem; margin: 12px 0 4px; font-size: 20px; font-weight: 800; line-height: 1.25; text-wrap: balance; }
.qz-risk { margin: 0; color: var(--qz-muted); }
.qz-note { margin: 14px 0 0; padding: 10px 14px; border-radius: 8px; background: var(--qz-green-wash); font-size: 15px; }
.qz-failure { margin: 0 0 16px; padding: 12px 16px; border-left: 4px solid var(--qz-bad); }

/* Le rapport en cartes : l'en-tête (note, verdict) puis chaque section ; leurs éléments passent sur fond gris clair */
.qz-stage > div:has(> .qz-score), .qz-section:not(.qz-booking) {
  padding: 32px 36px; background: var(--qz-surface); border: 1px solid var(--qz-line); border-radius: 16px; box-shadow: var(--qz-halo);
}
.qz-section { margin-top: 20px; }
.qz-section .qz-card, .qz-section .qz-building, .qz-section details, .qz-section .qz-related-item { background: var(--qz-bg); box-shadow: none; }
.qz-section .qz-related-item:hover { background: var(--qz-green-wash); }
.qz-section > h2 {
  position: relative; margin: 0 0 26px; font-size: 24px; font-weight: 800; line-height: 1.1; text-transform: uppercase; color: var(--qz-ink);
}
.qz-section > h2::after {
  content: ""; position: absolute; left: 0; bottom: -12px; width: 30px; height: 3px; border-radius: 2px; background: var(--qz-green-soft);
}
.qz-section-intro { margin: -4px 0 14px; font-size: 15px; color: var(--qz-muted); }

/* Prochaine étape : le bandeau encre de la démo */
.qz-booking { display: grid; gap: 12px; margin-top: 20px; padding: 28px 36px; border-radius: var(--qz-radius); background: var(--qz-ink-solid); color: #ffffff; }
.qz-booking > h2 { margin: 0; color: inherit; opacity: .75; font-size: 14px; }
.qz-booking > h2::after { display: none; }
.qz-booking-body { display: grid; gap: 12px; outline: none; }
.qz-booking p { margin: 0; }
.qz-booking .qz-small { color: inherit; opacity: .85; }
.qz-booking .qz-actions { margin-top: 4px; }
.qz-booking .qz-button:not(.is-ghost):not([disabled]):hover { background: #ffffff; border-color: #ffffff; color: var(--qz-ink-solid); }
.qz-booking .qz-button.is-ghost { background: transparent; color: #ffffff; border-color: #ffffff; }
.qz-booking .qz-button.is-ghost:not([disabled]):hover { background: #ffffff; color: var(--qz-ink-solid); }
.qz-booking .qz-review-flag { color: inherit; border-color: currentColor; }
.qz-booking-link { color: inherit; font-weight: 700; text-underline-offset: 3px; }
.qz-booking .qz-checklist li::before { border-color: currentColor; }
.qz-booking .qz-error { color: inherit; font-weight: 700; }
.qz-callback { display: grid; gap: 8px; }
.qz-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.qz-callback input { flex: 1 1 12rem; min-width: 0; }

/* Vos thèmes : la coupe du bâtiment, puis une barre par thème */
.qz-building { padding: 14px; background: var(--qz-surface); border-radius: var(--qz-radius); box-shadow: var(--qz-halo); }
.qz-building svg { width: 100%; height: auto; display: block; }
.qz-theme-scores { display: grid; gap: 12px; margin-top: 16px; }
.qz-theme-score { display: grid; grid-template-columns: minmax(0, 1fr) 3.2em; gap: 4px 12px; align-items: center; }
.qz-theme-name { font-size: 16px; font-weight: 400; }
.qz-theme-value { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; }
.qz-track { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--qz-line); overflow: hidden; }
.qz-track span { display: block; height: 100%; border-radius: 99px; }

/* Priorités numérotées, gestes, constats et obligations en cartes */
.qz-priorities { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: p; }
.qz-priorities li { counter-increment: p; display: grid; grid-template-columns: 2.2em minmax(0, 1fr); gap: 12px; align-items: start; }
.qz-priorities li::before {
  content: counter(p); width: 2.2em; height: 2.2em; display: grid; place-items: center; border-radius: 50%;
  background: var(--qz-green); color: var(--qz-on-green); font-weight: 800;
}
.qz-quick-wins { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.qz-quick-wins li { padding: 2px 0 2px 14px; border-left: 3px solid var(--qz-green-soft); }
.qz-cards { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.qz-card { display: grid; gap: 4px; min-width: 0; padding: 14px 16px; background: var(--qz-surface); border: 1px solid transparent; border-radius: var(--qz-radius); box-shadow: var(--qz-halo); }
.qz-card b { font-weight: 700; }
.qz-card.is-urgent { border-color: var(--qz-bad); }
.qz-card a { font-size: 14px; }
.qz-chip { justify-self: start; font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--qz-bad); }
.qz-status { justify-self: start; padding: 1px 7px; border-radius: 4px; font-size: 11px; font-weight: 800; text-transform: uppercase; color: var(--qz-on-status); }
.qz-status.is-ok { background: var(--qz-ok); }
.qz-status.is-check { background: var(--qz-mid); }
.qz-status.is-todo { background: var(--qz-bad); }
.qz-status.is-na { background: var(--qz-muted); }
.qz-deadline { font-size: 15px; font-style: italic; color: var(--qz-muted); }

/* Calendrier */
.qz-timeline { display: grid; margin: 0; padding: 0; list-style: none; }
.qz-timeline li { display: grid; grid-template-columns: 10rem minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--qz-line); }
.qz-timeline li:first-child { border-top: 0; }
.qz-date { font-weight: 800; font-variant-numeric: tabular-nums; }
.qz-date small { display: block; font-size: 12px; font-weight: 300; color: var(--qz-muted); }
.qz-timeline .is-past .qz-date { color: var(--qz-bad); }

/* Qui vous répond, questions fréquentes, pour aller plus loin, PDF */
.qz-checklist { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.qz-checklist li { position: relative; padding-left: 24px; }
.qz-checklist li::before {
  content: ""; position: absolute; left: 4px; top: .5em; width: 9px; height: 5px;
  border-left: 2px solid var(--qz-green-soft); border-bottom: 2px solid var(--qz-green-soft); transform: rotate(-45deg);
}
.qz-faq details { padding: 14px 16px; background: var(--qz-surface); border-radius: var(--qz-radius); box-shadow: var(--qz-halo); }
.qz-faq details + details { margin-top: 10px; }
.qz-faq summary { font-weight: 700; cursor: pointer; }
.qz-faq details p { margin: 8px 0 0; color: var(--qz-muted); }
.qz-related-list { display: grid; gap: 10px; }
.qz-related-item {
  display: block; padding: 14px 16px; background: var(--qz-surface); border-radius: var(--qz-radius); box-shadow: var(--qz-halo);
  color: var(--qz-ink); text-decoration: none; transition: box-shadow .2s, transform .2s;
}
.qz-related-item:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12); }
.qz-related-item b { font-weight: 800; color: var(--qz-green-ink); }
.qz-related-item.is-unavailable { box-shadow: none; border: 1px dashed var(--qz-line); }
.qz-pdf { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.qz-print-footer { display: none; }

/* ---- 9. Barre d'action sur téléphone (rapport : prendre rendez-vous reste à portée) -------------------------- */
.qz-cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: none;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  background: var(--qz-bar-bg); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--qz-line);
}
.qz-cta-bar .qz-button { width: 100%; }

/* ---- 10. Animation : chaque écran entre doucement, élément par élément ------------------------------------- */
@keyframes qz-enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.qz-stage > * { animation: qz-enter .45s cubic-bezier(.2, .7, .2, 1) both; }
.qz-stage > :nth-child(2) { animation-delay: .04s; }
.qz-stage > :nth-child(3) { animation-delay: .08s; }
.qz-stage > :nth-child(4) { animation-delay: .12s; }
.qz-stage > :nth-child(n+5) { animation-delay: .16s; }
@media (prefers-reduced-motion: reduce) {
  .qz-stage > *, .qz-progress-track span, .qz-choice, .qz-button, .qz-diagram .qz-pulse { animation: none; transition: none; }
}

/* ---- 11. Écrans étroits ------------------------------------------------------------------------------------ */
@media (max-width: 34rem) {
  :root { --qz-topbar-h: 56px; }
  .qz-app { padding-top: calc(var(--qz-topbar-h) + 12px); }
  .qz-sheet { width: calc(100% - 20px); border-radius: 14px; }
  .qz-stage { padding: 24px 18px 26px; }
  .qz-progress { padding: 12px 14px; gap: 10px; border-radius: 14px 14px 0 0; }
  .qz-stage > div:has(> .qz-score), .qz-section:not(.qz-booking), .qz-booking { padding: 22px 18px; border-radius: 14px; }
  .qz-logo { width: 29px; }        /* sur téléphone, le seul signet : place au nom du quiz */
  .qz-name { padding-left: 12px; gap: 8px; }
  .qz-name-title { font-size: 13px; }
  .qz-heading { font-size: 21px; }
  .qz-heading:has(~ .qz-question), .qz-transition .qz-heading, .qz-heading:has(+ .qz-score), .qz-heading:has(~ .qz-form) { font-size: 25px; }
  .qz-question { font-size: 18px; }
  .qz-choice { font-size: 16px; padding: 11px 14px; }
  .qz-row { grid-template-columns: 1fr; }
  .qz-cta-bar.is-visible { display: block; }
  .qz-teaser { flex-direction: column; align-items: flex-start; }
  .qz-section > h2 { font-size: 18px; }
  .qz-timeline li { grid-template-columns: 1fr; gap: 2px; }
  .qz-back { padding: 8px 11px 7px; }
}

/* ---- 12. Impression (« Enregistrer en PDF ») ------------------------------------------------------------------ */
@media print {
  :root {
    --qz-bg: #ffffff; --qz-surface: #ffffff; --qz-ink: #161f28; --qz-muted: #4b5563; --qz-line: #d1d5db; --qz-green-ink: #008e37;
    --qz-green-wash: #eef7f1; --qz-ok: #008e37; --qz-mid: #b45309; --qz-bad: #c62828; --qz-on-status: #ffffff; --qz-logo: #008e37;
    color-scheme: light;
  }
  .qz-app { min-height: 0; padding: 0 !important; }
  .qz-topbar { position: static; border: 0; background: none; backdrop-filter: none; }
  .qz-app { display: block; }
  .qz-sheet, .qz-stage, .qz-stage > div:has(> .qz-score), .qz-section:not(.qz-booking) {
    padding: 0 !important; border: 0 !important; box-shadow: none !important; background: none !important;
  }
  .qz-sheet { width: auto !important; max-width: calc(var(--qz-content) + 32px) !important; margin: 0 auto !important; padding-inline: 16px !important; }
  .qz-section:not(.qz-booking) { margin-top: 28px !important; }
  .qz-stage > * { animation: none; }
  .qz-progress, .qz-cta-bar, .qz-booking, .qz-faq, .qz-related, .qz-pdf, .qz-footer, .qz-review-flag, .qz-preview-notice { display: none !important; }
  .qz-print-footer { display: block; margin-top: 24px; font-size: 13px; color: var(--qz-muted); }
  .qz-section > h2 { break-after: avoid; }  /* une section peut se couper, jamais juste après son titre */
  .qz-card, .qz-building, .qz-timeline li, .qz-priorities li, .qz-theme-score { break-inside: avoid; }
  .qz-card, .qz-building, .qz-faq details, .qz-related-item { box-shadow: none; border: 1px solid var(--qz-line); }
  .qz-level, .qz-track span, .qz-priorities li::before, .qz-status { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
