/* ═══════════════════════════════════════════════════════════════
   ALEXANDRE JEZEQUEL — Portfolio CSS
   ═══════════════════════════════════════════════════════════════ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --navy:      #0D1B2A;
  --navy-mid:  #1A2F45;
  --navy-soft: #2A4260;
  --gold:      #C8A96E;
  --gold-light:#DFC08A;
  --bg:        #F8F7F3;
  --bg-alt:    #EFEDE7;
  --white:     #FFFFFF;
  --gray-200:  #E8E6E0;
  --gray-400:  #B5B3AC; /* bordures/décor uniquement — 1,8:1 sur --bg-alt, illisible en texte */
  --gray-600:  #686761; /* texte secondaire : ≥ 4,8:1 sur blanc, --bg et --bg-alt */
  --gray-900:  #1A1918;
  --gold-dark: #7D602B; /* or lisible en texte sur fond clair (≥ 5:1) */

  /* Contour des contrôles de formulaire : ≥ 3:1 sur blanc et --bg (WCAG
     1.4.11). --gray-200 reste réservé aux séparateurs décoratifs. */
  --border-strong: #8F8C84;
  --error:   #C0362C;
  --success: #1F7A45; /* blanc dessus : 5,3:1 */

  --font-display: 'Manrope', system-ui, sans-serif;
  --font-body:    'Manrope', system-ui, sans-serif;

  --header-h: 72px;
  --radius:   12px;
  --radius-lg:20px;
  --shadow:   0 4px 24px rgba(13,27,42,.08);
  --shadow-lg:0 16px 64px rgba(13,27,42,.18);

  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --font-logo-j:    'Sora', var(--font-body);
  --font-logo-rest: 'Urbanist', var(--font-body);
  --color-logo-dot: #3F1DAF;
}

/* ── Police principale (self-hosted, variable — pas de dépendance
   Google Fonts CDN, donc pas de transfert de données/cookies tiers) ── */
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/Manrope-Variable.woff2') format('woff2-variations'), url('../fonts/Manrope-Variable.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

