/* ==========================================================================
   Alsace Clean Pro — shared stylesheet (tokens + components)
   Static offline site. No external requests. Self-hosted fonts.

   Structure: brand tokens (fixed) + semantic tokens (themeable).
   The light/pro theme is the default below. The cozy/dark theme used by the
   "particuliers" site overrides ONLY the semantic tokens in theme-cozy.css.
   ========================================================================== */

/* ---- Fonts (self-hosted, variable) ---- */
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/CormorantGaramond-Variable.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---- Brand tokens (never themed) ---- */
:root {
  --blue-700: #0e3e8a;
  --blue-500: #1e63c4;
  --blue-300: #4a90e2;
  --gold-500: #e0a82e;
  --gold-300: #f2ce6a;
  --navy-900: #0a2540;
  --gray-50: #f6f8fb;
  --gray-200: #e4e9f0;
  --ink: #12233b;
  --white: #ffffff;

  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  --radius-sm: 12px;
  --radius-lg: 16px;
  --content-max: 1120px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---- Semantic tokens — light / pro theme (default) ---- */
:root {
  --bg: var(--white);
  --bg-alt: var(--gray-50);
  --surface: var(--white);
  --surface-2: var(--gray-50);
  --border: var(--gray-200);
  --border-strong: #cfd8e6;

  --heading: var(--navy-900);
  --text: var(--ink);
  --text-soft: #3c4f6b;
  --text-muted: #52647e;
  /* Assombris pour atteindre 4,5:1 (WCAG AA) sur --bg comme sur --surface-2 ;
     les valeurs d'origine plafonnaient à 3,05 et 2,56. */
  --text-faint: #5f7290;
  --text-dim: #626e7d;

  --accent: var(--blue-700);
  --accent-2: var(--blue-500);
  --accent-3: var(--blue-300);
  --accent-soft: rgba(30, 99, 196, 0.1);
  --ring: rgba(30, 99, 196, 0.15);

  --shadow-soft: 0 8px 30px rgba(14, 62, 138, 0.08);
  --shadow-lift: 0 16px 40px rgba(14, 62, 138, 0.14);

  --header-bg: rgba(255, 255, 255, 0.86);
  --header-border: var(--gray-200);

  --btn-primary-bg: var(--blue-700);
  --btn-primary-bg-hover: var(--blue-500);
  --btn-primary-fg: var(--white);
  --btn-outline: var(--gold-500);
  --btn-outline-fg: var(--gold-500);
  --btn-outline-fg-hover: var(--navy-900);

  --hero-bg: linear-gradient(155deg, var(--navy-900) 0%, var(--blue-700) 62%, var(--blue-500) 100%);
  --hero-glow-a: rgba(224, 168, 46, 0.35);
  --hero-glow-b: rgba(74, 144, 226, 0.35);
  --hero-text: var(--white);
  --hero-lede: #d9e6fb;
  --hero-mark: url("../logo/logo-drop.png");
  --hero-mark-filter: brightness(0) invert(1);
  --hero-mark-opacity: 0.07;
  --hero-photo: url("../img/e09708ac1b.webp");
  --hero-photo-opacity: 0.36;

  /* Bandeau de titre des pages secondaires. Bleu ici : sans lui, ces pages
     n'ont que du gris et du blanc jusqu'au pied de page. Le thème cozy le
     ramène au gris, sa palette sombre couvrant déjà ce rôle. */
  --page-hero-bg: linear-gradient(150deg, var(--navy-900) 0%, var(--blue-700) 100%);
  --page-hero-heading: var(--white);
  --page-hero-lede: #d9e6fb;
  --page-hero-eyebrow: var(--gold-300);
  --page-hero-crumb: #a3bce0;
  --page-hero-crumb-hover: var(--gold-300);
  --page-hero-border: transparent;

  /* Logotype de l'en-tête : le bleu de la marque, et l'or clair du pied de page
     plutôt que l'or foncé, qui tirait vers l'orange à côté du logotype. */
  --logo-name-color: var(--accent);
  --logo-pro-color: var(--gold-300);

  /* Inverted bands (band-navy) + footer */
  --deep-bg: var(--navy-900);
  --deep-texture: none;
  --deep-text: #dbe6f7;
  --deep-muted: #b9cbe9;
  --deep-faint: #7f95b8;
  --deep-heading: var(--white);
  --deep-rule: rgba(255, 255, 255, 0.12);
  --deep-accent: var(--gold-300);

  --scroll-thumb: rgba(18, 35, 59, 0.22);
  --scroll-thumb-hover: rgba(18, 35, 59, 0.42);

  --rule: linear-gradient(90deg, var(--gold-500), var(--gold-300));
  --icon-bg: linear-gradient(135deg, var(--blue-700), var(--blue-500));
  --icon-fg: var(--white);
  --logo-src-light: url("../logo/logo-drop.png");
}

/* ---- Barres de défilement ----
   Piste transparente, curseur discret mais bien saisissable. Le curseur est
   dessiné dans la zone de contenu d'une boîte plus large : la bordure
   transparente lui fait une marge sans le rendre difficile à attraper. */
html {
  scrollbar-width: thin;                       /* Firefox */
  scrollbar-color: var(--scroll-thumb) transparent;
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track,
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb {
  background-color: var(--scroll-thumb);
  border: 3px solid transparent;
  background-clip: content-box;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--scroll-thumb-hover); }
::-webkit-scrollbar-button { display: none; }

/* ---- Reset ---- */
* { box-sizing: border-box; }
html, body, h1, h2, h3, h4, p, ul, ol, li, figure, blockquote { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; border-radius: 4px; }
/* La cible d'un lien d'évitement reçoit le focus par programme : pas de halo. */
main:focus { outline: none; }

/* ---- Lien d'évitement ----
   Premier élément focalisable de la page : au clavier, une tabulation puis
   Entrée sautent l'en-tête et la navigation. */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  padding: 11px 20px; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  background: var(--accent); color: var(--white);
  font-weight: 600; font-size: 0.9rem;
  transition: top 180ms var(--ease-out);
}
.skip-link:focus { top: 0; }
::selection { background: var(--gold-300); color: var(--navy-900); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .btn::after { display: none; }
}

