/* ==========================================================================
   Ambree Studio — design tokens
   Colors and type come directly from the client's existing charte graphique.
   ========================================================================== */

:root {
  --bg: #f5ead8;
  --bg-alt: #ece2d0;
  --surface: #ffffff;
  --text: #201e1d;
  --text-soft: #5a5450;

  --accent-100: #f7e2c9;
  --accent-300: #e8a874;
  --accent: #c67139;
  --accent-700: #8a4a1f;
  --accent-900: #4a2411;

  --sage: #7a8a5e;
  --sage-light: #c9d8b8;
  --sage-900: #37432a;

  /* Texte posé sur un aplat terracotta (--accent).
     Le charbon donne 4.6:1 sur #c67139 : c'est la seule famille de teintes
     qui passe le seuil AA (4.5:1) sans toucher à la couleur de marque —
     du crème sur terracotta plafonne à 3.4:1. Volontairement opaque :
     la moindre transparence repasse sous le seuil. */
  --on-accent: #201e1d;
  /* Survol des surfaces terracotta : on éclaircit (au lieu d'assombrir)
     pour que --on-accent reste lisible dans les deux thèmes. */
  --accent-hover: #d4894f;

  /* Couleur fonctionnelle d'erreur de formulaire. Absente de la charte, mais
     indispensable : le terracotta est la couleur d'action, il ne peut pas
     signaler une erreur. Brique sourde choisie pour rester dans la famille
     chaude — 5,6:1 sur le crème. */
  --error: #a83232;

  /* Filets et séparateurs. Étaient codés en dur en rgba(74,36,17,…),
     donc invisibles en thème sombre. */
  --line: rgba(74, 36, 17, 0.14);
  --line-soft: rgba(74, 36, 17, 0.08);
  /* Fond du header une fois flouté au scroll. */
  --header-bg: rgba(245, 234, 216, 0.85);

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-pill: 999px;

  --font-display: "Caprasimo", serif;
  --font-body: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --shadow-soft: 0 12px 32px -16px rgba(74, 36, 17, 0.28);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="dark"] {
  --bg: #201e1d;
  --bg-alt: #2a2725;
  --surface: #2a2725;
  --text: #f5ead8;
  --text-soft: #cfc5b8;

  --accent-100: #4a2411;
  --accent-300: #a85a2c;
  --accent: #e08a52;
  --accent-700: #f0b384;
  --accent-900: #f7e2c9;

  --sage: #a9bb8c;
  --sage-light: #566645;
  --sage-900: #eef2e2;

  /* Le terracotta clair du thème sombre (#e08a52) est encore plus lumineux :
     le charbon y donne 6.3:1, donc --on-accent ne change pas de valeur. */
  --on-accent: #201e1d;
  --accent-hover: #f0b384;

  /* Version éclaircie pour rester lisible sur le charbon — 7,5:1. */
  --error: #f0968c;

  --line: rgba(245, 234, 216, 0.16);
  --line-soft: rgba(245, 234, 216, 0.10);
  --header-bg: rgba(32, 30, 29, 0.85);

  --shadow-soft: 0 12px 32px -16px rgba(0, 0, 0, 0.5);
}

/* ---- Reset ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

/* ---- Trame de fond ----
   Canvas fixe couvrant la fenêtre, placé derrière tout le contenu.
   z-index négatif : l'élément se peint au-dessus du fond de page (qui est
   celui de la racine) mais sous le contenu, sans avoir à positionner
   <main> ni <footer>.
   pointer-events: none est indispensable — sans lui, le canvas intercepterait
   tous les clics de la page. */
.trame {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* ---- Icônes ----
   Sprite SVG inline (en haut du <body>) au lieu du webfont Phosphor chargé
   depuis unpkg : plus aucune requête tierce, et les icônes sont là au premier
   rendu au lieu d'apparaître après coup. */
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  fill: currentColor;   /* hérité par le contenu du <symbol> via <use> */
  vertical-align: -0.135em;
}

/* ---- Accessibilité clavier ---- */
:focus-visible {
  outline: 2px solid var(--accent-700);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Lien d'évitement : invisible jusqu'à ce qu'on l'atteigne au clavier. */
.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 0.9rem;
  transition: top 0.2s var(--ease);
}
.skip-link:focus-visible { top: 12px; }

