:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1c1c1e;
  --muted: #5d5d63;
  --border: #dcdcd8;
  --accent: #2f5bd3;
  --accent-text: #ffffff;
  --accent-soft: #e8eefc;
  --error: #b42318;
  --error-soft: #fdecea;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141416;
    --surface: #1d1d20;
    --text: #ececef;
    --muted: #a3a3ab;
    --border: #34343a;
    --accent: #7c9cf5;
    --accent-text: #0f1424;
    --accent-soft: #232b44;
    --error: #ff8a80;
    --error-soft: #3a1f1d;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
main { max-width: 640px; margin: 0 auto; padding: 40px 16px 64px; }

.langues { display: flex; justify-content: flex-end; gap: 4px; margin-bottom: 16px; }
.langues button {
  width: auto; min-height: 36px; min-width: 44px; margin: 0; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 14px; font-weight: 600;
}
.langues button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 14px; font-weight: 600; letter-spacing: .02em; }
h1 { margin: 0 0 12px; font-size: clamp(26px, 6vw, 34px); line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
.lead { margin: 0 0 32px; color: var(--muted); }

form, #merci {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 8px 20px 24px;
}
fieldset, .champ { border: 0; margin: 0; padding: 20px 0; border-bottom: 1px solid var(--border); }
legend, .champ > label:first-child { display: block; padding: 0; margin-bottom: 12px; font-weight: 600; }
.num {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px; margin-right: 6px;
  border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  font-size: 13px; font-weight: 700; vertical-align: 1px;
}
.facultatif { margin-left: 4px; color: var(--muted); font-weight: 400; font-size: 14px; }
.aide { margin: -4px 0 10px; color: var(--muted); font-size: 14px; }
.champ .aide:last-child { margin: 10px 0 0; }

fieldset label {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 8px 12px; margin-bottom: 6px;
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
}
fieldset label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
input[type="radio"], input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex: none; }

textarea, input[type="email"] {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit;
}
textarea { resize: vertical; min-height: 84px; }
textarea:focus, input[type="email"]:focus, button:focus-visible, fieldset label:focus-within {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

.invalide legend, .invalide > label:first-child { color: var(--error); }
.erreur { margin: 16px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--error-soft); color: var(--error); }

.cf-turnstile { margin-top: 20px; min-height: 65px; }

button {
  width: 100%; min-height: 48px; margin-top: 16px;
  border: 0; border-radius: 10px;
  background: var(--accent); color: var(--accent-text);
  font: inherit; font-weight: 600; cursor: pointer;
}
button:disabled { opacity: .6; cursor: progress; }

#bloc-cra[hidden] { display: none; }
#merci { padding: 24px 20px; }
#merci h2 { margin: 0 0 8px; }
#merci:focus { outline: none; }

.piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

footer { margin-top: 24px; color: var(--muted); font-size: 14px; }
footer summary { cursor: pointer; font-weight: 600; }
footer p { margin: 8px 0; }
