/* =========================================================
   POLICES (hébergées sur notre serveur, licence SIL OFL dans /fonts)
   Une seule famille pour tout le site. Archivo variable : graisse 100–900 ET largeur 62–125 %, d'où font-stretch.
   Sous-ensemble « latin » : couvre le français et l'allemand (ä ö ü é è ç…).
   ========================================================= */
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

/* =========================================================
   TOKENS
   Le thème suit l'heure réelle (nuit 19h–7h) : un dépanneur
   travaille la nuit, le site aussi. Bascule manuelle possible.
   ========================================================= */

:root {
  --amber: #ffae00;          /* gyrophare */
  --sign-blue: #0f4c9c;      /* panneau de direction, route principale */
  --red: #d7322a;            /* triangle de panne */
  --asphalt: #1b1f24;        /* fond des blocs toujours sombres */
  --font: "Archivo", system-ui, sans-serif;
  /* Titres : si Archivo ne charge pas (aperçu hors ligne, réseau filtré),
     on retombe sur une police déjà condensée plutôt que sur une police large
     qui ferait déborder les titres. */
  --display: "Archivo", "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
  --header: 68px;            /* hauteur de l'en-tête collant */
  --sec-pad: 112px;          /* marge verticale des sections */
  --asphalt-2: #13161a;      /* section contact et pied de page : un cran plus sombre que l'asphalte */
  --on-amber: #1a1a1a;       /* texte posé sur l'ambre */
  /* Échelle de texte : 13 / 15 / 18 (17 sur téléphone) / 22 / 30, plus les titres fluides ci-dessous */
  --h3: clamp(28px, 3.2vw, 42px);
}
/* Le mode jour/nuit est porté par data-mode (et non data-theme) : certains hébergeurs et
   aperçus écrivent eux-mêmes data-theme sur la page, ce qui effaçait toutes nos couleurs.
   Les valeurs « nuit » sont aussi celles par défaut : la page reste lisible quoi qu'il arrive. */
:root, :root[data-mode="night"] {
  --bg: #1b1f24; --bg-2: #232830; --ink: #eef0ee; --muted: #9aa1a6;
  --line: #333a42; --steel: #b4b8b8; --accent-ink: var(--amber);
  --sk-car: #2c323b; --sk-glass: #9fb0bd; --danger: #ff7a6e;
  color-scheme: dark;        /* champs natifs (date, liste) assortis au mode */
}
:root[data-mode="day"] {
  --bg: #eceae4; --bg-2: #f7f6f1; --ink: #16191d; --muted: #545a5f;
  --line: #cfcdc6; --steel: #3d4246; --accent-ink: #8a5600;
  --sk-car: #fdfcf9; --sk-glass: #333a42; --danger: #b3261e;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 18px; line-height: 1.5;
  overflow-x: clip; transition: background-color .5s, color .5s;
}
/* Grain d'asphalte, très léger */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }
.wrap { width: min(1220px, 100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right)); margin-inline: auto; }

/* Titres : condensés, casse normale (comme la signalisation suisse) */
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 820; font-stretch: 66%; line-height: .92; letter-spacing: -.005em; overflow-wrap: break-word; text-wrap: balance; }

/* Ancres du menu : le titre de la section arrive juste sous l'en-tête collant
   (on compense la marge haute de la section pour ne pas laisser un grand vide). */
.sec[id] { scroll-margin-top: calc(var(--header) - var(--sec-pad) + 28px); }
.sec.flush[id] { scroll-margin-top: calc(var(--header) + 28px); }
.contact { scroll-margin-top: calc(var(--header) - 98px + 40px); }
h2 { font-size: clamp(36px, 4.8vw, 64px); }
p { margin: 0; }

