/* ==========================================================================
   NERALYS — Design system
   Sommaire :
   1. Variables & reset
   2. Typographie
   3. Layout & utilitaires
   4. Boutons & badges
   5. Header & navigation
   6. Hero
   7. Cartes & grilles
   8. Sections communes (avantages, avant/après, comment ça marche, chiffres, témoignages, CTA)
   9. FAQ accordéon
   10. Formulaires multi-étapes
   11. Footer
   12. Pages légales / 404 / merci
   13. Animations & accessibilité
   ========================================================================== */

/* 1. Variables & reset ---------------------------------------------------- */
:root {
  --bleu-profond: #0B1D3A;
  --bleu-ardoise: #1A2E4F;
  --bleu-gris: #3B4B63;
  --blanc-casse: #F7F4EF;
  --blanc: #FFFFFF;
  --beige: #EFE7D8;
  --or: #CBA15A;
  --or-clair: #E8C07A;
  --gris-clair: #E6E8EB;
  --gris-texte: #5A6475;
  --noir-doux: #22272F;
  --footer-bg: #101F38;
  --rouge: #B3261E;
  --vert: #1E7A46;

  --font-titres: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-nav: 'Montserrat', Arial, Helvetica, sans-serif;
  --font-corps: 'Inter', Arial, Helvetica, sans-serif;

  --container-max: 1200px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 10px rgba(11, 29, 58, 0.08);
  --shadow-md: 0 12px 32px rgba(11, 29, 58, 0.16);
  --header-h: 92px;
  --header-h-compact: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-corps);
  color: var(--noir-doux);
  background: var(--blanc-casse);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 1rem; }

/* Focus visible pour l'accessibilité clavier */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--or);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--bleu-profond);
  color: var(--blanc);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* 2. Typographie ----------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-titres); font-weight: 700; margin: 0 0 0.6em; color: var(--bleu-profond); line-height: 1.2; }
h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { line-height: 1.75; color: var(--gris-texte); margin: 0 0 1em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-nav);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--or);
}

.section-head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.section-head p { color: var(--gris-texte); }

.gold-sep {
  display: block;
  width: 60px;
  height: 3px;
  background: var(--or);
  border-radius: 3px;
  margin: 0 auto 1.2rem;
}

