/* ============================================================
   ThermoToit — style.css
   Variables, typographie, composants globaux
   ============================================================ */

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

/* ---------- Variables ---------- */
:root {
  --navy:        #131c3f;
  --navy-light:  #1e2d5e;
  --navy-dark:   #0b1128;
  --cool:        #0ea5e9;
  --cool-light:  #38bdf8;
  --cool-pale:   #e0f2fe;
  --heat:        #f97316;
  --heat-light:  #fb923c;
  --heat-pale:   #fff7ed;
  --beige:       #f8f5f0;
  --white:       #ffffff;
  --slate-50:    #f8fafc;
  --slate-100:   #f1f5f9;
  --slate-200:   #e2e8f0;
  --slate-400:   #94a3b8;
  --slate-600:   #475569;
  --slate-700:   #334155;
  --slate-800:   #1e293b;
  --radius-sm:   6px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.1);
  --shadow-md:   0 4px 16px rgba(0,0,0,.1);
  --shadow-lg:   0 8px 32px rgba(0,0,0,.12);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--slate-800);
  background: var(--white);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
main { flex: 1; }

/* ---------- Conteneur ---------- */
.container {
  width: 100%;
  max-width: 1152px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.container-sm  { max-width: 800px; margin-inline: auto; padding-inline: 1.25rem; }
.container-lg  { max-width: 1280px; margin-inline: auto; padding-inline: 1.25rem; }

/* ---------- Typographie ---------- */
h1,h2,h3,h4,h5 { line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }
p  { color: var(--slate-700); }

.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cool);
  margin-bottom: .75rem;
}
.section-title  { color: var(--navy); margin-bottom: 1rem; }
.section-intro  { font-size: 1.125rem; color: var(--slate-600); max-width: 680px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: all .18s ease;
  border: 2px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--cool);
  color: var(--white);
  border-color: var(--cool);
}
.btn-primary:hover { background: var(--cool-light); border-color: var(--cool-light); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(14,165,233,.35); }

.btn-secondary {
  background: var(--heat);
  color: var(--white);
  border-color: var(--heat);
}
.btn-secondary:hover { background: var(--heat-light); border-color: var(--heat-light); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(249,115,22,.35); }

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.5);
}
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: var(--white); }