/* ---------- Gyrophare ---------- */
.beacon {
  --s: 12px; position: relative; display: inline-block; flex: none;
  width: var(--s); height: var(--s); border-radius: 50%; overflow: hidden;
  background: #6b4300; animation: glow 1.6s ease-in-out infinite;
}
.beacon::before {
  content: ""; position: absolute; inset: -50%;
  background: conic-gradient(var(--amber) 0 80deg, transparent 80deg 180deg, var(--amber) 180deg 260deg, transparent 260deg);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glow { 50% { box-shadow: 0 0 14px 3px rgba(255,174,0,.55); } }

/* ---------- En-tête ---------- */
.top { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); transition: background-color .5s; }
.top-in { display: flex; align-items: center; gap: 28px; height: var(--header); }
/* Sprite caché sans display:none (sinon le clipPath du logo ne s'applique plus dans Firefox) */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.badge { display: block; flex: none; height: auto; }

.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo .badge { width: 72px; }   /* ≈ 57 px de haut : tient dans l'en-tête de 68 px */
.logo-sub { font-size: 13px; line-height: 1.15; color: var(--muted); font-stretch: 85%; padding-left: 12px; border-left: 1px solid var(--line); }
.nav { display: flex; gap: 24px; margin-left: auto; font-stretch: 85%; font-weight: 550; font-size: 15px; }
.nav a { text-decoration: none; padding-block: 4px; border-bottom: 2px solid transparent; }
.nav a:hover { border-color: var(--amber); }
/* Boutons icône de l'en-tête : 44 px minimum, la taille d'un pouce */
.icon-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; flex: none; cursor: pointer;
  background: none; color: var(--ink); border: 1px solid var(--line);
}
.icon-btn:hover { border-color: var(--ink); }
.theme svg { width: 20px; height: 20px; }
/* On montre le mode en cours : lune la nuit, soleil le jour */
.i-sun { display: none; }
:root[data-mode="day"] .i-moon { display: none; }
:root[data-mode="day"] .i-sun { display: block; }

/* Hamburger : trois traits qui se croisent en X à l'ouverture */
.burger { display: none; }
.burger span, .burger span::before, .burger span::after {
  display: block; width: 20px; height: 2px; background: currentColor; transition: transform .25s, background-color .25s;
}
.burger span { position: relative; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { transform: translateY(-6px); }
.burger span::after { transform: translateY(6px); }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: rotate(-45deg); }

/* Panneau du menu mobile, sous l'en-tête */
.mnav {
  position: fixed; z-index: 39; left: 0; right: 0; top: var(--header); bottom: 0;
  display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px 16px calc(24px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line);
  visibility: hidden; opacity: 0; transform: translateY(-10px);
  transition: opacity .2s, transform .2s, visibility 0s .2s;
}
.mnav.open { visibility: visible; opacity: 1; transform: none; transition: opacity .2s, transform .2s; }
.mnav nav { display: flex; flex-direction: column; }
.mnav nav a {
  display: flex; justify-content: space-between; align-items: center; padding: 16px 2px; text-decoration: none;
  border-bottom: 1px solid var(--line);
  font-family: var(--display); font-size: 30px; font-weight: 800; font-stretch: 66%; line-height: 1;
}
.mnav nav a::after { content: ""; width: 10px; height: 10px; border-top: 2px solid var(--muted); border-right: 2px solid var(--muted); transform: rotate(45deg); }
.mnav-actions { display: grid; gap: 10px; margin-top: auto; padding-top: 28px; }
.mnav-actions .btn { justify-content: center; }
body.menu-open { overflow: hidden; }
.top-call {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px;
  background: var(--amber); color: var(--on-amber); text-decoration: none;
  font-weight: 800; font-stretch: 75%; font-size: 18px; letter-spacing: .01em;
}
.top-call .beacon { background: #7a4d00; }

/* ---------- Hero ---------- */
/* Le hero occupe exactement l'écran sous l'en-tête dès l'affichage.
   svh = hauteur visible sur mobile, barre d'adresse comprise (vh en secours). */
.hero {
  position: relative; overflow: hidden; display: grid;
  min-height: calc(100vh - var(--header));
  min-height: calc(100svh - var(--header));
  border-bottom: 10px solid transparent;
  border-image: repeating-linear-gradient(-45deg, var(--amber) 0 14px, var(--asphalt) 14px 28px) 10;
}

.hero { --gutter: max(16px, calc((100vw - 1220px) / 2)); }   /* marge entre le contenu et le bord de l'écran */
.hero-in { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, .76fr) minmax(0, 1.24fr); gap: clamp(24px, 3vw, 40px); }
.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 40px 0 56px; }