/* ---- Typography ---- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; color: var(--heading); line-height: 1.15; }
h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); }
.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--accent-2);
}
.lede { font-size: 1.1rem; color: var(--text-soft); max-width: 620px; }
.tagline { font-family: var(--font-display); font-style: italic; color: var(--gold-500); font-weight: 600; }

/* ---- Layout ---- */
.wrap { max-width: var(--content-max); margin: 0 auto; padding: 0 24px; }
.band { padding: 88px 0; }
.band-tight { padding: 56px 0; }
.band-navy { background-color: var(--deep-bg); background-image: var(--deep-texture); color: var(--deep-text); }
.band-navy h2, .band-navy h3 { color: var(--deep-heading); }
.band-gray { background: var(--bg-alt); }
.band-navy + .band-navy { border-top: 1px solid var(--deep-rule); }
.divider-gold { height: 2px; width: 64px; background: var(--rule); border: 0; margin: 20px 0; }
.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }

.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---- Buttons ---- */
.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out), background 300ms var(--ease-out), color 300ms var(--ease-out);
}
.btn:hover, .btn:focus-visible { transform: translateY(-3px); }

/* Reflet discret qui traverse le bouton une fois, au survol */
.btn::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: skewX(-18deg);
  opacity: 0;
  pointer-events: none;
}
.btn:hover::after, .btn:focus-visible::after {
  opacity: 1;
  animation: btnSheen 720ms var(--ease-out);
}
@keyframes btnSheen {
  from { left: -60%; }
  to   { left: 115%; }
}

/* Les boutons porteurs d'une flèche la font glisser */
.btn svg { transition: transform 320ms var(--ease-out); }
.btn:hover svg, .btn:focus-visible svg { transform: translateX(4px); }
.btn-primary { background: var(--btn-primary-bg); color: var(--btn-primary-fg); box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--btn-primary-bg-hover); box-shadow: var(--shadow-lift); }
.btn-gold {
  background: transparent;
  border-color: var(--btn-outline);
  color: var(--btn-outline-fg);
}
.btn-gold:hover { background: var(--btn-outline); color: var(--btn-outline-fg-hover); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,0.35); color: var(--white); }
.btn-ghost:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled], .btn-disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.btn-sm { padding: 10px 22px; font-size: 0.85rem; white-space: nowrap; }

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
}
/* Le flou est porté par un calque placé derrière plutôt que par le bandeau
   lui-même : appliqué au bandeau, il enferme les boutons dans sa surface de
   rendu, où leurs bords arrondis perdent leur lissage. */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  pointer-events: none;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; gap: 16px; }