/* 3. Layout & utilitaires --------------------------------------------------- */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.bg-white { background: var(--blanc); }
.bg-beige { background: var(--blanc-casse); }
.bg-gris { background: var(--gris-clair); }
.bg-bleu { background: var(--bleu-profond); color: var(--blanc); }
.text-center { text-align: center; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
main { display: block; }

/* 4. Boutons & badges -------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 15px 30px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-or { background: var(--or); color: var(--bleu-profond); }
.btn-or:hover { background: var(--or-clair); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,0.6); color: var(--blanc); }
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-bleu { background: var(--bleu-profond); color: var(--blanc); }
.btn-bleu:hover { background: var(--bleu-ardoise); box-shadow: var(--shadow-md); }
.btn-ghost { background: transparent; border-color: var(--bleu-profond); color: var(--bleu-profond); }
.btn-ghost:hover { background: var(--bleu-profond); color: var(--blanc); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }

.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  color: var(--blanc);
}

/* 5. Header & navigation ----------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  background: var(--blanc);
  border-bottom: 1px solid rgba(11,29,58,0.08);
  transition: box-shadow 0.3s ease, padding 0.3s ease;
}
.site-header.is-scrolled { box-shadow: var(--shadow-sm); }
.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: height 0.3s ease;
}
.site-header.is-scrolled .header-inner { height: var(--header-h-compact); }

.brand img { height: 62px; width: auto; transition: height 0.3s ease; }
.site-header.is-scrolled .brand img { height: 44px; }

.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a {
  font-family: var(--font-nav);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--bleu-gris);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] { color: var(--bleu-profond); border-color: var(--or); }

.nav-toggle {
  display: none;
  background: transparent;
  border: none;
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  color: var(--bleu-profond);
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 26px; height: 26px; }

.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h-compact);
  left: 0; right: 0;
  bottom: 0;
  background: var(--blanc);
  z-index: 499;
  padding: 20px 24px 40px;
  overflow-y: auto;
}
.mobile-nav.is-open { display: block; }
.mobile-nav a {
  display: block;
  font-family: var(--font-nav);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--bleu-profond);
  padding: 16px 0;
  border-bottom: 1px solid var(--gris-clair);
}
.mobile-nav .btn { margin-top: 20px; }

/* 6. Hero -------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  color: var(--blanc);
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,29,58,0.92) 0%, rgba(11,29,58,0.68) 55%, rgba(11,29,58,0.9) 100%);
}
.hero-content { position: relative; z-index: 1; max-width: 720px; padding: 60px 0; }
.hero h1 { color: var(--blanc); }
.hero h1 span { color: var(--or); }
.hero .lead { font-size: 1.1rem; color: rgba(255,255,255,0.82); max-width: 560px; margin-bottom: 2rem; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 2.4rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 3rem; max-width: 560px; }
.hero-stats div { text-align: center; }
.hero-stats strong { display: block; font-family: var(--font-titres); font-size: 1.7rem; color: var(--or); }
.hero-stats span { font-size: 0.72rem; color: rgba(255,255,255,0.6); }

.hero--page { min-height: 56vh; align-items: flex-end; padding-bottom: 64px; }
.breadcrumb { position: relative; z-index: 1; font-size: 0.82rem; margin-bottom: 1rem; }
.breadcrumb a { color: rgba(255,255,255,0.75); }
.breadcrumb a:hover { color: var(--or); }
.breadcrumb span { color: rgba(255,255,255,0.4); margin: 0 6px; }
.breadcrumb [aria-current] { color: var(--or); }

/* 7. Cartes & grilles ---------------------------------------------------------- */
.grid-regions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.region-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 240px;
  display: block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.region-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.region-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.region-card:hover img { transform: scale(1.06); }
.region-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(11,29,58,0.92) 0%, rgba(11,29,58,0.25) 55%, transparent 100%);
}
.region-card-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 20px; z-index: 1; }
.region-card-body h3 { color: var(--blanc); margin: 0 0 4px; font-size: 1.1rem; }
.region-card-body p { color: rgba(255,255,255,0.72); font-size: 0.8rem; margin: 0 0 10px; }
.region-card-body .link-arrow { color: var(--or); font-size: 0.8rem; font-weight: 700; font-family: var(--font-nav); }

.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.benefit-card {
  background: var(--blanc);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.benefit-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.benefit-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: rgba(203,161,90,0.14);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  color: var(--or);
}
.benefit-icon svg { width: 28px; height: 28px; }

.choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.choice-card {
  background: var(--blanc);
  border: 2px solid var(--gris-clair);
  border-radius: var(--radius-lg);
  padding: 44px 34px;
  text-align: center;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.choice-card:hover { border-color: var(--or); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.choice-card .benefit-icon { margin: 0 auto 20px; width: 72px; height: 72px; border-radius: 20px; }
.choice-card .benefit-icon svg { width: 34px; height: 34px; }
.choice-card p { max-width: 340px; margin-left: auto; margin-right: auto; }

/* 8. Sections communes -------------------------------------------------------- */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.compare-card { border-radius: var(--radius-md); padding: 32px; border: 2px solid; }
.compare-card.bad { background: #FBEDEC; border-color: #F0C9C6; }
.compare-card.good { background: #ECF1F7; border-color: rgba(11,29,58,0.18); }
.compare-card h3 { margin-bottom: 18px; }
.compare-card.bad h3 { color: var(--rouge); }
.compare-card.good h3 { color: var(--bleu-profond); }
.compare-card ul li { display: flex; gap: 10px; font-size: 0.92rem; margin-bottom: 12px; line-height: 1.5; color: var(--noir-doux); }
.compare-card.bad li span:first-child { color: #C3564F; }
.compare-card.good li span:first-child { color: var(--or); }

.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.step-item { text-align: center; }
.step-number {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--bleu-profond); color: var(--blanc);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-titres); font-size: 1.3rem; font-weight: 700;
  margin: 0 auto 18px;
}

.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stats-band strong { display: block; font-family: var(--font-titres); font-size: 2.2rem; color: var(--or); }
.stats-band span { font-size: 0.8rem; color: var(--gris-texte); }

.testi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.testi-card { background: var(--blanc); border-radius: var(--radius-md); padding: 28px; box-shadow: var(--shadow-sm); }
.testi-stars { color: var(--or); font-size: 0.9rem; margin-bottom: 14px; letter-spacing: 2px; }
.testi-card p.testi-text { font-style: italic; color: var(--noir-doux); font-size: 0.94rem; }
.testi-name { font-weight: 700; font-size: 0.9rem; color: var(--bleu-profond); }
.testi-ville { font-size: 0.78rem; color: var(--gris-texte); }

.cta-band { background: var(--footer-bg); color: var(--blanc); padding: 72px 0; text-align: center; }
.cta-band h2 { color: var(--blanc); }
.cta-band p { color: rgba(255,255,255,0.65); max-width: 560px; margin: 0 auto 2rem; }

.prose-block { max-width: 820px; margin: 0 auto; }
.prose-block h2 { margin-top: 2.2rem; }
.prose-block ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1.2rem; }
.prose-block ul li { margin-bottom: 0.4rem; color: var(--gris-texte); }

.link-mesh { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.link-mesh a {
  font-size: 0.82rem; font-weight: 600; font-family: var(--font-nav);
  padding: 9px 16px; border-radius: 999px; background: var(--blanc);
  border: 1px solid var(--gris-clair); color: var(--bleu-profond);
  transition: background 0.2s, border-color 0.2s;
}
.link-mesh a:hover { background: var(--bleu-profond); color: var(--blanc); border-color: var(--bleu-profond); }

/* 9. FAQ accordéon ------------------------------------------------------------- */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--gris-clair); }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: none;
  border: none;
  text-align: left;
  padding: 22px 4px;
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 1rem;
  color: var(--bleu-profond);
}
.faq-question .icon { flex-shrink: 0; width: 22px; height: 22px; position: relative; }
.faq-question .icon::before,
.faq-question .icon::after {
  content: ""; position: absolute; background: var(--or);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.faq-question .icon::before { width: 16px; height: 2px; }
.faq-question .icon::after { width: 2px; height: 16px; transition: transform 0.25s ease; }
.faq-item.is-open .faq-question .icon::after { transform: translate(-50%, -50%) rotate(90deg) scale(0); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-item.is-open .faq-answer { max-height: 400px; }
.faq-answer p { padding: 0 4px 22px; margin: 0; }

/* 10. Formulaires multi-étapes -------------------------------------------------- */
.form-panel {
  background: var(--blanc);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 34px;
}
.form-panel--dark { background: rgba(255,255,255,0.98); }

.progress-track { margin-bottom: 28px; }
.progress-bar { height: 6px; background: var(--gris-clair); border-radius: 999px; overflow: hidden; margin-bottom: 14px; }
.progress-bar-fill { height: 100%; background: var(--or); border-radius: 999px; transition: width 0.35s ease; width: 20%; }
.progress-steps { display: flex; justify-content: space-between; }
.progress-steps .step-dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; font-family: var(--font-nav);
  background: var(--gris-clair); color: var(--gris-texte);
  transition: background 0.25s, color 0.25s;
}
.progress-steps .step-dot.active { background: var(--bleu-profond); color: var(--blanc); }
.progress-steps .step-dot.done { background: var(--or); color: var(--bleu-profond); }

.form-step { display: none; animation: fadeIn 0.35s ease; }
.form-step.is-active { display: block; }
.form-step h3 { margin-bottom: 1.4rem; }

.field { margin-bottom: 20px; }
.field label { display: block; font-family: var(--font-nav); font-weight: 600; font-size: 0.84rem; color: var(--bleu-profond); margin-bottom: 8px; }
.field .hint { font-size: 0.76rem; color: var(--gris-texte); margin-top: 4px; }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="date"],
.field input[type="file"],
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--gris-clair);
  border-radius: var(--radius-sm);
  background: var(--blanc-casse);
  color: var(--noir-doux);
  transition: border-color 0.2s, background 0.2s;
}
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--or); background: var(--blanc); }
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--rouge); background: #FCEEED; }
.error-msg { display: none; color: var(--rouge); font-size: 0.78rem; margin-top: 6px; font-weight: 600; }
.field.has-error .error-msg { display: block; }