/* Dessin du hero : il déborde jusqu'au bord droit de l'écran. */
.hero-art { align-self: center; margin: 0 calc(var(--gutter) * -1) 0 0; min-width: 0; }
.sketch { display: block; width: 100%; height: auto; overflow: visible; --sw: 3.2; }
/* Traits : la couleur suit le thème (encre sombre le jour, craie claire la nuit) */
.sk { fill: none; stroke: var(--ink); stroke-width: var(--sw); stroke-linecap: round; stroke-linejoin: round;
  animation: sk-draw 1.25s ease-out backwards; animation-delay: var(--d, 0s); }
.sk-thin { stroke-width: calc(var(--sw) * .7); }
.sk-far, .sk-ground { stroke: var(--muted); stroke-width: calc(var(--sw) * .75); }
.sk-ground { stroke: var(--ink); }
.sk-sun { stroke: var(--amber); }
.sk-cab { fill: var(--amber); }
.sk-lamp { fill: var(--amber); stroke-width: calc(var(--sw) * .7); }
.sk-red { fill: var(--red); stroke-width: calc(var(--sw) * .6); }
.sk-rail { fill: var(--amber); }
.sk-body, .sk-deck { fill: var(--bg-2); }
.sk-car { fill: var(--sk-car); }
.sk-glass { fill: var(--sk-glass); stroke-width: calc(var(--sw) * .6); }
.sk-tyre { fill: var(--bg); stroke-width: calc(var(--sw) * 1.5); }
.sk-strap { stroke: var(--amber); }
.sk-dash { fill: none; stroke: var(--muted); stroke-width: calc(var(--sw) * .75); stroke-dasharray: 44 36; stroke-linecap: round; }
.sk-holes { fill: none; stroke: var(--asphalt); stroke-width: 4.4; stroke-dasharray: 0.1 22; stroke-linecap: round; }
/* Le dessin se trace au chargement : pathLength="1" sur chaque trait, donc 1 = le trait entier.
   Sans animation (ou avec « réduire les animations »), le dessin est simplement affiché. */
@keyframes sk-draw {
  from { stroke-dasharray: 1; stroke-dashoffset: 1; fill-opacity: 0; }
  65%  { fill-opacity: 0; }
  to   { stroke-dasharray: 1; stroke-dashoffset: 0; fill-opacity: 1; }
}
/* Taille du titre bornée par la largeur ET la hauteur de l'écran :
   il tient dans le hero même sur un portable de 720 px de haut. */
