/* ==========================================================================
   GranAntique — feuille de style
   Le design system prolonge la carte de visite de Loïc (anthracite + blanc,
   sans-serif fine, monogramme en trait). Voir brand/README.md.
   ========================================================================== */

/* Inter est hébergée en local, pas appelée chez Google : une requête bloquante
   de moins sur un site ouvert en 4G, et l'adresse IP des visiteurs ne part nulle part.
   Fichier variable unique (47 Ko) couvrant toutes les graisses, sous-ensemble latin
   (accents français, ligature œ et symbole € inclus). Inter est sous licence SIL OFL. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin-var.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
                 U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Couleurs — sa charte, étendue */
  --noir:          #1c1c1e;   /* le fond de sa carte */
  --noir-profond:  #121214;
  --fond:          #faf9f7;   /* blanc cassé chaud : moins agressif que le blanc pur */
  --surface:       #ffffff;
  --texte:         #1c1c1e;
  --texte-doux:    #56555b;
  --texte-sombre-doux: #b9b8bd;  /* texte secondaire SUR fond noir */
  --bord:          #e5e2dc;
  --bord-sombre:   #333336;
  --accent:        #a16207;   /* laiton — évoque l'ancien, sans crier */
  --accent-fonce:  #7c4a05;   /* version texte, contraste renforcé sur fond clair */
  --accent-clair:  #d9a441;   /* version pour fond noir */

  /* Rythme d'espacement 4/8 */
  --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;  --sp-4: 16px;
  --sp-5: 24px;  --sp-6: 32px;  --sp-7: 48px;  --sp-8: 64px;
  --sp-9: 88px;  --sp-10: 120px;

  /* Rayons — volontairement sobres : un artisan sérieux, pas une app */
  --r-sm: 3px;  --r-md: 6px;  --r-lg: 10px;  --r-pill: 999px;

  --max: 720px;          /* colonne de lecture */
  --max-large: 1080px;

  --t-rapide: 150ms;
  --t-normal: 260ms;
  --t-fondu:  450ms;
  --ease: cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overscroll-behavior-y: contain;   /* pas de pull-to-refresh accidentel */
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  /* 17px de base : la cible a 45-65 ans et lit sur un téléphone, parfois dehors */
  font-size: 17px;
  line-height: 1.65;
  color: var(--texte);
  /* le fond du <body> est celui du pied de page : la zone réservée à la barre
     d'appel fixe reste ainsi dans la continuité visuelle du bas de page */
  background: var(--noir-profond);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* place pour la barre d'appel fixe en bas */
  padding-bottom: calc(68px + env(safe-area-inset-bottom));
}

@media (min-width: 900px) { body { padding-bottom: 0; } }

main { background: var(--fond); }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; touch-action: manipulation; cursor: pointer; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

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

/* ---------- Typographie ---------- */

h1, h2, h3 { line-height: 1.2; letter-spacing: -.018em; margin: 0 0 var(--sp-4); font-weight: 600; }
h1 { font-size: clamp(1.85rem, 6.5vw, 3rem); font-weight: 600; letter-spacing: -.03em; }
h2 { font-size: clamp(1.4rem, 4.6vw, 2rem); }
h3 { font-size: 1.12rem; font-weight: 600; letter-spacing: -.01em; }
p  { margin: 0 0 var(--sp-4); }
p:last-child { margin-bottom: 0; }

.surtitre {
  font-size: .75rem; font-weight: 600; letter-spacing: .13em;
  text-transform: uppercase; color: var(--accent-fonce);
  margin: 0 0 var(--sp-3);
}
.sombre .surtitre { color: var(--accent-clair); }

.chapo { font-size: 1.1rem; color: var(--texte-doux); }
.sombre .chapo { color: var(--texte-sombre-doux); }

/* ---------- Mise en page ---------- */

.section { padding: var(--sp-8) var(--sp-5); }
@media (min-width: 700px) { .section { padding: var(--sp-9) var(--sp-6); } }
.contenu { max-width: var(--max); margin: 0 auto; }
.contenu-large { max-width: var(--max-large); margin: 0 auto; }

