:root {
  /* Duo thermique : ambre = chauffage, givre = climatisation */
  --ink: #142B2A;
  --ink-soft: #2B4442;
  --ember: #E8A33D;
  --ember-dark: #C97F1F;
  --frost: #2F93A6;
  --frost-dark: #216D7C;
  --paper: #EEF3F1;
  --paper-alt: #E1EBE8;
  --line: #C7D6D2;
  --white: #FFFFFF;
  --radius-sm: 4px;
  --radius-md: 6px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding-top: 72px;
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
html, body {
  max-width: 100%;
  overflow-x: hidden;
}


h1, h2, h3, .logo {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

a { color: inherit; }

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

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: rgba(238, 243, 241, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-header__inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { font-size: 21px; color: var(--ink); }
.logo::after {
  content: "";
  display: inline-block;
  width: 8px; height: 8px;
  margin-left: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--frost), var(--ember));
  vertical-align: middle;
}
.site-nav { display: flex; gap: 32px; }
.site-nav a { 
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--ember); }

/* Hero */
.hero {
position: relative;
  z-index: 0;
  max-width: 1160px;
  margin: 0 auto;
  padding: 68px 24px 56px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: start;
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0; bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  background-image:
    linear-gradient(100deg, rgba(15, 31, 30, 0.88) 0%, rgba(15, 31, 30, 0.62) 45%, rgba(15, 31, 30, 0.35) 100%),
    url('pompe_à_chaleur.png');
  background-size: cover;
  background-position: center;
}
.hero__copy { position: relative; }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 18px;
  padding: 5px 12px 5px 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.hero__eyebrow::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ember), var(--frost));
  flex-shrink: 0;
}
.hero h1 { font-size: clamp(28px, 3vw, 38px); margin: 0 0 20px; max-width: 16ch; color: var(--white); }
.hero__lead { font-size: 16.5px; color: rgba(238, 243, 241, 0.86); max-width: 46ch; margin-bottom: 26px; }
.hero__points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 13px; }
.hero__points li {
  font-size: 14.5px;
  padding-left: 30px;
  position: relative;
  font-weight: 500;
  color: var(--white);
}
.hero__points li::before {
  content: "";
  position: absolute; left: 0; top: 2px;
  width: 18px; height: 18px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.hero__points li::after {
  content: "✓";
  position: absolute; left: 3.5px; top: 1px;
  color: var(--white);
  font-weight: 700;
  font-size: 12px;
}

/* Quiz card — panneau de commande */
.quiz-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 30px 30px 28px 34px;
  box-shadow: 0 1px 0 var(--line);
}
.quiz-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 6px;
  background: linear-gradient(180deg, var(--frost), var(--ember));
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}
.quiz-card__progress { display: flex; gap: 6px; margin-bottom: 26px; }
.quiz-card__progress .dot {
  height: 8px;
  flex: 1;
  border-radius: 2px;
  background: var(--paper-alt);
  transition: background 0.25s ease;
}
.quiz-card__progress .dot.is-active,
.quiz-card__progress .dot.is-done {
  background: linear-gradient(90deg, var(--frost), var(--ember));
}

.quiz-step { display: none; border: none; padding: 0; margin: 0; }
.quiz-step.is-active { display: block; animation: reveal 0.3s ease; }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.quiz-step legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.quiz-step__question {
  font-family: "Space Grotesk", sans-serif;
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 18px;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 8px;
}
.choice {
  text-align: left;
  padding: 16px 14px 14px;
  border: 1px solid var(--line);
  border-bottom: 3px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.choice::before { margin-right: 6px; }
.choice[data-field="besoin"][data-value="chauffer"]::before { content: "🔥"; }
.choice[data-field="besoin"][data-value="rafraichir"]::before { content: "❄️"; }
.choice[data-field="besoin"][data-value="les_deux"]::before { content: "🔥❄️"; }
.choice[data-field="logement"][data-value="maison"]::before { content: "🏠"; }
.choice[data-field="logement"][data-value="appartement"]::before { content: "🏢"; }
.choice[data-field="besoin"] { grid-column: span 2; }
.choice[data-field="logement"] { grid-column: span 1; }
.choice[data-field="surface"] { grid-column: span 2; }
.choice:hover { border-bottom-color: var(--ember); background: var(--white); }
.choice.is-selected {
  border-color: var(--frost);
  border-bottom-color: var(--ember);
  background: var(--paper-alt);
  transform: translateY(-1px);
}

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); }
.field input {
  padding: 11px 2px;
  border: none;
  border-bottom: 2px solid var(--line);
  border-radius: 0;
  background: transparent;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
}
.field input:focus { outline: none; border-bottom-color: var(--frost); }
.field--checkbox { flex-direction: row; align-items: flex-start; font-weight: 400; font-size: 13px; gap: 9px; color: var(--ink-soft); }
.field--checkbox input { margin-top: 3px; accent-color: var(--frost); }

.btn-submit {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--ember);
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  font-family: "Space Grotesk", sans-serif;
  transition: background 0.15s ease;
}
.btn-submit:hover { background: var(--ember-dark); color: var(--white); }
.btn-submit:disabled { opacity: 0.6; cursor: progress; }

.btn-back { display: inline-block; margin-top: 16px; background: none; border: none; color: var(--frost-dark); font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }
.btn-back:hover { text-decoration: underline; }