/* ── Logo fonts (self-hosted, SIL OFL — pas de dépendance CDN) ── */
@font-face {
  font-family: 'Sora';
  src: url('../fonts/Sora-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Urbanist';
  src: url('../fonts/Urbanist-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--gray-900);
  /* Pas d'overflow-x:hidden de précaution : il masquait les débordements au
     lieu de les corriger. Vérifié sans (360 → 1440px, toutes les pages) :
     aucun débordement. S'il en réapparaît un, le corriger à la source. */
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }

/* Anneau de focus clavier unique : navy sur fond clair, or sur fond sombre
   (l'or seul ne fait que 2,2:1 sur blanc, sous les 3:1 exigés). */
:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
.mega-panel :focus-visible,
.about :focus-visible,
.footer :focus-visible,
.cookie-banner :focus-visible,
.blog-hero :focus-visible,
.article-hero-block :focus-visible {
  outline-color: var(--gold);
}
img { display: block; max-width: 100%; height: auto; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select {
  font: inherit;
  border: none;
  outline: none;
  background: none;
}

/* ── Logo (composant réutilisable — header, footer, mega-menu, préchargeur) ──
   Texte réel (SEO/accessibilité) : "J" en Sora 700, "adev" en Urbanist 800,
   point final en cercle plein coloré séparé du texte. Injecté par JS dans les
   emplacements .logo-slot (voir main.js) ; le préchargeur écrit son
   .logo-mark directement en HTML pour s'afficher sans attendre le JS, en
   partageant exactement les mêmes classes. */
.logo-mark {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  line-height: 1;
  font-size: 1.9rem;
  letter-spacing: -0.01em;
  color: var(--gray-900);
  user-select: none;
}
.logo-mark--lg { font-size: clamp(2.1rem, 4vw, 2.6rem); }
.logo-mark--preloader { font-size: clamp(2.4rem, 6vw, 3.4rem); }
.logo-mark--sm { font-size: 1.5rem; }
.logo-mark--xs { font-size: 1.25rem; }
.logo-mark--light { color: var(--white); }

.logo-letter { display: inline-block; opacity: 1; transform: none; }
.logo-letter--j {
  font-family: var(--font-logo-j);
  font-weight: 700;
  margin-right: .02em; /* léger espacement J / adev, à peine perceptible */
}
.logo-letter--a,
.logo-letter--d,
.logo-letter--e,
.logo-letter--v {
  font-family: var(--font-logo-rest);
  font-weight: 800;
}
.logo-dot {
  /* Pas d'align-self : reste aligné avec le reste du mot via
     align-items:baseline du parent — sa marge basse fait office de ligne
     de base (comportement standard pour un élément vide sans texte), donc
     il repose exactement sur la même ligne d'horizon que "Jadev". */
  display: inline-block;
  width: .19em;
  height: .19em;
  margin-left: .07em;
  border-radius: 50%;
  background: var(--color-logo-dot);
  opacity: 1;
  transform: scale(1);
}

/* ── Préchargeur ───────────────────────────────────────────── */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  opacity: 1;
  transition: opacity .4s ease, transform .4s ease;
}
html.preloader-active #preloader { display: flex; }
html.preloader-active body { overflow: hidden; }
#preloader.preloader-hide { opacity: 0; transform: scale(1.04); pointer-events: none; }

/* Séquence (uniquement quand le préchargeur est actif, pour que le no-JS /
   mouvement réduit affiche directement le logo final sans animation) :
   1) J → a → d → e → v apparaissent dans l'ordre, fondu + léger slide-up,
      décalés de 100ms, easing net (pas de rebond).
   2) Une fois "Jadev" affiché (~.7s), le point violet apparaît avec un pop
      (scale 0 → 1.15 → 1) puis pulse doucement en boucle tant que le site
      charge encore. */
html.preloader-active .logo-mark--animated .logo-letter {
  opacity: 0;
  transform: translateY(10px) scale(.97);
  animation: logoLetterIn .3s cubic-bezier(.16, 1, .3, 1) both;
}
html.preloader-active .logo-mark--animated .logo-letter--j { animation-delay: 0s; }
html.preloader-active .logo-mark--animated .logo-letter--a { animation-delay: .1s; }
html.preloader-active .logo-mark--animated .logo-letter--d { animation-delay: .2s; }
html.preloader-active .logo-mark--animated .logo-letter--e { animation-delay: .3s; }
html.preloader-active .logo-mark--animated .logo-letter--v { animation-delay: .4s; }

html.preloader-active .logo-mark--animated .logo-dot {
  opacity: 0;
  transform: scale(0);
  animation:
    logoDotPop .3s cubic-bezier(.34, 1.56, .64, 1) .7s forwards,
    logoDotPulse 1.6s ease-in-out 1.05s infinite;
}

@keyframes logoLetterIn {
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes logoDotPop {
  0%   { opacity: 0; transform: scale(0); }
  60%  { opacity: 1; transform: scale(1.15); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes logoDotPulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: .55; transform: scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  #preloader { display: none !important; }
  html { scroll-behavior: auto; }
  /* Boucles infinies figées sur leur position de repos */
  .hero-mockup { animation: none; }
  .hv-float { animation: none; }
  .hv-float--1 { transform: rotate(-2deg); }
  .hv-float--2 { transform: rotate(2deg); }
  .hv-float--3 { transform: rotate(-1deg); }
  /* Entrées du héros : apparition directe (règles déclarées en fin de
     fichier, d'où le !important pour passer devant malgré l'ordre) */
  .hero-title, .hero-desc, .hero-actions, .hero-visual { animation: none !important; }
  .wizard-panel.shake { animation: none; }
  .mega-panel { transform: none; }
}

/* ── Header ────────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(248,247,243,.92);
  /* backdrop-filter sur une barre position:fixed pleine largeur force Safari
     à ré-échantillonner le flou sous le header à chaque frame de scroll — la
     cause la plus documentée de scroll saccadé/décalé au trackpad sous
     macOS. On garde l'effet (flou réduit, fond déjà quasi-opaque à 92% donc
     peu de différence visuelle) et on isole le header dans son propre
     calque GPU pour éviter qu'il ne déclenche un repaint du reste de la
     page à chaque tick de scroll. */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--gray-200);
  z-index: 900;
  transition: box-shadow .3s;
  transform: translateZ(0);
}
.header.scrolled { box-shadow: var(--shadow); }

.header-inner {
  max-width: 100%;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.logo-link {
  display: flex;
  align-items: center;
  position: absolute;
  left: 2rem;
  top: 50%;
  transform: translateY(-50%); /* centrage vertical explicite plutôt que de
    compter sur la "position statique" d'un élément absolu dans un parent
    flex — ce calcul est mal normé et certains WebKit (Safari) le résolvent
    différemment de Chrome, ce qui pouvait décaler/chevaucher le logo. */
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  gap: .25rem;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .5rem 1rem;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: color .2s, background .2s;
}
.nav-link:hover { color: var(--navy); background: var(--gray-200); }
.nav-link.active { color: var(--navy); }

.mega-trigger { color: var(--gray-600); }
.mega-trigger .nav-arrow {
  width: 16px; height: 16px;
  transition: transform .3s var(--ease-out);
}
.mega-trigger[aria-expanded="true"] .nav-arrow { transform: rotate(180deg); }
.mega-trigger[aria-expanded="true"] { color: var(--navy); }

.nav-link--cta {
  background: var(--navy);
  color: var(--white) !important;
  padding: .5rem 1.25rem;
  border-radius: 8px;
  margin-left: .5rem;
  transition: background .2s, transform .2s !important;
}
.nav-link--cta:hover {
  background: var(--navy-mid) !important;
  transform: translateY(-1px);
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: .5rem;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.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); }

/* ── Mega Panel — fade + slide ───────────────────────────────── */
.mega-panel {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0; bottom: 0;
  z-index: 850;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-12px);
  /* visibility (et inert, posé en JS) : fermé, le panneau ne doit plus rien
     exposer au clavier ni au lecteur d'écran — l'opacité seule laissait une
     douzaine d'éléments invisibles dans l'ordre de tabulation. Même motif que
     .nav en mobile : visibility bascule à la fin du fondu de fermeture. */
  visibility: hidden;
  transition: opacity .3s ease, transform .3s var(--ease-out), visibility 0s linear .3s;
}
.mega-panel.mega-expand {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
  visibility: visible;
  transition: opacity .3s ease, transform .3s var(--ease-out), visibility 0s;
}

.mega-tilt {
  width: 100%; height: 100%;
  overflow: hidden;
  background: var(--navy);
}

/* ── Mega shared elements ────────────────────────────────────── */
.mega-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.6);
  flex-shrink: 0;
  transition: background .2s, color .2s, border-color .2s;
}
.mega-close svg { width: 16px; height: 16px; }
.mega-close:hover {
  background: rgba(255,255,255,.1);
  color: var(--white);
  border-color: rgba(255,255,255,.3);
}