.field-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.field-row--3 { grid-template-columns: repeat(3, 1fr); }

.option-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.option-card {
  position: relative;
  border: 1.5px solid var(--gris-clair);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--blanc-casse);
}
.option-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.option-card span { font-family: var(--font-nav); font-weight: 600; font-size: 0.86rem; color: var(--noir-doux); }
.option-card:has(input:checked) { border-color: var(--or); background: rgba(203,161,90,0.12); }
.option-card:has(input:checked) span { color: var(--bleu-profond); }
.option-card:has(input:focus-visible) { outline: 3px solid var(--or); outline-offset: 2px; }

.checkbox-field { display: flex; gap: 10px; align-items: flex-start; }
.checkbox-field input { margin-top: 4px; flex-shrink: 0; width: 18px; height: 18px; }
.checkbox-field label { font-weight: 400; font-family: var(--font-corps); font-size: 0.84rem; color: var(--gris-texte); }

.form-nav { display: flex; justify-content: space-between; gap: 14px; margin-top: 28px; }
.form-nav .btn { flex: 1; }

.form-success {
  display: none;
  text-align: center;
  padding: 30px 10px;
}
.form-success.is-active { display: block; }
.form-success .check-circle {
  width: 72px; height: 72px; border-radius: 50%;
  background: rgba(203,161,90,0.16); color: var(--or);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}

.file-drop {
  border: 1.5px dashed var(--gris-clair);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  background: var(--blanc-casse);
  position: relative;
}
.file-drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.file-drop .file-name { font-size: 0.8rem; color: var(--bleu-profond); font-weight: 600; margin-top: 6px; }

.confirm-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 900;
  background: rgba(11,29,58,0.55);
  align-items: center; justify-content: center;
  padding: 20px;
}
.confirm-overlay.is-open { display: flex; }
.confirm-box {
  background: var(--blanc); border-radius: var(--radius-md);
  padding: 34px; max-width: 420px; width: 100%; text-align: center;
  box-shadow: var(--shadow-md);
}
.confirm-box .form-nav { margin-top: 24px; }

/* 11. Footer --------------------------------------------------------------------- */
.site-footer { background: var(--footer-bg); color: rgba(255,255,255,0.85); padding: 76px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 50px; }
.footer-brand img { width: 190px; height: auto; margin-bottom: 16px; }
.footer-brand p { color: rgba(255,255,255,0.72); font-size: 0.86rem; }
.footer-col h4 { font-family: var(--font-nav); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--or); margin-bottom: 18px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { font-size: 0.86rem; color: rgba(255,255,255,0.78); transition: color 0.2s; }
.footer-col a:hover { color: var(--blanc); }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
}
.footer-social a:hover { background: var(--or); color: var(--bleu-profond); }
.footer-social svg { width: 18px; height: 18px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 22px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 0.76rem; color: rgba(255,255,255,0.55);
}

.back-to-top {
  position: fixed;
  right: 20px; bottom: 20px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--bleu-profond);
  color: var(--blanc);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  border: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 400;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top svg { width: 20px; height: 20px; }

/* 12. Pages légales / 404 / merci -------------------------------------------------- */
.legal-page .prose-block h2:first-child { margin-top: 0; }
.error-page, .thanks-page {
  min-height: 80vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 160px 24px 80px;
}
.error-page .code { font-family: var(--font-titres); font-size: 6rem; color: var(--or); line-height: 1; margin-bottom: 0.2em; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-info-card { background: var(--blanc); border-radius: var(--radius-md); padding: 30px; box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.contact-info-card h3 { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.contact-info-card h3 svg { width: 20px; height: 20px; color: var(--or); }
.map-embed { border-radius: var(--radius-md); overflow: hidden; border: none; width: 100%; height: 280px; box-shadow: var(--shadow-sm); }

/* 13. Animations & accessibilité -------------------------------------------------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ==========================================================================
   14. Tableau de données (page Prix immobilier)
   Ajout additif — aucune règle ci-dessus n'est modifiée. Construit
   exclusivement avec les tokens déjà définis en section 1 (couleurs,
   rayons, ombres, typographies) : aucun nouveau style visuel introduit.
   ========================================================================== */
.data-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background: var(--blanc);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  white-space: nowrap;
}
.data-table caption { text-align: left; }
.data-table thead th {
  background: var(--bleu-profond);
  color: var(--blanc);
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: left;
  padding: 14px 18px;
}
.data-table tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--gris-clair);
  color: var(--noir-doux);
}
.data-table tbody tr:nth-child(even) { background: var(--blanc-casse); }
.data-table tbody tr:hover { background: rgba(203,161,90,0.08); }
.data-table tbody a { color: var(--bleu-profond); font-weight: 600; }
.data-table tbody a:hover { color: var(--or); }