.wrap {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-700);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.3rem; }

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}
.section-head p {
  margin-top: 14px;
  color: var(--text-soft);
  max-width: 52ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--accent-hover); box-shadow: none; transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--text);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-700); }

.btn-light {
  background: var(--bg);
  color: var(--accent-900);
}
.btn-light:hover { transform: translateY(-2px); }

/* ---- Reveal on scroll ---- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-block: 16px;
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), padding 0.3s var(--ease);
}
/* Le fond passe par --header-bg : la règle utilisait auparavant
   @media (prefers-color-scheme: dark), donc elle suivait l'OS et ignorait
   le choix manuel du bouton de thème (bandeau crème sur un site sombre). */
.site-header.is-scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow: 0 1px 0 var(--line-soft);
  padding-block: 10px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text);
}
.brand-dot { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a { transition: color 0.2s var(--ease); }
.nav-links a:hover { color: var(--accent-700); }

.nav-locale {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--accent-100);
  color: var(--accent-900);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Le CTA du header était en `display: none` sans être jamais réactivé :
   il n'apparaissait donc sur aucune largeur d'écran. Il est ici visible à
   partir de 861px ; en dessous, c'est .nav-cta-mobile (dans le menu déplié)
   qui prend le relais, car .nav-cta est un frère de .nav-links et ne peut
   pas se retrouver à l'intérieur du panneau dépliant. */
.nav-cta {
  padding: 11px 20px;
  font-size: 0.9rem;
}

.nav-cta-mobile { display: none; }

.theme-toggle,
.lang-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  background: var(--bg-alt);
  color: var(--text);
  font-size: 1.05rem;
  flex: none;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.theme-toggle:hover,
.lang-toggle:hover { background: var(--accent-100); color: var(--accent-900); }
.theme-toggle:active,
.lang-toggle:active { transform: scale(0.92); }
.theme-toggle .icon { transition: transform 0.35s var(--ease); }
.theme-toggle:hover .icon { transform: rotate(-14deg); }
.lang-flag { font-size: 1.15rem; line-height: 1; }

.nav-toggle {
  display: none;
  padding: 8px;
  font-size: 1.4rem;
}

/* Palier intermédiaire : le CTA du header étant désormais affiché, la pastille
   « Valence & Drôme » ferait déborder la barre. L'info reste présente dans le
   hero et dans le footer. */
@media (max-width: 1080px) {
  .nav-locale { display: none; }
}

@media (max-width: 860px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }

  .nav-links.is-open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 8px 16px 0;
    padding: 24px;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
  }

  /* Le CTA n'était accessible nulle part sur téléphone : on le remet en bas
     du menu déplié, séparé des liens de navigation. */
  .nav-links.is-open .nav-cta-mobile {
    display: inline-flex;
    margin-top: 6px;
  }
  .nav-links.is-open .nav-locale { align-self: flex-start; }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-top: clamp(32px, 6vw, 72px);
  padding-bottom: 88px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-copy .eyebrow { margin-bottom: 18px; }

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  max-width: 14ch;
}

.hero-sub {
  margin-top: 20px;
  max-width: 42ch;
  font-size: 1.08rem;
  color: var(--text-soft);
}

.hero-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  justify-self: center;
  width: 100%;
  max-width: 420px;
  perspective: 1200px;
}

.hero-photo {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transform: rotate(-3deg);
  transition: transform 0.2s ease-out, box-shadow 0.3s var(--ease);
  transform-style: preserve-3d;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Cursor-follow highlight, added by script.js on pointer move */
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.4), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  mix-blend-mode: soft-light;
  pointer-events: none;
}
.hero-visual.is-active .hero-photo {
  box-shadow: 0 24px 48px -16px rgba(74, 36, 17, 0.38);
}
.hero-visual.is-active .hero-photo::after { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero-photo { transition: none; }
}

