/* =============================================================
   V2 Theme Override — Transformations Resilientes
   Redefinit les variables CSS legacy des anciens simus
   pour aligner visuellement avec la palette Autonomie V2.
   Charge APRES le style.css de chaque ancien simulateur.
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  /* === Palette V2 — valeurs officielles depuis calculs.css === */
  --earth:         #1B4436;   /* vert fonce — etait brun #5c4a3a */
  --earth-light:   #2a5f4f;   /* vert moyen (derive V2) */
  --wood:          #8B6F47;   /* bois V2 */
  --wood-light:    #f0e8d8;   /* fond bois clair — derive V2 */
  --sand:          #f7f5f0;   /* fond sable — align bg-alt V2 */
  --cream:         #ffffff;   /* fond cards — blanc V2 */
  --accent:        #C2410C;   /* rouge-orange V2 — etait vert #7a9e7e */
  --accent-dark:   #a83509;   /* hover rouge-orange V2 */

  /* Texte — identiques V2 */
  --text:          #1a1a2e;
  --text-muted:    #6b7280;
  --border:        #e5e7eb;

  /* Fond general */
  --bg:            #ffffff;

  /* Typographie — Poppins V2 */
  --font-body:     'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading:  'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Radius — aligne V2 */
  --radius:        8px;
}

/* Override body : fond blanc + Poppins */
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
}

/* Override headers — vert fonce V2 */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--earth);
}

/* Override header statique des simus (pas le calculs-header du layout) */
header h1 {
  color: var(--earth);
}

/* === Boutons primaires — rouge-orange V2 === */
.cta-button,
.modal-submit,
.btn-action,
button:not(.btn-reset):not(#btnReset):not(.calculs-nav-toggle) {
  background: var(--accent);
  border-color: var(--accent);
}
.cta-button:hover,
.modal-submit:hover,
.btn-action:hover,
button:not(.btn-reset):not(#btnReset):not(.calculs-nav-toggle):hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

/* === Sticky bar — vert fonce V2 === */
.sticky-bar {
  background: var(--earth);
}
.sticky-bar-cta--primary {
  background: var(--accent) !important;
}
.sticky-bar-cta--primary:hover {
  background: var(--accent-dark) !important;
}

/* === CTA Calendly — vert fonce V2 === */
.sim-cta-calendly {
  background: var(--earth);
}
.sim-cta-calendly:hover {
  background: var(--earth-light);
}

/* === Inputs focus — rouge-orange V2 === */
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.12) !important;
}

/* === Sliders accent === */
input[type="range"] {
  accent-color: var(--accent);
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
}

/* === Card headers V2 === */
.card h2 {
  border-bottom-color: var(--wood);
}

/* === Table headers V2 === */
th {
  background: var(--wood-light);
  color: var(--earth);
}

/* === Tabs nav simus — alignes V2 === */
.sim-tab-active {
  background: var(--earth);
}
.sim-tab:hover {
  color: var(--earth);
}

/* === Bilan rows V2 === */
.bilan-total td,
.sticky-bar {
  background: var(--earth);
}

/* === Mode switcher (autoconstruction) === */
.mode-switcher input[type="radio"]:checked + label {
  background: var(--earth);
}

/* === Axe headers — V2 === */
.axe-header {
  background: var(--wood-light);
}

/* =============================================================
   ALIGNEMENT HEADER — simus legacy -> style calculs-hero V2
   Les anciens simus (renovation, bioclimatique, autoconstruction)
   utilisent un <header> nu. On l aligne sur .calculs-hero.
   ============================================================= */
.calculs-simu-wrapper > header {
  text-align: center;
  padding: 3rem 1rem 2rem;
}
.calculs-simu-wrapper > header h1 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--earth);
  margin-bottom: 0.5rem;
}
.calculs-simu-wrapper > header .subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}
