/* ACMPR Québec — site public et formulaires */

:root {
  --green-950: #0b2a20;
  --green-900: #123f30;
  --green-700: #1b6a4c;
  --green-500: #2f9e6f;
  --green-300: #8fd3b1;
  --green-100: #e5f3eb;
  --green-50: #f2f9f5;
  --sand: #f7f5ef;
  --ink: #17221d;
  --muted: #5a6b63;
  --line: #e1e7e3;
  --white: #ffffff;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --warn-bg: #fff8e6;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(16, 40, 30, .06), 0 8px 24px rgba(16, 40, 30, .08);
  --shadow-lg: 0 2px 4px rgba(16, 40, 30, .06), 0 24px 48px rgba(16, 40, 30, .12);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
}
img, svg { max-width: 100%; }
a { color: var(--green-700); }
a:hover { color: var(--green-900); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--green-500); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 640px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.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;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--green-900); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em;
  color: var(--green-700); margin-bottom: .75em;
}
.lead { font-size: 1.15rem; color: var(--muted); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 0 24px; border-radius: 999px; border: 2px solid var(--green-900);
  background: var(--green-900); color: #fff; font: inherit; font-weight: 600; text-decoration: none;
  cursor: pointer; transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.btn:hover { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--green-900); border-color: var(--line); }