/* ── Footer mega panel ──────────────────────────────────────── */
.mega-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.25rem 2.5rem;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.mega-footer-logo {
  opacity: .55;
}
.mega-footer-copy {
  font-size: .75rem;
  color: rgba(255,255,255,.65);
}
.mega-footer-link {
  font-size: .78rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: .02em;
  transition: opacity .2s;
}
.mega-footer-link:hover { opacity: .7; }

/* ══════════════════════════════════════════════════════════════
   RÉALISATIONS — Galerie maître-détail (inspirée de l'agencement B) :
   liste des projets à gauche, aperçu réel + prix à droite, formules en
   bas. Une seule vue (plus de bascule grille/détail), un seul <iframe>
   dont on change juste le src en cliquant un projet.
   ══════════════════════════════════════════════════════════════ */

.mega-inner {
  position: relative;
  height: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch; /* défilement à inertie fluide sur iOS */
  overscroll-behavior: contain; /* le scroll du panneau ne doit pas "fuiter"
    vers la page derrière une fois en haut/bas du contenu */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.1) transparent;
}

/* ── Bandeau d'intro ─────────────────────────────────────────── */
.gallery-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding: 2.5rem 2.5rem 1.5rem;
}
.gallery-eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
}
.gallery-lead {
  font-size: .92rem;
  line-height: 1.65;
  color: rgba(255,255,255,.6);
  max-width: 56ch;
}

/* ── Layout principal : liste + détail ──────────────────────── */
.gallery-main {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 2rem;
  padding: 0 2.5rem 2rem;
  align-items: start;
}

/* ── Liste des projets ───────────────────────────────────────── */
.gallery-list {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: .35rem;
}
.gallery-list-item {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: .9rem;
  width: 100%;
  text-align: left;
  padding: .9rem 1rem;
  border-radius: 10px;
  border-left: 2px solid transparent;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.gallery-list-item:hover { background: rgba(255,255,255,.04); }
.gallery-list-item.is-active {
  background: rgba(200,169,110,.1);
  border-left-color: var(--gold);
}
.gallery-list-num {
  font-size: .72rem;
  color: rgba(255,255,255,.55);
}
.gallery-list-item.is-active .gallery-list-num { color: var(--gold); }
.gallery-list-name {
  display: block;
  font-size: .92rem;
  font-weight: 500;
  color: rgba(255,255,255,.75);
  letter-spacing: -.005em;
}
.gallery-list-item.is-active .gallery-list-name { color: var(--white); }
.gallery-list-sector {
  display: block;
  font-size: .74rem;
  color: rgba(255,255,255,.6);
  margin-top: .2rem;
}
.gallery-list-tier {
  grid-column: 2;
  display: inline-block;
  margin-top: .5rem;
  padding: .22rem .6rem;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,.15);
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  width: fit-content;
}
.gallery-list-item.is-active .gallery-list-tier {
  border-color: rgba(200,169,110,.5);
  color: var(--gold);
}

/* ── Détail : aperçu + carte de prix ─────────────────────────── */
.gallery-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 1fr);
  gap: 1.75rem;
  align-items: start;
}

.gallery-preview { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }

.gallery-browser {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.65);
}
.gallery-browser-bar {
  height: 36px;
  background: #F0F0F0;
  border-bottom: 1px solid #E0E0E0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 5px;
  flex-shrink: 0;
}
.rd-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #D0D0D0;
  flex-shrink: 0;
}
.rd-dot:nth-child(1) { background: #FF5F57; }
.rd-dot:nth-child(2) { background: #FFBE2E; }
.rd-dot:nth-child(3) { background: #28C941; }
.gallery-browser-url {
  flex: 1;
  height: 20px;
  background: #EBEBEB;
  border-radius: 10px;
  margin-left: 8px;
  font-size: .72rem;
  color: #555;
  line-height: 20px;
  padding: 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* L'iframe garde son ratio (aperçu réel, scrollable dedans) plutôt qu'un
   crop figé — c'est ce qui donne une vraie projection sur le site plutôt
   qu'une simple vignette. */
.gallery-browser-iframe-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
}
.gallery-browser-iframe-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.gallery-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.gallery-meta h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--white);
}
.gallery-meta span {
  font-size: .8rem;
  color: rgba(255,255,255,.6);
}

.gallery-blurb {
  font-size: .88rem;
  line-height: 1.7;
  color: rgba(255,255,255,.68);
  max-width: 62ch;
}

.gallery-stats {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
  padding-top: .25rem;
}
.gallery-stat { display: flex; flex-direction: column; gap: .25rem; }
.gallery-stat-label {
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
}
.gallery-stat-val { font-size: .9rem; color: var(--white); }

/* ── Carte de prix (collante) ────────────────────────────────── */
.gallery-price {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.6rem;
  border-radius: 14px;
  border: 1px solid rgba(200,169,110,.25);
  background: rgba(255,255,255,.03);
  position: -webkit-sticky;
  position: sticky;
  top: 1.5rem;
}
.gallery-price-head { display: flex; flex-direction: column; gap: .35rem; }
.gallery-price-tier {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
}
.gallery-price-value {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 400;
  color: var(--white);
  line-height: 1.1;
}
.gallery-price-note { font-size: .76rem; color: rgba(255,255,255,.6); }
.gallery-price-divider { height: 1px; background: rgba(255,255,255,.1); }
.gallery-includes {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  list-style: none;
}
.gallery-includes li {
  position: relative;
  padding-left: 1.1rem;
  font-size: .82rem;
  line-height: 1.55;
  color: rgba(255,255,255,.68);
}
.gallery-includes li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
}
.gallery-price-actions {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin-top: .25rem;
}
.gallery-price-actions .btn { justify-content: center; }
/* Sur le fond navy du panneau, le bouton navy par défaut disparaissait :
   CTA principal en or, comme dans la section « À propos ». */
.gallery-price-actions .btn--primary { background: var(--gold); color: var(--navy); }
.gallery-price-actions .btn--primary:hover { background: var(--gold-light); }
.gallery-price-actions .btn--ghost {
  border-color: rgba(255,255,255,.2);
  color: var(--white);
}
.gallery-price-actions .btn--ghost:hover {
  border-color: rgba(255,255,255,.68);
  transform: translateY(-2px);
}

/* ── Les trois formules ──────────────────────────────────────── */
.gallery-formulas {
  margin: .5rem 2.5rem 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.gallery-formulas-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
}
.gallery-formulas-head h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--white);
}
.gallery-formulas-head span { font-size: .8rem; color: rgba(255,255,255,.6); }
.gallery-formulas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.gallery-formula-card {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: 1.3rem 1.4rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.02);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.gallery-formula-card:hover { border-color: rgba(200,169,110,.4); }
.gallery-formula-card.is-active {
  border-color: var(--gold);
  background: rgba(200,169,110,.08);
}
.gallery-formula-name {
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
}
.gallery-formula-card.is-active .gallery-formula-name { color: var(--gold); }
.gallery-formula-price {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  color: var(--white);
}
.gallery-formula-desc {
  font-size: .8rem;
  line-height: 1.55;
  color: rgba(255,255,255,.68);
}
.gallery-formula-examples { font-size: .76rem; color: var(--gold); margin-top: .15rem; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  padding: calc(var(--header-h) + 4rem) 2rem 5rem;
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  position: relative;
}

.hero-bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(13,27,42,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13,27,42,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: -1;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.08;
  color: var(--navy);
  margin-bottom: 1.5rem;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--gray-600);
  max-width: 460px;
  line-height: 1.5;
  margin-bottom: 2rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem 1.75rem;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 500;
  transition: all .25s var(--ease-out);
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform .25s; }
.btn:hover svg { transform: translateX(3px); }

.btn--primary {
  background: var(--navy);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(13,27,42,.25);
}
.btn--primary:hover {
  background: var(--navy-mid);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(13,27,42,.3);
}

.btn--ghost {
  border: 1.5px solid var(--gray-200);
  color: var(--gray-600);
}
.btn--ghost:hover {
  border-color: var(--navy);
  color: var(--navy);
  transform: translateY(-2px);
}

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 500px;
}

.hero-mockup {
  width: 100%;
  max-width: 520px;
  height: auto;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 24px 60px rgba(13,27,42,.28));
  animation: floatBrowser 6s ease-in-out infinite;
}
@keyframes floatBrowser {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* Floating badges */
.hv-float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--white);
  border-radius: 10px;
  padding: .6rem 1rem;
  box-shadow: var(--shadow);
  font-size: .78rem;
  font-weight: 500;
  color: var(--navy);
  white-space: nowrap;
  z-index: 3;
}
.hv-float-icon { font-size: 1rem; }
.hv-float--1 {
  top: 60px; left: -10px;
  animation: floatBadge1 5s ease-in-out infinite;
}
.hv-float--2 {
  bottom: 80px; left: -30px;
  animation: floatBadge2 5.5s ease-in-out infinite;
}
.hv-float--3 {
  top: 40px; right: -10px;
  animation: floatBadge3 6s ease-in-out infinite;
}
@keyframes floatBadge1 { 0%,100%{transform:translateY(0) rotate(-2deg)} 50%{transform:translateY(-8px) rotate(-2deg)} }
@keyframes floatBadge2 { 0%,100%{transform:translateY(0) rotate(2deg)} 50%{transform:translateY(-6px) rotate(2deg)} }
@keyframes floatBadge3 { 0%,100%{transform:translateY(0) rotate(-1deg)} 50%{transform:translateY(-12px) rotate(-1deg)} }