/* ---- Abstract brand-pattern panels (used in place of stock photography) ---- */
.pattern-warm,
.pattern-cool {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.pattern-warm {
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.35), transparent 42%),
    linear-gradient(155deg, var(--accent-300), var(--accent) 70%);
}
.pattern-cool {
  background:
    radial-gradient(circle at 78% 15%, rgba(255, 255, 255, 0.3), transparent 40%),
    linear-gradient(160deg, var(--sage-light), var(--sage) 75%);
}
.pattern-warm::before,
.pattern-cool::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.5) 2px, transparent 2px);
  background-size: 26px 26px;
  opacity: 0.35;
  mix-blend-mode: soft-light;
}

.pattern-shape {
  position: absolute;
  display: block;
}
.shape-circle {
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--bg);
  opacity: 0.9;
  bottom: 12%;
  right: 10%;
}
.shape-circle.alt {
  background: var(--accent-100);
  top: 10%;
  left: 8%;
  bottom: auto;
  right: auto;
  width: 26%;
}
.shape-square {
  width: 30%;
  aspect-ratio: 1;
  border-radius: 22%;
  background: var(--sage-light);
  top: 12%;
  left: 12%;
  transform: rotate(-8deg);
}
.shape-square.alt {
  background: var(--bg);
  bottom: 10%;
  right: 12%;
  top: auto;
  left: auto;
  width: 24%;
  transform: rotate(10deg);
}
.shape-bar {
  width: 42%;
  height: 16%;
  border-radius: 999px;
  background: var(--bg);
  opacity: 0.9;
  bottom: 16%;
  left: 14%;
}

.hero-mark {
  position: absolute;
  bottom: -28px;
  left: -28px;
  width: 132px;
  height: 132px;
  border-radius: 30px;
  background: var(--accent);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(6deg);
  transition: transform 0.2s ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .hero-mark { transition: none; }
}
.hero-mark svg { width: 62%; height: 62%; }

/* Touch devices have no cursor, so the pointer-follow tilt in script.js
   never triggers. Instead, play the tilt once as the visual scrolls into
   view, reusing the [data-reveal]/.is-visible mechanism already driven by
   the IntersectionObserver in script.js (no scroll listener involved). */
@media (hover: none) {
  .hero-visual.is-visible .hero-photo { animation: tilt-in-hero 1.1s var(--ease) both; }
  .hero-visual.is-visible .hero-mark { animation: tilt-in-mark 1.1s var(--ease) both; }
}

@keyframes tilt-in-hero {
  0% { transform: rotate(-3deg) rotateX(0deg) rotateY(0deg); }
  55% { transform: rotate(-3deg) rotateX(5deg) rotateY(-6deg); }
  100% { transform: rotate(-3deg) rotateX(0deg) rotateY(0deg); }
}
@keyframes tilt-in-mark {
  0% { transform: rotate(6deg) translate(0, 0); }
  55% { transform: rotate(6deg) translate(6px, -5px); }
  100% { transform: rotate(6deg) translate(0, 0); }
}

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 320px; margin-top: 8px; }
}

/* ==========================================================================
   Services (pricing formulas)
   ========================================================================== */

.services { padding-block: 88px; }

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  /* Cartes de hauteur égale : c'est ce qui aligne les trois boutons entre eux
     alors que les listes de prestations n'ont pas le même nombre de lignes. */
  align-items: stretch;
}

.plan-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  border: 1px solid var(--line-soft);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.plan-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }

.plan-card.is-featured {
  background: var(--accent);
  color: var(--on-accent);
  border-color: transparent;
  transform: scale(1.04);
  box-shadow: var(--shadow-soft);
}
.plan-card.is-featured:hover { transform: scale(1.04) translateY(-6px); }
/* Opaque et non atténué : sur terracotta, toute transparence fait chuter le
   contraste sous AA. La hiérarchie passe donc par la taille et la graisse. */
.plan-card.is-featured .plan-price { color: var(--on-accent); }

.plan-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.plan-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  /* Puce contournée plutôt que remplie : un aplat clair sur terracotta ne
     tenait pas le contraste, et le contour est plus proche du ton artisanal. */
  background: transparent;
  border: 1.5px solid var(--on-accent);
  color: var(--on-accent);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.plan-price {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--accent-900);
}

/* ---- Contenu des formules ---- */

/* Ligne « Tout l'Essentiel, plus : » des formules Pro et Premium. */
.plan-includes {
  margin-top: 22px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-700);
}
.plan-card.is-featured .plan-includes { color: var(--on-accent); }

