/* ============================================================
   MOZL Rénov — Design system pages niveau 2 (« Apple-like »)
   Léger, sans dépendance. Mobile-first.
   ============================================================ */

:root {
  --ink: #1d1d1f;
  --ink-soft: #494949;
  --ink-muted: #86868b;
  --paper: #ffffff;
  --paper-alt: #f5f5f7;
  --night: #0b0b0d;
  --night-soft: #a1a1a6;
  --accent: #0a7d55;          /* vert énergie (défaut / aides) */
  --accent-soft: #e7f4ee;
  /* Couleurs héritées de la page d'accueil (blocs métier) */
  --violet: #5C4D8A;          /* Isolation — --purple-deep accueil */
  --violet-soft: #ECE9F4;
  --amber: #C9A227;           /* Chauffage — --gold-deep accueil */
  --amber-soft: #FBF3D9;
  --sky: #0A7A91;             /* Fenêtres — --cyan-deep accueil */
  --sky-soft: #DFF5FA;
  --radius-l: 28px;
  --radius-m: 18px;
  --shadow-card: 0 2px 8px rgba(0,0,0,.04), 0 24px 60px rgba(0,0,0,.09);
  --shadow-float: 0 12px 48px rgba(0,0,0,.14);
  --ease-out: cubic-bezier(.22,.61,.36,1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Typographie ---------- */
.h-display {
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  line-height: 1.04;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
}
.h-section {
  font-size: clamp(1.9rem, 5vw, 3.4rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 .5em;
}
.h-card {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 650;
  letter-spacing: -0.015em;
  margin: 0 0 .35em;
}
.lead {
  font-size: clamp(1.1rem, 2.6vw, 1.45rem);
  line-height: 1.4;
  color: var(--ink-soft);
  font-weight: 420;
  margin: 0;
}
.eyebrow {
  display: inline-block;
  font-size: .82rem;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.muted { color: var(--ink-muted); }
.copy { font-size: 1.05rem; color: var(--ink-soft); max-width: 62ch; }

/* thèmes d'accent par page (couleurs des blocs de la page d'accueil) */
.theme-iso { --accent: var(--violet); --accent-soft: var(--violet-soft); --cat-bg: #9D93C6; }
.theme-warm { --accent: var(--amber); --accent-soft: var(--amber-soft); --cat-bg: #F7D25F; }
.theme-light { --accent: var(--sky); --accent-soft: var(--sky-soft); --cat-bg: #10BEE1; }
.theme-aides { --accent: #2D5A3D; --accent-soft: #E4F1EA; --cat-bg: #AFDAC7; }

/* section colorée à la couleur de la catégorie (juste après le hero) */
.section-cat { background: var(--cat-bg); color: var(--ink); }
.section-cat .lead, .section-cat .copy { color: rgba(20, 18, 26, .78); }
.section-cat .eyebrow { color: rgba(20, 18, 26, .62); }
.section-cat .stat-num { color: var(--ink); }
.section-cat .stat-label { color: rgba(20, 18, 26, .66); }

/* ---------- Structure ---------- */
.section { padding: clamp(4.5rem, 12vw, 9rem) 0; }
.section-alt { background: var(--paper-alt); }
.section-night { background: var(--night); color: #f5f5f7; }
.section-night .lead, .section-night .copy { color: var(--night-soft); }
.wrap { width: min(1180px, 92vw); margin-inline: auto; }
.wrap-narrow { width: min(780px, 92vw); margin-inline: auto; }
.center { text-align: center; }
.stack-head { margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }

/* ---------- Nav produit sticky (style page produit Apple) ---------- */
.subnav {
  position: sticky; top: 0; z-index: 60;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: rgba(255,255,255,.78);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
.subnav-inner {
  width: min(1180px, 92vw); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between;
  min-height: 52px; gap: 1rem;
}
.subnav-title { font-weight: 650; font-size: 1.05rem; letter-spacing: -.01em; }
.subnav-title .subnav-metier { color: var(--accent); }
.subnav-links { display: flex; align-items: center; gap: 1.4rem; font-size: .86rem; }
.subnav-links a { color: var(--ink-soft); transition: color .2s; }
.subnav-links a:hover { color: var(--ink); }
.subnav-links .subnav-anchor { display: none; }
@media (min-width: 820px) { .subnav-links .subnav-anchor { display: inline; } }

/* --- CTA mobile : sorti du header, fixé en bas d'écran ---
   Le header porte un backdrop-filter, qui empêche un enfant en position
   fixe de se référencer à l'écran : le bouton mobile est donc un élément
   distinct, émis en fin de page. */
@media (max-width: 819px) {
  .subnav-links .btn-pill { display: none; }
  body { padding-bottom: 5.5rem; }
}
.cta-mobile {
  display: none;
  position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom));
  translate: -50% 0; z-index: 90;
  box-shadow: 0 8px 28px rgba(0,0,0,.22), 0 2px 6px rgba(0,0,0,.12);
  padding: .85em 1.7em; font-size: .98rem; white-space: nowrap;
  animation: cta-in .45s var(--ease-out) both;
}
@media (max-width: 819px) { .cta-mobile { display: inline-block; } }
@keyframes cta-in { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { .cta-mobile { animation: none; } }

.btn-pill {
  display: inline-block;
  background: var(--accent); color: #fff;
  border-radius: 980px; padding: .5em 1.15em;
  font-size: .88rem; font-weight: 600;
  transition: transform .25s var(--ease-out), box-shadow .25s, opacity .2s;
}
/* le texte du bouton reste blanc partout (y compris dans .subnav-links) */
.btn-pill, .btn-pill:visited, .btn-pill:hover, .btn-pill:focus,
.subnav-links a.btn-pill { color: #fff; }
.btn-pill:hover { transform: scale(1.04); box-shadow: 0 6px 22px rgba(0,0,0,.18); }
.btn-pill-lg { font-size: 1.05rem; padding: .8em 1.7em; }
.btn-ghost {
  display: inline-block; font-weight: 600; font-size: 1.02rem;
  color: var(--accent);
}
.btn-ghost::after { content: " ›"; }
.btn-ghost:hover { text-decoration: underline; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 92svh;
  display: grid; place-items: end center;
  isolation: isolate; overflow: hidden;
}
.hero-media {
  position: absolute; inset: 0; z-index: -2;
  background-size: cover; background-position: center;
  transform: scale(1.06);
  will-change: transform;
}
.hero-veil {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(8,10,12,.72) 0%, rgba(8,10,12,.25) 45%, rgba(8,10,12,.15) 100%);
}
.hero-content {
  position: relative;
  width: min(880px, 92vw);
  text-align: center; color: #fff;
  padding-bottom: clamp(4rem, 12vh, 7.5rem);
}
.hero-content .lead { color: rgba(255,255,255,.86); margin: 1.2rem auto 2rem; max-width: 34ch; }
.hero-cta-row { display: flex; gap: 1.2rem; justify-content: center; align-items: center; flex-wrap: wrap; }
.hero .btn-ghost { color: #fff; opacity: .92; }
.hero-scroll-hint {
  position: absolute; bottom: 1.2rem; left: 50%; translate: -50% 0;
  width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.5);
  border-radius: 14px;
  cursor: pointer;
}
/* zone cliquable élargie autour de l'indicateur */
.hero-scroll-hint::before { content: ""; position: absolute; inset: -14px; }
.hero-scroll-hint::after {
  content: ""; position: absolute; top: 7px; left: 50%; translate: -50% 0;
  width: 4px; height: 8px; border-radius: 3px; background: rgba(255,255,255,.75);
  animation: hint 2.2s infinite var(--ease-out);
}
@keyframes hint { 0%,20% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(12px); opacity: 0; } 100% { opacity: 0; } }

/* ---------- Cartes ---------- */
.card-grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .card-grid-2 { grid-template-columns: 1fr 1fr; } .card-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1020px) { .card-grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--paper);
  border-radius: var(--radius-l);
  padding: clamp(1.6rem, 4vw, 2.4rem);
  box-shadow: var(--shadow-card);
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-float); }
.section-night .card { background: #17171a; box-shadow: none; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 1.1rem;
}
.card-icon svg { width: 26px; height: 26px; }
.card p { margin: 0; color: var(--ink-soft); font-size: .98rem; }
.section-night .card p { color: var(--night-soft); }

/* carte média immersive (image plein cadre + texte) */
.media-card {
  position: relative; border-radius: var(--radius-l); overflow: hidden;
  min-height: 420px; display: grid; align-content: end;
  color: #fff; padding: clamp(1.6rem, 4vw, 2.6rem);
  background-size: cover; background-position: center;
  box-shadow: var(--shadow-card);
  transition: transform .5s var(--ease-out);
}
.media-card::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.66), rgba(0,0,0,0) 55%);
}
.media-card > * { position: relative; z-index: 1; }
.media-card p { color: rgba(255,255,255,.85); margin: 0; max-width: 46ch; }
.media-card:hover { transform: scale(1.015); }

/* ---------- Split (texte + image alternés) ---------- */
.split { display: grid; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; } .split-rev > :first-child { order: 2; } }
.split-img {
  border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow-card);
  aspect-ratio: 4 / 3.2; background-size: cover; background-position: center;
}