/* ── About ─────────────────────────────────────────────────── */
.about {
  background: var(--navy);
  color: var(--white);
  padding: 6rem 2rem;
}
.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.about .section-inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 4rem;
  align-items: center;
}
.about-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 3 / 4;
}
.about-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-label {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 300;
  line-height: 1.15;
  margin-bottom: 1.5rem;
}

/* Titre plus long que les autres (deux phrases) : réduit pour ne pas
   écraser le reste du bloc "À propos". */
.about .section-title {
  font-size: clamp(1.5rem, 2.3vw, 2.1rem);
  margin-bottom: 1.25rem;
}

.about-text p {
  color: rgba(255,255,255,.7);
  line-height: 1.75;
  margin-bottom: 1rem;
}
.about-text .btn--primary {
  margin-top: 1rem;
  background: var(--gold);
  color: var(--navy);
}
.about-text .btn--primary:hover { background: var(--gold-light); }

/* ── Services ──────────────────────────────────────────────── */
.services { padding: 6rem 2rem; }
.services .section-title { margin-bottom: 3rem; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.service-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--gray-200);
  transition: transform .3s var(--ease-out), box-shadow .3s;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.service-icon {
  color: var(--gold);
  margin-bottom: 1rem;
}
.service-icon svg { width: 28px; height: 28px; }
.service-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .5rem;
}
.service-card p {
  font-size: .875rem;
  color: var(--gray-600);
  line-height: 1.65;
}

/* ── FAQ ───────────────────────────────────────────────────── */
.faq { padding: 6rem 2rem; }
.faq .section-title { margin-bottom: 2.5rem; }
.faq-list {
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 0 1.5rem;
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  font-size: .95rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  color: var(--gold);
  transition: transform .25s var(--ease-out);
}
.faq-item[open] summary svg { transform: rotate(180deg); }
.faq-item p {
  font-size: .88rem;
  color: var(--gray-600);
  line-height: 1.65;
  padding-bottom: 1.25rem;
}
.faq-item p + p { padding-top: 0; margin-top: -.5rem; }
.faq-item p strong { color: var(--navy); font-weight: 600; }

/* ── Contact ───────────────────────────────────────────────── */
.contact { padding: 6rem 2rem; background: var(--bg-alt); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 5rem;
  align-items: start;
}
.contact-text p { color: var(--gray-600); line-height: 1.7; margin-bottom: 1.5rem; }
.contact-details { display: flex; flex-direction: column; gap: .75rem; }
.contact-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .9rem;
  color: var(--navy);
  font-weight: 500;
}
.contact-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.contact-item:hover { color: var(--gold); }

/* ── Contact wizard shell ──────────────────────────────────── */
.contact-wizard { position: relative; }

/* ── Stepper (rond vide → coche) ──────────────────────────────── */
.wizard-steps {
  display: flex;
  align-items: flex-start;
  list-style: none;
  margin-bottom: 1.5rem;
  padding: 0 .5rem;
}
.wizard-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}
.wizard-step::before {
  content: '';
  position: absolute;
  top: 15px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--gray-200);
  z-index: 0;
}
.wizard-step:first-child::before { display: none; }
.wizard-step.is-done::before { background: var(--gold); }

.wizard-step-dot {
  position: relative;
  z-index: 1;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  font-size: .8rem;
  font-weight: 600;
  transition: border-color .25s, background .25s, color .25s;
}
.wizard-step-check { display: none; width: 14px; height: 14px; }
.wizard-step.is-active .wizard-step-dot {
  border-color: var(--navy);
  color: var(--navy);
}
.wizard-step.is-done .wizard-step-dot {
  border-color: var(--gold);
  background: var(--gold);
  color: var(--navy);
  cursor: pointer;
}
.wizard-step.is-done .wizard-step-num { display: none; }
.wizard-step.is-done .wizard-step-check { display: block; }

.wizard-step-label {
  margin-top: .5rem;
  font-size: .7rem;
  font-weight: 500;
  color: var(--gray-600);
  line-height: 1.3;
  padding: 0 .25rem;
}
.wizard-step.is-active .wizard-step-label,
.wizard-step.is-done .wizard-step-label { color: var(--navy); }

/* Form */
.contact-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.form-group label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: .02em;
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: .75rem 1rem;
  border: 1.5px solid var(--border-strong);
  border-radius: 8px;
  font-size: .9rem;
  color: var(--gray-900);
  background: var(--bg);
  transition: border-color .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--navy);
  background: var(--white);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--gray-600); opacity: 1; }
.form-group select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23686761' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px;
}
.form-group textarea { resize: vertical; min-height: 100px; }