.plan-features {
  display: grid;
  gap: 11px;
  margin-top: 16px;
  margin-bottom: 28px;   /* écart minimal conservé au-dessus du bouton */
  font-size: 0.94rem;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text-soft);
}
.plan-card.is-featured .plan-features li { color: var(--on-accent); }

/* Sauge sur les cartes claires (second accent de la charte, peu employé
   ailleurs) ; charbon sur la carte terracotta, où la sauge ne tiendrait pas
   le contraste minimal de 3:1 exigé pour un élément graphique. */
.plan-features .icon {
  margin-top: 0.22em;
  font-size: 0.95rem;
  color: var(--sage);
}
.plan-card.is-featured .plan-features .icon { color: var(--on-accent); }

/* margin-top: auto colle le bouton en bas de la carte quelle que soit la
   longueur de la liste — c'est ce qui les aligne tous les trois. */
.plan-cta {
  margin-top: auto;
  width: 100%;
}

.plan-note {
  margin-top: 40px;
  color: var(--text-soft);
  font-size: 0.94rem;
}

@media (max-width: 900px) {
  .plan-grid { grid-template-columns: 1fr; }
  .plan-card.is-featured { transform: none; }
  .plan-card.is-featured:hover { transform: translateY(-4px); }
}

/* ---- Options complémentaires (onglets) ---- */
.options { margin-top: 56px; }
.options h3 { margin-bottom: 6px; }

.options-hint {
  margin-bottom: 18px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.pill {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--sage-light);
  border: 1.5px solid var(--sage);
  color: var(--sage-900);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: left;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.pill:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }

/* Onglet actif : inversion complète (fond sauge foncée, texte de la couleur
   du fond de page). La sauge moyenne ne donnait que 3,15:1 avec du crème ;
   la sauge foncée monte à 8,9:1 en thème clair et 14,6:1 en sombre, la
   variable s'inversant d'un thème à l'autre. */
.pill[aria-selected="true"] {
  background: var(--sage-900);
  border-color: var(--sage-900);
  color: var(--bg);
}

/* Les libellés tiennent sur une ligne tant que la place le permet ; sous
   520px, on autorise le retour à la ligne plutôt que de risquer un
   débordement horizontal sur les intitulés les plus longs. */
@media (min-width: 521px) {
  .pill { white-space: nowrap; }
}

.option-panel {
  margin-top: 20px;
  padding: 20px 22px;
  max-width: 70ch;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.96rem;
}
.option-panel:not([hidden]) { animation: panel-in 0.25s var(--ease) both; }

/* ==========================================================================
   Déroulé d'un projet (timeline verticale numérotée)
   Troisième rythme de mise en page, volontairement distinct de la grille de
   cartes (formules) et de la liste en lignes (maintenance), pour ne pas
   répéter trois fois la même structure sur une seule page.
   ========================================================================== */

.process { padding-block: 88px; }

.step-list { max-width: 760px; }

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 24px;
}

/* La cellule repère s'étire sur toute la hauteur de l'étape (align stretch
   par défaut en grid) : c'est ce qui permet au trait de liaison de remplir
   l'espace restant sous la pastille, quelle que soit la longueur du texte. */
.step-marker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1;
}

.step-line {
  width: 2px;
  flex: 1;
  border-radius: 1px;
  background: var(--line);
}
.step:last-child .step-line { display: none; }

.step-body { padding-bottom: 40px; }
.step:last-child .step-body { padding-bottom: 0; }

.step-body h3 { font-size: 1.15rem; margin-bottom: 6px; }
.step-body p { color: var(--text-soft); font-size: 0.96rem; max-width: 58ch; }

@media (max-width: 640px) {
  .step { column-gap: 16px; }
  .step-num { width: 40px; height: 40px; font-size: 1.1rem; }
  .step-body { padding-bottom: 32px; }
}

/* ==========================================================================
   Réalisations
   Chaque vignette est une capture de la page ENTIÈRE, contenue dans un cadre
   plus court. Au survol, l'image remonte à l'intérieur du cadre : on parcourt
   le site complet au lieu d'en voir un recadrage figé.
   Le décalage vaut `-100% + hauteur du cadre` : -100% se réfère à la hauteur
   propre de l'image, donc la formule s'adapte d'elle-même à des captures de
   longueurs différentes, sans valeur à recalculer.
   ========================================================================== */

