/* === SITE 3 — ITE / ISOLATION EXTÉRIEURE — THEME CLAIR === */
/* Univers : Thermographie IR pastel — clair, lisible, accent orange */

:root {
  --bg: #fafaf7;
  --bg-2: #f0ede5;
  --bg-3: #e6e2d6;
  --fg: #1a1d24;
  --fg-soft: #4b5563;
  --fg-mute: #6b7280;
  --thermo-cold: #1d4ed8;
  --thermo-mid: #f59e0b;
  --thermo-hot: #ef4444;
  --accent: #d94a1f;
  --accent-light: #ff6b35;
  --grid: rgba(26, 29, 36, .05);
  --rule: rgba(26, 29, 36, .12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'Geist', 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(255, 107, 53, .12), transparent),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px, 24px 24px;
  background-attachment: fixed;
}
.mono { font-family: 'JetBrains Mono', 'IBM Plex Mono', monospace; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* HEADER */
header {
  background: rgba(250, 250, 247, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  padding: 16px 0;
  position: sticky; top: 0; z-index: 50;
}
header nav { display: flex; justify-content: space-between; align-items: center; }
.logo {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -.02em;
  color: var(--fg);
  text-decoration: none;
}
.logo-thermo {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 3px;
  background: linear-gradient(135deg, var(--thermo-hot), var(--thermo-mid), var(--thermo-cold));
  vertical-align: -2px;
  margin-right: 8px;
}

/* HERO — Simulateur aides */
.hero-thermo {
  padding: 80px 0 100px;
  position: relative;
}
.tag-line {
  display: inline-flex;
  align-items: center; gap: 8px;
  padding: 6px 14px;
  background: rgba(255, 107, 53, .12);
  border: 1px solid rgba(255, 107, 53, .3);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: .75rem;
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: .05em;
}
.tag-line::before {
  content: ''; width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 50% { opacity: .4; } }

.hero-thermo h1 {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -.03em;
  max-width: 950px;
  margin-bottom: 24px;
}
.hero-thermo h1 .gradient {
  background: linear-gradient(90deg, var(--thermo-hot), var(--thermo-mid));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-thermo .lead {
  font-size: 1.2rem;
  color: var(--fg-soft);
  max-width: 700px;
  margin-bottom: 36px;
}

/* Simulateur aides */
.simu {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 40px;
  margin-top: 50px;
}
.simu .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
  color: var(--fg-mute);
  text-transform: uppercase;
  letter-spacing: .12em;
  margin-bottom: 12px;
}
.simu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 30px;
}
.simu-input {
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 16px 20px;
}
.simu-input strong {
  display: block;
  font-size: 1.4rem;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 4px;
}
.simu-result {
  background: linear-gradient(135deg, var(--thermo-hot) 0%, var(--accent) 100%);
  border-radius: 12px;
  padding: 28px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; gap: 20px;
}
.simu-result .amount {
  font-family: 'Geist', sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: white;
}
.simu-result .label-w { color: rgba(255, 255, 255, .85); font-size: .9rem; }
@media (max-width: 768px) { .simu-grid { grid-template-columns: 1fr; } }

/* CTA */
.btn-thermo {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--accent);
  color: #fff;
  padding: 16px 30px;
  font-family: 'Geist', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 8px;
  transition: all .2s;
  border: 1px solid var(--accent);
}
.btn-thermo:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255, 107, 53, .3);
}

section { padding: 80px 0; border-bottom: 1px solid var(--rule); }
section h2 {
  font-family: 'Geist', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  letter-spacing: -.02em;
  margin-bottom: 32px;
}

/* Aides 3 cartes */
.aides-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.aide-card {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 32px 28px;
  transition: border-color .2s;
}
.aide-card:hover { border-color: var(--accent); }
.aide-card .badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(255, 107, 53, .15);
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: .7rem;
  border-radius: 4px;
  margin-bottom: 16px;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.aide-card h3 {
  font-family: 'Geist', sans-serif;
  font-size: 1.3rem;
  margin-bottom: 12px;
}
.aide-card .max {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.6rem;
  color: var(--accent);
  margin: 12px 0;
}
.aide-card p { color: var(--fg-soft); font-size: .95rem; }
@media (max-width: 768px) { .aides-grid { grid-template-columns: 1fr; } }

footer {
  background: var(--bg);
  color: var(--fg-mute);
  padding: 60px 0 30px;
  border-top: 1px solid var(--rule);
  font-size: .9rem;
}
footer a { color: var(--accent); text-decoration: none; }

.api-block {
  background: var(--bg-2);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  padding: 18px 24px;
  margin: 24px 0;
  border-radius: 0 8px 8px 0;
}
.api-block h3 { font-family: 'JetBrains Mono', monospace; font-size: .8rem; color: var(--accent); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 12px; }
.api-block strong { color: var(--fg); }

/* === GLOBAL FIX LISIBILITE : liens dans <section> et <nav> heritent la couleur du parent === */
section a:not([class*="btn"]):not(.exit-popup-cta):not([style*="color:#fff"]):not([style*="color: #fff"]):not([style*="color:#d94a1f"]):not([style*="color: #d94a1f"]):not([style*="color:#2563eb"]) {
  color: inherit;
}
nav a:not([class*="btn"]):not([style*="color"]) { color: inherit; }
section a:hover:not([class*="btn"]):not(.exit-popup-cta) { opacity: 1; }

/* === WIDGET VUD — Force light theme dans une page dark (contraste lisibilité) === */
#devis, .widget-card, [id^="vac6f0"], [class*="viteundevis"] {
  color-scheme: light;
}
#devis, #devis *, .widget-card, .widget-card * {
  color: #1a1a1a !important;
}
#devis input, #devis select, #devis textarea, #devis button,
.widget-card input, .widget-card select, .widget-card textarea, .widget-card button {
  color: #1a1a1a !important;
  background-color: #fff !important;
  border-color: #d1d5db !important;
}
#devis a:not([href*="viteundevis"]):not([class*="btn"]),
.widget-card a:not([href*="viteundevis"]):not([class*="btn"]) {
  color: #2563eb !important;
}
#devis [style*="color:#fff"], #devis [style*="color: #fff"],
#devis [style*="color:white"], #devis [style*="color: white"] {
  color: #fff !important;  /* preserver les btn primary blancs */
}
/* Le widget VUD lui-meme (script JS injecte) */
#vac6f0118e8d, #vac6f0118e8d * { color: #1a1a1a !important; }
#vac6f0118e8d a, #vac6f0118e8d strong { color: #2563eb !important; }
#vac6f0118e8d h1, #vac6f0118e8d h2, #vac6f0118e8d h3 { color: #0f3da3 !important; font-weight: 700 !important; }

/* Hero compact (widget plus haut) */
section.no-prefix:first-of-type { padding-top: 16px !important; padding-bottom: 12px !important; }
section.no-prefix.devis-prio { padding-top: 0 !important; padding-bottom: 16px !important; }

/* Sticky CTA mobile bottom (toujours visible) */
.sticky-cta-mobile {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
  background: linear-gradient(180deg, transparent, rgba(13,15,20,.95));
  padding: 14px 16px 18px;
  display: none;
}
.sticky-cta-mobile a {
  display: block; text-align: center;
  background: var(--accent); color: #fff !important;
  padding: 14px; border-radius: 8px; font-weight: 700;
  text-decoration: none; box-shadow: 0 6px 24px rgba(255,107,53,.4);
}
@media (max-width: 768px) { .sticky-cta-mobile { display: block; } body { padding-bottom: 80px; } }