/* Erreurs de validation (voir validateStep() dans main.js) */
.form-group.has-error > label { color: var(--error); }
.form-group.has-error input:not([type="radio"]):not([type="checkbox"]),
.form-group.has-error select,
.form-group.has-error textarea {
  border-color: var(--error);
}
.form-group.has-error .choice-row,
.form-group.has-error .formula-grid {
  outline: 1.5px solid var(--error);
  outline-offset: 6px;
  border-radius: var(--radius);
}
.consent-row.has-error {
  outline: 1.5px solid var(--error);
  outline-offset: 4px;
  border-radius: var(--radius);
}
.form-error {
  display: block;
  font-size: .78rem;
  color: var(--error);
  margin-top: .4rem;
}
.form-error[hidden] { display: none; }

/* ── Wizard panels ─────────────────────────────────────────── */
.wizard-panel {
  display: none;
  flex-direction: column;
  gap: 1.25rem;
  border: none;
}
.wizard-panel.is-active { display: flex; }
.wizard-panel.shake { animation: panelShake .4s; }
@keyframes panelShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.wizard-panel-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--navy);
  padding: 0;
}

/* Choice pills (radio) */
.choice-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.choice-pill {
  position: relative;
  display: flex;
  align-items: center;
  padding: .55rem 1rem;
  border: 1.5px solid var(--border-strong);
  border-radius: 50px;
  font-size: .85rem;
  color: var(--gray-600);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.choice-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.choice-pill:has(input:checked) {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}
.choice-pill:has(input:focus-visible) {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

/* Rappel de l'exemple choisi dans la galerie (step 3) */
.wizard-reference {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 1rem;
  border: 1px solid rgba(200,169,110,.45);
  border-radius: var(--radius);
  background: rgba(200,169,110,.1);
  font-size: .85rem;
  line-height: 1.5;
  color: var(--navy);
}
.wizard-reference[hidden] { display: none; }
.wizard-reference-clear {
  flex-shrink: 0;
  min-height: 24px;
  padding: .2rem .25rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.wizard-reference-clear:hover { opacity: .7; }
.wizard-reference-clear:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

/* Formula cards (step 3) */
.formula-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .9rem;
}
.formula-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1.1rem 1rem;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .2s var(--ease-out);
}
.formula-card input { position: absolute; opacity: 0; width: 0; height: 0; }
.formula-card:hover { transform: translateY(-2px); }
.formula-card:has(input:checked) {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold);
}
.formula-card:has(input:focus-visible) {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
.formula-card-name { font-weight: 600; color: var(--navy); font-size: .92rem; }
.formula-card-price {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--navy); /* l'or (2,2:1) reste sur la bordure de la carte choisie */
  line-height: 1;
}
.formula-card-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-top: .15rem;
}
.formula-card-points li {
  position: relative;
  padding-left: 1rem;
  font-size: .76rem;
  line-height: 1.45;
  color: var(--gray-600);
}
.formula-card-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .5em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

/* Checkbox pills (options) */
.checkbox-pill {
  position: relative;
  display: flex;
  align-items: center;
  padding: .5rem .9rem;
  border: 1.5px solid var(--border-strong);
  border-radius: 8px;
  font-size: .82rem;
  color: var(--gray-600);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.checkbox-pill input { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox-pill:has(input:checked) {
  border-color: var(--gold);
  background: rgba(200,169,110,.12);
  color: var(--navy);
}
.checkbox-pill:has(input:focus-visible) {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}

/* Cartes de formules : profil, pages/délai, badge "conseillé" */
.formula-card-audience { font-size: .78rem; line-height: 1.45; color: var(--gray-600); margin-top: .2rem; }
.formula-card-meta { font-size: .72rem; font-weight: 600; color: var(--navy); }
.formula-card-price small {
  display: block;
  margin-bottom: .2rem;
  font-family: var(--font-body);
  font-size: .68rem;
  color: var(--gray-600);
}
/* Posé sur le bord haut de la carte, pour ne pas décaler son contenu */
.formula-card-hint {
  display: none;
  position: absolute;
  top: -.65rem;
  left: .75rem;
  padding: .15rem .5rem;
  border-radius: 50px;
  background: rgba(200,169,110,.18);
  font-size: .64rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--navy);
}
.formula-card.is-recommended .formula-card-hint { display: inline-block; }
.formula-card--advice {
  grid-column: 1 / -1;
  padding: .85rem 1rem;
  border-style: dashed;
}

/* Fonctionnalités selon la formule (étape 3) */
.options-help { font-size: .8rem; line-height: 1.5; color: var(--gray-600); margin: -.15rem 0 .2rem; }
.options-board { display: flex; flex-direction: column; gap: 1rem; }
.options-board[hidden] { display: none; }
.options-group-title {
  display: block;
  margin-bottom: .45rem;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gray-600);
}
.options-list { display: flex; flex-wrap: wrap; gap: .5rem; }
.option-item { gap: .45rem; }
.option-item--included,
.option-item--locked {
  display: inline-flex;
  align-items: center;
  padding: .5rem .9rem;
  border-radius: 8px;
  font-size: .82rem;
}
.option-item--included {
  border: 1.5px solid rgba(200,169,110,.45);
  background: rgba(200,169,110,.1);
  color: var(--navy);
}
.option-check {
  width: 7px;
  height: 11px;
  margin: 0 .1rem -.1rem .1rem;
  border-right: 2px solid var(--gold);
  border-bottom: 2px solid var(--gold);
  transform: rotate(45deg) translateY(-2px);
}
.option-badge,
.option-tag {
  padding: .1rem .45rem;
  border-radius: 50px;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .03em;
}
.option-badge { background: var(--gold); color: var(--navy); }
.option-tag { background: var(--navy); color: var(--white); }
.option-item--locked {
  border: 1.5px dashed var(--border-strong);
  color: var(--gray-600);
}
.option-upgrade {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: .2rem .25rem;
  margin: -.2rem 0;
  font-size: .72rem;
  font-weight: 600;
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.option-upgrade:hover { color: var(--gold-dark); }
.option-upgrade:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.options-notice {
  font-size: .78rem;
  color: var(--navy);
  padding: .55rem .8rem;
  border-left: 2px solid var(--gold);
  background: rgba(200,169,110,.1);
}
.options-notice[hidden] { display: none; }
.wizard-summary {
  padding: .85rem 1rem;
  border-radius: var(--radius);
  background: var(--bg-alt);
  font-size: .8rem;
  line-height: 1.6;
  color: var(--gray-600);
}
.wizard-summary b { color: var(--navy); font-weight: 600; }
.wizard-summary[hidden] { display: none; }
.wizard-summary-note { color: var(--gray-600); font-style: italic; }

/* Consent */
.consent-row {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .82rem;
  color: var(--gray-600);
  cursor: pointer;
  line-height: 1.5;
}
.consent-row input { margin-top: .2rem; width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--navy); }
.consent-row a { color: var(--navy); text-decoration: underline; }