.realisations { padding-block: 88px; }

.real-grille {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.real-carte { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); overflow: hidden; }
.real-carte a { display: block; }

.real-vue {
  display: block;
  height: 280px;
  overflow: hidden;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line-soft);
}
.real-vue img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 3.2s var(--ease);
}
.real-carte:hover .real-vue img,
.real-carte:focus-within .real-vue img {
  transform: translateY(calc(-100% + 280px));
}
/* La capture du cabinet ne fait qu'un écran : le parcours est plus court,
   donc plus rapide, sinon le mouvement paraîtrait s'arrêter. */
.real-vue-courte img { transition-duration: 1.4s; }

/* Sans survol (tactile) et en mouvement réduit, la vignette reste fixe sur
   le haut de page — l'information utile y est déjà. */
@media (hover: none) {
  .real-carte:hover .real-vue img { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .real-vue img { transition: none; }
  .real-carte:hover .real-vue img,
  .real-carte:focus-within .real-vue img { transform: none; }
}

.real-texte { display: block; padding: 22px 24px 26px; }
.real-metier {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-700);
  margin-bottom: 6px;
}
.real-nom { display: block; font-family: var(--font-display); font-size: 1.35rem; color: var(--text); }
.real-detail { display: block; margin-top: 8px; color: var(--text-soft); font-size: 0.94rem; }

.real-carte { transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.real-carte:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }

.real-note { margin-top: 28px; color: var(--text-soft); font-size: 0.94rem; }

@media (max-width: 760px) {
  .real-grille { grid-template-columns: 1fr; }
  .real-vue { height: 220px; }
  .real-carte:hover .real-vue img,
  .real-carte:focus-within .real-vue img { transform: translateY(calc(-100% + 220px)); }
}

/* ==========================================================================
   Maintenance (row layout — deliberately different from the plan cards)
   ========================================================================== */

.maintenance { padding-block: 88px; background: var(--bg-alt); }

.tier-list {
  border-top: 1px solid var(--line);
}

.tier-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 16px 24px;
  padding-block: 28px;
  border-bottom: 1px solid var(--line);
}

.tier-name-line {
  display: flex;
  align-items: center;
  gap: 10px;
  grid-column: 1;
}
.tier-name-line h3 { font-size: 1.15rem; }

.tier-price {
  grid-column: 2;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--accent-700);
  white-space: nowrap;
}

.tier-desc {
  grid-column: 1 / -1;
  color: var(--text-soft);
  font-size: 0.94rem;
  max-width: 68ch;
}

.tier-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--accent);
  color: var(--on-accent);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

@media (max-width: 640px) {
  .tier-row { grid-template-columns: 1fr; }
  .tier-price { grid-column: 1; }
}

/* ==========================================================================
   Why local (image + list split)
   ========================================================================== */

.why-local { padding-block: 88px; }

.why-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: center;
  perspective: 1200px;
}

.why-photo {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease-out, box-shadow 0.3s var(--ease);
  transform-style: preserve-3d;
}
.why-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Cursor-follow highlight, added by script.js on pointer move */
.why-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.4), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s var(--ease);
  mix-blend-mode: soft-light;
  pointer-events: none;
}
.why-photo.is-active {
  box-shadow: 0 24px 48px -16px rgba(74, 36, 17, 0.38);
}
.why-photo.is-active::after { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .why-photo { transition: none; }
}

/* Touch devices have no cursor, so the pointer-follow tilt in script.js
   never triggers. Instead, play the tilt once as the visual scrolls into
   view, reusing the [data-reveal]/.is-visible mechanism already driven by
   the IntersectionObserver in script.js (no scroll listener involved). */
@media (hover: none) {
  .why-photo.is-visible { animation: tilt-in-why 1.1s var(--ease) both; }
}

@keyframes tilt-in-why {
  0% { transform: rotateX(0deg) rotateY(0deg); }
  55% { transform: rotateX(-5deg) rotateY(6deg); }
  100% { transform: rotateX(0deg) rotateY(0deg); }
}

.why-points { display: grid; gap: 28px; }

