/* IALocales - enquête terrain. Palette unique : neutres froids + un seul accent vert profond. */

:root {
  --bg: #f7f8f7;
  --surface: #fdfdfc;
  --text: #1c2420;
  --text-2: #55605a;
  --line: #dde2df;
  --accent: #17604a;
  --accent-ink: #f4faf7;
  --accent-soft: #e3efe9;
  --error: #9c2f2f;
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141917;
    --surface: #1b211e;
    --text: #e8ece9;
    --text-2: #9aa69f;
    --line: #2c342f;
    --accent: #5cbd97;
    --accent-ink: #10201a;
    --accent-soft: #21362d;
    --error: #e08a8a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
}

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }

/* ---- header ---- */
header {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 46rem; margin: 0 auto; padding: 1.1rem 1.25rem;
}
.brand { font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em; text-decoration: none; color: var(--text); }
.brand span { color: var(--accent); }

/* ---- hero ---- */
.hero { padding: 3.5rem 0 3rem; }
.hero h1 {
  font-size: clamp(2rem, 6vw, 3rem);
  letter-spacing: -0.03em; line-height: 1.05;
  margin: 0 0 1rem; max-width: 22ch;
}
.hero p { color: var(--text-2); max-width: 46ch; margin: 0 0 1.75rem; }

/* ---- buttons ---- */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 600;
  padding: 0.75rem 1.5rem; border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.15s ease;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line);
}
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

/* ---- sections ---- */
section { padding: 2.5rem 0; }
h2 { font-size: 1.45rem; letter-spacing: -0.02em; margin: 0 0 1rem; }
.muted { color: var(--text-2); }

.piliers { border-top: 1px solid var(--line); }
.pilier { padding: 1.25rem 0; border-bottom: 1px solid var(--line); }
.pilier h3 { margin: 0 0 0.25rem; font-size: 1.05rem; }
.pilier p { margin: 0; color: var(--text-2); max-width: 60ch; }

/* ---- form ---- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem;
  margin: 1rem 0 4rem;
}
@media (max-width: 640px) { .form-card { padding: 1.25rem 1rem; } }

.progress { margin-bottom: 1.5rem; }
.progress-label { font-size: 0.85rem; color: var(--text-2); margin-bottom: 0.4rem; }
.progress-track { height: 4px; background: var(--line); border-radius: 2px; }
.progress-fill { height: 100%; width: 20%; background: var(--accent); border-radius: 2px; transition: width 0.3s ease; }

fieldset { border: 0; padding: 0; margin: 0 0 1.6rem; }
legend { font-weight: 600; padding: 0; margin-bottom: 0.6rem; line-height: 1.4; }
.hint { display: block; font-weight: 400; font-size: 0.85rem; color: var(--text-2); margin-top: 0.15rem; }

.choices { display: grid; gap: 0.4rem; }
.choice {
  display: flex; gap: 0.6rem; align-items: baseline;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer;
}
.choice:has(:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { accent-color: var(--accent); }

label.field { display: block; font-weight: 600; margin-bottom: 0.4rem; }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 0.6rem 0.8rem;
}
textarea { min-height: 5.5rem; resize: vertical; }

.form-error { color: var(--error); font-size: 0.9rem; margin: 0.5rem 0 0; display: none; }
.form-error.visible { display: block; }

.form-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; }

.step { display: none; }
.step.active { display: block; }
@media (prefers-reduced-motion: no-preference) {
  .step.active { animation: stepIn 0.25s ease; }
  @keyframes stepIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}

/* ---- offre (étape 5) ---- */
.offre-intro {
  background: var(--accent-soft);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.offre-intro p { margin: 0.3rem 0; }
.offre-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; margin: 1rem 0 1.75rem; }
.offre-table th, .offre-table td { text-align: left; padding: 0.55rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.offre-table th { font-weight: 600; }
.offre-table td:last-child { white-space: nowrap; font-weight: 600; }
@media (max-width: 640px) {
  .offre-table td:last-child { white-space: normal; }
}

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

footer {
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 2.5rem;
  font-size: 0.85rem; color: var(--text-2);
}
footer p { max-width: 60ch; }
footer a { color: inherit; }