.hero h1 { margin-top: 0; font-size: clamp(44px, min(6vw, 11.5vh), 116px); font-stretch: 62%; font-weight: 860; line-height: .88; }
.hero h1 .q { display: block; margin-bottom: .14em; font-size: .46em; font-stretch: 75%; font-weight: 700; line-height: 1.05; color: var(--accent-ink); }
.lede { margin-top: 10px; max-width: 34em; color: var(--muted); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(20px, 3.5vh, 34px); }
.btn {
  display: inline-flex; align-items: center; gap: 12px; padding: 17px 22px; cursor: pointer;
  border: 2px solid transparent; text-decoration: none;
  font: 800 18px/1 var(--font); font-stretch: 75%; letter-spacing: .01em;
}
.btn-call { background: var(--amber); color: var(--on-amber); background-size: 40px 40px; }
/* Au survol : rayures de chantier qui défilent, comme une barrière */
.btn-call:hover {
  background-image: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(0,0,0,.09) 10px 20px);
  animation: stripes .7s linear infinite;
}
@keyframes stripes { to { background-position: 40px 0; } }
/* Sur ordinateur, le bouton du hero affiche juste le numéro : les deux boutons tiennent sur une ligne */
@media (min-width: 1001px) { .hero .cta-verb { display: none; } }
.btn-call .num { font-variant-numeric: tabular-nums; font-weight: 900; }
.btn-geo { background: transparent; color: var(--ink); border-color: currentColor; }
.btn-geo:hover { background: var(--ink); color: var(--bg); }
.btn-geo[aria-busy="true"] { opacity: .6; cursor: progress; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- Sections ---------- */
.sec { padding: var(--sec-pad) 0; }
.sec.flush { padding-top: 0; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26em); gap: 40px; align-items: end; margin-bottom: 52px; }
.sec-head p { color: var(--muted); }

/* Services : un tableau de bord de dispatch, pas des cartes */
.svc { border-top: 2px solid var(--ink); }
.svc-row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: baseline;
  padding: 26px 0; border-bottom: 1px solid var(--line);
}
.svc-row h3 { font-size: var(--h3); font-stretch: 66%; }
.svc-row p { color: var(--muted); max-width: 32em; }
.svc-row:hover h3 { color: var(--accent-ink); }

/* Zone : poteau indicateur */
.zone-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.zone-text h2 { margin-bottom: 26px; }
.zone-text p + p { margin-top: 14px; }
.zone-text .muted { color: var(--muted); }

/* Poteau indicateur (SVG). La taille du texte est en unités du dessin :
   elle suit la largeur du poteau, sur ordinateur comme sur téléphone. */
.signpost { display: block; width: 100%; max-width: 500px; height: auto; margin-inline: auto; overflow: visible; }
.signpost text { font-family: var(--font); font-size: 23px; font-weight: 700; font-stretch: 80%; }
.sp-plate text { font-size: 25px; font-stretch: 75%; font-weight: 800; }
/* Au survol, la flèche pivote légèrement autour du poteau */
.sp-sign { transform-box: fill-box; transition: transform .35s; }
.sp-r { transform-origin: 0% 50%; }
.sp-l { transform-origin: 100% 50%; }
.sp-r:hover { transform: rotate(-2.5deg); }
.sp-l:hover { transform: rotate(2.5deg); }