.btn-ghost:hover { background: var(--green-50); color: var(--green-900); border-color: var(--green-300); }
.btn-small { min-height: 40px; padding: 0 18px; font-size: .95rem; }
.btn-lg { min-height: 54px; padding: 0 30px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn.is-loading::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand img { display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.1rem; }
.brand-text small { color: var(--muted); font-size: .8rem; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:not(.btn):hover { color: var(--green-700); }
.nav-toggle { display: none; }

@media (max-width: 820px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px;
    border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; content: "";
  }
  .nav-toggle-bar::before { position: absolute; top: -6px; }
  .nav-toggle-bar::after { position: absolute; top: 6px; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 72px; flex-direction: column; align-items: stretch;
    gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 20px; box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin-top: 16px; }
}

/* ---------- Héros ---------- */
.hero {
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(63, 179, 127, .18), transparent 60%),
    linear-gradient(180deg, var(--green-50), #fff 85%);
  padding: 72px 0 64px;
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 { color: var(--green-950); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.hero-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: .95rem; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; }
.hero-points li::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%; background: var(--green-100)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b6a4c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center/12px no-repeat;
}
.hero-art { position: relative; min-height: 360px; }
.hero-leaf { position: absolute; right: -40px; top: -30px; width: 320px; opacity: .9; }
.hero-leaf path { fill: var(--green-100); }
.hero-leaf .vein { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; }
.hero-card {
  position: relative; z-index: 1; margin: 40px 0 0 auto; max-width: 360px; background: #fff;
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 22px 24px 26px; border: 1px solid var(--line);
}
.hero-card-head { display: flex; gap: 6px; margin-bottom: 18px; }
.hero-card-head .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.hero-card-title { font-weight: 700; margin-bottom: 10px; }
.hero-progress { height: 8px; border-radius: 99px; background: var(--green-100); overflow: hidden; margin-bottom: 18px; }
.hero-progress span { display: block; height: 100%; width: 75%; background: linear-gradient(90deg, var(--green-500), var(--green-700)); border-radius: inherit; }
.hero-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hero-checks li { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.hero-checks li::before {
  content: ""; flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px dashed var(--green-300);
}
.hero-checks li.done { color: var(--ink); font-weight: 500; }
.hero-checks li.done::before {
  border: 0; background: var(--green-500)
    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' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center/15px no-repeat;
}

@media (max-width: 900px) {
  .hero { padding: 48px 0; }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { min-height: 0; }
  .hero-leaf { display: none; }
  .hero-card { margin: 0; max-width: none; }
}

/* ---------- Bandeau d'information ---------- */
.notice-band { background: var(--green-900); color: #dcefe5; padding: 22px 0; }
.notice-band p { margin: 0; font-size: .98rem; }
.notice-band strong { color: #fff; }

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-alt { background: var(--sand); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head p:last-child { color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px;
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card p { color: var(--muted); margin: 0; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--green-100); display: grid; place-items: center; margin-bottom: 18px;
}
.card-icon svg, .contact-line svg {
  width: 26px; height: 26px; fill: none; stroke: var(--green-700); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: none; }
.steps li { background: #fff; border-radius: var(--radius-lg); padding: 26px; border: 1px solid var(--line); position: relative; }
.steps p { color: var(--muted); margin: 0; font-size: .96rem; }
.step-num {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--green-900); color: #fff; font-weight: 700; margin-bottom: 16px;
}
.steps-note { margin: 28px 0 0; color: var(--muted); font-size: .95rem; }

.resources { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.resources a {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 16px; row-gap: 2px;
  padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink);
  transition: border-color .15s, background .15s;
}
.resources a:hover { border-color: var(--green-300); background: var(--green-50); }
.res-type {
  grid-row: span 2; align-self: start; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: var(--green-100); color: var(--green-700); padding: 6px 9px; border-radius: 8px;
}
.res-title { font-weight: 600; }
.res-title::after { content: " ↗"; color: var(--green-500); }
.res-desc { color: var(--muted); font-size: .94rem; }

.section-contact { background: linear-gradient(135deg, var(--green-900), var(--green-950)); color: #dcefe5; }
.section-contact h2 { color: #fff; }
.section-contact .eyebrow { color: var(--green-300); }
.contact-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.contact-card { background: #fff; color: var(--ink); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-lg); display: grid; gap: 14px; }
.contact-line { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-weight: 600; word-break: break-all; }

@media (max-width: 900px) {
  .section { padding: 64px 0; }
  .cards, .steps, .resources, .contact-inner { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Pied de page ---------- */
.site-footer { background: var(--green-950); color: #a9c4b7; padding: 40px 0; font-size: .92rem; }
.site-footer a { color: #dcefe5; }
.footer-inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; }
.footer-brand { color: #fff; font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; } }

/* ---------- Texte long ---------- */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.3rem; margin-top: 2em; }
.rich p:last-child { margin-bottom: 0; }
.rich ul { padding-left: 1.2em; margin: 0 0 1em; }
.rich li { margin-bottom: .55em; }
.callout {
  background: var(--warn-bg); border: 1px solid #f3dfa5; border-radius: 12px; padding: 14px 16px; margin: 1em 0 0;
}

/* ======================================================================
   Formulaire interactif (quiz)
   ====================================================================== */
.quiz-body { background: linear-gradient(180deg, var(--green-50), var(--sand)); min-height: 100vh; display: flex; flex-direction: column; }
.quiz-header {
  display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; max-width: 760px; width: 100%; margin: 0 auto;
}
.quiz-secure { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.quiz-secure svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.quiz-main { flex: 1; width: 100%; max-width: 760px; margin: 0 auto; padding: 8px 16px 40px; }
.quiz-footer { text-align: center; font-size: .85rem; color: var(--muted); padding: 20px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.quiz-footer a { color: var(--muted); }

.preview-banner {
  background: var(--warn-bg); border: 1px solid #f3dfa5; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: .92rem;
}

.quiz-card {
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 36px 40px;
  border: 1px solid var(--line);
}
.quiz-card.enter { animation: quiz-in .35s ease both; }
.quiz-card.enter-back { animation: quiz-in-back .35s ease both; }
@keyframes quiz-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes quiz-in-back { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .quiz-card.enter, .quiz-card.enter-back { animation: none; }
  html { scroll-behavior: auto; }
}
@media (max-width: 600px) {
  .quiz-main { padding: 4px 10px 32px; }
  .quiz-card { padding: 24px 18px; border-radius: 18px; }
}

.quiz-intro h1 { font-size: clamp(1.8rem, 5vw, 2.4rem); color: var(--green-950); }
.quiz-intro .rich { font-size: 1.05rem; color: var(--muted); }
.intro-meta { list-style: none; padding: 0; margin: 22px 0 6px; display: flex; flex-wrap: wrap; gap: 8px; }
.intro-meta li { background: var(--green-50); border: 1px solid var(--green-100); color: var(--green-700); border-radius: 999px; padding: 4px 12px; font-size: .88rem; font-weight: 500; }

/* Barre de progression */
.progress { margin-bottom: 26px; }
.progress-top { display: flex; justify-content: space-between; font-size: .88rem; color: var(--muted); margin-bottom: 8px; font-weight: 500; }
.progress-pct { font-variant-numeric: tabular-nums; }
.progress-bar { height: 10px; border-radius: 99px; background: var(--green-100); overflow: hidden; }
.progress-fill {
  display: block; height: 100%; width: 3%; border-radius: inherit;
  background: linear-gradient(90deg, var(--green-500), var(--green-700));
  transition: width .5s cubic-bezier(.2, .8, .2, 1);
}

.page-title { font-size: clamp(1.45rem, 4vw, 1.9rem); color: var(--green-950); outline: none; }
.page-desc { color: var(--muted); margin-bottom: 8px; }
.questions { display: grid; gap: 26px; margin: 22px 0 8px; }
.q[hidden] { display: none; }
.q-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.q-label { display: block; font-weight: 600; font-size: 1.05rem; margin-bottom: 10px; padding: 0; }
.q-optional { font-weight: 400; color: var(--muted); font-size: .9rem; }
.q-help { color: var(--muted); font-size: .92rem; margin: -4px 0 10px; }
.q-error { color: var(--danger); font-size: .9rem; font-weight: 500; margin: 8px 0 0; min-height: 0; }
.q-error:empty { display: none; }

.field {
  width: 100%; min-height: 52px; padding: 12px 16px; font: inherit; color: var(--ink);
  background: #fff; border: 1.5px solid #cfd8d3; border-radius: 12px; transition: border-color .15s, box-shadow .15s;
}
textarea.field { min-height: 110px; resize: vertical; }
select.field { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235a6b63' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 14px center/18px no-repeat; padding-right: 44px; }
.field:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(47, 158, 111, .18); }
.has-error .field { border-color: var(--danger); }
.field-postal, .field-ramq { text-transform: uppercase; }

/* Choix (cartes) */
.choices { display: grid; gap: 10px; }
.choices-2col { grid-template-columns: repeat(2, 1fr); }
.choices-inline { grid-template-columns: repeat(2, minmax(0, 200px)); }
@media (max-width: 520px) { .choices-2col { grid-template-columns: 1fr; } .choices-inline { grid-template-columns: 1fr 1fr; } }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-box {
  display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 12px 16px;
  border: 1.5px solid #cfd8d3; border-radius: 14px; background: #fff; transition: border-color .15s, background .15s, box-shadow .15s, transform .1s;
}
.choice:hover .choice-box { border-color: var(--green-500); background: var(--green-50); }
.choice input:focus-visible + .choice-box { box-shadow: 0 0 0 4px rgba(47, 158, 111, .25); border-color: var(--green-500); }
.choice input:checked + .choice-box { border-color: var(--green-700); background: var(--green-100); box-shadow: inset 0 0 0 1px var(--green-700); }
.choice:active .choice-box { transform: scale(.99); }
.choice-key {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  border: 1.5px solid #cfd8d3; font-size: .85rem; font-weight: 700; color: var(--muted); background: #fff;
}
.q-multi .choice-key { border-radius: 7px; width: 26px; height: 26px; }
.choice input:checked + .choice-box .choice-key { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.q-multi .choice input:checked + .choice-box .choice-key {
  background: var(--green-700) 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/16px no-repeat;
}
.choice-text { font-weight: 500; }
.has-error .choice-box { border-color: #f2b8b5; }

/* Grille Oui/Non */
.grid-q { display: grid; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; }
.grid-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px;
  border-bottom: 1px solid var(--line); transition: background .15s;
}
.grid-row:last-child { border-bottom: 0; }
.grid-row:nth-child(even) { background: #fbfcfb; }
.grid-row.answered .grid-label::before { background: var(--green-500); border-color: var(--green-500); }
.grid-label { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.grid-label::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid #cfd8d3; }
.grid-opts { display: flex; gap: 6px; flex: none; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pill span {
  display: inline-grid; place-items: center; min-width: 64px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  border: 1.5px solid #cfd8d3; font-weight: 600; font-size: .92rem; background: #fff; transition: all .15s;
}
.pill:hover span { border-color: var(--green-500); }
.pill input:focus-visible + span { box-shadow: 0 0 0 4px rgba(47, 158, 111, .25); }
.pill input:checked + span { background: var(--green-700); border-color: var(--green-700); color: #fff; }
@media (max-width: 520px) {
  .grid-row { flex-direction: column; align-items: stretch; }
  .grid-opts .pill { flex: 1; }
  .pill span { width: 100%; }
}

/* Case de consentement */
.consent { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; padding: 16px; border: 1.5px solid #cfd8d3; border-radius: 14px; background: var(--green-50); }
.consent input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.consent-box { flex: none; width: 26px; height: 26px; border-radius: 7px; border: 2px solid var(--green-700); background: #fff; margin-top: 1px; }
.consent input:checked + .consent-box {
  background: var(--green-700) 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/17px no-repeat;
}
.consent input:focus-visible + .consent-box { box-shadow: 0 0 0 4px rgba(47, 158, 111, .3); }
.consent-text { font-weight: 600; }
.has-error .consent { border-color: var(--danger); background: var(--danger-bg); }

.info-title { font-size: 1.05rem; }
.info-block { background: #fbfcfb; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px 18px 16px; font-size: .96rem; }
.info-block ul { margin-bottom: 0; }

.quiz-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 30px; flex-wrap: wrap-reverse; }
.quiz-intro .quiz-actions { justify-content: flex-start; }
@media (max-width: 520px) { .quiz-actions .btn { flex: 1; } }

/* Révision */
.review { display: grid; gap: 14px; margin: 18px 0; }
.review-section { border: 1px solid var(--line); border-radius: 14px; padding: 14px 18px; }
.review-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.review-head h3 { margin: 0; font-size: 1rem; color: var(--green-700); }
.review dl { margin: 0; }
.review-row { display: grid; grid-template-columns: 1fr 1.2fr; gap: 12px; padding: 7px 0; border-top: 1px solid #eef2ef; font-size: .95rem; }
.review-row:first-child { border-top: 0; }
.review-row dt { color: var(--muted); }
.review-row dd { margin: 0; white-space: pre-line; font-weight: 500; word-break: break-word; }
@media (max-width: 520px) { .review-row { grid-template-columns: 1fr; gap: 0; } }
.link-btn { background: none; border: 0; padding: 4px 6px; color: var(--green-700); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.submit-error { color: var(--danger); background: var(--danger-bg); border-radius: 12px; padding: 12px 14px; font-weight: 500; }
.submit-error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Confirmation */
.quiz-done { text-align: center; padding-top: 48px; padding-bottom: 48px; }
.quiz-done .rich { color: var(--muted); max-width: 520px; margin: 0 auto 24px; }
.done-icon { width: 76px; height: 76px; border-radius: 50%; background: var(--green-100); display: grid; place-items: center; margin: 0 auto 20px; animation: pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.done-icon svg { width: 40px; height: 40px; fill: none; stroke: var(--green-700); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }

/* Carte du corps (zones douloureuses) */
.bodymap-figures { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 640px; margin: 4px auto 0; }
@media (max-width: 560px) { .bodymap-figures { grid-template-columns: 1fr; max-width: 360px; } }
.bodymap-figure { margin: 0; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 8px 8px; }
.bodymap-figure figcaption { font-size: .82rem; font-weight: 600; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .06em; }
.bodymap-svg { display: block; width: 100%; height: auto; margin: 0 auto; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.bodymap-svg .zone { fill: transparent; stroke: none; cursor: pointer; transition: fill .15s; }
.bodymap-svg .zone:hover { fill: rgba(232, 69, 47, .22); }
.bodymap-svg .zone:focus { outline: none; stroke: var(--green-500); stroke-width: 1.2; stroke-dasharray: 3 2; }
.bodymap-svg .zone.on { stroke: none; }
.bodymap-side { font: 700 9px var(--font); fill: #9aaaa2; text-anchor: middle; pointer-events: none; }
.bodymap-legend { text-align: center; font-size: .8rem; color: var(--muted); margin: 8px 0 0; }
.bodymap-credit { text-align: center; font-size: .7rem; color: #9aaaa2; margin: 2px 0 0; }
.bodymap-hint { text-align: center; font-size: .92rem; font-weight: 600; color: var(--green-700); min-height: 1.5em; margin: 6px 0 10px; }
.bodymap-summary { background: var(--green-50); border: 1px solid var(--green-100); border-radius: 14px; padding: 12px 14px; }
.bodymap-empty { margin: 0; color: var(--muted); font-size: .94rem; }
.bodymap-count { margin: 0 0 8px; font-size: .95rem; }
.bodymap-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bodymap-chip {
  display: inline-flex; align-items: center; gap: 2px; border: 1px solid #f1b5ad; background: #fdecea; color: #a92e20;
  border-radius: 999px; padding: 5px 12px; font: inherit; font-size: .86rem; font-weight: 600; cursor: pointer;
}
.bodymap-chip:hover { background: #fbd9d4; }
.has-error .bodymap-figure { border-color: var(--danger); }

/* Image d'en-tête propre à chaque formulaire (logo ou bannière) */
.form-banner { margin: 0 0 22px; }
.form-banner img { display: block; width: 100%; max-width: 100%; height: auto; margin: 0 auto; border-radius: 10px; }

/* Page d'arrivée : choix de la langue */
.quiz-lang { text-align: center; }
.lang-title { margin: 6px 0 8px; }
.lang-intro { color: var(--muted); margin: 0 0 26px; font-size: 1.05rem; }
.lang-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lang-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 18px;
  background: var(--green-50); border: 2px solid var(--line); border-radius: var(--radius);
  font: inherit; color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, transform .15s;
}
.lang-btn:hover, .lang-btn:focus-visible { border-color: var(--green-500); background: var(--green-100); transform: translateY(-2px); }
.lang-btn:focus-visible { outline: 3px solid var(--green-300); outline-offset: 2px; }
.lang-name { font-size: 1.5rem; font-weight: 700; color: var(--green-900); }
.lang-sub { font-size: .95rem; color: var(--muted); }
@media (max-width: 520px) { .lang-choices { grid-template-columns: 1fr; } .lang-btn { padding: 20px 16px; } }

/* Outils de la page d'accueil : réécouter le message, changer de langue */
.intro-tools { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px 14px; margin: -8px 0 4px; }
.intro-tools .link-btn { font-size: .92rem; }

/* Barre du message vocal d'accueil */
.welcome-audio {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50;
  display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px);
  padding: 10px 12px 10px 16px; background: var(--green-900); color: #fff;
  border-radius: 999px; box-shadow: var(--shadow-lg); font-size: .95rem;
}
.welcome-audio[hidden] { display: none; }
.welcome-audio-stop {
  background: #fff; color: var(--green-900); border: 0; border-radius: 999px;
  padding: 6px 14px; font: inherit; font-weight: 700; cursor: pointer;
}
.welcome-audio-stop:focus-visible { outline: 3px solid var(--green-300); outline-offset: 2px; }
