/* Layout concept : la jauge du logo Co Installateur (vert → ambre → orange)
   fournit les trois couleurs de marque, réutilisées partout (bandeau,
   boutons, jauge de qualification) — jamais de teinte approchée. */
:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --fg: #16211c;
  --muted: #55615a;
  --border: #dfe3df;
  --marque: #1d3f35;
  --marque-fonce: #132a22;
  --vert: #22a37a;
  --ambre: #eba63e;
  --orange: #e0892f;
  --froid: var(--vert);
  --tiede: var(--ambre);
  --chaud: var(--orange);
  --font-display: 'Archivo', sans-serif;
  --font-body: 'Source Sans 3', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10160f;
    --surface: #182019;
    --fg: #eee8d8;
    --muted: #99a393;
    --border: #28322a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #10160f;
  --surface: #182019;
  --fg: #eee8d8;
  --muted: #99a393;
  --border: #28322a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.side { padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.08; text-wrap: balance; margin: 0; }
p { margin: 0; }
a { color: inherit; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.wrap { max-width: 1040px; margin: 0 auto; }
img, svg { max-width: 100%; }

/* ---------- Header ---------- */
header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; letter-spacing: -0.01em; text-decoration: none; color: var(--fg); }
.brand svg { width: 30px; height: 30px; flex: none; }
.nav-links { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; font-size: 0.93rem; font-weight: 600; }
.nav-links a { text-decoration: none; color: var(--muted); padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.nav-links a:hover { color: var(--fg); }
.nav-links a[aria-current="page"] { color: #fff; background: var(--marque); }
:root[data-theme="dark"] .nav-links a[aria-current="page"] { color: var(--bg); background: var(--vert); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav-links a[aria-current="page"] { color: var(--bg); background: var(--vert); }
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 8px; font-weight: 700; font-size: 0.95rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--marque); color: #fff; }
.btn-primary:hover { background: var(--marque-fonce); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }

/* ---------- Page header (sub-pages) ---------- */
.page-head { padding-block: 44px 8px; }
.eyebrow { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.12em; color: var(--marque); margin-bottom: 14px; }
:root[data-theme="dark"] .eyebrow { color: var(--vert); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .eyebrow { color: var(--vert); }
}
.page-head h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); font-weight: 900; letter-spacing: -0.02em; max-width: 24ch; }
.page-head p { margin-top: 16px; max-width: 58ch; color: var(--muted); font-size: 1.02rem; }

/* ---------- Hero (accueil) ---------- */
.hero { padding-block: 56px 48px; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 900; letter-spacing: -0.02em; max-width: 15ch; }
.hero-sub { margin-top: 20px; max-width: 56ch; color: var(--muted); font-size: 1.08rem; }
.hero-sub b { color: var(--fg); }
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 28px; }
.hero-price { margin-top: 16px; font-size: 0.9rem; color: var(--muted); }
.hero-diag { margin-top: 10px; font-size: 0.92rem; color: var(--muted); }

/* ---------- Product shot ---------- */
.product-shot { padding-block: 8px 48px; }
.shot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.shot-grid figure { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.shot-grid img { display: block; width: 100%; border-radius: 6px; border: 1px solid var(--border); }
.shot-grid figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--muted); text-align: center; }
@media (max-width: 760px) { .shot-grid { grid-template-columns: 1fr; } }