.why-point { display: flex; gap: 18px; }

.why-icon {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--accent-100);
  color: var(--accent-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.why-point p { color: var(--text-soft); max-width: 46ch; }
.why-point strong { display: block; color: var(--text); font-weight: 700; margin-bottom: 4px; }

@media (max-width: 900px) {
  .why-grid { grid-template-columns: 1fr; }
  .why-photo { max-width: 420px; margin-inline: auto; }
}

/* ==========================================================================
   FAQ
   Construite sur <details>/<summary> natifs : aucun JS, navigation clavier
   et lecteurs d'écran gérés par le navigateur, et la FAQ reste consultable
   même si script.js ne se charge pas.
   L'attribut name= partagé rend l'accordéon exclusif (une seule réponse
   ouverte). Un navigateur plus ancien qui ignore name= reste parfaitement
   utilisable : plusieurs réponses peuvent simplement être ouvertes ensemble.
   ========================================================================== */

.faq { padding-block: 88px; background: var(--bg-alt); }

.faq-list {
  max-width: 800px;
  border-top: 1px solid var(--line);
}

.faq-item { border-bottom: 1px solid var(--line); }

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 22px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.02rem;
  list-style: none;             /* masque le triangle par défaut */
  transition: color 0.2s var(--ease);
}
.faq-q::-webkit-details-marker { display: none; }   /* idem sur Safari */
.faq-q:hover { color: var(--accent-700); }

.faq-chevron {
  font-size: 1.1rem;
  color: var(--accent-700);
  transition: transform 0.3s var(--ease);
}
.faq-item[open] .faq-chevron { transform: rotate(180deg); }

.faq-a {
  padding-bottom: 22px;
  color: var(--text-soft);
  font-size: 0.96rem;
  max-width: 68ch;
}

/* <details> n'anime pas son ouverture : un simple fondu sur la réponse
   suffit à adoucir l'apparition (neutralisé en mouvement réduit par la
   règle globale en haut du fichier). */
.faq-item[open] .faq-a { animation: panel-in 0.25s var(--ease) both; }

/* Fondu partagé par la FAQ et les panneaux d'options. */
@keyframes panel-in {
  from { opacity: 0; transform: translateY(-4px); }
}

/* ==========================================================================
   Contact CTA band
   ========================================================================== */

.contact-band {
  /* Même retrait sur les quatre côtés : le bandeau était collé à la section
     précédente alors qu'il respirait en bas et sur les côtés. */
  margin-inline: 24px;
  margin-block: 24px;
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: var(--on-accent);
  padding: clamp(40px, 6vw, 72px);
}

.contact-inner {
  max-width: 1152px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
}

.contact-band h2 { color: var(--on-accent); max-width: 12ch; }
.contact-band p { margin-top: 14px; color: var(--on-accent); max-width: 40ch; }

.contact-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.contact-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

@media (max-width: 800px) {
  .contact-inner { grid-template-columns: 1fr; }
  .contact-actions { align-items: flex-start; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

/* Footer en trois colonnes : marque, plan du site, coordonnées.
   Les coordonnées (nom, ville, téléphone) sont un signal de référencement
   local de base, attendu sur chaque page par les moteurs de recherche. */

/* Bouton WhatsApp flottant.
   Volontairement en terracotta et non en vert WhatsApp : c'est le logo qui
   porte la reconnaissance, la couleur reste celle de la charte. Le charbon
   sur terracotta tient 4,6:1, comme tous les autres boutons pleins.
   Il n'affiche pas de libellé, d'où l'aria-label posé par applyLanguage(). */
.wa-flottant {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 45;              /* sous le header collant (50) et le lien d'évitement (100) */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 1.6rem;
  box-shadow: 0 8px 24px -8px rgba(74, 36, 17, 0.45);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease);
}
.wa-flottant:hover { background: var(--accent-hover); transform: translateY(-3px); }
.wa-flottant:active { transform: scale(0.94); }

.site-footer {
  /* Le retrait bas est agrandi pour que le bouton flottant ne recouvre pas
     le lien des mentions légales une fois arrivé en bas de page. */
  padding-block: 56px 92px;
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
}

.footer-tagline {
  margin-top: 14px;
  max-width: 38ch;
  color: var(--text-soft);
  font-size: 0.92rem;
}

/* Titres de colonnes : balises <h2> pour la navigation au lecteur d'écran,
   mais ramenées à la police de texte — la police d'affichage à sa taille
   par défaut écraserait visuellement le reste du footer. */
.footer-col-title {
  margin-bottom: 16px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-700);
}