.btn-outline-navy {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-outline-navy:hover { background: var(--navy); color: var(--white); }

.btn-lg { padding: 1rem 2.25rem; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn-sm { padding: .5rem 1.25rem; font-size: .85rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(19, 28, 63, .97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  height: 64px;
  display: flex;
  align-items: center;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1152px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--cool), var(--cool-light));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-text { font-size: 1.2rem; font-weight: 800; color: var(--white); letter-spacing: -.02em; }
.logo-text span { color: var(--cool-light); }

.nav-desktop { display: none; align-items: center; gap: .25rem; }
.nav-desktop a {
  color: rgba(255,255,255,.8);
  font-size: .875rem;
  font-weight: 500;
  padding: .4rem .75rem;
  border-radius: 6px;
  transition: all .15s;
}
.nav-desktop a:hover { color: var(--white); background: rgba(255,255,255,.08); }

.header-cta { display: none; }

.burger {
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-radius: 6px;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all .25s;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: var(--navy-dark);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 1.25rem;
  z-index: 99;
  flex-direction: column;
  gap: .25rem;
}
.nav-mobile.open { display: flex; }
.nav-mobile a {
  color: rgba(255,255,255,.85);
  padding: .75rem 1rem;
  border-radius: 8px;
  font-weight: 500;
  transition: background .15s;
}
.nav-mobile a:hover { background: rgba(255,255,255,.07); color: var(--white); }
.nav-mobile .btn { margin-top: .75rem; width: 100%; justify-content: center; }

/* ---------- Spacers & Sections ---------- */
.page-top { padding-top: 64px; }
section, .section { padding-block: 4rem; }
.section-sm { padding-block: 2.5rem; }
.section-lg { padding-block: 6rem; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(160deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
  color: var(--white);
  padding-block: 5rem 4rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(14,165,233,.18) 0%, transparent 60%),
              radial-gradient(ellipse at 10% 80%, rgba(249,115,22,.1) 0%, transparent 50%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(14,165,233,.15);
  border: 1px solid rgba(14,165,233,.3);
  color: var(--cool-light);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .35rem .85rem;
  border-radius: 99px;
  margin-bottom: 1.5rem;
}
.hero h1 { color: var(--white); margin-bottom: 1.25rem; }
.hero h1 span { color: var(--cool-light); }
.hero-desc { font-size: 1.125rem; color: rgba(255,255,255,.75); max-width: 580px; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 3rem; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 480px;
}
.stat-card {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}
.stat-number { font-size: 1.75rem; font-weight: 800; color: var(--cool-light); display: block; }
.stat-label  { font-size: .75rem; color: rgba(255,255,255,.65); margin-top: .25rem; }

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  padding: 1.75rem;
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.card-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.card-icon.blue  { background: var(--cool-pale); color: var(--cool); }
.card-icon.orange{ background: var(--heat-pale); color: var(--heat); }
.card-icon.navy  { background: rgba(19,28,63,.08); color: var(--navy); }
.card-icon.green { background: #f0fdf4; color: #16a34a; }

.card h3 { color: var(--navy); margin-bottom: .5rem; font-size: 1.05rem; }
.card p  { font-size: .9rem; }

/* ---------- Grid helpers ---------- */
.grid-2  { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-3  { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.grid-4  { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }

/* ---------- Badge ---------- */
.badge {
  display: inline-block;
  padding: .2rem .7rem;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 600;
}
.badge-blue   { background: var(--cool-pale); color: #0369a1; }
.badge-green  { background: #f0fdf4; color: #15803d; }
.badge-orange { background: var(--heat-pale); color: #c2410c; }
.badge-red    { background: #fef2f2; color: #dc2626; }
.badge-gray   { background: var(--slate-100); color: var(--slate-600); }
.badge-navy   { background: rgba(19,28,63,.08); color: var(--navy); }

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding-block: 4rem;
  text-align: center;
}
.cta-banner h2 { color: var(--white); margin-bottom: 1rem; }
.cta-banner p  { color: rgba(255,255,255,.75); margin-bottom: 2rem; font-size: 1.1rem; }
.cta-actions   { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Timeline ---------- */
.timeline { position: relative; }
.timeline-item {
  display: flex;
  gap: 1.5rem;
  position: relative;
  padding-bottom: 2.5rem;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 23px; top: 48px;
  width: 2px;
  bottom: 0;
  background: var(--slate-200);
}
.timeline-num {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  position: relative;
  z-index: 1;
}
.timeline-body h3 { color: var(--navy); margin-bottom: .35rem; }
.timeline-body p  { font-size: .95rem; }

/* ---------- Table ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table th {
  background: var(--navy);
  color: var(--white);
  padding: .9rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.data-table td {
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--slate-200);
  color: var(--slate-700);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) td { background: var(--slate-50); }

/* ---------- FAQ Accordion ---------- */
.faq-item {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  margin-bottom: .75rem;
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-weight: 600;
  font-size: .95rem;
  color: var(--navy);
  transition: background .15s;
}
.faq-question:hover { background: var(--slate-50); }
.faq-question.open  { background: var(--cool-pale); color: var(--cool); }
.faq-icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  transition: transform .25s;
}
.faq-question.open .faq-icon { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding: 0 1.25rem 1.1rem;
  font-size: .9rem;
  color: var(--slate-600);
  line-height: 1.7;
}
.faq-answer.open { display: block; }

/* ---------- Formulaire ---------- */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-weight: 600;
  font-size: .875rem;
  color: var(--slate-700);
  margin-bottom: .4rem;
}
.form-label .req { color: var(--heat); }
.form-control {
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--slate-800);
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s;
  background: var(--white);
}
.form-control:focus {
  outline: none;
  border-color: var(--cool);
  box-shadow: 0 0 0 3px rgba(14,165,233,.15);
}
.form-row { display: grid; gap: 1rem; }

.checkbox-group { display: grid; gap: .6rem; margin-top: .5rem; }
.checkbox-label { display: flex; align-items: flex-start; gap: .6rem; cursor: pointer; font-size: .9rem; color: var(--slate-600); }
.checkbox-label input[type=checkbox] { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--cool); flex-shrink: 0; }

.form-note {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: .85rem 1rem;
  font-size: .8rem;
  color: var(--slate-500);
  margin-bottom: 1.25rem;
}
.form-rgpd { font-size: .75rem; color: var(--slate-400); margin-top: .75rem; }
.form-rgpd a { text-decoration: underline; }

.alert {
  padding: 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #dc2626; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  color: var(--slate-400);
  padding-block: .75rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--slate-500); }
.breadcrumb a:hover { color: var(--cool); }
.breadcrumb span { color: var(--slate-700); font-weight: 500; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.7);
  padding-block: 3rem 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}
.footer-brand .logo { margin-bottom: 1rem; }
.footer-brand p { font-size: .875rem; color: rgba(255,255,255,.55); max-width: 280px; }
.footer-col h4 { color: var(--white); font-size: .875rem; font-weight: 700; margin-bottom: 1rem; letter-spacing: .04em; text-transform: uppercase; }
.footer-col ul { display: flex; flex-direction: column; gap: .5rem; }
.footer-col ul a { font-size: .875rem; color: rgba(255,255,255,.55); transition: color .15s; }
.footer-col ul a:hover { color: var(--cool-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.5rem;
  font-size: .8rem;
  color: rgba(255,255,255,.35);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}

/* ---------- Page hero (pages intérieures) ---------- */
.page-hero {
  background: linear-gradient(160deg, var(--navy-dark), var(--navy));
  color: var(--white);
  padding-block: 3.5rem 2.5rem;
}
.page-hero h1 { color: var(--white); font-size: clamp(1.75rem, 4vw, 2.75rem); margin-bottom: .75rem; }
.page-hero p  { color: rgba(255,255,255,.75); font-size: 1.1rem; max-width: 600px; }

/* ---------- Blog ---------- */
.article-card { display: flex; flex-direction: column; }
.article-card .card-meta { font-size: .8rem; color: var(--slate-400); margin-bottom: .5rem; }
.article-card h3 { margin-bottom: .5rem; font-size: 1.05rem; }
.article-card h3 a:hover { color: var(--cool); }
.article-card .read-more { margin-top: auto; padding-top: 1rem; font-size: .85rem; font-weight: 600; color: var(--cool); }
.article-card .read-more:hover { color: var(--cool-light); }

.article-body { max-width: 720px; margin-inline: auto; }
.article-body h2 { color: var(--navy); margin-block: 2rem .75rem; font-size: 1.4rem; }
.article-body h3 { color: var(--navy); margin-block: 1.5rem .5rem; }
.article-body p  { margin-bottom: 1rem; }
.article-body ul, .article-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.article-body li { margin-bottom: .4rem; color: var(--slate-700); }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body strong { color: var(--slate-800); }
.article-body .callout {
  background: var(--cool-pale);
  border-left: 3px solid var(--cool);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-block: 1.5rem;
  font-size: .95rem;
}

/* ---------- Responsive ---------- */
@media (min-width: 640px) {
  .form-row-2 { grid-template-columns: 1fr 1fr; }
  .checkbox-group { grid-template-columns: 1fr 1fr; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

@media (min-width: 1024px) {
  .nav-desktop  { display: flex; }
  .header-cta   { display: flex; }
  .burger       { display: none; }
  .grid-3       { grid-template-columns: repeat(3, 1fr); }
  .footer-grid  { grid-template-columns: 2fr 1fr 1fr 1fr; }
  section, .section { padding-block: 5rem; }
  .section-lg { padding-block: 7rem; }
}

@media (min-width: 1280px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---------- Utilitaires ---------- */
.text-center { text-align: center; }
.text-navy   { color: var(--navy); }
.text-cool   { color: var(--cool); }
.text-heat   { color: var(--heat); }
.text-white  { color: var(--white); }
.text-muted  { color: var(--slate-500); }
.bg-beige    { background: var(--beige); }
.bg-navy     { background: var(--navy); }
.bg-cool-pale{ background: var(--cool-pale); }
.bg-white    { background: var(--white); }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.gap-1  { gap: .25rem; }
.flex   { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.mx-auto { margin-inline: auto; }
.rounded { border-radius: var(--radius-md); }
.shadow  { box-shadow: var(--shadow-md); }
.overflow-x { overflow-x: auto; }