.logo-link { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.logo-link img { height: 44px; width: auto; }
.logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--logo-name-color);
  line-height: 1;
  white-space: nowrap;
}
.logo-name .logo-pro { color: var(--logo-pro-color); }
@media (max-width: 420px) { .logo-name { font-size: 1.15rem; } }
.main-nav { display: flex; align-items: center; gap: 20px; }
.main-nav ul { display: flex; gap: 18px; }
.main-nav ul a { font-weight: 600; font-size: 0.95rem; color: var(--text); position: relative; padding: 4px 0; white-space: nowrap; }
.main-nav ul a::after {
  content: "";
  position: absolute; left: 0; right: 100%; bottom: -2px; height: 2px;
  background: var(--gold-500);
  transition: right 250ms var(--ease-out);
}
.main-nav ul a:hover::after, .main-nav ul a[aria-current="page"]::after { right: 0; }
.main-nav ul a[aria-current="page"] { color: var(--accent); }
.nav-ctas { display: flex; gap: 10px; align-items: center; }
.nav-ctas .btn { justify-content: center; }
/* Les largeurs de texte tombent sur des fractions de pixel, ce qui pose les
   bords arrondis à cheval sur deux colonnes et rend l'escalier visible.
   main.js mesure le décalage et le corrige via --snap-x / --snap-y. */
.nav-ctas .btn { transform: translate(var(--snap-x, 0px), var(--snap-y, 0px)); }
.nav-ctas .btn:hover, .nav-ctas .btn:focus-visible {
  transform: translate(var(--snap-x, 0px), calc(var(--snap-y, 0px) - 3px));
}
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 11px;
}
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px 0; transition: transform 200ms, opacity 200ms; }

/* ---- Audience bar (pro <-> particuliers switch) ---- */
.audience-bar { background: var(--surface-2); border-bottom: 1px solid var(--border); }
.audience-bar .wrap {
  display: flex; align-items: center; justify-content: flex-end; gap: 6px;
  padding-top: 6px; padding-bottom: 6px;
  font-size: 0.78rem;
}
.audience-bar .aud-label { color: var(--text-faint); margin-right: 6px; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.7rem; font-weight: 600; }
.audience-bar a, .audience-bar span.is-current {
  border-radius: 999px; padding: 5px 13px; font-weight: 600;
  transition: color 200ms var(--ease-out), background 200ms var(--ease-out);
}
.audience-bar a { color: var(--text-muted); }
.audience-bar a:hover { color: var(--accent); background: var(--accent-soft); }
.audience-bar span.is-current { color: var(--accent); background: var(--accent-soft); }
@media (max-width: 560px) {
  .audience-bar .wrap { justify-content: center; }
  .audience-bar .aud-label { display: none; }
}

@media (max-width: 1150px) {
  /* Le panneau est un enfant absolu de l'en-tête collant : il se place donc
     toujours juste sous lui, quelle que soit sa hauteur (barre d'audience
     comprise). L'ancienne valeur fixe de 72px le faisait passer derrière. */
  .site-header { position: sticky; }
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 14px 24px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.12);
    max-height: calc(100svh - 100%);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: transform 240ms var(--ease-out), opacity 240ms var(--ease-out), visibility 240ms;
  }
  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav ul a {
    display: block;
    padding: 13px 4px;
    border-bottom: 1px solid var(--border);
  }
  /* Le soulignement animé n'a plus de sens sur des lignes pleine largeur. */
  .main-nav ul a::after { display: none; }
  .main-nav ul a[aria-current="page"] { color: var(--accent); }

  .nav-ctas {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
  }
  .nav-ctas .btn { flex: 1 1 auto; }

  .nav-toggle { display: block; }
  body.nav-open { overflow: hidden; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 88px;
  background: var(--hero-bg);
  color: var(--hero-text);
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10%;
  background: radial-gradient(circle at 78% 22%, var(--hero-glow-a), transparent 55%),
              radial-gradient(circle at 15% 85%, var(--hero-glow-b), transparent 50%);
  animation: driftGlow 22s ease-in-out infinite alternate;
  will-change: transform;          /* couche GPU : la boucle ne repeint plus le dégradé */
}
/* Animations d'ambiance mises en pause dès que l'onglet passe en arrière-plan
   (voir main.js) : inutile de faire tourner le GPU pour un onglet qu'on ne
   regarde pas — cela pénalise la lecture vidéo dans les autres fenêtres. */