/* Déroulement : une route, des losanges « route principale » */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; margin: 0; padding: 0; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 18px; height: 52px; background: var(--asphalt); }
.steps::after { content: ""; position: absolute; left: 0; right: 0; top: 43px; height: 3px;
  background: repeating-linear-gradient(90deg, #e9ebe8 0 28px, transparent 28px 52px); }
.step { position: relative; padding: 100px 28px 0 0; }
.diamond {
  position: absolute; z-index: 1; top: 22px; left: 6px; width: 44px; height: 44px;
  display: grid; place-items: center; font-weight: 900; font-stretch: 70%; font-size: 22px; color: var(--on-amber);
}
.diamond::before { content: ""; position: absolute; inset: 6px; transform: rotate(45deg);
  background: var(--amber); border: 3px solid #fff; outline: 1px solid var(--on-amber); }
.diamond span { position: relative; }
.step h3 { font-size: 22px; font-stretch: 75%; font-weight: 800; line-height: 1.05; }
.step p { margin-top: 10px; color: var(--muted); }

/* ---------- Services : trois métiers avec photo, en quinconce ---------- */
.features { display: grid; gap: clamp(36px, 4.5vw, 56px); margin-bottom: clamp(48px, 5.5vw, 72px); }
.feature { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.feature:nth-child(even) .feature-img { order: 2; }
.feature-img { margin: 0; position: relative; }
.feature-img img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
/* Coin de bande de chantier : rappelle le bandeau du hero, une seule touche par photo */
.feature-img::after {
  content: ""; position: absolute; left: 0; bottom: -10px; width: 34%; height: 10px;
  background: repeating-linear-gradient(-45deg, var(--amber) 0 10px, var(--asphalt) 10px 20px);
}
.feature-text h3 { font-size: var(--h3); font-stretch: 66%; margin-bottom: 12px; }
.feature-text p { color: var(--muted); max-width: 30em; }

/* ---------- Galerie bento ----------
   Grille de 3 colonnes à hauteur de rangée fixe : les photos (16:9) sont recadrées
   par object-fit, la grande vignette occupe 2×2. */
.bento { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: clamp(150px, 17vw, 240px); gap: 10px; }
.tile { position: relative; display: block; overflow: hidden; background: var(--bg-2); }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.tile:hover img { transform: scale(1.03); }
.tile-xl { grid-column: span 2; grid-row: span 2; }
.tile-wide { grid-column: span 2; }
/* Tuile d'appel à l'action : la seule case de la galerie qui n'est pas une photo */
.tile-cta { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; padding: 18px;
  background: var(--amber); color: var(--on-amber); text-decoration: none; background-size: 40px 40px; }
.tile-cta:hover { background-image: repeating-linear-gradient(-45deg, transparent 0 10px, rgba(0,0,0,.09) 10px 20px); animation: stripes .7s linear infinite; }
.tile-cta-big { font-family: var(--display); font-size: var(--h3); font-weight: 860; font-stretch: 64%; line-height: .95; }
.tile-cta-link { align-self: start; padding: 9px 13px; background: var(--on-amber); color: #fff; font-weight: 800; font-stretch: 75%; font-size: 18px; }
.tile-cap {
  position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px);
  padding: 5px 9px; background: var(--asphalt); color: #eef0ee;
  font-size: 15px; font-stretch: 85%; font-weight: 600; line-height: 1.2;
}

/* ---------- Visionneuse ---------- */
.lightbox { padding: 0; border: 0; max-width: none; max-height: none; width: 100vw; height: 100vh; height: 100dvh; background: transparent; }
.lightbox::backdrop { background: rgba(10, 12, 15, .92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; display: grid; gap: 12px; justify-items: center; padding: 64px 16px; }
.lightbox img { max-width: min(1400px, 100%); max-height: calc(100dvh - 160px); width: auto; height: auto; display: block; }
.lightbox figcaption { color: #eef0ee; font-size: 15px; font-stretch: 85%; }
.lb-btn { position: fixed; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; cursor: pointer;
  background: rgba(27,31,36,.85); color: #eef0ee; border: 1px solid #39404a; }
.lb-btn svg { width: 22px; height: 22px; }
.lb-btn:hover { border-color: var(--amber); }
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
body.lb-open { overflow: hidden; }

/* ---------- Demande de prix : formulaire dans le style du site (suit le mode jour/nuit) ---------- */
.devis-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.devis-text h2 { margin-bottom: 22px; }
.devis-text p { color: var(--muted); max-width: 28em; }
.devis-text p + p { margin-top: 14px; }
.devis-text a { color: var(--ink); font-weight: 700; text-decoration-color: var(--amber); text-underline-offset: 4px; }
.bon { display: grid; gap: 18px; padding: clamp(20px, 3vw, 32px); background: var(--bg-2); border-top: 4px solid var(--amber); }
.bon-row { display: grid; gap: 6px; padding: 0; border: 0; margin: 0; min-width: 0; }
.bon label, .bon legend { padding: 0; font-size: 15px; font-weight: 650; font-stretch: 85%; }
.bon .opt { font-weight: 400; color: var(--muted); }
/* Bordure des champs en gris soutenu : contraste suffisant (≥ 3:1) pour repérer les champs */
.bon input, .bon select, .bon textarea {
  width: 100%; min-width: 0; padding: 12px; font: 500 18px var(--font); color: var(--ink);
  background: var(--bg); border: 1.5px solid var(--muted); border-radius: 0; appearance: none; resize: vertical;
}
.bon input::placeholder, .bon textarea::placeholder { color: var(--muted); opacity: 1; }
.bon input:focus-visible, .bon select:focus-visible, .bon textarea:focus-visible { outline: 3px solid var(--amber); outline-offset: 0; border-color: var(--ink); }
.bon input[aria-invalid="true"] { border-color: var(--danger); border-width: 2.5px; }
/* Chevron dessiné en CSS (le menu natif est masqué par appearance: none) */
.bon select { padding-right: 36px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(-45deg, transparent 50%, var(--ink) 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; }
.bon-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 14px; }
.bon-two > div { display: grid; gap: 6px; }
/* Trois choix sur une seule ligne, y compris sur téléphone */
.chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.chips label { position: relative; cursor: pointer; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span { display: block; padding: 12px 4px; text-align: center; white-space: nowrap;
  background: var(--bg); border: 1.5px solid var(--muted); font-size: 15px; font-weight: 650; font-stretch: 80%; }
.chips input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chips input:focus-visible + span { outline: 3px solid var(--amber); }
.bon-error { color: var(--danger); font-size: 15px; font-weight: 650; }
.bon-send { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.bon-send .btn[disabled] { opacity: .6; cursor: progress; }
.bon-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
/* Piège à robots : sorti de l'écran plutôt que display:none, que certains robots repèrent */
.bon-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bon-note { font-size: 14px; color: var(--muted); }
.bon-note a { color: inherit; }
.bon input[type="email"][aria-invalid="true"] { border-color: var(--danger); border-width: 2.5px; }
/* Après un envoi réussi, le formulaire laisse la place à la confirmation */
.bon-ok { display: none; outline: none; }
.bon-ok h3 { font-size: 28px; margin-bottom: 8px; }
.bon.sent > * { display: none; }
.bon.sent > .bon-ok { display: block; }
.btn-ink { background: transparent; color: var(--ink); border-color: currentColor; }
.btn-ink:hover { background: var(--ink); color: var(--bg); }
/* Le SMS n'a de sens que sur téléphone */
@media (hover: hover) and (pointer: fine) { [data-send="sms"] { display: none; } }

/* Contact : toujours sombre, le numéro prend toute la largeur */
.contact { background: var(--asphalt-2); color: #eef0ee; padding: 88px 0 72px;
  border-top: 10px solid transparent;
  border-image: repeating-linear-gradient(-45deg, var(--amber) 0 14px, var(--asphalt) 14px 28px) 10; }
.contact-head { display: flex; align-items: center; gap: 24px; }
.contact-head .badge { width: clamp(110px, 14vw, 170px); }
.contact h2 { font-size: var(--h3); font-stretch: 75%; font-weight: 700; color: #9aa1a6; }
/* La taille réelle est calculée en JS pour que le numéro remplisse
   exactement la largeur, quelle que soit la police chargée. */
.big-phone {
  display: block; width: max-content; max-width: 100%; margin: 14px 0 40px; text-decoration: none; color: var(--amber);
  font-family: var(--display); font-size: clamp(48px, 9vw, 160px); font-weight: 900; font-stretch: 62%;
  line-height: .9; letter-spacing: -.01em; white-space: nowrap; font-variant-numeric: tabular-nums;
}
/* Au survol, les chiffres s'allument l'un après l'autre comme des feux de détresse */
.big-phone span { display: inline-block; }
.big-phone:hover span { animation: hazard .5s steps(1) calc(var(--i) * 45ms) 2; }
@keyframes hazard { 0% { background: var(--amber); color: var(--asphalt); } 50% { background: transparent; color: var(--amber); } }
.contact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; padding-top: 28px; border-top: 1px solid #39404a; }
.contact-grid h3 { font-size: 22px; font-stretch: 75%; font-weight: 750; margin-bottom: 8px; }
.contact-grid p { color: #b3b9bd; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.contact .btn-geo { color: #eef0ee; }
.contact .btn-geo:hover { background: #eef0ee; color: var(--asphalt); }

/* =========================================================
   PAGES SECONDAIRES (mentions légales, confidentialité, 404)
   ========================================================= */
.back { margin-left: auto; font-stretch: 85%; font-weight: 600; font-size: 15px; text-decoration: none; padding: 10px 0; }
.back:hover { text-decoration: underline; text-decoration-color: var(--amber); text-underline-offset: 4px; }
.legal { padding: 64px 0 104px; }
.legal .wrap { max-width: 46rem; }   /* ~70 caractères par ligne : confortable à lire */
.legal h1 { font-size: clamp(44px, 7vw, 72px); font-stretch: 66%; margin-bottom: 12px; }
.legal .updated { color: var(--muted); font-size: 15px; margin-bottom: 40px; }
.legal h2 { font-size: 30px; font-stretch: 70%; margin: 44px 0 12px; scroll-margin-top: calc(var(--header) + 20px); }
.legal p, .legal li { line-height: 1.6; }
.legal p + p { margin-top: 12px; }
.legal ul { margin: 10px 0 0; padding-left: 1.2em; }
.legal li + li { margin-top: 6px; }
.legal dl { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr); gap: 8px 20px; margin: 0; }
.legal dt { color: var(--muted); }
.legal dd { margin: 0; }
.legal a { text-decoration-color: var(--amber); text-underline-offset: 3px; }
/* Valeurs à compléter : impossibles à rater avant la mise en ligne */
.todo { background: #ffe58a; color: #3a2a00; padding: 0 .3em; font-weight: 600; }
.notfound { min-height: calc(100svh - var(--header) - 60px); display: grid; align-content: center; padding: 48px 0; }
.notfound h1 { font-size: clamp(52px, 10vw, 120px); font-stretch: 62%; }
.notfound p { margin: 18px 0 30px; max-width: 34em; color: var(--muted); }
.notfound .cta { margin-top: 0; }
.mbar.mbar--single { grid-template-columns: 1fr; }
/* « Retour à l'accueil » prend la place libre ; le bouton thème se colle à lui */
@media (min-width: 761px) { .back ~ .theme { margin-left: 0; } }
@media (max-width: 760px) {
  .legal dl { grid-template-columns: 1fr; gap: 2px; }
  .legal dd { margin-bottom: 10px; }
  .back { display: none; }
}

.foot { background: var(--asphalt-2); color: #9aa1a6; border-top: 1px solid #2c323a; padding: 22px 0; font-size: 15px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.foot nav { display: flex; gap: 20px; }

/* Barre d'appel mobile */
/* La barre glisse depuis le bas quand les boutons du hero sortent de l'écran :
   il y a toujours un bouton d'appel visible, jamais deux. */
.mbar {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; display: none; grid-template-columns: 1.6fr 1fr;
  padding-bottom: env(safe-area-inset-bottom); background: var(--asphalt);
  transform: translateY(100%); transition: transform .25s ease-out;
}
.mbar.show { transform: none; }
/* Menu ouvert : la barre est toujours là, c'est elle qui porte Appeler et WhatsApp
   (le menu ne les répète plus). */
body.menu-open .mbar { transform: none; }
.mbar a, .mbar button { display: flex; align-items: center; justify-content: center; gap: 10px; height: 62px; border: 0; text-decoration: none;
  font: 800 18px var(--font); font-stretch: 75%; cursor: pointer; }
.mbar a { background: var(--amber); color: var(--on-amber); font-variant-numeric: tabular-nums; }
.mbar button, .mbar .mbar-alt { background: var(--asphalt); color: #eef0ee; border-left: 1px solid #39404a; }
.mbar svg { width: 18px; height: 18px; flex: none; }

/* Retour tactile : pas de flash bleu natif, un léger enfoncement à la place */
a, button, label { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.btn:active, .mbar a:active, .mbar button:active, .icon-btn:active { transform: translateY(1px); filter: brightness(.94); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero-in { grid-template-columns: 1fr; gap: 0; }
  /* En une colonne : bandeau photo en haut, texte et boutons dessous, le tout dans un écran */
  .hero-in { display: flex; flex-direction: column; }
  .hero-art { order: -1; flex: none; align-self: stretch; margin: 10px calc(var(--gutter) * -1) 0; }
  .sketch { --sw: 4.6; }                 /* dessin plus petit : trait épaissi pour rester lisible */
  .hero-copy { flex: 1; padding: 22px 0 32px; }
  .hero h1 { margin-top: 0; font-size: clamp(40px, min(13.5vw, 9vh), 104px); }
  .zone-grid, .devis-grid { grid-template-columns: 1fr; gap: 40px; }
  .feature { grid-template-columns: 1fr; gap: 22px; }
  .feature:nth-child(even) .feature-img { order: 0; }
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Le menu complet ne tient plus dans l'en-tête : place au hamburger */
@media (max-width: 960px) {
  .nav { display: none; }
  .theme { margin-left: auto; }
  .burger { display: inline-grid; }
  .top-in { gap: 10px; }
  .top-call { order: 1; margin-left: 6px; }
  .burger { order: 2; }
}
@media (min-width: 961px) { .mnav { display: none; } }

@media (max-width: 760px) {
  :root { --header: 60px; --sec-pad: 64px; }
  body { padding-bottom: calc(62px + env(safe-area-inset-bottom)); font-size: 17px; }
  .hero-copy { padding: 18px 0 24px; }
  .logo-sub { display: none; }
  .logo .badge { width: 64px; }
  .top-call { display: none; }
  /* Grain de fond coupé sur mobile : couche plein écran inutile pour la batterie */
  body::before { display: none; }
  /* Boutons du hero empilés pleine largeur, faciles à toucher */
  .cta { flex-direction: column; }
  .cta .btn { justify-content: center; padding: 17px 18px; }
  .btn-call { font-size: 22px; }
  .sec-head { grid-template-columns: 1fr; gap: 16px; }
  .svc-row { grid-template-columns: 1fr; gap: 10px; }
  .steps { grid-template-columns: 1fr; }
  .steps::before { right: auto; top: 0; bottom: 0; width: 52px; height: auto; }
  .steps::after { right: auto; left: 25px; top: 0; bottom: 0; width: 3px; height: auto;
    background: repeating-linear-gradient(to bottom, #e9ebe8 0 22px, transparent 22px 40px); }
  .step { padding: 8px 0 36px 76px; }
  .diamond { top: 4px; left: 4px; }
  .contact-grid { grid-template-columns: 1fr; gap: 22px; }
  /* Galerie : 2 colonnes, la grande photo et les panoramiques sur toute la largeur */
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; gap: 8px; }
  .tile { aspect-ratio: 4 / 3; }
  .tile-xl, .tile-cta { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 9; }
  .tile-cta { aspect-ratio: auto; min-height: 132px; }
  .tile-cap { font-size: 13px; left: 8px; bottom: 8px; }
  .bon-two { grid-template-columns: 1fr; gap: 10px; }
  .bon-send .btn { flex: 1 1 100%; justify-content: center; }
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; }
  .mbar { display: grid; }
  /* le bas du menu ne passe pas sous la barre d'appel */
  .mnav { padding-bottom: calc(62px + 24px + env(safe-area-inset-bottom)); }
}
/* Petits téléphones (≤ 650 px de haut visibles) : on garde titre, heure et boutons
   à l'écran, le texte d'appoint passe à la trappe. */
@media (max-width: 760px) and (max-height: 650px) {
  .hero .lede { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