/* ---------- Chiffres clés ---------- */
.stats-row {
  display: grid; gap: 2.2rem; grid-template-columns: repeat(2, 1fr);
  text-align: center;
}
@media (min-width: 820px) { .stats-row { grid-template-columns: repeat(4, 1fr); } }
.stat-num {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 700; letter-spacing: -.03em; line-height: 1;
  color: var(--accent);
}
.section-night .stat-num { color: #fff; }
.stat-label { margin-top: .5rem; color: var(--ink-muted); font-size: .95rem; }
.section-night .stat-label { color: var(--night-soft); }

/* ---------- Avant / Après (slider) ---------- */
.ba {
  position: relative; border-radius: var(--radius-l); overflow: hidden;
  aspect-ratio: 16 / 10; box-shadow: var(--shadow-card);
  touch-action: pan-y; user-select: none; cursor: ew-resize;
}
.ba-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.ba-after { clip-path: inset(0 0 0 var(--ba-pos, 50%)); }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: var(--ba-pos, 50%);
  width: 3px; background: #fff; translate: -50% 0; z-index: 2;
  box-shadow: 0 0 14px rgba(0,0,0,.4);
}
.ba-handle::after {
  content: "⟷"; position: absolute; top: 50%; left: 50%;
  translate: -50% -50%; width: 46px; height: 46px; border-radius: 50%;
  background: #fff; color: var(--ink);
  display: grid; place-items: center; font-size: 1.15rem; font-weight: 700;
  box-shadow: var(--shadow-float);
}
.ba-tag {
  position: absolute; bottom: 1rem; z-index: 1;
  background: rgba(0,0,0,.55); color: #fff; backdrop-filter: blur(8px);
  font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: .4em .9em; border-radius: 980px;
}
.ba-tag-before { left: 1rem; }
.ba-tag-after { right: 1rem; }