body.is-idle .hero::before,
body.is-idle .panel::before {
  animation-play-state: paused;
}
@keyframes driftGlow {
  from { transform: translate3d(0,0,0) scale(1); }
  to { transform: translate3d(2%, -2%, 0) scale(1.08); }
}
.hero::after {
  content: "";
  position: absolute;
  right: -4%;
  bottom: -16%;
  width: min(560px, 52vw);
  aspect-ratio: 1;
  background: var(--hero-mark) center / contain no-repeat;
  filter: var(--hero-mark-filter);
  opacity: var(--hero-mark-opacity);
  pointer-events: none;
}
/* Photo d'ambiance calée à gauche, estompée vers la droite pour laisser
   la place à la goutte en filigrane. Couche distincte : ::before porte les
   halos, ::after la goutte. */
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--hero-photo);
  background-size: cover;
  background-position: left center;
  opacity: var(--hero-photo-opacity, 0.16);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 30%, transparent 72%);
  mask-image: linear-gradient(90deg, #000 0%, #000 30%, transparent 72%);
  pointer-events: none;
}
.hero::before { z-index: 1; }
.hero::after { z-index: 2; }
.hero-inner { position: relative; z-index: 3; max-width: 720px; }
.hero h1 { color: var(--hero-text); margin-top: 18px; }
.hero .lede { color: var(--hero-lede); margin-top: 18px; }
.hero-ctas { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }

/* ---- Aides fiscales mises en avant dans le héros (site particuliers) ----
   Deux pastilles cliquables qui mènent au détail plus bas dans la page. */
.hero-aides { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero-aide {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hero-aide-border, rgba(255, 255, 255, 0.22));
  background: var(--hero-aide-bg, rgba(255, 255, 255, 0.07));
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: border-color 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.hero-aide:hover { border-color: var(--gold-300); transform: translateY(-2px); }
.hero-aide__taux {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  color: var(--gold-300);
}
.hero-aide__texte { font-size: 0.86rem; line-height: 1.4; color: var(--hero-lede); }
.hero-aide__texte strong { color: var(--hero-text); font-weight: 600; }
@media (max-width: 560px) { .hero-aide { width: 100%; } }

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  transition: transform 320ms var(--ease-out), box-shadow 320ms var(--ease-out);
}
.card.lift:hover { transform: translateY(-6px); box-shadow: var(--shadow-lift); }
.card .icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--icon-bg);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.card .icon svg { width: 24px; height: 24px; stroke: var(--icon-fg); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 0.96rem; }

/* ---- Trust / feature list ---- */
.feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 700px) { .feature-list { grid-template-columns: 1fr; } }
.feature-item { display: flex; gap: 14px; align-items: flex-start; }
.feature-item .tick {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.feature-item .tick svg { width: 16px; height: 16px; stroke: var(--accent); }
.feature-item strong { display: block; color: var(--heading); }
.feature-item span { color: var(--text-muted); font-size: 0.92rem; }

/* ---- Stats / count-up ---- */
.stats-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; text-align: center; }
@media (max-width: 700px) { .stats-band { grid-template-columns: 1fr; } }
.stat-tile .stat-number { font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3rem); font-weight: 700; color: var(--deep-accent); }
.stat-tile .stat-label { color: var(--deep-muted); margin-top: 6px; font-size: 0.92rem; }

/* ---- CTA banner ---- */
.cta-banner { text-align: center; }
.band-navy.cta-banner h2 { color: var(--deep-heading); }
.cta-banner .lede { margin: 14px auto 30px; }
.band-navy.cta-banner .lede { color: var(--deep-text); }
.cta-banner .hero-ctas { justify-content: center; }