/* ==========================================================================
   15. Upload de fichiers premium (formulaire partenaire)
   Ajout additif — aucune règle ci-dessus n'est modifiée. Tokens existants
   uniquement (couleurs, rayons, ombres).
   ========================================================================== */
.file-drop.is-dragover { border-color: var(--or); background: rgba(203,161,90,0.1); }
.file-preview:not(:empty) { margin-top: 10px; }
.file-preview-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--blanc-casse);
  border: 1px solid var(--gris-clair);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.file-preview-row img {
  width: 40px; height: 40px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.file-preview-row .file-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: var(--gris-clair);
  color: var(--bleu-profond);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.file-preview-name {
  flex: 1;
  font-size: 0.82rem;
  color: var(--noir-doux);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-remove {
  background: none;
  border: none;
  color: var(--rouge);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.file-remove:hover { background: rgba(179,38,30,0.1); }

/* ==========================================================================
   16. Pages Ville — Prix immobilier (données DVF/INSEE, graphique, quartiers)
   Ajout additif — aucune règle ci-dessus n'est modifiée. Tokens existants
   uniquement (couleurs, rayons, ombres, typographies).
   ========================================================================== */
.stat-mini-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 18px; }
.stat-mini {
  position: relative;
  background: var(--blanc);
  border-radius: var(--radius-md);
  padding: 24px 20px 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stat-mini::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--or), var(--or-clair));
}
.stat-mini:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-mini strong {
  display: block;
  font-family: var(--font-titres);
  font-size: 1.5rem;
  color: var(--bleu-profond);
  line-height: 1.15;
  margin-bottom: 8px;
}
.stat-mini span {
  display: block;
  font-family: var(--font-nav);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gris-texte);
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.price-chart-card {
  background: var(--blanc);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 36px 30px 24px;
}
.price-chart {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  height: 220px;
  padding: 10px 6px 0;
  border-bottom: 2px solid var(--gris-clair);
}
.price-chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.price-chart-col .bar-value {
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--bleu-profond);
  margin-bottom: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(203,161,90,0.14);
  white-space: nowrap;
}
.price-chart-col .bar {
  width: 100%;
  max-width: 52px;
  background: linear-gradient(180deg, var(--or-clair), var(--or));
  border-radius: 8px 8px 0 0;
  transition: filter 0.2s ease, transform 0.2s ease;
}
.price-chart-col:hover .bar { filter: brightness(1.08); transform: scaleX(1.05); }
.price-chart-col .bar-label {
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--bleu-gris);
  margin-top: 12px;
}

@media (max-width: 900px) {
  .stat-mini-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .price-chart-card { padding: 28px 18px 18px; }
}

@media (max-width: 600px) {
  .price-chart { gap: 8px; height: 180px; }
  .price-chart-col .bar-value { font-size: 0.7rem; padding: 2px 6px; }
}

/* ==========================================================================
   17. Erreur d'envoi de formulaire (Web3Forms)
   ========================================================================== */
.form-submit-error {
  background: #FBEDEC;
  border: 1.5px solid #F0C9C6;
  color: var(--rouge);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 16px;
}

/* ==========================================================================
   18. Wizard vendeur premium (votre-projet)
   ========================================================================== */
.wizard-step { display: none; }
.wizard-step.is-active { display: block; animation: fadeIn 0.35s ease; }
.wizard-step h3 { margin-bottom: 1.4rem; }