/* listes avant/après en colonnes */
.ba-cols { display: grid; gap: 1.4rem; margin-top: 2.2rem; }
@media (min-width: 700px) { .ba-cols { grid-template-columns: 1fr 1fr; } }
.ba-col { border-radius: var(--radius-m); padding: 1.5rem 1.7rem; }
.ba-col-before { background: var(--paper-alt); color: var(--ink-muted); }
.ba-col-after { background: var(--accent-soft); }
.ba-col h3 { margin: 0 0 .8rem; font-size: 1rem; letter-spacing: .08em; text-transform: uppercase; }
.ba-col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: .55rem; font-size: 1rem; }
.ba-col-after li::before { content: "✓  "; color: var(--accent); font-weight: 700; }
.ba-col-before li::before { content: "—  "; }

/* ---------- Étapes accompagnement ---------- */
.steps { display: grid; gap: 1.4rem; counter-reset: step; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step { counter-increment: step; }
.step-num {
  font-size: .85rem; font-weight: 650; color: var(--accent);
  letter-spacing: .1em; margin-bottom: .6rem;
}
.step-num::before { content: "0" counter(step); font-size: 1.9rem; letter-spacing: 0; display: block; line-height: 1.2; }
.step h3 { margin: 0 0 .3em; font-size: 1.12rem; letter-spacing: -.01em; }
.step p { margin: 0; color: var(--ink-soft); font-size: .96rem; }

/* ---------- Aides (bandeau simple) ---------- */
.aid-band {
  border-radius: var(--radius-l);
  background: linear-gradient(135deg, var(--accent-soft), #fff 70%);
  padding: clamp(2rem, 6vw, 4rem);
  display: grid; gap: 2rem; align-items: center;
}
@media (min-width: 900px) { .aid-band { grid-template-columns: 1.2fr 1fr; } }
.aid-figure {
  text-align: center; background: #fff; border-radius: var(--radius-m);
  padding: 2rem 1.5rem; box-shadow: var(--shadow-card);
}
.aid-figure .stat-num { font-size: clamp(3rem, 7vw, 4.6rem); }

/* ---------- CTA final ---------- */
.cta-final {
  position: relative; isolation: isolate; overflow: hidden;
  text-align: center; color: #fff;
  padding: clamp(6rem, 16vw, 11rem) 0;
  background-size: cover; background-position: center;
}
.cta-final::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(8,10,12,.66);
}
.cta-final .lead { color: rgba(255,255,255,.85); margin: 1rem auto 2.2rem; max-width: 40ch; }
.cta-note { margin-top: 1.1rem; font-size: .88rem; color: rgba(255,255,255,.65); }

/* ---------- Footer minimal ---------- */
.footer-mini {
  padding: 2.5rem 0 3.5rem; font-size: .85rem; color: var(--ink-muted);
  background: var(--paper-alt);
}
.footer-mini .wrap { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; }
.footer-mini a:hover { color: var(--ink); }
.footer-mini-liens { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .55rem; }
.footer-mini-liens .sep { opacity: .45; }

/* ============================================================
   NIVEAU 3 — pages solutions techniques (sobres, couleur héritée)
   ============================================================ */

/* fil d'Ariane */
.crumbs { font-size: .82rem; color: rgba(20,18,26,.62); margin-bottom: 1.2rem; }
.crumbs a { color: inherit; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs .sep { margin: 0 .45em; opacity: .6; }

/* hero compact coloré à la couleur de la catégorie */
.n3-hero { background: var(--cat-bg); color: var(--ink); padding: clamp(2.5rem, 7vw, 4.5rem) 0 clamp(2.2rem, 6vw, 3.8rem); }
.n3-hero .h-display { font-size: clamp(2rem, 5.5vw, 3.6rem); }
.n3-hero .lead { color: rgba(20,18,26,.78); margin: 1rem 0 1.6rem; max-width: 56ch; }
.n3-hero-cta { display: flex; gap: 1.1rem; align-items: center; flex-wrap: wrap; }
.n3-hero .btn-ghost { color: var(--ink); font-weight: 650; }
.n3-chips { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.6rem; }
.n3-chip {
  background: rgba(255,255,255,.55); border-radius: 980px;
  padding: .45em 1em; font-size: .85rem; font-weight: 600; color: var(--ink);
  backdrop-filter: blur(4px);
}

/* corps de page : colonne de lecture confortable */
.n3-section { padding: clamp(2.8rem, 7vw, 5rem) 0; }
.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(1.45rem, 3.2vw, 2rem); letter-spacing: -.02em; margin: 0 0 .6em; }
/* sous-titres dans le corps de texte (même langage visuel que les H2) */
.prose h3 { font-size: clamp(1.08rem, 2.2vw, 1.28rem); letter-spacing: -.015em; margin: 1.8em 0 .5em; }
.prose h3:first-child { margin-top: 0; }
.prose p { color: var(--ink-soft); margin: 0 0 1em; line-height: 1.65; }
.prose ul { color: var(--ink-soft); line-height: 1.65; padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
.prose strong { color: var(--ink); }
/* corps de texte sur fond sombre : le gras doit ressortir, pas disparaître */
.section-night .prose p,
.section-night .prose ul,
.section-night .prose li { color: var(--night-soft); }
.section-night .prose h2,
.section-night .prose h3 { color: #f5f5f7; }
.section-night .prose strong { color: #fff; }

/* tableau de prix */
.price-table-wrap { overflow-x: auto; border-radius: var(--radius-m); box-shadow: var(--shadow-card); }
.price-table { width: 100%; border-collapse: collapse; background: var(--paper); font-size: .95rem; }
.price-table th {
  text-align: left; padding: .9em 1.1em; font-size: .78rem; font-weight: 650;
  text-transform: uppercase; letter-spacing: .07em; color: var(--ink-muted);
  border-bottom: 1.5px solid #ececf0; background: var(--paper-alt);
}
.price-table td { padding: .95em 1.1em; border-bottom: 1px solid #f0f0f3; color: var(--ink-soft); vertical-align: top; }
.price-table tr:last-child td { border-bottom: 0; }
.price-table .price { font-weight: 700; color: var(--accent); white-space: nowrap; }
.price-note { font-size: .8rem; color: var(--ink-muted); margin-top: .7rem; }

/* encart aides */
.n3-aides {
  border-radius: var(--radius-l); background: var(--accent-soft);
  padding: clamp(1.6rem, 4vw, 2.4rem);
  display: grid; gap: 1.4rem; align-items: center;
}
@media (min-width: 800px) { .n3-aides { grid-template-columns: 1fr auto; } }
.n3-aides .stat-num { font-size: clamp(2.2rem, 5vw, 3.2rem); }

/* FAQ accordéon */
.faq { display: grid; gap: .7rem; }
.faq-item { border: 1.5px solid #ececf0; border-radius: var(--radius-m); background: var(--paper); overflow: hidden; transition: border-color .25s; }
.faq-item[open] { border-color: var(--accent); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem;
  align-items: center; padding: 1.05em 1.2em; font-weight: 600; font-size: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.3rem; font-weight: 400; color: var(--accent);
  transition: transform .3s var(--ease-out); flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 1.2em 1.1em; color: var(--ink-soft); font-size: .96rem; line-height: 1.6; }

/* bandeau CTA final sobre */
.n3-cta {
  background: var(--cat-bg); border-radius: var(--radius-l);
  padding: clamp(2rem, 6vw, 3.5rem); text-align: center; color: var(--ink);
}
.n3-cta .lead { color: rgba(20,18,26,.75); margin: .6rem auto 1.6rem; max-width: 44ch; }

/* liens sœurs / maillage */
.n3-links { display: flex; gap: .6rem; flex-wrap: wrap; }
.n3-links a {
  border: 1.5px solid #e3e3e8; border-radius: 980px; padding: .5em 1.05em;
  font-size: .88rem; font-weight: 600; color: var(--ink-soft);
  transition: all .25s var(--ease-out);
}
.n3-links a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
/* pastilles solutions sous la section solution du niveau 2 */
.n2-solutions-nav { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; margin-top: 1.6rem; }
.n2-solutions-nav a {
  background: var(--accent-soft); color: var(--accent); border-radius: 980px;
  padding: .5em 1.1em; font-size: .9rem; font-weight: 650;
  transition: all .25s var(--ease-out);
}
.n2-solutions-nav a:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }

/* ============================================================
   SÉLECTEUR DE CATÉGORIES (panneau déroulant de la barre sticky)
   ============================================================ */
.switch { position: relative; display: flex; align-items: center; gap: .5rem; }
.switch-btn {
  display: inline-flex; align-items: center; gap: .45rem;
  background: none; border: 0; cursor: pointer; font: inherit;
  font-weight: 650; font-size: 1.05rem; letter-spacing: -.01em;
  color: var(--ink); padding: .35em .55em .35em 0; border-radius: 10px;
  transition: opacity .2s;
}
.switch-btn:hover { opacity: .65; }
.switch-btn .chev {
  width: 16px; height: 16px; flex-shrink: 0;
  transition: transform .35s var(--ease-out); color: var(--ink-muted);
}
.switch.is-open .switch-btn .chev { transform: rotate(180deg); }

.switch-panel {
  position: fixed; left: 0; right: 0; top: 52px; z-index: 55;
  /* fond plein : la lisibilité prime sur l'effet de flou, dont le rendu
     varie trop d'un navigateur à l'autre pour qu'on s'y fie */
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 24px 50px rgba(0,0,0,.10);
  padding: clamp(1.4rem, 3vw, 2.2rem) 0 clamp(1.6rem, 3vw, 2.4rem);
  opacity: 0; visibility: hidden; transform: translateY(-12px);
  transition: opacity .3s var(--ease-out), transform .35s var(--ease-out), visibility .3s;
  max-height: calc(100svh - 52px); overflow-y: auto;
}
.switch.is-open .switch-panel { opacity: 1; visibility: visible; transform: none; }

.switch-cols {
  width: min(1180px, 92vw); margin-inline: auto;
  display: grid; gap: 1.6rem 2rem; grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .switch-cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .switch-cols { grid-template-columns: repeat(4, 1fr); } }

.switch-col-title {
  display: flex; align-items: center; gap: .5rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; margin: 0 0 .8rem; color: var(--sw);
}
.switch-col-title::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--sw); flex-shrink: 0;
}
.switch-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.switch-col a {
  display: block; padding: .42em .6em; margin-left: -.6em;
  border-radius: 9px; font-size: .96rem; color: var(--ink-soft);
  transition: background .18s, color .18s;
}
.switch-col a:hover { background: rgba(0,0,0,.045); color: var(--ink); }
.switch-col a.is-pilier { font-weight: 650; color: var(--ink); }
.switch-col a.is-actif { color: var(--sw); font-weight: 650; }
.switch-col a.is-actif::after { content: " ●"; font-size: .55em; vertical-align: middle; }

.switch-foot {
  width: min(1180px, 92vw); margin: 1.5rem auto 0; padding-top: 1.1rem;
  border-top: 1px solid rgba(0,0,0,.08);
  display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; align-items: center;
  font-size: .9rem;
}
.switch-foot a { color: var(--ink-soft); font-weight: 600; }
.switch-foot a:hover { color: var(--ink); }
.switch-scrim {
  position: fixed; inset: 52px 0 0; z-index: 54; background: rgba(10,10,14,.18);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.switch.is-open ~ .switch-scrim,
.switch-scrim.is-open { opacity: 1; visibility: visible; }

/* ---------- Pages locales (niveau 4) ---------- */
.local-lbl {
  font-size: .78rem; font-weight: 650; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-muted); margin: 0 0 .8rem;
}
.chip-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .45rem;
}
.chip-list li {
  background: var(--accent-soft); color: var(--accent);
  border-radius: 980px; padding: .38em .95em;
  font-size: .87rem; font-weight: 600;
}
.chip-list-soft li {
  background: var(--paper-alt); color: var(--ink-soft); font-weight: 500;
}
.section-alt .chip-list-soft li { background: #fff; }
.quote {
  margin: 1.6rem 0 0; padding: 1.3rem 1.5rem;
  background: var(--paper); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-m) var(--radius-m) 0;
  box-shadow: var(--shadow-card);
}
.quote p { margin: 0 0 .7rem; font-size: 1.02rem; line-height: 1.6; color: var(--ink); font-style: italic; }
.quote cite { font-style: normal; font-size: .85rem; font-weight: 600; color: var(--ink-muted); }

/* ============================================================
   RAIL DE RACCOURCIS — 4 boutons verticaux, bord droit
   Une couleur par catégorie, infobulle au survol.
   Visible sur tous les écrans. Sur téléphone, les boutons sont
   réduits et resserrés pour ne pas gêner la lecture.
   ============================================================ */
.rail {
  position: fixed; right: 14px; top: 50%; translate: 0 -50%;
  z-index: 80; display: flex; flex-direction: column; gap: .6rem;
}
@media (max-width: 767px) {
  .rail { right: 8px; gap: .45rem; }
  .rail-btn { width: 40px; height: 40px; }
  .rail-btn svg { width: 19px; height: 19px; }
}

.rail-btn {
  position: relative;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; background: var(--rc, #555);
  box-shadow: 0 3px 10px rgba(0,0,0,.16), 0 1px 3px rgba(0,0,0,.1);
  transition: transform .28s var(--ease-out), box-shadow .28s var(--ease-out);
}
.rail-btn svg { width: 23px; height: 23px; }
.rail-btn:hover, .rail-btn:focus-visible {
  transform: scale(1.12);
  box-shadow: 0 6px 20px rgba(0,0,0,.26), 0 2px 6px rgba(0,0,0,.14);
}
.rail-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
/* page courante : anneau blanc discret */
.rail-btn.is-actif { box-shadow: 0 0 0 3px #fff, 0 4px 14px rgba(0,0,0,.28); }

/* infobulle */
.rail-btn::after {
  content: attr(data-tip);
  position: absolute; right: calc(100% + 12px); top: 50%; translate: 0 -50%;
  background: var(--ink); color: #fff;
  padding: .45em .85em; border-radius: 10px;
  font-size: .82rem; font-weight: 650; white-space: nowrap;
  opacity: 0; pointer-events: none;
  transform: translateX(6px);
  transition: opacity .22s var(--ease-out), transform .22s var(--ease-out);
  box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
/* petite pointe */
.rail-btn::before {
  content: ""; position: absolute; right: calc(100% + 6px); top: 50%;
  translate: 0 -50%; border: 6px solid transparent; border-left-color: var(--ink);
  opacity: 0; transition: opacity .22s var(--ease-out);
  pointer-events: none;
}
.rail-btn:hover::after, .rail-btn:focus-visible::after { opacity: 1; transform: none; }
.rail-btn:hover::before, .rail-btn:focus-visible::before { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .rail-btn, .rail-btn::after { transition: none; }
  .rail-btn:hover { transform: none; }
}

/* ---------- Popup demande de devis ---------- */
.devis-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10, 10, 14, .45);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  display: grid; place-items: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .35s var(--ease-out);
}
.devis-overlay.is-open { opacity: 1; pointer-events: auto; }
.devis-card {
  width: min(460px, 100%);
  max-height: min(92svh, 720px);
  overflow-y: auto;
  background: var(--paper);
  border-radius: var(--radius-l);
  padding: clamp(1.6rem, 5vw, 2.4rem);
  box-shadow: 0 40px 120px rgba(0,0,0,.35);
  transform: translateY(36px) scale(.96);
  transition: transform .45s cubic-bezier(.22,1.1,.36,1);
  position: relative;
}
.devis-overlay.is-open .devis-card { transform: none; }
.devis-close {
  position: absolute; top: 1rem; right: 1rem;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: var(--paper-alt); color: var(--ink-soft);
  font-size: 1.05rem; line-height: 1; cursor: pointer;
  transition: background .2s, transform .2s;
}
.devis-close:hover { background: #e8e8ed; transform: rotate(90deg); }
.devis-card h2 { margin: 0 0 .3rem; font-size: 1.45rem; letter-spacing: -.02em; }
.devis-sub { margin: 0 0 1.4rem; color: var(--ink-muted); font-size: .95rem; }
.devis-field { margin-bottom: .9rem; }
.devis-field label {
  display: block; font-size: .8rem; font-weight: 600;
  color: var(--ink-soft); margin-bottom: .35rem; letter-spacing: .02em;
}
.devis-field input {
  width: 100%; border: 1.5px solid #d8d8dd; border-radius: 12px;
  padding: .72em .9em; font: inherit; font-size: .98rem;
  background: var(--paper); color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.devis-field input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.devis-field input.is-invalid { border-color: #d64545; }
.devis-grid-2 { display: grid; gap: .9rem; grid-template-columns: 1fr; }
@media (min-width: 420px) { .devis-grid-2 { grid-template-columns: 1fr 1fr; } }
/* sélecteur de projet en pastilles */
.devis-projets { display: flex; gap: .5rem; flex-wrap: wrap; }
.devis-projets input { position: absolute; opacity: 0; pointer-events: none; }
.devis-projets label {
  flex: 1; text-align: center; cursor: pointer;
  border: 1.5px solid #d8d8dd; border-radius: 980px;
  padding: .55em .9em; font-size: .9rem; font-weight: 600;
  color: var(--ink-soft); margin: 0;
  transition: all .25s var(--ease-out);
  white-space: nowrap;
}
.devis-projets input:checked + label {
  background: var(--accent); border-color: var(--accent);
  color: #fff; transform: scale(1.03);
}
.devis-projets input:focus-visible + label { box-shadow: 0 0 0 3px var(--accent-soft); }
.devis-submit {
  width: 100%; border: 0; cursor: pointer; margin-top: .5rem;
  font: inherit;
}
.devis-note { margin: .9rem 0 0; text-align: center; font-size: .78rem; color: var(--ink-muted); }
.devis-rgpd { margin: .55rem 0 0; text-align: center; font-size: .72rem; line-height: 1.45; color: var(--ink-muted); }
.devis-rgpd a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
/* état succès */
.devis-success { display: none; text-align: center; padding: 1.5rem 0 .5rem; }
.devis-card.is-sent .devis-form { display: none; }
.devis-card.is-sent .devis-success { display: block; }
.devis-check {
  width: 72px; height: 72px; margin: 0 auto 1.1rem; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
}
.devis-check svg { width: 34px; height: 34px; }
.devis-check svg path {
  stroke-dasharray: 48; stroke-dashoffset: 48;
  animation: devis-draw .6s .15s var(--ease-out) forwards;
}
@keyframes devis-draw { to { stroke-dashoffset: 0; } }
body.devis-lock { overflow: hidden; }

/* ---------- Animations d'apparition ---------- */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal-scale { transform: scale(.94) translateY(18px); }
.reveal-scale.is-in { transform: none; }
[data-stagger] > * { --reveal-delay: calc(var(--i, 0) * 90ms); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-scale { opacity: 1; transform: none; transition: none; }
  .hero-media { transform: none !important; }
  .hero-scroll-hint { display: none; }
  .devis-overlay, .devis-card { transition: none; }
  .devis-check svg path { animation: none; stroke-dashoffset: 0; }
}