/* ---- Image placeholder ---- */
.img-placeholder {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg-alt), var(--border));
  border: 1px dashed var(--accent-3);
  border-radius: var(--radius-lg);
  color: var(--accent);
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
  overflow: hidden;
}
.img-placeholder::before {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(45deg, var(--accent-soft) 0 12px, transparent 12px 24px);
}
.img-placeholder span { position: relative; z-index: 1; max-width: 260px; line-height: 1.4; }
.img-placeholder svg { position: relative; z-index: 1; width: 34px; height: 34px; margin-bottom: 10px; stroke: var(--accent-2); }
/* ---- Carte de la zone d'intervention ----
   Carte Leaflet déplaçable et zoomable, fonds OpenStreetMap. Le cercle et son
   rayon viennent de config('entreprise.zone') : un seul chiffre pour le dessin
   et pour la légende. */
.map-figure {
  position: relative;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: var(--surface-2);
}
.map-canvas {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--surface-2);
  z-index: 0;                           /* garde la carte sous l'en-tête collant */
}
/* La légende recouvre le bas de la carte : on lui laisse la place. */
.map-figure .leaflet-control-attribution { display: none; }
.map-figure .leaflet-bottom.leaflet-right { bottom: 26px; }
.map-figure figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 7px 12px;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.84);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.map-figure figcaption a { text-decoration: underline; }

/* Photo réelle, occupant le même emplacement qu'un .img-placeholder */
.media {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

/* Reproduction d'un document (fiche, devis) : la légende dit que l'exemple
   est fictif, sans quoi la capture se lirait comme un engagement. */
.doc-figure {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.doc-figure .media { display: block; border-radius: 0; box-shadow: none; }
.doc-figure figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 10px 16px;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.ratio-16-9 { aspect-ratio: 16/9; }
.ratio-4-3 { aspect-ratio: 4/3; }
.ratio-1-1 { aspect-ratio: 1/1; }

/* ---- Map / secteurs ---- */
.sector-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 800px) { .sector-layout { grid-template-columns: 1fr; } }
.client-types { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 20px; }
.client-types li { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; font-weight: 600; font-size: 0.9rem; }

/* ---- Footer ---- */
.site-footer { background-color: var(--deep-bg); background-image: var(--deep-texture); color: var(--deep-muted); padding: 72px 0 28px; }
/* Colonnes dimensionnées au contenu et blancs répartis, plutôt que quatre
   fractions égales : à largeur de colonne égale, l'adresse courriel remplissait
   presque toute la sienne quand « Navigation » n'en occupait que la moitié, et
   le blanc entre les textes passait de 49 px à 161 px alors que les colonnes,
   elles, étaient régulières. L'écart porte maintenant sur les blocs eux-mêmes,
   et le rang occupe toute la largeur utile. */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  justify-content: space-between;
  gap: 40px 32px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--deep-heading); font-family: var(--font-body); font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 16px; }
/* Les colonnes de grille ont min-width:auto par défaut : elles refusent de
   passer sous la largeur de leur contenu, et le mot-clé nowrap du logotype
   débordait alors sur la colonne voisine. */
.footer-grid > * { min-width: 0; }
/* Le bloc de marque est plus court que les colonnes de liens : on le centre
   verticalement dans sa cellule plutôt que de le laisser collé en haut.
   Le padding bas décale le centrage de 16 px vers le haut : les colonnes
   voisines ont leur masse visuelle en haut (intitulés en gras) et un centrage
   strictement géométrique paraît trop bas. */
.footer-grid > *:first-child {
  display: flex;
  align-items: center;
  padding-bottom: 32px;
}
/* Bloc de marque du pied de page : la goutte reste calée à gauche, en dehors
   de l'alignement ; le logotype et le slogan partagent le même bord gauche.
   Le PNG est carré mais le dessin n'occupe que ~60 % de sa largeur (≈20 % de
   transparence de chaque côté) : la marge négative compense ce retrait
   fantôme pour que la goutte affleure vraiment le bord de la colonne. */
