/* Teamens — interface participant. Identité : vert profond, corail, jaune, fond crème. Mobile d'abord, contrastes AA. */
:root {
  --bg: #fdf8f1;
  --card: #fffefb;
  --ink: #0c3d35;
  --muted: #526a65;
  --line: #eadfce;
  --accent: #0f6b5c;
  --accent-strong: #0c4f44;
  --accent-ink: #ffffff;
  --accent-soft: #e6f3ef;
  --leaf: #5fbfa8;
  --warm: #c9452b;
  --warm-strong: #a93a23;
  --warm-soft: #fce6df;
  --coral: #f2674a;
  --sun: #f6b94a;
  --sun-soft: #fdf1db;
  --focus: #0b5cad;
  --radius: 20px;
  --shadow: 0 1px 2px rgb(12 61 53 / 0.05), 0 10px 28px rgb(12 61 53 / 0.07);
  --display: "Avenir Next", "Nunito Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --sans: "Avenir Next", "Nunito Sans", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1f1c; --card: #142a26; --ink: #f4efe6; --muted: #a9bdb8; --line: #27413c;
    --accent: #5fd0b8; --accent-strong: #86e0cc; --accent-ink: #07231e; --accent-soft: #163630;
    --warm: #ff8f73; --warm-strong: #ffa88f; --warm-soft: #3a231d; --sun-soft: #3a3020; --focus: #7cb7ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans);
  font-size: 1.0625rem; line-height: 1.55; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}
h1, h2, h3 { font-family: var(--display); line-height: 1.12; margin: 0 0 0.6em; font-weight: 800; letter-spacing: -0.025em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 5vw, 2.7rem); }
h2 { font-size: clamp(1.35rem, 3.2vw, 1.7rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; }
.hl { color: var(--warm); }
p { margin: 0 0 1em; }
a { color: var(--accent-strong); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
main:focus, [tabindex="-1"]:focus { outline: none; } /* titres et légendes reçoivent le focus par programme à chaque écran : pas d'anneau parasite */
.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: var(--gutter); top: -4rem; background: var(--ink); color: var(--bg); padding: 0.6rem 1rem; border-radius: 8px; z-index: 10; }
.skip-link:focus { top: 0.5rem; }

/* Barre supérieure */
.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; padding: 1rem var(--gutter); max-width: 66rem; width: 100%; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-family: var(--display); font-size: 1.75rem; font-weight: 800; letter-spacing: -0.04em; color: var(--ink); text-decoration: none; line-height: 1; }
.brand-mark { width: 2.4rem; height: 2.4rem; display: block; }
.progress-area { flex: 1 1 14rem; min-width: 0; order: 3; width: 100%; }
@media (min-width: 640px) { .progress-area { order: 0; width: auto; } }
.progress-label { margin: 0 0 0.25rem; font-size: 0.875rem; color: var(--muted); }
.progress-bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.progress-bar > span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--leaf), var(--sun), var(--coral)); transition: width 0.5s ease; }
.chip { margin-left: auto; font: inherit; font-size: 0.85rem; padding: 0.4rem 0.9rem; min-height: 2.5rem; border-radius: 99px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); }