.footer-col ul { display: grid; gap: 10px; }

.footer-col li,
.footer-col a {
  color: var(--text-soft);
  font-size: 0.92rem;
}
.footer-col a { transition: color 0.2s var(--ease); }
.footer-col a:hover { color: var(--accent-700); }
.footer-col a[aria-current="page"] { color: var(--accent-700); font-weight: 600; }

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.footer-contact .icon { color: var(--accent-700); font-size: 1rem; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--text-soft);
}

.footer-legal { text-decoration: underline; text-underline-offset: 3px; }
.footer-legal:hover { color: var(--accent-700); }

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand-col { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ==========================================================================
   Legal page
   ========================================================================== */

.legal {
  padding-block: 56px 96px;
}

.legal .wrap { max-width: 760px; }

.legal h1 {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  margin-bottom: 12px;
}

.legal .updated {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-bottom: 48px;
}

.legal section { margin-bottom: 40px; }

.legal h2 {
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.legal p, .legal li {
  color: var(--text-soft);
  margin-bottom: 10px;
  max-width: 68ch;
}

.legal ul { padding-left: 20px; list-style: disc; }

.legal a.inline-link {
  color: var(--accent-700);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-en-notice {
  font-style: italic;
  color: var(--accent-700);
  margin-bottom: 24px;
}

.todo {
  display: inline-block;
  background: var(--accent-100);
  color: var(--accent-900);
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 0.88em;
  font-weight: 600;
}

/* ==========================================================================
   Contact page
   ========================================================================== */

.contact-hero { padding-block: clamp(32px, 6vw, 64px) 24px; }
.contact-hero h1 { font-size: clamp(2.1rem, 4vw, 2.9rem); max-width: 16ch; }
.contact-hero p { margin-top: 16px; max-width: 48ch; color: var(--text-soft); font-size: 1.05rem; }

.contact-main { padding-block: 24px 96px; }

.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 48px;
  align-items: start;
}

.contact-form {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 4vw, 40px);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 20px;
}

.field { display: flex; flex-direction: column; gap: 6px; }

.field label {
  font-weight: 600;
  font-size: 0.9rem;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field input,
.field select,
.field textarea {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--bg-alt);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-100);
}

.field textarea { min-height: 150px; resize: vertical; }

/* ---- Champs obligatoires, erreurs, anti-spam ---- */

.req { color: var(--error); font-weight: 700; }

.form-required-note {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-top: -4px;
}

/* Piège à robots : hors écran, mais sans display:none ni visibility:hidden,
   que beaucoup de robots détectent et contournent. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field-error {
  color: var(--error);
  font-size: 0.85rem;
  font-weight: 600;
}

/* L'erreur n'est jamais signalée par la seule couleur : le message texte sous
   le champ porte l'information, et aria-invalid la transmet aux lecteurs
   d'écran. */
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--error);
}
.field input[aria-invalid="true"]:focus,
.field textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 3px rgba(168, 50, 50, 0.18);
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin-top: -6px;
}

.form-success {
  background: var(--sage-light);
  color: var(--sage-900);
  border: 1.5px solid var(--sage);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-error-global {
  background: var(--accent-100);
  color: var(--error);
  border: 1.5px solid var(--error);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Pendant l'envoi : bouton neutralisé, sans le faire disparaître visuellement. */
.btn[aria-busy="true"] { opacity: 0.7; pointer-events: none; }

.contact-aside {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 3vw, 32px);
  align-self: start;
  position: sticky;
  top: 96px;
}

.contact-aside h2 { font-size: 1.2rem; margin-bottom: 16px; }

.contact-aside-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.contact-aside-row:last-of-type { border-bottom: none; }

.aside-icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-100);
  color: var(--accent-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

.contact-aside-note {
  margin-top: 20px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-aside { position: static; }
  .field-row { grid-template-columns: 1fr; }
}