.footer-brand {
  display: grid;
  grid-template-columns: auto auto;     /* goutte | logotype, dimensionnées au contenu */
  justify-content: start;               /* sinon la 2e colonne s'étire et fausse le centrage */
  grid-template-rows: auto auto;        /* logotype | slogan */
  /* Le PNG a ~21,6 % de transparence à droite : à 46 px de large cela ajoute
     ~10 px d'écart invisible. On les retranche pour obtenir un blanc optique
     d'environ 12 px entre la goutte et le logotype. */
  column-gap: calc(12px - 46px * 0.216);
  align-items: center;
  margin-left: calc(46px * -0.201);
}
.footer-brand img {
  grid-column: 1;
  grid-row: 1 / -1;                     /* centrée sur l'ensemble logotype + slogan */
  height: 46px;
  width: auto;
  align-self: center;
  /* La goutte a sa masse dans le bulbe, en bas : son centre de gravité est à
     8 % de la hauteur sous son centre géométrique. Un centrage strictement
     géométrique la fait donc paraître trop basse — on la remonte d'autant.
     transform plutôt que margin : aucun impact sur la mise en page. */
  transform: translateY(calc(46px * -0.0805));
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.35));
}
.footer-brand .logo-name {
  grid-column: 2;
  grid-row: 1;
  font-size: 1.2rem;
  white-space: normal;
  color: var(--deep-heading);
}
.footer-brand .logo-name .logo-pro { color: var(--deep-accent); }
.footer-brand .tagline {
  grid-column: 2;                       /* même bord gauche que le logotype */
  grid-row: 2;
  font-size: 0.92rem;
  margin-top: 2px;
}

.site-footer ul li { margin-bottom: 10px; font-size: 0.92rem; overflow-wrap: anywhere; }
.site-footer a:hover { color: var(--deep-accent); }
.footer-bottom {
  margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--deep-rule);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 0.82rem; color: var(--deep-faint);
}
.footer-bottom a:hover { color: var(--deep-accent); }
.site-footer .fill-slot { color: var(--gold-300); background: rgba(224,168,46,0.15); border-color: var(--gold-300); }

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---- Forms ---- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--heading); }
.field input, .field select, .field textarea {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
  background: var(--surface); color: var(--text);
  transition: border-color 200ms, box-shadow 200ms;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--ring);
}
.field input[disabled], .field select[disabled] { background: var(--surface-2); color: var(--text-dim); }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.88rem; color: var(--text-muted); }
.checkbox-row input { margin-top: 3px; }
.form-note { font-size: 0.82rem; color: var(--text-faint); margin-top: 10px; }
/* Sans soulignement, le numéro se confond avec le reste de la note. */
.form-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.form-success {
  display: none; align-items: center; gap: 10px;
  background: var(--ok-bg, #e6f4f1); border: 1px solid var(--ok-border, #b3ddd4); color: var(--ok-fg, #0f6b5c);
  border-radius: 10px; padding: 14px 16px; margin-top: 18px; font-weight: 600; font-size: 0.9rem;
}
.form-success.is-visible { display: flex; }
.form-success svg { width: 20px; height: 20px; stroke: var(--ok-fg, #0f6b5c); flex-shrink: 0; }

/* ---- Demo / preview banners ---- */
.demo-banner {
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(90deg, var(--gold-300), var(--gold-500));
  color: var(--navy-900); font-weight: 600; font-size: 0.9rem;
  padding: 14px 20px; border-radius: 12px; margin-bottom: 32px;
}
.demo-banner svg { width: 20px; height: 20px; flex-shrink: 0; }
.preview-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 5px 12px;
}

/* ---- Page hero (secondary pages) ---- */
.page-hero {
  background: var(--page-hero-bg);
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--page-hero-border);
}
.page-hero h1 { color: var(--page-hero-heading); }
.page-hero .eyebrow { margin-bottom: 10px; color: var(--page-hero-eyebrow); }
.page-hero .lede { margin-top: 14px; color: var(--page-hero-lede); }
.breadcrumb { font-size: 0.82rem; color: var(--text-faint); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--accent-2); }
/* Note de bas de bandeau : définition d'un sigle appelé par un astérisque. */
.footnote {
  margin-top: 14px;
  max-width: 620px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-faint);
}
.page-hero .footnote { color: var(--page-hero-crumb); }
.lede sup { font-size: 0.66em; line-height: 0; vertical-align: super; }

.page-hero .breadcrumb { color: var(--page-hero-crumb); }
.page-hero .breadcrumb a { color: inherit; }
.page-hero .breadcrumb a:hover { color: var(--page-hero-crumb-hover); }

