/* =========================================================
   AUDIT FLASH · DA "Pétrole"
   Teal sombre #0C2429 · Or #E6C57D · Ivoire #F4EEDD
   Instrument Serif (titres) · Space Mono (labels)
   Hanken Grotesk (texte)
   ========================================================= */

:root {
  --petrole: #0C2429;
  --petrole-2: #11333C;
  --petrole-3: #17414D;
  --or: #E6C57D;
  --or-vif: #F0D399;
  --ivoire: #F4EEDD;
  --ivoire-70: rgba(244, 238, 221, 0.72);
  --ivoire-45: rgba(244, 238, 221, 0.45);
  --ivoire-15: rgba(244, 238, 221, 0.16);
  --ivoire-08: rgba(244, 238, 221, 0.08);
  --or-12: rgba(230, 197, 125, 0.12);
  --erreur: #E39075;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "Space Mono", "Courier New", monospace;
  --sans: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --radius: 4px;
  --maxw: 660px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--petrole);
  color: var(--ivoire);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--or); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

.conteneur {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--ivoire-15);
}

.site-header .conteneur {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

.wordmark {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--ivoire);
}

.wordmark:hover { text-decoration: none; color: var(--or); }

.wordmark .point { color: var(--or); }

.header-tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ivoire-45);
  display: none;
}

/* ---------- Hero ---------- */

.hero {
  padding: 48px 0 36px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--or);
  margin-bottom: 18px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 7vw, 52px);
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}

.sous-titre {
  color: var(--ivoire-70);
  font-size: 17px;
  max-width: 56ch;
  margin-bottom: 22px;
}

.reassurance {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ivoire-45);
}

.reassurance .sep { color: var(--or); padding: 0 8px; }

/* ---------- Carte formulaire ---------- */

.carte-form {
  background: var(--petrole-2);
  border: 1px solid var(--ivoire-15);
  border-radius: var(--radius);
  padding: 26px 20px 30px;
  margin-bottom: 64px;
}

.progress {
  margin-bottom: 26px;
}

.progress-piste {
  height: 2px;
  background: var(--ivoire-15);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}

.progress-fil {
  height: 100%;
  width: 0%;
  background: var(--or);
  transition: width 0.35s ease;
}

.etape-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ivoire-45);
}

.etape-titre {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 5.5vw, 34px);
  line-height: 1.15;
  margin: 6px 0 26px;
}

/* ---------- Champs ---------- */

.champ { margin-bottom: 26px; }

.champ:last-of-type { margin-bottom: 8px; }

fieldset.champ { border: 0; }

.label {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ivoire);
  margin-bottom: 10px;
}

.label .optionnel {
  color: var(--ivoire-45);
  text-transform: none;
  letter-spacing: 0.04em;
}

.aide {
  font-size: 14px;
  color: var(--ivoire-45);
  margin-top: 8px;
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  background: var(--petrole);
  border: 1px solid var(--ivoire-15);
  border-radius: var(--radius);
  color: var(--ivoire);
  font-family: var(--sans);
  font-size: 16px;
  padding: 13px 14px;
  transition: border-color 0.2s ease;
  appearance: none;
}

textarea { min-height: 120px; resize: vertical; }

select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23E6C57D' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

select:invalid { color: var(--ivoire-45); }

input::placeholder,
textarea::placeholder { color: var(--ivoire-45); }

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--or);
}

:focus-visible {
  outline: 2px solid var(--or);
  outline-offset: 2px;
}

/* Options en cartes (radio / checklist) */

.options {
  display: grid;
  gap: 10px;
}

.option-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--petrole);
  border: 1px solid var(--ivoire-15);
  border-radius: var(--radius);
  padding: 13px 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.option-card:hover { border-color: var(--ivoire-45); }

.option-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-card .puce {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 3px;
  border: 1px solid var(--ivoire-45);
  border-radius: 50%;
  position: relative;
  transition: border-color 0.2s ease;
}

.option-card .puce.carree { border-radius: 3px; }

.option-card input:checked ~ .puce {
  border-color: var(--or);
}

.option-card input:checked ~ .puce::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--or);
  border-radius: inherit;
}

.option-card input:checked ~ .option-texte { color: var(--ivoire); }

.option-card:has(input:checked) {
  border-color: var(--or);
  background: var(--or-12);
}

.option-card:focus-within {
  outline: 2px solid var(--or);
  outline-offset: 2px;
}

.option-texte {
  font-size: 15.5px;
  color: var(--ivoire-70);
  transition: color 0.2s ease;
}

/* Consentement */

.option-consent { align-items: flex-start; }

.option-consent .option-texte { font-size: 14px; line-height: 1.55; }

.liens-legaux {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ivoire-45);
}

/* Erreurs */

.err {
  display: none;
  color: var(--erreur);
  font-size: 14px;
  margin-top: 8px;
}

.err.visible { display: block; }

.champ.invalide input,
.champ.invalide select,
.champ.invalide textarea {
  border-color: var(--erreur);
}

.form-erreur {
  display: none;
  border: 1px solid var(--erreur);
  border-radius: var(--radius);
  color: var(--erreur);
  font-size: 14.5px;
  padding: 13px 14px;
  margin-top: 18px;
}

.form-erreur.visible { display: block; }

.bandeau-demo {
  border: 1px dashed var(--or);
  border-radius: var(--radius);
  color: var(--or);
  font-family: var(--mono);
  font-size: 12px;
  padding: 12px 14px;
  margin-top: 18px;
}

/* ---------- Navigation étapes ---------- */

.nav-etapes {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  padding: 14px 22px;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent;
}

.btn:active { transform: translateY(1px); }

.btn-or {
  background: var(--or);
  color: var(--petrole);
  border-color: var(--or);
  flex: 1;
}

.btn-or:hover { background: var(--or-vif); border-color: var(--or-vif); }

.btn-or:disabled {
  opacity: 0.55;
  cursor: wait;
}

.btn-ghost {
  background: transparent;
  color: var(--ivoire-70);
  border-color: var(--ivoire-15);
}

.btn-ghost:hover { color: var(--ivoire); border-color: var(--ivoire-45); text-decoration: none; }

/* ---------- Page merci ---------- */

.merci { padding: 64px 0 80px; }

.merci h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 7vw, 48px);
  line-height: 1.12;
  margin-bottom: 30px;
}

.etapes-suivantes {
  list-style: none;
  margin-bottom: 38px;
}

.etapes-suivantes li {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--ivoire-15);
  color: var(--ivoire-70);
  font-size: 16px;
}

.etapes-suivantes li:last-child { border-bottom: 1px solid var(--ivoire-15); }

.etapes-suivantes .num {
  font-family: var(--mono);
  color: var(--or);
  font-size: 13px;
  padding-top: 3px;
}

.merci-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.merci-actions .btn { text-align: center; }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--ivoire-15);
  padding: 22px 0 30px;
}

.site-footer .conteneur {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-liens {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.footer-liens a { color: var(--ivoire-45); }

.footer-liens a:hover { color: var(--or); }

.footer-copy {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ivoire-45);
}

/* ---------- Divers ---------- */

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

noscript .carte-form { padding: 20px; }

/* ---------- Desktop ---------- */

@media (min-width: 720px) {
  .hero { padding: 72px 0 44px; }
  .carte-form { padding: 36px 36px 40px; }
  .header-tag { display: block; }
  .options.deux-colonnes { grid-template-columns: 1fr 1fr; }
  .merci-actions { flex-direction: row; }
}

/* ---------- Accessibilité mouvement ---------- */

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