.quiz-step--success, .quiz-step--error { display: none; text-align: center; }
.quiz-step--success.is-active, .quiz-step--error.is-active { display: block; animation: reveal 0.3s ease; }
.success-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 50px; height: 50px; border-radius: 50%;
  background: linear-gradient(135deg, var(--frost), var(--ember));
  color: var(--white); font-size: 22px; margin-bottom: 14px;
}
.quiz-step--error h2 { color: var(--ember-dark); }

/* Trust bar — bandeau de mesures */
.trust-bar {
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding: 22px 24px;
  font-size: 13.5px;
}
.trust-bar__item {
  padding: 0 34px;
  border-left: 1px solid rgba(238, 243, 241, 0.15);
}
.trust-bar__item:first-child { border-left: none; }
.trust-bar__item strong {
  display: block;
  font-size: 20px;
  font-family: "Space Grotesk", sans-serif;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, var(--frost), var(--ember));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Sections */
.section { max-width: 1000px; margin: 0 auto; padding: 76px 24px; }
.section--muted { background: var(--paper-alt); max-width: none; }
.section--muted > * { max-width: 1000px; margin-left: auto; margin-right: auto; }
.section h2 { font-size: 27px; margin-bottom: 36px; text-align: center; }

#aides {
  max-width: none;
  padding: 108px 24px;
  background-color: var(--ink);
  background-image:
    linear-gradient(180deg, rgba(15, 31, 30, 0.512) 0%, rgba(15, 31, 30, 0.255) 100%),
    url('installation.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
#aides > * { max-width: 1000px; margin-left: auto; margin-right: auto; }
#aides h2 { color: var(--white); }

.aid-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.aid-card {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-top: 4px solid var(--line);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 44px 36px;
  min-height: 260px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-top-width 0.2s ease, background 0.2s ease;
}
.aid-card:hover { background: rgba(255, 255, 255, 0.86); }
.aid-card:nth-child(1) { border-top-color: var(--frost); }
.aid-card:nth-child(2) { border-top-color: var(--ember); }
.aid-card:nth-child(3) { border-top-color: var(--ink-soft); }
.aid-card:hover {
  transform: translateY(-6px);
  border-top-width: 6px;
  box-shadow: 0 16px 28px -18px rgba(20, 43, 42, 0.35);
}
.aid-card:hover h3 { color: var(--frost-dark); }
.aid-card:nth-child(2):hover h3 { color: var(--ember-dark); }
.aid-card__tag { display: inline-block; font-size: 13px; color: var(--ink-soft); font-weight: 600; margin-bottom: 11px; }
.aid-card h3 { font-size: 20px; margin: 0 0 12px; }
.aid-card p { font-size: 15.5px; line-height: 1.5; color: var(--ink-soft); margin: 0; }
.aid-cards__footnote { text-align: center; font-size: 12.5px; color: rgba(248, 251, 250, 0.753); border-radius: 25% ;margin-top: 26px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; }
.steps::before {
  content: "";
  position: absolute;
  top: 18px; left: 16%; right: 16%;
  height: 2px;
  background: linear-gradient(90deg, var(--frost), var(--ember));
  opacity: 0.35;
  z-index: 0;
}
.step { text-align: center; padding: 8px; position: relative; z-index: 1; }
.step__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink);
  color: var(--ink); font-family: "Space Grotesk", sans-serif; font-weight: 700;
  margin-bottom: 14px;
}
.step h3 { font-size: 16px; margin: 0 0 8px; }
.step p { font-size: 14px; color: var(--ink-soft); margin: 0; }

.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.testimonials blockquote {
  margin: 0;
  padding: 24px 22px;
  border-radius: var(--radius-sm);
  position: relative;
}
.testimonials blockquote:nth-child(1) { background: #DCEBEE; }
.testimonials blockquote:nth-child(2) { background: var(--white); border: 1px solid var(--line); }
.testimonials blockquote:nth-child(3) { background: #FBEBD3; }
.testimonials p { font-size: 14px; margin: 0 0 14px; color: var(--ink); }
.testimonials cite { font-size: 13px; color: var(--ink-soft); font-style: normal; font-weight: 600; }

.accordion details { border-bottom: 1px solid var(--line); padding: 17px 0; }
.accordion summary {
  font-weight: 600;
  cursor: pointer;
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+";
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  color: var(--ember-dark);
  flex-shrink: 0;
  margin-left: 16px;
}
.accordion details[open] summary::after { content: "–"; }
.accordion p { margin: 12px 0 0; font-size: 14px; color: var(--ink-soft); }

/* Expired */
.expired { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.expired__card { max-width: 460px; text-align: center; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--frost); border-radius: 0 0 var(--radius-md) var(--radius-md); padding: 32px; }
.expired__card h1 { font-size: 22px; }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; }
  .testimonials, .aid-cards, .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .choice[data-field="besoin"], .choice[data-field="surface"] { grid-column: span 2; }
  .trust-bar__item { padding: 0 20px; }
}

/* Bouton Burger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background-color: var(--ink);
  border-radius: 2px;
}

/* Navigation Mobile */
@media (max-width: 880px) {
  .menu-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    flex-direction: column;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
    gap: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
  }

  .site-nav.is-open {
    display: flex;
  }
}