.address-autocomplete { position: relative; }
.address-suggestions {
  position: absolute; top: 100%; left: 0; right: 0;
  background: var(--blanc);
  border: 1px solid var(--gris-clair);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 50;
  max-height: 260px;
  overflow-y: auto;
  margin-top: 4px;
  list-style: none;
  padding: 4px 0;
}
.address-suggestion { padding: 10px 14px; font-size: 0.88rem; cursor: pointer; color: var(--noir-doux); }
.address-suggestion:hover { background: var(--blanc-casse); }

.photo-dropzone {
  border: 2px dashed var(--gris-clair);
  border-radius: var(--radius-md);
  padding: 40px 20px;
  text-align: center;
  background: var(--blanc-casse);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.photo-dropzone.is-dragover { border-color: var(--or); background: rgba(203,161,90,0.08); }
.photo-dropzone input[type="file"] { display: none; }
.photo-dropzone .benefit-icon { margin: 0 auto 14px; }

.photo-preview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; margin-top: 20px; }
.photo-preview-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); height: 100px; }
.photo-preview-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-preview-actions {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center; gap: 4px;
  padding: 4px; background: rgba(11,29,58,0.7);
}
.photo-action-btn {
  background: rgba(255,255,255,0.92);
  border: none; border-radius: 4px;
  width: 24px; height: 24px;
  font-size: 0.78rem; cursor: pointer;
  color: var(--bleu-profond);
}

.estimation-range { display: flex; gap: 16px; text-align: center; flex-wrap: wrap; }
.estimation-range > div { flex: 1; min-width: 140px; background: var(--blanc); border-radius: var(--radius-md); padding: 20px; box-shadow: var(--shadow-sm); }
.estimation-range .is-probable { border: 2px solid var(--or); }
.estimation-range span { display: block; font-size: 0.76rem; color: var(--gris-texte); margin-bottom: 6px; }
.estimation-range strong { font-family: var(--font-titres); font-size: 1.3rem; color: var(--bleu-profond); }
.estimation-note { font-size: 0.82rem; color: var(--gris-texte); font-style: italic; margin-top: 16px; }

.leadscore-badge {
  display: inline-block;
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--bleu-profond);
  color: var(--blanc);
  font-family: var(--font-nav);
  font-weight: 700;
  font-size: 0.85rem;
  margin-top: 14px;
}

@media (max-width: 600px) {
  .estimation-range { flex-direction: column; }
}

.choice-cards--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) {
  .choice-cards--3 { grid-template-columns: 1fr; }
}

/* Navigation du wizard par pastilles cliquables (remplace les boutons "Continuer") */
.progress-steps .step-dot { cursor: default; transition: box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease; }
.progress-steps .step-dot.is-ready { cursor: pointer; box-shadow: 0 0 0 4px rgba(203,161,90,0.35); }
.progress-steps .step-dot.is-ready:hover { background: var(--or); color: var(--bleu-profond); }
.progress-steps .step-dot.done { cursor: pointer; }
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(203,161,90,0.3); }
  50% { box-shadow: 0 0 0 6px rgba(203,161,90,0.15); }
}
.progress-steps .step-dot.is-ready { animation: dotPulse 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .progress-steps .step-dot.is-ready { animation: none; }
}

/* ==========================================================================
   19. Popup cookies (bas droite)
   ========================================================================== */
.cookie-popup {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 340px;
  width: calc(100% - 40px);
  background: var(--blanc);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 22px;
  z-index: 950;
  animation: fadeInUp 0.4s ease;
}
.cookie-popup[hidden] { display: none; }
.cookie-popup-head { margin-bottom: 12px; }
.cookie-popup-head img { height: 34px; width: auto; }
.cookie-popup p { font-size: 0.84rem; color: var(--gris-texte); margin-bottom: 18px; line-height: 1.6; }
.cookie-popup p a { color: var(--bleu-profond); font-weight: 600; text-decoration: underline; }
.cookie-popup-actions { display: flex; gap: 10px; }
.cookie-popup-actions .btn { flex: 1; padding: 11px 14px; font-size: 0.82rem; }

@media (max-width: 600px) {
  .cookie-popup { left: 16px; right: 16px; bottom: 16px; max-width: none; width: auto; }
}