/* ---- Legal pages ---- */
.legal-body { max-width: 760px; margin: 0 auto; }
.legal-body h2 { margin-top: 44px; margin-bottom: 14px; font-size: 1.3rem; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p, .legal-body li { color: var(--text-soft); margin-bottom: 12px; }
.legal-body ul { list-style: disc; padding-left: 22px; }
.legal-body ul li { margin-bottom: 8px; }
.fill-slot { background: rgba(224,168,46,0.18); border: 1px dashed var(--gold-500); border-radius: 6px; padding: 1px 8px; color: var(--fill-slot-fg, #8a5f0d); font-weight: 600; font-size: 0.92em; white-space: nowrap; }
.legal-updated { color: var(--text-faint); font-size: 0.85rem; margin-bottom: 32px; }

/* ---- Booking (rendez-vous) ---- */
.booking-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 36px; align-items: start; }
@media (max-width: 900px) { .booking-layout { grid-template-columns: 1fr; } }
.calendar-card { padding: 24px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.calendar-head button { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; width: 34px; height: 34px; color: var(--text); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.calendar-grid .dow { font-size: 0.72rem; color: var(--text-dim); font-weight: 700; padding-bottom: 6px; }
.calendar-grid button.day {
  aspect-ratio: 1/1; border-radius: 10px; border: 1px solid transparent; background: var(--surface-2);
  font-weight: 600; color: var(--text); transition: background 180ms, color 180ms, transform 180ms;
}
.calendar-grid button.day:hover:not([disabled]) { background: var(--accent-3); color: var(--btn-primary-fg); transform: translateY(-1px); }
.calendar-grid button.day.is-selected { background: var(--accent); color: var(--btn-primary-fg); }
.calendar-grid button.day[disabled] { color: var(--border-strong); background: transparent; cursor: not-allowed; }
.calendar-grid button.day.is-today { box-shadow: inset 0 0 0 2px var(--gold-500); }
.calendar-grid .pad { visibility: hidden; }
.slot-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.slot-chip {
  border: 1px solid var(--border); border-radius: 999px; padding: 9px 16px; font-size: 0.88rem; font-weight: 600;
  background: var(--surface); color: var(--text); transition: background 180ms, color 180ms, border-color 180ms;
}
.slot-chip:hover:not([disabled]) { border-color: var(--accent-2); color: var(--accent); }
.slot-chip.is-selected { background: var(--accent); border-color: var(--accent); color: var(--btn-primary-fg); }
.slot-chip[disabled] { opacity: 0.4; cursor: not-allowed; }
.booking-summary { background: var(--surface-2); border-radius: 10px; padding: 14px 16px; margin-top: 20px; font-size: 0.88rem; color: var(--heading); }

/* ---- Espace client / login ---- */
.auth-layout { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 44px; align-items: start; }
@media (max-width: 900px) { .auth-layout { grid-template-columns: 1fr; } }
.auth-card { max-width: 420px; }
.auth-card .field { margin-bottom: 16px; }
.auth-links { display: flex; justify-content: space-between; font-size: 0.85rem; margin-top: 14px; }
.preview-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media (max-width: 600px) { .preview-grid { grid-template-columns: 1fr; } }
.preview-card { position: relative; opacity: 0.75; }
.preview-card .preview-tag { position: absolute; top: 16px; right: 16px; }

/* ---- Paiement ---- */
.pay-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 36px; align-items: start; }
@media (max-width: 900px) { .pay-layout { grid-template-columns: 1fr; } }
.order-line { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.order-line.total { font-weight: 700; color: var(--heading); border-bottom: none; padding-top: 14px; font-size: 1rem; }
.trust-badges { display: flex; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.trust-badge { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--text-muted); }
.trust-badge svg { width: 18px; height: 18px; stroke: var(--accent-2); }

/* ---- Blog ---- */
.blog-card { overflow: hidden; padding: 0; }
.blog-card .img-placeholder { border-radius: 0; border-width: 0 0 1px 0; }
.blog-card .blog-body { padding: 22px; }
.blog-meta { font-size: 0.78rem; color: var(--text-faint); margin-bottom: 8px; }
.blog-card h3 { margin-bottom: 8px; }
.blog-card p { color: var(--text-muted); font-size: 0.92rem; }
.article-body { max-width: 700px; margin: 0 auto; }
.article-body p { margin-bottom: 16px; color: var(--text-soft); }
.article-body h2 { margin: 32px 0 12px; font-size: 1.3rem; }

/* ---- Misc utilities ---- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.muted { color: var(--text-muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ==========================================================================
   Espace client
   ========================================================================== */

.espace-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
  margin-bottom: 32px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.espace-nav a {
  padding: 9px 15px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-muted);
  transition: color 200ms var(--ease-out), background 200ms var(--ease-out);
}
.espace-nav a:hover { color: var(--accent); background: var(--accent-soft); }
.espace-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.espace-logout { margin-left: auto; }

.espace-flash {
  background: var(--ok-bg, #e6f4f1);
  border: 1px solid var(--ok-border, #b3ddd4);
  color: var(--ok-fg, #0f6b5c);
  border-radius: 10px;
  padding: 13px 16px;
  margin-bottom: 26px;
  font-weight: 600;
  font-size: 0.92rem;
}

.espace-figure {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.1;
  margin: 6px 0 4px;
}
.espace-figure-sm { font-size: 1.7rem; }

.espace-list { display: grid; gap: 14px; }
.espace-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
}
.espace-ref { font-weight: 600; color: var(--heading); }
.espace-amount { font-weight: 700; color: var(--heading); white-space: nowrap; }
.espace-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.espace-inline-form { display: flex; gap: 8px; }

@media (max-width: 760px) {
  .espace-row { grid-template-columns: 1fr; gap: 10px; }
  .espace-actions { justify-content: flex-start; }
  .espace-logout { margin-left: 0; width: 100%; }
  .espace-logout .btn { width: 100%; justify-content: center; }
}

/* ---- Pastilles de statut ----
   Le sens ne repose jamais sur la seule couleur : chaque pastille porte son
   libellé en toutes lettres et un signe distinctif. Une capture en noir et
   blanc reste lisible. */
.statut {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.statut::before {
  content: var(--statut-signe, "•");
  font-size: 0.9em;
  line-height: 1;
}
/* Le vert tire volontairement vers le sarcelle et le rouge vers le rose : un
   vert et un rouge francs se confondent en déficience rouge/vert (deutéranopie
   et protanopie, les plus répandues), alors que ce couple-ci reste dissociable
   sans rien retirer à la lecture de tout le monde. */
.statut-ok {
  --statut-signe: "\2713";                 /* ✓ */
  background: var(--statut-ok-bg, rgba(15, 107, 92, 0.12));
  color: var(--statut-ok-fg, #0f6b5c);
  border-color: var(--statut-ok-bd, rgba(15, 107, 92, 0.32));
}
.statut-attente {
  --statut-signe: "\2026";                 /* … */
  background: var(--statut-attente-bg, rgba(224, 168, 46, 0.16));
  color: var(--statut-attente-fg, #7a5209);
  border-color: var(--statut-attente-bd, rgba(224, 168, 46, 0.45));
}
.statut-ko {
  --statut-signe: "\2715";                 /* ✕ */
  background: var(--statut-ko-bg, rgba(168, 27, 75, 0.12));
  color: var(--statut-ko-fg, #a81b4b);
  border-color: var(--statut-ko-bd, rgba(168, 27, 75, 0.32));
}
.statut-neutre {
  --statut-signe: "\2013";                 /* – */
  background: var(--surface-2);
  color: var(--text-muted);
  border-color: var(--border);
}

/* Récapitulatif d'erreurs en tête de formulaire (composant x-erreurs). */
.form-errors {
  border: 2px solid var(--statut-ko-bd, rgba(168, 27, 75, 0.4));
  background: var(--statut-ko-bg, rgba(168, 27, 75, 0.08));
  color: var(--statut-ko-fg, #a81b4b);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 22px;
  font-size: 0.9rem;
}
.form-errors-title { font-weight: 700; margin-bottom: 6px; }
.form-errors ul { display: grid; gap: 4px; }
.form-errors li { padding-left: 16px; position: relative; }
.form-errors li::before { content: "\2715"; position: absolute; left: 0; font-size: 0.8em; top: 0.15em; }
.form-errors a { text-decoration: underline; }

.field-error { color: var(--erreur-fg, #a81b4b); font-size: 0.82rem; font-weight: 600; }
/* Un message d'erreur s'annonce aussi par un signe, pas seulement par sa couleur. */
/* Espace insécable : une espace ordinaire serait avalée par le rendu. */
.field-error::before { content: "\26A0\FE0E\00A0"; }