.sombre { background: var(--noir); color: #fff; }
.sombre h1, .sombre h2, .sombre h3 { color: #fff; }

/* ---------- En-tête ---------- */

.entete {
  background: var(--noir);
  color: #fff;
  padding: var(--sp-4) var(--sp-5);
  padding-top: calc(var(--sp-4) + env(safe-area-inset-top));
}
.entete-inner {
  max-width: var(--max-large); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
}
.marque { display: flex; align-items: center; gap: var(--sp-3); text-decoration: none; color: #fff; }
.marque svg { width: 44px; height: 44px; flex: none; }
.marque-nom { display: block; font-size: 1.15rem; font-weight: 500; letter-spacing: -.015em; line-height: 1.15; }
.marque-bl {
  display: block;
  font-size: .72rem; color: var(--texte-sombre-doux);
  letter-spacing: .02em; margin-top: 1px;
}
.entete-tel {
  display: none; align-items: center; gap: var(--sp-2);
  font-weight: 600; font-size: 1.05rem; text-decoration: none; white-space: nowrap;
  padding: var(--sp-2) var(--sp-4); border: 1px solid var(--bord-sombre);
  border-radius: var(--r-pill); transition: background var(--t-rapide) var(--ease);
}
.entete-tel:hover { background: #ffffff14; }
@media (min-width: 700px) { .entete-tel { display: inline-flex; } }

/* ---------- Navigation ---------- */

.nav {
  background: var(--noir);
  border-top: 1px solid var(--bord-sombre);
  /* Sur mobile, la barre défile horizontalement plutôt que de se replier dans un
     menu burger : les liens restent visibles, donc réellement utilisés. */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }

.nav-inner {
  max-width: var(--max-large); margin: 0 auto;
  display: flex; gap: var(--sp-1);
  padding: 0 var(--sp-4);
  white-space: nowrap;
}

.nav a {
  display: inline-flex; align-items: center;
  min-height: 48px; padding: 0 var(--sp-4);
  color: var(--texte-sombre-doux);
  font-size: .94rem; font-weight: 500; text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--t-rapide) var(--ease), border-color var(--t-rapide) var(--ease);
}
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--accent-clair); }

/* Estompage à droite : signale qu'il reste des liens au-delà du bord.
   Purement visuel — rien n'est masqué pour un lecteur d'écran ni au clavier. */
@media (max-width: 899px) {
  .nav {
    -webkit-mask-image: linear-gradient(to right, #000 82%, transparent 100%);
            mask-image: linear-gradient(to right, #000 82%, transparent 100%);
  }
}

@media (min-width: 700px) {
  .nav-inner { padding: 0 var(--sp-6); gap: var(--sp-2); }
}
@media (min-width: 900px) {
  .nav-inner { justify-content: flex-start; }
}

/* ---------- Hero ---------- */

.hero {
  background: var(--noir);
  color: #fff;
  padding: var(--sp-6) var(--sp-5) var(--sp-9);
}
.hero .contenu { max-width: var(--max); }
.hero h1 { margin-bottom: var(--sp-5); }
.hero-sous { font-size: 1.12rem; color: var(--texte-sombre-doux); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); margin-top: var(--sp-6); }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 52px;                     /* cible tactile confortable */
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-pill); border: 1px solid transparent;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  transition: transform var(--t-rapide) var(--ease), background var(--t-rapide) var(--ease),
              border-color var(--t-rapide) var(--ease);
}
.btn:active { transform: scale(.975); }
.btn-primaire { background: var(--accent); color: #fff; }
.btn-primaire:hover { background: #b46f09; }
.btn-secondaire { background: transparent; color: #fff; border-color: var(--bord-sombre); }
.btn-secondaire:hover { background: #ffffff14; }
.btn-clair { background: var(--noir); color: #fff; }
.btn-clair:hover { background: #303034; }
.btn svg { width: 19px; height: 19px; flex: none; }

/* ---------- Avant / après ---------- */

.chantiers { display: grid; gap: var(--sp-7); }
@media (min-width: 860px) { .chantiers { grid-template-columns: repeat(2, 1fr); } }

.chantier { margin: 0; }
.cadre {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  border-radius: var(--r-lg); background: #e8e5e0;
  box-shadow: 0 1px 2px #0000000f, 0 8px 28px -12px #0000002e;
}
.cadre img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.cadre .av {
  opacity: 0;
  transition: opacity var(--t-fondu) var(--ease);
}
.cadre[data-etat="avant"] .av { opacity: 1; }

.etiquette {
  position: absolute; top: var(--sp-3); left: var(--sp-3); z-index: 2;
  background: #000000d9; color: #fff;
  font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 11px; border-radius: var(--r-pill);
}

.bascule {
  position: absolute; z-index: 2;
  bottom: var(--sp-3); left: 50%; transform: translateX(-50%);
  display: flex; padding: 3px; gap: 2px;
  background: #000000d9; border-radius: var(--r-pill);
}
.bascule button {
  border: 0; background: transparent; color: #ffffffb8;
  font-size: .8rem; font-weight: 600; letter-spacing: .02em;
  padding: 9px 20px; min-height: 40px; border-radius: var(--r-pill);
  transition: background var(--t-rapide) var(--ease), color var(--t-rapide) var(--ease);
}
.bascule button[aria-pressed="true"] { background: #fff; color: var(--noir); }

.chantier figcaption { margin-top: var(--sp-3); }
.chantier-titre { font-weight: 600; font-size: 1rem; }
.chantier-detail { color: var(--texte-doux); font-size: .92rem; }
.sombre .chantier-detail { color: var(--texte-sombre-doux); }

/* ---------- Listes de contenu ---------- */

.liste-nue { list-style: none; padding: 0; margin: 0; }

.prestations { display: grid; gap: var(--sp-3); margin-top: var(--sp-5); }
@media (min-width: 620px) { .prestations { grid-template-columns: repeat(2, 1fr); } }
.prestations li {
  display: flex; gap: var(--sp-3); align-items: flex-start;
  padding: var(--sp-4); background: var(--surface);
  border: 1px solid var(--bord); border-radius: var(--r-md);
}
.prestations svg { width: 20px; height: 20px; flex: none; margin-top: 2px; color: var(--accent-fonce); }

.destinations { display: grid; gap: var(--sp-4); margin-top: var(--sp-6); }
@media (min-width: 620px) { .destinations { grid-template-columns: repeat(2, 1fr); } }
.destinations li {
  padding: var(--sp-5); border: 1px solid var(--bord-sombre); border-radius: var(--r-md);
  background: #ffffff0a;
}
.destinations h3 { margin-bottom: var(--sp-2); font-size: 1rem; }
.destinations p { color: var(--texte-sombre-doux); font-size: .95rem; margin: 0; }

/* Déroulé numéroté */
.etapes { counter-reset: e; margin-top: var(--sp-6); }
.etapes li {
  counter-increment: e; position: relative;
  padding: 0 0 var(--sp-6) var(--sp-8);
}
.etapes li::before {
  content: counter(e);
  position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--noir); color: #fff;
  font-size: .85rem; font-weight: 600;
}
.etapes li:not(:last-child)::after {
  content: ""; position: absolute; left: 17px; top: 38px; bottom: 8px;
  width: 1px; background: var(--bord);
}
.etapes h3 { margin-bottom: var(--sp-1); }
.etapes p { color: var(--texte-doux); margin: 0; font-size: .97rem; }

/* Encadré d'insistance */
.encart {
  border-left: 3px solid var(--accent);
  background: #a1620710;
  padding: var(--sp-5); border-radius: 0 var(--r-md) var(--r-md) 0;
  margin: var(--sp-6) 0;
}
.encart p:last-child { margin-bottom: 0; }

/* FAQ */
.faq { margin-top: var(--sp-5); border-top: 1px solid var(--bord); }
.faq details { border-bottom: 1px solid var(--bord); }
.faq summary {
  padding: var(--sp-4) var(--sp-6) var(--sp-4) 0;
  font-weight: 500; cursor: pointer; position: relative; list-style: none;
  min-height: 44px; display: flex; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: var(--sp-2); top: 50%;
  width: 9px; height: 9px; margin-top: -6px;
  border-right: 2px solid var(--texte-doux); border-bottom: 2px solid var(--texte-doux);
  transform: rotate(45deg); transition: transform var(--t-normal) var(--ease);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .reponse { padding: 0 0 var(--sp-5); color: var(--texte-doux); }
.faq .reponse p:last-child { margin-bottom: 0; }

/* Zone d'intervention */
.villes { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-5); padding: 0; list-style: none; }
.villes li {
  padding: 7px 15px; background: var(--surface); border: 1px solid var(--bord);
  border-radius: var(--r-pill); font-size: .9rem; color: var(--texte-doux);
}

/* Contact */
.contact-blocs { display: grid; gap: var(--sp-3); margin-top: var(--sp-6); }
@media (min-width: 620px) { .contact-blocs { grid-template-columns: repeat(2, 1fr); } }
.contact-bloc {
  display: flex; align-items: center; gap: var(--sp-4); text-decoration: none;
  padding: var(--sp-5); border: 1px solid var(--bord-sombre); border-radius: var(--r-md);
  background: #ffffff0a; transition: background var(--t-rapide) var(--ease);
  min-height: 76px;
}
.contact-bloc:hover { background: #ffffff16; }
.contact-bloc svg { width: 24px; height: 24px; flex: none; color: var(--accent-clair); }
.contact-bloc .lbl { font-size: .78rem; color: var(--texte-sombre-doux); letter-spacing: .04em; text-transform: uppercase; }
.contact-bloc .val { font-weight: 600; font-size: 1.05rem; word-break: break-word; }

/* ---------- Barre d'appel fixe (mobile) ---------- */

.barre-appel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  padding-bottom: calc(var(--sp-2) + env(safe-area-inset-bottom));
  background: var(--fond);
  border-top: 1px solid var(--bord);
}
.barre-appel .btn { flex: 1; min-height: 52px; font-size: .98rem; padding: var(--sp-3); }
.barre-appel .btn-wa { background: var(--surface); color: var(--texte); border-color: var(--bord); }
.barre-appel .btn-wa:hover { background: #f1efeb; }
@media (min-width: 900px) { .barre-appel { display: none; } }

/* ---------- Pied de page ---------- */

.pied { background: var(--noir-profond); color: var(--texte-sombre-doux); padding: var(--sp-8) var(--sp-5) var(--sp-7); font-size: .9rem; }
.pied a { color: #fff; }
.pied-haut { display: flex; flex-wrap: wrap; gap: var(--sp-5); justify-content: space-between; align-items: flex-start; }
.pied-liens { display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-5); }
/* Cibles tactiles : WCAG 2.2 AA (2.5.8) demande 24px, on vise large —
   la cible du site a 45-65 ans et clique sur un téléphone. */
.pied-liens a {
  display: inline-flex; align-items: center;
  min-height: 44px; padding: 0 2px;
}
.pied-bas { margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--bord-sombre); font-size: .88rem; line-height: 2.1; }
/* Liens dans une phrase : l'exception « inline » de WCAG 2.5.8 s'applique,
   mais on élargit quand même la zone de contact. */
.pied-bas a { display: inline-block; padding: 6px 2px; }

/* ---------- Apparition au défilement ---------- */

/* Le contenu est visible par défaut : on ne masque qu'une fois le JS confirmé actif,
   sinon un blocage de script ferait disparaître la preuve principale du site. */
.reveal { transition: opacity 620ms var(--ease), transform 620ms var(--ease); }
html.js .reveal:not(.vu) { opacity: 0; transform: translateY(14px); }
@media (prefers-reduced-motion: reduce) {
  html.js .reveal:not(.vu) { opacity: 1; transform: none; }
}

/* ---------- Page QR ---------- */

.page-qr {
  min-height: 100svh; display: grid; place-items: center; text-align: center;
  background: #fff; color: var(--noir); padding: var(--sp-5);
}
.qr-carte { max-width: 380px; }
.qr-carte .cadre-qr {
  background: #fff; padding: var(--sp-5); border-radius: var(--r-lg);
  border: 1px solid var(--bord); display: inline-block;
}
.qr-url { font-weight: 600; font-size: 1.05rem; margin-top: var(--sp-5); word-break: break-all; }


/* ---------- Page Réalisations ---------- */

.chantiers-pleine { display: grid; gap: var(--sp-8); }
.chantiers-pleine .cadre { aspect-ratio: 1 / 1; }
@media (min-width: 760px) {
  /* L'image est bornée : au-delà, elle écrase le texte et laisse un grand vide
     sous la légende. Le texte prend la place restante. */
  .chantiers-pleine .chantier {
    display: grid; grid-template-columns: minmax(0, 520px) 1fr;
    gap: var(--sp-7); align-items: center;
  }
  .chantiers-pleine figcaption { margin-top: 0; max-width: 34em; }
  .chantiers-pleine .chantier-texte { font-size: 1rem; }
}
/* Le côte à côte suit la même largeur que les chantiers en fondu */
.duo { max-width: 1084px; }

.chantier-texte { color: var(--texte-doux); font-size: .95rem; margin-top: var(--sp-2); }
.chantier-titre-g { font-weight: 600; font-size: 1.12rem; letter-spacing: -.01em; }

/* Comparaison côte à côte : pour les paires dont les cadrages diffèrent trop
   pour supporter un fondu. Montrer les deux vues en même temps reste honnête. */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-2); }
.duo figure { margin: 0; position: relative; }
.duo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--r-md); display: block; }
.duo figcaption {
  position: absolute; top: var(--sp-2); left: var(--sp-2);
  background: #000000d9; color: #fff;
  font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: 5px 11px; border-radius: var(--r-pill);
}

.rappel-cta {
  margin-top: var(--sp-8); padding: var(--sp-6);
  background: var(--surface); border: 1px solid var(--bord); border-radius: var(--r-md);
  text-align: center;
}
.rappel-cta h2 { font-size: 1.25rem; margin-bottom: var(--sp-2); }
.rappel-cta p { color: var(--texte-doux); margin-bottom: var(--sp-5); }

.fil { font-size: .88rem; color: var(--texte-doux); margin-bottom: var(--sp-4); }
/* Zone de contact suffisante sur le lien de retour (WCAG 2.2 — 2.5.8) */
.fil a { color: var(--texte-doux); display: inline-block; padding: 8px 4px; margin: -8px -4px; }