/* ---------- Stat strip ---------- */
.stats { padding-block: 40px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stats-head { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; max-width: 36ch; margin-bottom: 28px; }
.stats-head span { color: var(--muted); font-weight: 500; display: block; font-size: 0.95rem; margin-top: 6px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stat { border-left: 2px solid var(--orange); padding-left: 16px; }
.stat .num { font-family: var(--font-mono); font-size: 1.9rem; font-weight: 600; }
.stat .desc { color: var(--muted); font-size: 0.88rem; margin-top: 6px; }

/* ---------- Gauge / qualification section ---------- */
.gauge-section { padding-block: 24px 64px; }
.section-head { max-width: 46ch; margin-bottom: 36px; }
.section-head .eyebrow { margin-bottom: 10px; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -0.01em; }
.gauge-layout { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: center; }
.gauge-dial { width: 100%; height: auto; }
.class-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.class-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 18px; border-top: 3px solid var(--c); }
.class-card .tag { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; color: var(--c); }
.class-card p { margin-top: 10px; font-size: 0.9rem; color: var(--muted); }

/* ---------- Application (comment ça marche) ---------- */
.appli { padding-block: 24px 64px; }
.appli-card { padding-block: 44px; background: var(--marque); color: #f3ecdc; border-radius: 18px; }
.appli-inner { padding-inline: 32px; display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; align-items: start; }
.appli-card h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; }
.appli-card .eyebrow { color: #a9c4b4; }
.appli-sub { margin-top: 14px; color: #cfe0d4; font-size: 0.98rem; }
.appli-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.appli-card li { display: flex; gap: 14px; font-size: 0.96rem; color: #e7efe9; }
.appli-card li .i { font-family: var(--font-mono); color: var(--orange); font-weight: 600; flex: none; }

/* ---------- Features ---------- */
.features { padding-block: 24px 64px; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; display: flex; gap: 14px; }
.feature .i { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 700; color: var(--marque); background: color-mix(in srgb, var(--marque) 14%, transparent); border-radius: 999px; width: 28px; height: 28px; flex: none; display: flex; align-items: center; justify-content: center; }
.feature p { font-size: 0.92rem; }
.feature b { display: block; margin-bottom: 3px; font-size: 0.97rem; }

/* ---------- Pour qui ---------- */
.zone { padding-block: 24px 56px; }
.cat-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 8px; }
.cat-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.cat-item summary { list-style: none; cursor: pointer; padding: 15px 18px; font-weight: 700; font-size: 0.93rem; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cat-item summary::-webkit-details-marker { display: none; }
.cat-count { font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; color: var(--muted); }
.cat-item[open] summary { border-bottom: 1px solid var(--border); }
.dept-list { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 18px 18px; }
.dept { font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600; border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; background: var(--bg); }
.dept-note { margin-top: 20px; font-size: 0.88rem; color: var(--muted); }
.dept-note a { color: var(--marque); font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; }
:root[data-theme="dark"] .dept-note a { color: var(--vert); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .dept-note a { color: var(--vert); }
}
@media (max-width: 600px) { .cat-list { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { padding-block: 24px 56px; }
.faq-list { display: flex; flex-direction: column; gap: 10px; max-width: 760px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.faq-item summary { list-style: none; cursor: pointer; padding: 16px 20px; font-weight: 700; font-size: 0.98rem; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-family: var(--font-mono); font-size: 1.1rem; color: var(--marque); flex: none; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding: 0 20px 18px; color: var(--muted); font-size: 0.93rem; max-width: 65ch; }

/* ---------- Pricing ---------- */
.pricing { padding-block: 24px 64px; }
.price-card { background: var(--marque); color: #f3ecdc; border-radius: 18px; padding: 44px 36px; text-align: center; }
.price-card h2 { font-size: clamp(1.4rem, 2.8vw, 1.9rem); font-weight: 800; max-width: 26ch; margin: 0 auto; }
.price-table { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 32px; }
.plan { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: 12px; padding: 22px 26px; min-width: 220px; flex: 1 1 220px; max-width: 280px; text-align: left; }
.plan .tag { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.08em; color: var(--orange); font-weight: 700; }
.plan .price { font-family: var(--font-mono); font-size: 1.8rem; font-weight: 600; margin-top: 10px; }
.plan .price span { font-size: 0.85rem; font-weight: 500; color: #cfe0d4; }
.plan .note { margin-top: 10px; font-size: 0.85rem; color: #cfe0d4; }
.price-ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 30px; }
.price-card .btn-primary { background: var(--orange); }
.price-card .btn-primary:hover { background: #c9771f; }
.price-card .btn-ghost { border-color: rgba(255,255,255,0.3); color: #f3ecdc; }

/* ---------- Blog ---------- */
.blog-meta { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); margin-top: 10px; }
.blog-list { display: flex; flex-direction: column; gap: 18px; margin-top: 8px; }
.blog-card { display: block; text-decoration: none; color: var(--fg); border: 1px solid var(--border); border-radius: 14px; padding: 24px 26px; transition: border-color 0.2s; }
.blog-card:hover { border-color: var(--marque); }
.blog-card .blog-date { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }
.blog-card h2 { font-size: 1.15rem; margin-top: 8px; }
.blog-card p { margin-top: 10px; color: var(--muted); font-size: 0.93rem; max-width: 65ch; }
.article-body { max-width: 68ch; margin-top: 8px; }
.article-body p { margin-top: 18px; color: var(--fg); font-size: 1.02rem; }
.article-body h2 { font-size: 1.25rem; margin-top: 38px; margin-bottom: 4px; }
.article-body ul { margin-top: 14px; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.article-body li { color: var(--fg); }
.article-body strong { font-weight: 700; }

/* ---------- CTA de bas de page (sous-pages) ---------- */
.cta-strip { padding-block: 40px 56px; }
.cta-strip .inner { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.cta-strip p { font-family: var(--font-display); font-weight: 800; font-size: 1.1rem; max-width: 36ch; }

footer { padding-block: 32px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

@media (max-width: 760px) {
  .nav { flex-wrap: wrap; row-gap: 10px; }
  .nav-links {
    order: 3; width: 100%;
    gap: 8px; font-size: 0.85rem;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding-bottom: 4px; margin-bottom: -4px;
  }
  .nav-links a { padding: 6px 10px; }
  .stat-grid { grid-template-columns: 1fr; }
  .gauge-layout { grid-template-columns: 1fr; }
  .class-grid { grid-template-columns: 1fr; }
  .appli-inner { grid-template-columns: 1fr; padding-inline: 20px; }
  .appli-card { border-radius: 14px; }
  .feature-grid { grid-template-columns: 1fr; }
  .price-card { padding: 32px 22px; }
  .cta-strip .inner { flex-direction: column; align-items: flex-start; }
}