/* Piège à bots (invisible pour un humain, y compris au clavier/lecteur d'écran) */
.hp-field {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wizard-form-error {
  font-size: .82rem;
  color: var(--error);
  background: rgba(192,54,44,.08);
  border-radius: var(--radius);
  padding: .6rem .8rem;
}

/* Nav buttons within wizard */
.wizard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: .5rem;
}

/* Confirmation screen */
.wizard-confirm {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .75rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2.5rem;
  box-shadow: var(--shadow);
}
.wizard-confirm.is-visible { display: flex; }
.wizard-confirm-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--success);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .5rem;
}
.wizard-confirm-icon svg { width: 26px; height: 26px; }
.wizard-confirm h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--navy);
}
.wizard-confirm p {
  font-size: .9rem;
  color: var(--gray-600);
  max-width: 380px;
  line-height: 1.6;
}
.wizard-confirm .btn { margin-top: .75rem; }

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  background: var(--navy);
  padding: 2rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-logo { opacity: .8; }
.footer-copy { font-size: .8rem; color: rgba(255,255,255,.55); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a,
.footer-links button {
  display: inline-flex;
  align-items: center;
  min-height: 24px; /* cible tactile minimale (WCAG 2.5.8) */
  padding: .25rem 0;
  font-size: .8rem;
  color: rgba(255,255,255,.62);
  transition: color .2s;
}
.footer-links a:hover,
.footer-links button:hover { color: var(--gold); }

/* ── Bannière cookies ─────────────────────────────────────────── */
.cookie-banner {
  position: fixed;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 999;
  max-width: 640px;
  margin: 0 auto;
  background: var(--navy);
  color: rgba(255,255,255,.85);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  justify-content: space-between;
}
/* [hidden] seul perd contre .cookie-banner{display:flex} (spécificité égale,
   mais une règle de classe l'emporte toujours sur le style UA de [hidden]) —
   sans ça, la bannière ne peut jamais disparaître après Accepter/Refuser. */
.cookie-banner[hidden] { display: none; }
.cookie-banner p { font-size: .85rem; line-height: 1.5; flex: 1 1 320px; }
.cookie-banner a { color: var(--gold-light); text-decoration: underline; }
.cookie-banner-actions { display: flex; gap: .6rem; flex-shrink: 0; }
.cookie-banner .btn--ghost { border-color: rgba(255,255,255,.3); color: var(--white); }
.cookie-banner .btn--ghost:hover { background: rgba(255,255,255,.08); }

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 1100px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .about .section-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-visual { order: -1; max-width: 380px; margin: 0 auto; }
  /* minmax(0,…) : un 1fr s'élargissait au contenu des étapes 2 à 4 (listes
     déroulantes, options) et faisait déborder la page sur téléphone. */
  .contact-inner { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  /* minmax(0,…) et non 1fr : un 1fr ne descend pas sous la largeur
     minimale du contenu et mangeait la marge droite sur téléphone. */
  .gallery-main { grid-template-columns: minmax(0, 1fr); }
  .gallery-detail { grid-template-columns: minmax(0, 1fr); }
  .gallery-price { position: static; }

  /* Galerie empilée : la liste des exemples passe en grille compacte, pour
     que l'aperçu reste visible juste en dessous quand on change d'exemple. */
  .gallery-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: .5rem;
    border-top: none;
    padding-top: 0;
  }
  .gallery-list-item {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: .1rem;
    padding: .75rem .8rem;
    border: 1px solid rgba(255,255,255,.1);
  }
  .gallery-list-item.is-active { border-color: var(--gold); }
  .gallery-list-num { display: none; }
  .gallery-list-tier { grid-column: 1; margin-top: .45rem; }
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: var(--header-h); left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    flex-direction: column;
    padding: 1rem;
    gap: .25rem;
    /* Fermé : remonté de sa hauteur + celle du header. Un simple -110 %
       laissait dépasser le bas du menu par-dessus le header (le menu est
       un enfant du header, donc peint au-dessus de lui), masquant logo et
       burger. visibility retire aussi l'ombre et le focus clavier. */
    transform: translateY(calc(-100% - var(--header-h)));
    visibility: hidden;
    transition: transform .4s var(--ease-out), visibility 0s linear .4s;
    box-shadow: var(--shadow-lg);
    z-index: 800;
  }
  .nav.open {
    transform: translateY(0);
    visibility: visible;
    transition: transform .4s var(--ease-out), visibility 0s;
  }
  .nav .nav-link { justify-content: center; color: var(--navy); font-size: 1rem; padding: .8rem 1rem; }
  /* Voile sur la page quand le menu est ouvert : sans lui, le contenu
     commence juste sous le menu et le panneau semble se fondre dans la
     page. Le header (z-index 900) reste au-dessus, menu compris. */
  body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 850;
    background: rgba(13,27,42,.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
  }
  body.nav-open::after { opacity: 1; pointer-events: auto; }
  .burger { display: flex; }
  .mega-panel { top: var(--header-h); }
  .services-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .formula-grid { grid-template-columns: 1fr; }
  .wizard-step-label { display: none; }
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .gallery-topbar { padding: 1.25rem 1.25rem 1rem; }
  .mega-footer { padding: 1rem 1.25rem; }

  /* ── Header mobile : burger à gauche, logo centré ──
     .nav sort du flux (position:fixed), donc header-inner ne "voit" plus
     que .burger comme enfant flex — sans règle il se centrerait
     (justify-content:center hérité du desktop). Une marge automatique à
     droite le pousse tout à gauche à la place. Le logo reste centré via
     son positionnement absolu (left:50%), indépendant de la largeur du
     burger — plus fiable qu'un centrage flex avec un seul élément voisin. */
  .logo-link { left: 50%; top: 50%; transform: translate(-50%, -50%); }
  .burger { margin-right: auto; margin-left: 0; }

  /* ── Zoom automatique iOS : Safari zoome la page dès qu'un champ a un
     font-size calculé < 16px. Tous les champs du tunnel de contact
     passent donc à 1rem (16px) sur mobile. ── */
  .form-group input,
  .form-group select,
  .form-group textarea { font-size: 1rem; }

  /* ── Galerie mobile : même agencement, juste empilé et resserré ──
     L'aperçu live reste affiché (pas de mode dégradé sans iframe) : c'est
     la "vraie projection sur le site" demandée, pas une simple liste. */
  .gallery-main { padding: 0 1.25rem 1.5rem; gap: 1.5rem; }

  /* ── Accordéon téléphone (voir pickProject dans js/gallery.js) ──
     Une barre par exemple ; le détail glisse sous la barre ouverte. */
  .gallery-list { grid-template-columns: 1fr; }
  .gallery-list-item {
    grid-template-columns: minmax(0, 1fr) auto 14px;
    align-items: center;
    column-gap: .75rem;
  }
  .gallery-list-tier { grid-column: 2; margin-top: 0; }
  .gallery-list-item::after {
    content: '';
    width: 8px;
    height: 8px;
    justify-self: center;
    border-right: 2px solid rgba(255,255,255,.5);
    border-bottom: 2px solid rgba(255,255,255,.5);
    transform: translateY(-2px) rotate(45deg);
    transition: transform .3s var(--ease-out), border-color .3s;
  }
  .gallery-list-item[aria-expanded="true"]::after {
    transform: translateY(2px) rotate(-135deg);
    border-color: var(--gold);
  }
  .gallery-acc {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .35s var(--ease-out);
  }
  .gallery-acc.is-open { grid-template-rows: 1fr; }
  .gallery-acc > .gallery-detail {
    min-height: 0;
    overflow: hidden;
    visibility: hidden; /* rien de focusable ni d'iframe chargé quand fermé */
    transition: visibility 0s linear .35s;
  }
  .gallery-acc.is-open > .gallery-detail { visibility: visible; transition-delay: 0s; }
  .gallery-acc .gallery-preview { padding-top: .75rem; }
  .gallery-acc .gallery-price { margin-bottom: 1rem; }
  .gallery-formulas { margin: .5rem 1.25rem 1.5rem; }
}

/* ── Animations d'entrée ────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-title   { animation: fadeInUp .6s .2s both; }
.hero-desc    { animation: fadeInUp .6s .3s both; }
.hero-actions { animation: fadeInUp .6s .4s both; }
.hero-visual  { animation: fadeInUp .8s .3s both; }

/* ── Page 404 ──────────────────────────────────────────────── */
.notfound-main { text-align: center; }
.notfound-main .btn { display: inline-flex; margin-top: 1rem; }
