:root {
  --bg: #f6f4ef;
  --ink: #0f0f10;
  --mut: #5c5a55;
  --line: #e2ded5;
  --acc: #ff4d1f;
  --acc-t: #c93a12;
  --card: #fff;
  --r: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--acc-t); }
img { max-width: 100%; height: auto; }

.wrap { width: min(720px, calc(100% - 40px)); margin: 0 auto; }
.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 10px;
  top: 10px;
  z-index: 9;
  background: #fff;
  padding: 8px 12px;
}

.top {
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}
.bar { display: flex; align-items: center; height: 64px; }
.logo {
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.logo span { color: var(--acc); }

main { flex: 1; padding: 36px 0 64px; }

.carte {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 32px 28px 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--mut);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 5vw, 2.3rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-weight: 800;
}

.intro { margin: 0 0 28px; color: var(--mut); }

.progression { margin: 0 0 8px; }
.progression-barre {
  height: 8px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
}
.progression-barre span {
  display: block;
  height: 100%;
  width: 25%;
  background: var(--acc);
  border-radius: 99px;
  transition: width 0.25s ease;
}
.etape-statut {
  margin: 0 0 22px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--mut);
}

.etape {
  margin: 0;
  padding: 0;
  border: 0;
}
.etape > legend,
.etape > #titre-etape-1,
.etape legend:first-child {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0 0 20px;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.champ, .choix { display: block; margin: 0 0 22px; }
.champ { font-weight: 600; font-size: 0.95rem; }
.champ input,
.champ textarea {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-weight: 400;
  font-size: 16px;
  background: var(--bg);
  color: var(--ink);
}
.champ textarea { resize: vertical; min-height: 110px; }
.champ input:focus,
.champ textarea:focus {
  outline: 3px solid var(--acc);
  outline-offset: 2px;
  border-color: var(--acc);
}

.choix { border: 0; padding: 0; margin: 0 0 22px; }
.choix > legend {
  padding: 0;
  margin: 0 0 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  font-weight: 400;
  cursor: pointer;
  min-height: 44px;
}
.opt:hover { border-color: var(--ink); }
.opt:has(input:checked) {
  border-color: var(--ink);
  background: #fff4ef;
}
.opt input {
  margin: 3px 0 0;
  width: 18px;
  height: 18px;
  accent-color: var(--acc-t);
  flex-shrink: 0;
}

.indice { color: var(--mut); font-weight: 400; font-size: 0.88rem; }
.compteur {
  display: block;
  margin-top: 6px;
  text-align: right;
  color: var(--mut);
  font-size: 0.8rem;
  font-weight: 400;
}

.grille-2 { display: grid; gap: 0 16px; }
@media (min-width: 600px) {
  .grille-2 { grid-template-columns: 1fr 1fr; }
}

.consentement {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 8px 0 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 400;
  cursor: pointer;
}
.consentement input {
  margin: 3px 0 0;
  width: 18px;
  height: 18px;
  accent-color: var(--acc-t);
  flex-shrink: 0;
}

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

.erreur-formulaire {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff4ef;
  border: 1px solid var(--acc);
  color: var(--acc-t);
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--acc); border-color: var(--acc); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { color: #fff; background: var(--acc); border-color: var(--acc); }
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--acc);
  outline-offset: 3px;
}

.message p { color: var(--mut); }
.message a { font-weight: 600; }

.pied {
  border-top: 1px solid var(--line);
  padding: 22px 0;
  font-size: 0.95rem;
}
.pied p { margin: 0; }
.pied a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }

@media (max-width: 600px) {
  .wrap { width: min(100% - 28px, 720px); }
  .carte { padding: 24px 18px 22px; }
  .actions { justify-content: stretch; }
  .actions .btn { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

[hidden] { display: none !important; }