main { flex: 1; width: 100%; max-width: 66rem; margin: 0 auto; padding: 0.5rem var(--gutter) 3rem; }
.screen { animation: enter 0.45s ease both; max-width: 46rem; margin: 0 auto; }
.screen.wide { max-width: 66rem; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.reduced-motion .screen, .reduced-motion .progress-bar > span { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { .screen, .progress-bar > span { animation: none !important; transition: none !important; } }

.eyebrow { text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.75rem; font-weight: 700; color: var(--accent-strong); margin: 0 0 0.6rem; }
.lead { font-size: 1.18rem; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.35rem; margin: 0 0 1.25rem; }
.card > :last-child { margin-bottom: 0; }

/* Accueil : slogan et formes organiques */
.hero { position: relative; isolation: isolate; padding: 1rem 0 0.5rem; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: -1; background-repeat: no-repeat; background-size: contain; pointer-events: none; }
.hero::before { width: 15rem; height: 15rem; right: -3rem; top: -2rem; background-image: url("/shape-coral.svg"); }
.hero::after { width: 12rem; height: 12rem; right: 5rem; top: 5rem; background-image: url("/shape-teal.svg"); }
.hero-title { font-size: clamp(2.3rem, 8vw, 3.6rem); line-height: 1.02; letter-spacing: -0.035em; margin-bottom: 0.45em; }
.facts { display: grid; gap: 0.85rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); margin: 1.25rem 0; padding: 0; list-style: none; }
.facts li { border-radius: var(--radius); padding: 1rem 1.15rem; font-size: 0.97rem; background: var(--accent-soft); }
.facts li:nth-child(2) { background: var(--sun-soft); }
.facts li:nth-child(3) { background: var(--warm-soft); }
.facts strong { display: block; font-family: var(--display); font-size: 1.05rem; margin-bottom: 0.15rem; }
.chapters { counter-reset: ch; list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.chapters li { counter-increment: ch; display: flex; gap: 0.75rem; align-items: baseline; font-weight: 600; }
.chapters li::before { content: counter(ch); flex: none; width: 1.7rem; height: 1.7rem; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 0.85rem; font-weight: 800; }
.chapters li:nth-child(2)::before { background: var(--coral); color: #3a1208; }
.chapters li:nth-child(3)::before { background: var(--sun); color: #3a2a05; }
.chapters li:nth-child(4)::before { background: var(--leaf); color: #05302a; }

/* Boutons et formulaires : action principale en corail, comme sur le site */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font: inherit; font-weight: 700; font-size: 1.1rem; min-height: 3.25rem; padding: 0.65rem 1.75rem; border-radius: 99px; border: 2px solid var(--warm); background: var(--warm); color: #fff; cursor: pointer; text-decoration: none; transition: transform 0.15s ease, background 0.15s, box-shadow 0.15s; box-shadow: 0 6px 16px rgb(201 69 43 / 0.25); }
.btn:hover:not(:disabled) { background: var(--warm-strong); border-color: var(--warm-strong); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.btn.secondary { background: transparent; color: var(--accent-strong); border-color: var(--accent-strong); box-shadow: none; }
@media (prefers-color-scheme: dark) { .btn { color: #2b0f08; } }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin-top: 1.5rem; }
fieldset { border: 0; margin: 0 0 1.5rem; padding: 0; min-width: 0; }
legend { padding: 0; font-weight: 700; margin-bottom: 0.75rem; }
.field { margin: 0 0 1rem; }
.field label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
input[type="text"] { width: 100%; font: inherit; padding: 0.7rem 0.9rem; min-height: 3rem; border-radius: 14px; border: 1.5px solid var(--muted); background: var(--card); color: var(--ink); }
.hint { font-size: 0.9rem; color: var(--muted); margin-top: 0.3rem; }
.error { background: var(--warm-soft); border: 1px solid var(--warm); color: var(--ink); border-radius: 14px; padding: 0.8rem 1rem; margin: 1rem 0; }

/* Cartes de choix (boutons radio natifs, accessibles au clavier) */
.choices { display: grid; gap: 0.7rem; margin: 0; padding: 0; list-style: none; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice label { display: flex; gap: 0.9rem; align-items: flex-start; padding: 0.95rem 1.1rem; border: 1.5px solid var(--line); border-radius: 16px; background: var(--card); cursor: pointer; transition: border-color 0.15s, background 0.15s; font-weight: 400; margin: 0; }
.choice label::before { content: ""; flex: none; width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; border-radius: 50%; border: 2px solid var(--muted); background: var(--card); transition: all 0.15s; }
.choice:hover label { border-color: var(--accent); }
.choice input:checked + label { border-color: var(--accent); background: var(--accent-soft); }
.choice input:checked + label::before { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 0 45%, transparent 50%); }
.choice input[type="checkbox"] + label::before { border-radius: 6px; }
.choice input[type="checkbox"]:checked + label::before { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--card); }
.choice input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice.skip label { border-style: dashed; color: var(--muted); font-size: 0.95rem; padding: 0.7rem 1.1rem; }

/* Échelle bipolaire */
.bipolar { margin: 1.25rem 0 0.75rem; }
.poles { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; font-family: var(--display); font-weight: 600; font-size: 1.1rem; line-height: 1.35; }
.poles .pole-right { text-align: right; }
.pole-tag { display: block; font-family: var(--sans); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.2rem; }
.dots { display: flex; justify-content: space-between; align-items: center; gap: 0.4rem; margin: 0; padding: 0; list-style: none; }
.dot { position: relative; flex: 1; display: flex; justify-content: center; }
.dot input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.dot label { display: grid; place-items: center; border-radius: 50%; border: 2.5px solid var(--muted); background: var(--card); cursor: pointer; transition: all 0.15s; width: var(--s); height: var(--s); }
.dot:nth-child(1), .dot:nth-child(5) { --s: 3.4rem; }
.dot:nth-child(2), .dot:nth-child(4) { --s: 2.9rem; }
.dot:nth-child(3) { --s: 2.4rem; }
.dot:nth-child(1) label { border-color: var(--leaf); }
.dot:nth-child(5) label { border-color: var(--coral); }
.dot:hover label { border-color: var(--accent); }
.dot input:checked + label { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.dot:nth-child(4) input:checked + label, .dot:nth-child(5) input:checked + label { background: var(--warm); border-color: var(--warm); box-shadow: 0 0 0 4px var(--warm-soft); }
.dot input:focus-visible + label { outline: 3px solid var(--focus); outline-offset: 3px; }
.dot-caption { text-align: center; font-size: 0.85rem; color: var(--muted); min-height: 1.6em; margin-top: 0.9rem; }
@media (max-width: 420px) { .dot:nth-child(1), .dot:nth-child(5) { --s: 3rem; } .dot:nth-child(2), .dot:nth-child(4) { --s: 2.7rem; } .dot:nth-child(3) { --s: 2.4rem; } }

/* Scénario et conversation simulée */
.scene { background: var(--card); border: 1px solid var(--line); border-left: 8px solid var(--coral); border-radius: var(--radius); padding: 1.15rem 1.3rem; margin: 0 0 1.5rem; box-shadow: var(--shadow); }
.scene h2 { font-size: 1.2rem; }
.scene .narration { font-size: 1.08rem; margin-bottom: 0.9rem; }
.bubble { position: relative; max-width: 92%; margin: 0.4rem 0 0.9rem; padding: 0.85rem 1.05rem; border-radius: 20px 20px 20px 5px; background: var(--sun-soft); font-style: italic; }
.bubble::before { content: "Interlocuteur"; display: block; font-style: normal; font-weight: 800; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--warm); margin-bottom: 0.15rem; }
.response-block { margin-bottom: 1.6rem; }
.response-block > legend { font-family: var(--display); font-size: 1.15rem; font-weight: 700; }
.note-line { font-size: 0.9rem; color: var(--muted); }

.save-status { font-size: 0.88rem; color: var(--muted); display: inline-flex; gap: 0.4rem; align-items: center; }
.save-status::before { content: "✓"; color: var(--accent-strong); font-weight: 800; }

/* Restitution */
.axis { margin: 1rem 0 1.4rem; }
.axis-head { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.25rem 1rem; font-family: var(--display); font-weight: 800; }
.axis-head .conf { font-family: var(--sans); font-weight: 400; font-size: 0.85rem; color: var(--muted); }
.bar-row { display: grid; grid-template-columns: 5.5rem 1fr 2.6rem; align-items: center; gap: 0.6rem; margin: 0.3rem 0; font-size: 0.9rem; }
.bar { height: 14px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; }
.bar.natural > span { background: var(--leaf); }
.bar.adapted > span { background: var(--coral); }
.track { position: relative; height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--accent-soft), var(--sun-soft), var(--warm-soft)); margin: 0.9rem 0 0.4rem; }
.track .marker { position: absolute; top: -5px; width: 20px; height: 20px; margin-left: -10px; border-radius: 50%; background: var(--ink); border: 3px solid var(--card); }
.track .mid { position: absolute; left: 50%; top: -3px; width: 2px; height: 16px; background: var(--muted); opacity: 0.5; }
.track-labels { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--muted); gap: 1rem; }
.legend { display: flex; gap: 1.2rem; flex-wrap: wrap; font-size: 0.9rem; margin: 0 0 1rem; }
.legend i { display: inline-block; width: 0.9rem; height: 0.9rem; border-radius: 50%; margin-right: 0.35rem; vertical-align: -0.1rem; }
.legend .dot-n { background: var(--leaf); }
.legend .dot-a { background: var(--coral); }
.grid-2 { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 820px) { .grid-2 { grid-template-columns: 1fr 1fr; align-items: start; } }
.limits { border-left: 8px solid var(--leaf); }
.empty { color: var(--muted); font-style: italic; }

.footer { max-width: 66rem; width: 100%; margin: 0 auto; padding: 1rem var(--gutter) 2rem; font-size: 0.85rem; color: var(--muted); }
.noscript { padding: 1rem; background: var(--warm-soft); }
.loading { text-align: center; padding: 4rem 0; color: var(--muted); }

@media print {
  body { background: #fff; color: #000; }
  .topbar, .footer, .actions, .skip-link, .pdf-actions { display: none !important; }
  .hero::before, .hero::after { display: none; }
  .card, .scene { box-shadow: none; break-inside: avoid; }
  .screen { animation: none; max-width: none; }
}
