/* ==========================================================================
   RÉNOVATION GLOBAL — local.css
   Feuille complémentaire des pages secteur (500 pages) :
   hub régional · page département · page ville, pour chacun des 25 thèmes.
   --------------------------------------------------------------------------
   Dépend de style.css (variables, nav, boutons, .form-devis, .avant-apres,
   .faq, .confiance, .liens-locaux, .cta, .etapes, .badge, .breadcrumb).
   Ne redéfinit aucune variable ; aucune couleur en dur.

   Structure attendue d'une page secteur :
   <body class="page page--hub">          (ou page--departement / page--ville)
     <header class="nav nav--secteur">…</header>
     <nav class="breadcrumb local-breadcrumb">…</nav>
     <main>
       <section class="local-hero">…</section>            1. premier écran
       <section class="local-section local-intro">…</section>
       <section class="local-section local-zones">…</section>      2. zones couvertes
       <section class="local-section local-prestations">…</section> 3. prestations
       <section class="local-section local-chantier">…</section>   4. avant / après
       <section class="local-section local-tarifs">…</section>     5. prix / délais / étapes
       <section class="local-section local-faq">…</section>        6. FAQ
       <section class="local-section local-voisins">…</section>    7. thèmes voisins
       <section class="local-section local-cta">…</section>        8. appel à l'action
     </main>
     <footer class="footer">…</footer>

   Sommaire
    1. Base des pages secteur et variantes par niveau
    2. Fil d'Ariane
    3. Premier écran
    4. Introduction / réponse directe (GEO)
    5. Zones couvertes
    6. Prestations
    7. Chantier mis en avant (avant / après)
    8. Tableaux prix / délais / étapes (cartes sur mobile)
    9. FAQ
   10. Thèmes voisins et maillage
   11. Appel à l'action final
   12. Blocs secondaires (confiance, encart local, sommaire)
   13. Media queries
   14. Alignement sur index.html (gabarit hub) — carte chantier sans vide
   15. Corrections téléphone (08/11/2026) : ordre du premier écran,
       fil d'Ariane et bulles centrés, centrages, point final insécable
   ========================================================================== */


/* ==========================================================================
   1. BASE DES PAGES SECTEUR ET VARIANTES PAR NIVEAU
   ========================================================================== */
.page {
  /* tailles de H1 par niveau : plus le niveau est précis, plus le titre est compact */
  --local-h1: var(--fs-h1);
  --local-h2: var(--fs-h2);
}

.page--hub {
  --local-h1: clamp(2.125rem, 1.5rem + 3.2vw, 3.5rem);
  --local-h2: var(--fs-h2);
}

.page--departement {
  --local-h1: clamp(1.875rem, 1.35rem + 2.6vw, 3rem);
  --local-h2: clamp(1.5rem, 1.2rem + 1.4vw, 2rem);
}

.page--ville {
  --local-h1: clamp(1.75rem, 1.3rem + 2.2vw, 2.625rem);
  --local-h2: clamp(1.375rem, 1.15rem + 1.2vw, 1.875rem);
}

.page .local-hero h1 {
  font-size: var(--local-h1);
}

.page .local-section h2 {
  font-size: var(--local-h2);
}

/* Rythme vertical commun des sections */
.local-section {
  padding-block: var(--section);
}

.local-section--blanc {
  background-color: var(--c-fond-carte);
}

.local-section--compact {
  padding-block: calc(var(--section) * 0.6);
}

.local-section__entete {
  max-width: 720px;
  margin-bottom: var(--esp-6);
}

.local-section__entete p {
  font-size: var(--fs-grand);
}

/* Étiquette de niveau (Région / Département / Ville) au-dessus du H1 */
.local-niveau {
  display: inline-flex;
  align-items: center;
  gap: var(--esp-2);
  margin-bottom: var(--esp-3);
  padding: var(--esp-1) var(--esp-3);
  font-size: var(--fs-petit);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-rond);
  background-color: var(--c-fond-pastille);
  color: var(--c-etiquette);
}

.local-niveau::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--c-puce);
}

.page--hub .local-niveau::before {
  background-color: var(--c-filet);
}


/* ==========================================================================
   2. FIL D'ARIANE (juste sous la barre fixe)
   ========================================================================== */
.local-breadcrumb {
  padding-block: var(--esp-2) 0;
}

.local-breadcrumb ol {
  padding: var(--esp-2) var(--esp-4);
  background-color: rgba(var(--c-clair-rgb), 0.6);
  border-radius: var(--radius-rond);
  display: inline-flex;
  max-width: 100%;
}

/* Sur mobile, les niveaux intermédiaires se compressent : on garde la lisibilité */
.local-breadcrumb li {
  min-width: 0;
}

.local-breadcrumb a,
.local-breadcrumb [aria-current="page"] {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 42vw;
  display: inline-block;
  vertical-align: bottom;
}


/* ==========================================================================
   3. PREMIER ÉCRAN : H1 + accroche + téléphone | formulaire ; image terminée
   ========================================================================== */
.local-hero {
  padding-block: clamp(1.25rem, 3vw, 2.5rem) var(--section);
}

.local-hero__grille {
  display: grid;
  gap: var(--esp-6);
  align-items: start;
}

.local-hero__texte {
  min-width: 0;
}

.local-hero__accroche {
  font-size: var(--fs-grand);
  font-weight: 500;
  color: var(--c-texte-fort);
  max-width: 52ch;
}

/* Téléphone bien visible sous l'accroche */
.local-hero__tel {
  display: inline-flex;
  align-items: center;
  gap: var(--esp-3);
  margin-top: var(--esp-4);
  padding: var(--esp-3) var(--esp-4);
  font-size: var(--fs-grand);
  font-weight: 800;
  color: var(--c-texte-fort);
  text-decoration: none;
  background-color: var(--c-fond-carte);
  border-radius: var(--radius);
  box-shadow: var(--ombre-douce);
  transition: transform var(--duree) var(--courbe), box-shadow var(--duree) var(--courbe), color var(--duree) var(--courbe);
}

@media (hover: hover) and (pointer: fine) {
  .local-hero__tel:hover {
    color: var(--c-lien);
  }
}

.local-hero__tel-icone {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-petit);
  background-color: var(--c-accent);
  color: var(--c-texte-sur-accent);
}

.local-hero__tel-icone svg {
  width: 20px;
  height: 20px;
}

.local-hero__tel small {
  display: block;
  font-size: var(--fs-petit);
  font-weight: 500;
  color: var(--c-texte-doux);
}

/* Preuves courtes (interlocuteur unique, décennale, devis gratuit) */
.local-hero__preuves {
  display: flex;
  flex-wrap: wrap;
  gap: var(--esp-2) var(--esp-4);
  list-style: none;
  padding: 0;
  margin: var(--esp-5) 0 0;
  font-size: var(--fs-petit);
  font-weight: 700;
  color: var(--c-texte-fort);
}

.local-hero__preuves li {
  display: flex;
  align-items: center;
  gap: var(--esp-2);
  margin: 0;
}

.local-hero__preuves li::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--c-puce);
}

.local-hero__formulaire {
  min-width: 0;
}

/* Image de chantier terminé (toujours un « après ») */
.local-hero__image {
  position: relative;
  margin: 0;
}

.local-hero__image img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  box-shadow: var(--ombre-carte);
}

.local-hero__image figcaption {
  position: absolute;
  left: var(--esp-3);
  bottom: var(--esp-3);
  max-width: calc(100% - var(--esp-6));
  padding: var(--esp-1) var(--esp-3);
  font-size: var(--fs-petit);
  font-weight: 700;
  border-radius: var(--radius-rond);
  background-color: var(--c-accent);
  color: var(--c-texte-sur-accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* ==========================================================================
   4. INTRODUCTION / RÉPONSE DIRECTE (GEO)
   --------------------------------------------------------------------------
   Paragraphe factuel et citable : qui, quoi, où, pour qui.
   ========================================================================== */
.local-intro {
  padding-block: 0 var(--section);
}

.local-intro__bloc {
  max-width: 820px;
  padding: clamp(1.25rem, 3vw, 2rem);
  background-color: var(--c-fond-carte);
  border-left: 5px solid var(--c-accent);
  border-radius: var(--radius);
  box-shadow: var(--ombre-douce);
}

.local-intro__bloc p {
  font-size: var(--fs-grand);
  color: var(--c-texte-fort);
  max-width: none;
}

.local-intro__bloc p + p {
  font-size: var(--fs-base);
  color: var(--c-texte);
}

/* Points clés en grille (quatre faits courts) */
.local-cles {
  display: grid;
  gap: var(--esp-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  list-style: none;
  padding: 0;
  margin: var(--esp-5) 0 0;
}

.local-cles li {
  margin: 0;
  padding: var(--esp-4);
  border-radius: var(--radius);
  background-color: var(--c-fond-carte);
  box-shadow: var(--ombre-douce);
}

.local-cles__valeur {
  display: block;
  font-size: var(--fs-h3);
  font-weight: 800;
  line-height: 1.1;
  color: var(--c-chiffre);
  margin-bottom: var(--esp-1);
}

.local-cles__libelle {
  font-size: var(--fs-petit);
  font-weight: 700;
  color: var(--c-texte-fort);
}


/* ==========================================================================
   5. ZONES COUVERTES : puces arrondies cliquables
   (hub → 4 départements ; département → ses villes ; ville → villes voisines)
   ========================================================================== */
.local-zones__grille {
  display: grid;
  gap: var(--esp-5);
  align-items: start;
}

.local-zones__liste {
  display: flex;
  flex-wrap: wrap;
  gap: var(--esp-2);
  list-style: none;
  padding: 0;
  margin: 0;
}

.local-zones__liste li {
  margin: 0;
}

.local-zones__puce {
  display: inline-flex;
  align-items: center;
  gap: var(--esp-2);
  min-height: 44px;
  padding: var(--esp-2) var(--esp-4);
  font-size: var(--fs-petit);
  font-weight: 700;
  color: var(--c-texte-fort);
  text-decoration: none;
  background-color: var(--c-fond-carte);
  border: 1.5px solid var(--c-bordure);
  border-radius: var(--radius-rond);
  transition: border-color var(--duree) var(--courbe), color var(--duree) var(--courbe),
              background-color var(--duree) var(--courbe), transform var(--duree) var(--courbe);
}

.local-zones__puce::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--c-puce);
  flex: 0 0 auto;
}



/* Zone courante (non cliquable) ou mise en avant */
.local-zones__puce.is-active,
.local-zones__puce[aria-current="page"] {
  background-color: var(--c-btn-fond);
  border-color: var(--c-btn-fond);
  color: var(--c-btn-texte);
  pointer-events: none;
}

.local-zones__puce.is-active::before,
.local-zones__puce[aria-current="page"]::before {
  background-color: var(--c-puce);
}

/* Numéro de département en préfixe (13, 83, 84, 06) */
.local-zones__numero {
  font-weight: 800;
  color: var(--c-chiffre);
}

.local-zones__puce.is-active .local-zones__numero,
.local-zones__puce[aria-current="page"] .local-zones__numero {
  color: var(--c-texte-sur-sombre);
}

/* Hub : les 4 départements en tuiles avec leurs villes */
.local-zones__departements {
  display: grid;
  gap: var(--esp-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}

.local-zones__departement {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--esp-2);
  margin: 0;
  padding: var(--esp-5);
  background-color: var(--c-fond-carte);
  border-radius: var(--radius);
  box-shadow: var(--ombre-douce);
  transition: transform var(--duree) var(--courbe), box-shadow var(--duree) var(--courbe);
}



.local-zones__departement h3 {
  font-size: var(--fs-h4);
  margin: 0;
}

.local-zones__departement h3 a {
  text-decoration: none;
}

.local-zones__departement h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.local-zones__departement .local-zones__numero {
  font-size: var(--fs-h2);
  line-height: 1;
}

.local-zones__departement p {
  font-size: var(--fs-petit);
  margin: 0;
}

/* Encart contexte local (quartiers, bâti, contraintes PLU / ABF / littoral) */
.local-contexte {
  padding: clamp(1.25rem, 3vw, 2rem);
  background-color: var(--c-fond-sombre);
  color: var(--c-texte-sur-sombre);
  border-radius: var(--radius);
}

.local-contexte h3 {
  color: var(--c-titre-sur-sombre);
  font-size: var(--fs-h4);
  margin-bottom: var(--esp-3);
}

.local-contexte p,
.local-contexte li {
  font-size: var(--fs-petit);
  color: var(--c-texte-sur-sombre);
}

.local-contexte ul {
  margin: 0;
}

.local-contexte strong {
  color: var(--c-titre-sur-sombre);
}

/* Liens sur fond vert : ocre, jamais vert sur vert */
.local-contexte a {
  display: inline-flex;
  align-items: center;
  gap: var(--esp-2);
  font-weight: 700;
  color: var(--c-lien-sur-sombre);
  text-decoration: underline;
  text-decoration-color: rgba(var(--c-accent-rgb), 0.5);
  text-underline-offset: 0.2em;
}

.local-contexte a::after {
  content: "→";
  transition: transform var(--duree) var(--courbe);
}

.local-contexte a:focus-visible {
  color: var(--c-lien-sur-sombre-survol);
  text-decoration-color: var(--c-titre-sur-sombre);
}

@media (hover: hover) and (pointer: fine) {
  .local-contexte a:hover {
    color: var(--c-lien-sur-sombre-survol);
    text-decoration-color: var(--c-titre-sur-sombre);
  }
}




/* ==========================================================================
   6. PRESTATIONS DU THÈME : cartes
   ========================================================================== */
.local-prestations__grille {
  display: grid;
  gap: var(--esp-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.local-prestation {
  display: flex;
  flex-direction: column;
  gap: var(--esp-3);
  height: 100%;
  padding: var(--esp-5);
  background-color: var(--c-fond-carte);
  border-radius: var(--radius);
  box-shadow: var(--ombre-douce);
  transition: transform var(--duree) var(--courbe), box-shadow var(--duree) var(--courbe);
}



.local-prestation__icone {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-petit);
  background-color: var(--c-fond-pastille);
  color: var(--c-icone);
}

.local-prestation__icone svg {
  width: 24px;
  height: 24px;
}

.local-prestation h3 {
  font-size: var(--fs-h4);
  margin: 0;
}

.local-prestation p {
  flex: 1 1 auto;
  font-size: var(--fs-petit);
  margin: 0;
}

.local-prestation__liste {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--fs-petit);
}

.local-prestation__liste li {
  position: relative;
  padding-left: 1.2em;
  margin-bottom: var(--esp-1);
}

.local-prestation__liste li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--c-puce);
}

/* Prestation mise en avant (fond vert) */
.local-prestation--phare {
  background-color: var(--c-fond-sombre);
  color: var(--c-texte-sur-sombre);
}

.local-prestation--phare h3 {
  color: var(--c-titre-sur-sombre);
}

.local-prestation--phare p,
.local-prestation--phare .local-prestation__liste {
  color: var(--c-texte-sur-sombre);
}

.local-prestation--phare a:not(.btn) {
  color: var(--c-lien-sur-sombre);
}

@media (hover: hover) and (pointer: fine) {
  .local-prestation--phare a:not(.btn):hover {
    color: var(--c-lien-sur-sombre-survol);
  }
}

.local-prestation--phare .local-prestation__icone {
  background-color: var(--c-accent);
  color: var(--c-texte-sur-accent);
}


/* ==========================================================================
   7. CHANTIER MIS EN AVANT : avant / après
   --------------------------------------------------------------------------
   Deux variantes dans .local-chantier__visuel :
     • grande image « après » : img.local-chantier__principale ;
     • paire avant / après : div.avant-apres.avant-apres--paire.
   Dès 768 px la carte prend la hauteur du texte et c'est l'image (ou la
   paire) qui s'agrandit pour la combler : voir section 14.
   ========================================================================== */
.local-chantier__grille {
  display: grid;
  gap: var(--esp-5);
  align-items: center;
}

.local-chantier__texte h2 {
  margin-bottom: var(--esp-3);
}

.local-chantier__fiche {
  display: grid;
  gap: var(--esp-2);
  grid-template-columns: auto 1fr;
  margin: var(--esp-4) 0 0;
  font-size: var(--fs-petit);
}

.local-chantier__fiche dt {
  font-weight: 700;
  color: var(--c-titre-3);
  padding-right: var(--esp-3);
}

.local-chantier__fiche dd {
  margin: 0;
}

.local-chantier__visuel {
  padding: var(--esp-3);
  background-color: var(--c-fond-carte);
  border-radius: var(--radius);
  box-shadow: var(--ombre-carte);
}

.local-chantier__visuel .avant-apres {
  gap: var(--esp-3);
}

.local-chantier__visuel .avant-apres__item img {
  border-radius: calc(var(--radius) - 6px);
}

.local-chantier__visuel .avant-apres__comparateur {
  border-radius: calc(var(--radius) - 6px);
  box-shadow: none;
}

.local-chantier__legende {
  padding: var(--esp-3) var(--esp-2) var(--esp-1);
  font-size: var(--fs-petit);
  color: var(--c-texte-doux);
  margin: 0;
}

/* Galerie secondaire de photos terminées (3 à 4 vignettes) */
.local-chantier__galerie {
  display: grid;
  gap: var(--esp-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  margin-top: var(--esp-4);
}

.local-chantier__galerie img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}


/* ==========================================================================
   8. TABLEAUX PRIX INDICATIFS / DÉLAIS / ÉTAPES (cartes sur mobile)
   --------------------------------------------------------------------------
   <table class="local-tableau">
     <thead><tr><th>Prestation</th><th>Fourchette</th><th>Délai</th></tr></thead>
     <tbody><tr><td data-label="Prestation">…</td><td data-label="Fourchette">…</td>…
   Chaque <td> porte data-label="…" : sur mobile, chaque ligne devient une
   carte et le libellé s'affiche devant la valeur.
   ========================================================================== */
.local-tarifs__grille {
  display: grid;
  gap: var(--esp-5);
  align-items: start;
}

.local-tableau {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 var(--esp-3);
  margin-bottom: var(--esp-2);
}

.local-tableau caption {
  text-align: left;
  font-weight: 800;
  color: var(--c-titre-3);
  padding-bottom: var(--esp-2);
  caption-side: top;
}

/* Mobile : en-tête masqué, lignes en cartes */
.local-tableau thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.local-tableau tbody tr {
  display: block;
  padding: var(--esp-4);
  background-color: var(--c-fond-carte);
  border-radius: var(--radius);
  box-shadow: var(--ombre-douce);
}

.local-tableau tbody td {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--esp-3);
  padding: var(--esp-2) 0;
  border-bottom: 1px solid var(--c-bordure);
  font-size: var(--fs-petit);
}

.local-tableau tbody td:last-child {
  border-bottom: 0;
}

.local-tableau tbody td::before {
  content: attr(data-label);
  flex: 0 0 40%;
  font-weight: 700;
  color: var(--c-texte-fort);
}

/* Première cellule = nom de la prestation, mise en avant */
.local-tableau tbody td:first-child {
  font-weight: 800;
  color: var(--c-texte-fort);
  font-size: var(--fs-base);
  padding-bottom: var(--esp-3);
}

.local-tableau tbody td:first-child::before {
  display: none;
}

.local-tableau__prix {
  font-weight: 800;
  color: var(--c-chiffre);
  white-space: nowrap;
}

/* Mention « ordre de grandeur » obligatoire sous chaque tableau */
.local-tarifs__note {
  padding: var(--esp-3) var(--esp-4);
  font-size: var(--fs-petit);
  color: var(--c-texte-doux);
  background-color: var(--c-fond-carte);
  border-left: 4px solid var(--c-accent);
  border-radius: var(--radius-petit);
}

/* Étapes du chantier : réutilise .etapes de style.css ; variante compacte */
.local-tarifs .etapes li {
  padding-top: var(--esp-3);
  padding-bottom: var(--esp-3);
}

/* Délais sous forme de frise horizontale (facultatif) */
.local-delais {
  display: grid;
  gap: var(--esp-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
}

.local-delais li {
  position: relative;
  margin: 0;
  padding: var(--esp-4);
  background-color: var(--c-fond-carte);
  border-radius: var(--radius);
  box-shadow: var(--ombre-douce);
}

.local-delais__duree {
  display: block;
  font-size: var(--fs-h3);
  font-weight: 800;
  color: var(--c-chiffre);
  line-height: 1.1;
}

.local-delais__libelle {
  font-size: var(--fs-petit);
  font-weight: 700;
  color: var(--c-texte-fort);
}


/* ==========================================================================
   9. FAQ EN ACCORDÉON (composant .faq de style.css) : deux colonnes dès 1024 px
   ========================================================================== */
.local-faq__grille {
  display: grid;
  gap: var(--esp-6);
  align-items: start;
}

.local-faq__intro p {
  font-size: var(--fs-base);
}

.local-faq__intro .btn {
  margin-top: var(--esp-4);
}


/* ==========================================================================
   10. THÈMES VOISINS ET MAILLAGE
   (ville → 2-3 thèmes voisins de la même ville ; département → hub + 3 autres
    départements ; hub → thèmes proches)
   ========================================================================== */
.local-voisins__grille {
  display: grid;
  gap: var(--esp-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}

.local-voisin {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--esp-4);
  padding: var(--esp-4) var(--esp-5);
  background-color: var(--c-fond-carte);
  border-radius: var(--radius);
  box-shadow: var(--ombre-douce);
  transition: transform var(--duree) var(--courbe), box-shadow var(--duree) var(--courbe);
}



.local-voisin__icone {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-petit);
  background-color: var(--c-fond-pastille);
  color: var(--c-icone);
}

.local-voisin__icone svg {
  width: 22px;
  height: 22px;
}

.local-voisin__corps {
  min-width: 0;
}

.local-voisin h3 {
  font-size: var(--fs-base);
  margin: 0 0 2px;
}

.local-voisin h3 a {
  text-decoration: none;
}

.local-voisin h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}

.local-voisin p {
  font-size: var(--fs-petit);
  margin: 0;
}

.local-voisin__fleche {
  flex: 0 0 auto;
  margin-left: auto;
  color: var(--c-icone);
  font-weight: 800;
  transition: transform var(--duree) var(--courbe);
}



/* Maillage vertical : remonter au département / au hub (liens en pastilles) */
.local-maillage {
  margin-top: var(--esp-5);
}

.local-maillage h3 {
  font-size: var(--fs-petit);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--c-titre-3);
  margin-bottom: var(--esp-3);
}


/* ==========================================================================
   11. APPEL À L'ACTION FINAL (composant .cta de style.css)
   ========================================================================== */
.local-cta {
  padding-block: 0 var(--section);
}

.local-cta .cta {
  position: relative;
  overflow: hidden;
}

/* Filigrane décoratif discret : disque clair translucide sur le fond vert */
.local-cta .cta::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -90px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background-color: rgba(var(--c-clair-rgb), 0.05);
  pointer-events: none;
}

.local-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--esp-3);
  align-items: center;
  position: relative;
  z-index: 1;
}

.local-cta__tel {
  display: inline-flex;
  align-items: center;
  gap: var(--esp-2);
  font-weight: 800;
  color: var(--c-titre-sur-sombre);
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .local-cta__tel:hover {
    color: var(--c-titre-sur-sombre);
  }
}


/* ==========================================================================
   12. BLOCS SECONDAIRES
   ========================================================================== */

/* Bloc de confiance local : réutilise .confiance ; variante en ligne compacte */
.local-confiance .confiance {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}

/* Sommaire de page (hub long) : ancres vers les sections */
.local-sommaire {
  display: flex;
  gap: var(--esp-2);
  overflow-x: auto;
  scrollbar-width: none;
  list-style: none;
  padding: 0 0 var(--esp-1);
  margin: 0 0 var(--esp-5);
}

.local-sommaire::-webkit-scrollbar {
  display: none;
}

.local-sommaire li {
  flex: 0 0 auto;
  margin: 0;
}

.local-sommaire a {
  display: inline-block;
  padding: var(--esp-2) var(--esp-4);
  font-size: var(--fs-petit);
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  background-color: var(--c-fond-carte);
  border: 1.5px solid var(--c-bordure);
  border-radius: var(--radius-rond);
  transition: border-color var(--duree) var(--courbe), color var(--duree) var(--courbe);
}

@media (hover: hover) and (pointer: fine) {
  .local-sommaire a:hover {
    border-color: var(--c-bordure-active);
    color: var(--c-lien);
  }
}

/* Définition courte (GEO) : « Qu'est-ce que … ? » */
.local-definition {
  padding: var(--esp-4) var(--esp-5);
  margin-bottom: var(--esp-5);
  background-color: var(--c-fond-carte);
  border-radius: var(--radius);
  box-shadow: var(--ombre-douce);
}

.local-definition dt {
  font-weight: 800;
  color: var(--c-titre-3);
  margin-bottom: var(--esp-1);
}

.local-definition dd {
  margin: 0;
  font-size: var(--fs-base);
}

/* Encadré « bon à savoir » */
.local-encart {
  padding: var(--esp-4) var(--esp-5);
  margin: var(--esp-5) 0;
  background-color: var(--c-fond-pastille);
  border-left: 4px solid var(--c-accent);
  border-radius: var(--radius-petit);
  font-size: var(--fs-petit);
}

.local-encart strong {
  display: block;
  margin-bottom: var(--esp-1);
}

/* Colonne de texte long (hub / département) avec image latérale */
.local-texte {
  display: grid;
  gap: var(--esp-5);
  align-items: start;
}

.local-texte__corps {
  min-width: 0;
}

.local-texte__corps h3 {
  margin-top: var(--esp-5);
}

.local-texte__aside {
  display: grid;
  gap: var(--esp-4);
}

.local-texte__aside img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  box-shadow: var(--ombre-douce);
}

/* Sécurité anti-débordement */
.local-hero,
.local-section,
.local-tableau,
.local-zones__liste,
.local-texte {
  max-width: 100%;
  min-width: 0;
}


/* ==========================================================================
   13. MEDIA QUERIES (mobile first : 480 / 768 / 1024 / 1280 px)
   ========================================================================== */

/* --- ≥ 480 px --- */
@media (min-width: 30em) {
  .local-breadcrumb a,
  .local-breadcrumb [aria-current="page"] {
    max-width: 32vw;
  }

  .local-chantier__galerie {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* --- ≥ 768 px --- */
@media (min-width: 48em) {
  .local-breadcrumb a,
  .local-breadcrumb [aria-current="page"] {
    max-width: none;
    overflow: visible;
  }

  .local-hero__grille {
    grid-template-columns: 1.1fr 1fr;
  }

  .local-hero__image {
    grid-column: 1 / -1;
  }

  .local-zones__grille {
    grid-template-columns: 1.4fr 1fr;
  }

  .local-chantier__grille {
    grid-template-columns: 1fr 1.3fr;
  }

  .local-texte {
    grid-template-columns: 1.6fr 1fr;
  }

  /* Tableau : retour à une vraie grille de colonnes */
  .local-tableau {
    border-spacing: 0;
    overflow: hidden;
    background-color: var(--c-fond-carte);
    border-radius: var(--radius);
    box-shadow: var(--ombre-douce);
  }

  .local-tableau caption {
    padding: 0 0 var(--esp-3);
  }

  .local-tableau thead {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    clip-path: none;
  }

  .local-tableau thead th {
    text-align: left;
    padding: var(--esp-3) var(--esp-4);
    font-size: var(--fs-petit);
    font-weight: 800;
    color: var(--c-titre-sur-sombre);
    background-color: var(--c-fond-sombre);
  }

  .local-tableau tbody tr {
    display: table-row;
    padding: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .local-tableau tbody tr:nth-child(even) td {
    background-color: rgba(var(--c-fond-rgb), 0.6);
  }

  .local-tableau tbody td {
    display: table-cell;
    padding: var(--esp-3) var(--esp-4);
    border-bottom: 1px solid var(--c-bordure);
    vertical-align: top;
    font-size: var(--fs-petit);
  }

  .local-tableau tbody tr:last-child td {
    border-bottom: 0;
  }

  .local-tableau tbody td::before {
    display: none;
  }

  .local-tableau tbody td:first-child {
    font-size: var(--fs-petit);
    padding-bottom: var(--esp-3);
  }
}

/* --- ≥ 1024 px --- */
@media (min-width: 64em) {
  /* Premier écran : titre + téléphone à gauche, formulaire collant à droite,
     image terminée en colonne 1 sous le texte */
  .local-hero__grille {
    grid-template-columns: minmax(0, 1.15fr) minmax(380px, 440px);
    column-gap: var(--esp-7);
    row-gap: var(--esp-6);
  }

  .local-hero__texte {
    grid-column: 1;
    grid-row: 1;
    padding-top: var(--esp-4);
  }

  .local-hero__formulaire {
    grid-column: 2;
    grid-row: 1 / span 2;
  /* (plus de position sticky : rien ne suit le défilement) */
  }

  .local-hero__image {
    grid-column: 1;
    grid-row: 2;
  }

  .local-hero__image img {
    aspect-ratio: 16 / 9;
  }

  .local-zones__departements {
    grid-template-columns: repeat(4, 1fr);
  }

  .local-prestations__grille {
    grid-template-columns: repeat(3, 1fr);
  }

  .local-tarifs__grille {
    grid-template-columns: 1.5fr 1fr;
    gap: var(--esp-7);
  }

  .local-faq__grille {
    grid-template-columns: 1fr 1.7fr;
  }

  .local-faq__intro {
  /* (plus de position sticky : rien ne suit le défilement) */
  }

  .local-voisins__grille {
    grid-template-columns: repeat(3, 1fr);
  }

  .local-texte {
    grid-template-columns: 1.8fr 1fr;
    gap: var(--esp-7);
  }

  .local-texte__aside {
  /* (plus de position sticky : rien ne suit le défilement) */
  }
}

/* --- ≥ 1280 px --- */
@media (min-width: 80em) {
  .local-hero__grille {
    grid-template-columns: minmax(0, 1.25fr) 460px;
  }

  .local-prestations__grille {
    grid-template-columns: repeat(4, 1fr);
  }

  .page--hub .local-prestations__grille {
    grid-template-columns: repeat(4, 1fr);
  }

  .page--ville .local-prestations__grille {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   14. ALIGNEMENT SUR INDEX.HTML — gabarit hub (30/10/2026)
   --------------------------------------------------------------------------
   Reprend sur les pages secteur les règles validées de l'accueil :
   premier écran centré sous 1024 px puis texte à gauche face au formulaire,
   image « après » étirée jusqu'au pied du formulaire, en-têtes de section
   centrés, cartes en flux flex centré (rangées incomplètes centrées),
   transitions incluant `opacity` sur tout élément qui porte .reveal,
   survols limités au pointeur fin.
   Carte « chantier » : jamais de vide — dès 768 px la grande image OU la
   paire avant / après s'agrandit pour remplir toute la hauteur de la carte.
   ========================================================================== */

/* --- Premier écran : centré sur mobile et tablette --- */
.local-hero__texte {
  text-align: center;
}

.local-hero__texte h1,
.local-hero__accroche {
  margin-inline: auto;
}

.local-hero__preuves {
  justify-content: center;
}

.local-hero__image figcaption {
  left: 50%;
  transform: translateX(-50%);
}

.local-hero__image img {
  border-radius: var(--radius);
}

/* --- En-tête de section centré (surtitre + H2 en question + intro) --- */
.local-section__entete--centre {
  margin-inline: auto;
  text-align: center;
}

.local-section__entete--centre p {
  margin-inline: auto;
}

/* --- Chiffres clés / définition : centrés et limités à la largeur de l'intro --- */
.local-intro__bloc,
.local-definition,
.local-cles {
  max-width: 820px;
  margin-inline: auto;
}

.local-contexte p {
  max-width: none;
}

.local-cles li {
  text-align: center;
}

/* --- Cartes en flux flex centré : rangées incomplètes centrées --- */
.local-zones__departements,
.local-prestations__grille {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  --colonnes: 1;
  --ecart: var(--esp-4);
}

.local-zones__departements > li,
.local-prestations__grille > .local-prestation {
  flex: 0 1 calc((100% - (var(--colonnes) - 1) * var(--ecart)) / var(--colonnes));
  max-width: 480px;
  min-width: 0;
}

.local-zones__departement {
  text-align: center;
  align-items: center;
}

.local-prestation {
  height: auto;
}

/* --- Chantier mis en avant : grande image « après » puis galerie --- */
.local-chantier__principale {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: calc(var(--radius) - 6px);
}

.local-chantier__galerie img {
  border-radius: calc(var(--radius) - 6px);
}

/* --- Étapes : titre h4 dans .etapes (h3 réservé au titre de la colonne) --- */
.local-tarifs .etapes h4 {
  margin-bottom: var(--esp-1);
}

.local-tarifs .etapes p {
  margin: 0;
  font-size: var(--fs-petit);
}

/* --- Encart « sujets voisins » : centré sous la grille des prestations --- */
.local-prestations .local-encart {
  max-width: 820px;
  margin: var(--esp-6) auto 0;
  text-align: center;
}

.local-prestations .local-encart strong {
  display: inline;
  margin: 0 0.25em 0 0;
}


/* --- CTA final centré par rapport à son fond vert --- */
.local-cta .cta--centre {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

.local-cta .cta--centre p {
  max-width: 62ch;
  margin-inline: auto;
}

.local-cta .cta--centre .local-cta__actions {
  justify-content: center;
}

/* --- Premier écran : mêmes marges verticales que .home-hero (index.html) --- */
.local-hero {
  padding-block: clamp(1.5rem, 4vw, 3.5rem) var(--section);
}

.local-niveau {
  margin-top: 0;
}

/* --- Note « ordre de grandeur » : même largeur que le tableau au-dessus
   (la limite max-width des <p> l'empêchait d'aller jusqu'au bord droit), centrée --- */
.local-tarifs__note {
  max-width: none;
  width: 100%;
  margin-inline: auto;
  text-align: center;
  border-left: 0;
  border-top: 4px solid var(--c-accent);
  border-radius: var(--radius-petit);
}

/* --- CTA final abaissé : même respiration au-dessus qu'en dessous --- */
.local-cta {
  padding-block: var(--section);
}

/* --- Légende du tableau : retrait latéral (le coin arrondi + overflow hidden
   du tableau rognait la première lettre dès 768 px) --- */
.local-tableau caption {
  padding-inline: var(--esp-4);
}

/* --- Mouvement : transform/opacity seulement, survol au pointeur fin ---
   Tout élément porteur de .reveal (ou enfant d'un .reveal--stagger) doit
   inclure `opacity` dans sa transition, sinon le raccourci écrase le fondu. */
.local-zones__departement,
.local-prestation,
.local-cles li,
.local-delais li,
.local-zones__puce {
  transition: transform var(--duree) var(--courbe),
              opacity calc(var(--duree-reveal) * 0.8) var(--courbe-douce);
  box-shadow: var(--ombre-douce);
}




@media (min-width: 48em) {
  .local-zones__departements,
  .local-prestations__grille {
    --colonnes: 2;
  }

  /* Chantier : la carte visuelle prend la hauteur du texte, c'est la grande
     image qui comble (jamais de zone vide dans une carte) */
  .local-chantier__grille {
    align-items: stretch;
  }

  .local-chantier__visuel {
    display: flex;
    flex-direction: column;
  }

  .local-chantier__principale {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    aspect-ratio: auto;
  }

  /* Variante avec paire avant / après (hub 05 et suivants) : la paire se
     comporte comme la grande image — elle prend toute la hauteur restante
     de la carte et chacune des deux photos s'agrandit (object-fit: cover)
     pour la combler ; légende et galerie restent en bas, sans zone vide. */
  .local-chantier__visuel > .avant-apres--paire {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .local-chantier__visuel > .avant-apres--paire .avant-apres__item {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    margin: 0;
  }

  .local-chantier__visuel > .avant-apres--paire .avant-apres__item img {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    object-fit: cover;
  }
}

@media (min-width: 64em) {
  /* Premier écran : texte à gauche face au formulaire, le haut du formulaire
     s'aligne sur l'étiquette de niveau */
  .local-hero__texte {
    text-align: left;
    /* comme index.html : le haut de l'étiquette « Région » (surtitre) est
       exactement au niveau du bord haut de la carte du formulaire */
    padding-top: 0;
  }

  .local-hero__texte h1,
  .local-hero__accroche {
    margin-inline: 0;
  }

  .local-hero__preuves {
    justify-content: flex-start;
  }

  .local-hero__image figcaption {
    left: var(--esp-3);
    transform: none;
  }

  /* L'image occupe toute la hauteur restante sous le texte : son bas
     coïncide avec celui du formulaire (même principe que l'accueil) */
  .local-hero__grille {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .local-hero__image {
    align-self: stretch;
    min-height: 240px;
  }

  .local-hero__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
  }

  .local-zones__departements {
    --colonnes: 4;
  }

  .local-prestations__grille {
    --colonnes: 3;
  }

  .page--hub .local-prestations__grille {
    --colonnes: 3;
  }
}

/* --- Impression --- */
@media print {
  .local-hero__formulaire,
  .local-sommaire,
  .local-cta {
    display: none;
  }
  .local-tableau tbody tr,
  .local-prestation,
  .local-voisin {
    box-shadow: none;
  }
}


/* ==========================================================================
   15. CORRECTIONS TÉLÉPHONE (08/11/2026)
   --------------------------------------------------------------------------
   « Téléphone » = moins de 768 px. Au-delà, la mise en page est identique à
   la version précédente, sauf le fil d'Ariane et les bulles des secteurs,
   centrés partout.

   Premier écran : le bloc texte est scindé dans le HTML (script
   corriger_affichage_mobile.py) en deux blocs qui gardent la classe
   .local-hero__texte :
     .local-hero__titre  = étiquette de niveau + H1
     .local-hero__suite  = accroche + téléphone + atouts
   Ordre du DOM : fil d'Ariane → titre → formulaire → suite → image, donc
   l'ordre lu au clavier et par les lecteurs d'écran est l'ordre affiché
   sur téléphone. Dès 768 px, grid-template-areas replace le titre et la
   suite l'un sous l'autre à gauche du formulaire, comme avant :
     - l'écart entre les rangées passe à 0 (le titre et la suite se suivent
       sans espace ajouté : la marge basse du H1 fait la séparation, comme
       quand ils étaient dans le même bloc) ;
     - l'image reprend son écart par une marge haute égale à l'ancien gap ;
     - la rangée de la suite est flexible : si le formulaire est plus haut
       que titre + suite, c'est elle qui absorbe l'excédent (la suite reste
       collée au titre, en haut de sa case).
   ========================================================================== */

/* --- Premier écran : zones de grille (toutes largeurs) --- */
.local-hero__grille {
  grid-template-areas:
    "titre"
    "formulaire"
    "suite"
    "image";
}

.local-hero__titre      { grid-area: titre; }
.local-hero__formulaire { grid-area: formulaire; }
.local-hero__suite      { grid-area: suite; }
.local-hero__image      { grid-area: image; }

/* --- Fil d'Ariane centré (téléphone ET ordinateur) : les lignes sont
   centrées, chaque séparateur › reste attaché à son élément (il est le
   ::before du <li>, dans le même bloc flex) --- */
.local-breadcrumb .container {
  text-align: center;
}

.local-breadcrumb ol {
  justify-content: center;
}

/* --- Bulles des secteurs couverts : rangées centrées, la dernière ligne
   incomplète comprise (téléphone ET ordinateur) --- */
.local-zones__liste {
  justify-content: center;
}

/* --- Phrase de lien en fin d'encart : le point final ne passe jamais seul
   à la ligne. Cause : le lien était en inline-flex, donc une boîte
   insécable vue du texte, suivie du point ; le navigateur pouvait couper
   entre la boîte et le point. Le lien redevient un texte en ligne, la
   flèche reste son ::after en ligne (pas de boîte atomique) : le point
   colle à la flèche, et le lien se coupe entre ses mots comme du texte. --- */
.local-contexte a {
  display: inline;
}

.local-contexte a::after {
  display: inline;
  margin-left: var(--esp-2);
}

/* (une boîte en ligne ne se décale pas : plus de glissement de la flèche au survol) */


/* --- Téléphone uniquement --- */
@media (max-width: 47.99875em) {
  /* Titre puis formulaire : la marge du H1 s'ajouterait à l'écart de la grille */
  .local-hero__titre h1 {
    margin-bottom: 0;
  }


  /* Chantier terminé : surtitre, titre et paragraphe centrés ;
     la fiche garde ses deux colonnes, le bloc entier centré */
  .local-chantier__texte {
    text-align: center;
  }

  .local-chantier__texte p,
  .local-chantier__texte h2 {
    margin-inline: auto;
  }

  .local-chantier__fiche {
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
    text-align: left;
  }

  /* FAQ : surtitre, titre, texte et bouton du bloc d'intro centrés */
  .local-faq__intro {
    text-align: center;
  }

  .local-faq__intro p,
  .local-faq__intro h2 {
    margin-inline: auto;
  }
}

/* --- Dès 768 px : mise en page d'origine (titre + suite | formulaire ;
   image sur toute la largeur dessous) --- */
@media (min-width: 48em) {
  .local-hero__grille {
    grid-template-areas:
      "titre formulaire"
      "suite formulaire"
      "image image";
    grid-template-rows: auto 1fr auto;
    row-gap: 0;
  }

  .local-hero__suite {
    align-self: start;
  }

  .local-hero__image {
    margin-top: var(--esp-6);
  }
}

/* --- Dès 1024 px : titre + suite + image à gauche, formulaire à droite
   sur toute la hauteur ; l'image comble jusqu'au pied du formulaire --- */
@media (min-width: 64em) {
  .local-hero__grille {
    grid-template-areas:
      "titre formulaire"
      "suite formulaire"
      "image formulaire";
    grid-template-rows: auto auto minmax(0, 1fr);
    row-gap: 0;
  }
}


/* ==========================================================================
   16. LÉGENDES EN BULLE ET GALERIE DU BLOC « CHANTIER TERMINÉ » (08/11/2026)
   --------------------------------------------------------------------------
   HTML posé par corriger_legendes_images.py :
     figure.local-chantier__figure > img.local-chantier__principale
                                    + figcaption.legende-bulle
     figure.local-chantier__figure.local-chantier__figure--paire
                                    > div.avant-apres--paire + figcaption.legende-bulle
     div.local-chantier__galerie > figure.local-chantier__vignette
                                    > img + figcaption.legende-bulle
   La bulle (.legende-bulle, style.css section 17) se pose centrée en bas.
   Dans une paire (corriger_bulles.py), chaque photo a UNE bulle (« Avant… »
   / « Après… ») ; la légende de la paire est un figcaption.visually-hidden.
   Téléphone : image principale en 16:10 sur toute la largeur, puis
   mosaïque 2 × 2 des photos (tout le bloc dans un écran, sans défilement
   horizontal). Ordinateur : grille d'origine, avec les bulles.
   ========================================================================== */
.local-chantier__figure,
.local-chantier__vignette {
  position: relative;
  margin: 0;
  min-width: 0;
}

.local-chantier__figure > .local-chantier__principale {
  display: block;
}

/* (08/11/2026) Positions et styles de toutes les bulles : style.css,
   section 17 (bulles centrées, une seule par image). */

/* Galerie : chaque photo dans son cadre arrondi */
.local-chantier__vignette img {
  display: block;
}

/* Dès 1280 px, les 4 vignettes en ligne ne mesurent que ~140 px : la bulle
   n'y affiche que le sujet (« cuisine grise et blanche »), l'état « Après
   travaux · » reste lu par les lecteurs d'écran (masquage visuel seul) ;
   bulle plus compacte, pour couvrir au plus un quart de la vignette.
   Même chose sur téléphone (mosaïque de photos de ~160 px de large).
   (08/11/2026 : désormais à toutes les largeurs, voir style.css section 17.) */
@media (max-width: 47.99875em), (min-width: 80em) {
  .local-chantier__vignette .legende-bulle__etat {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
}

/* --- Téléphone (correction du 08/11/2026) : tout le bloc tient dans un
   écran, sans défilement horizontal. Image principale pleine largeur en
   16:10, puis mosaïque 2 × 2 des photos de la galerie (4:3, écart 8 px).
   À 390 px : 209 + 8 + 2 × 122 + 8 ≈ 470 px pour les images. 3 photos : la
   dernière prend la rangée entière (même hauteur) ; 1 photo : pleine
   largeur ; jamais de case vide. --- */
@media (max-width: 47.99875em) {
  .local-chantier__visuel,
  .local-chantier__galerie {
    min-width: 0;
  }

  .local-chantier__figure > .local-chantier__principale {
    width: 100%;
    aspect-ratio: 16 / 10;
  }

  .local-chantier__galerie {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--esp-2);
    margin-top: var(--esp-2);
  }

  .local-chantier__galerie img {
    width: 100%;
    aspect-ratio: 4 / 3;
  }

  .local-chantier__vignette:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .local-chantier__vignette:last-child:nth-child(odd) img {
    aspect-ratio: 8 / 3;
  }

  /* (bulles : style.css, section 17) */
}

/* --- 768–1279 px : la carte est étroite, 4 vignettes en ligne ne mesureraient
   que 85 à 120 px (bulle tronquée, 40 à 60 % de l'image couverte) : la
   grille passe en 2 × 2 sur cette plage. Dès 1280 px, grille d'origine
   (4 en ligne, ~140 px), bulle réduite au sujet de la photo. --- */
@media (min-width: 48em) and (max-width: 79.99875em) {
  .local-chantier__galerie {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .local-chantier__galerie img {
    aspect-ratio: 4 / 3;
  }

  /* nombre impair de photos (3) : la dernière prend la rangée entière, à la
     même hauteur que les autres (pas de case vide) */
  .local-chantier__vignette:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .local-chantier__vignette:last-child:nth-child(odd) img {
    aspect-ratio: 8 / 3;
  }
}

/* --- Dès 768 px : la figure (image ou paire) comble la carte comme avant --- */
@media (min-width: 48em) {
  .local-chantier__visuel > .local-chantier__figure {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .local-chantier__figure > .local-chantier__principale {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    aspect-ratio: auto;
  }

  .local-chantier__figure--paire > .avant-apres--paire {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .local-chantier__figure--paire .avant-apres__item {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    margin: 0;
  }

  .local-chantier__figure--paire .avant-apres__item img {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    object-fit: cover;
  }
}


/* ==========================================================================
   17. CENTRAGES, TABLEAU DES PRIX, PASTILLES (08/11/2026, soir)
   ========================================================================== */

/* Phrase de lien vers le niveau supérieur (« Voir notre entreprise de
   rénovation dans toute la région », « … dans tout le département … ») :
   centrée sur ordinateur ET téléphone. Deux emplacements selon le gabarit :
   en fin d'encart (461 pages) ou juste sous la liste des villes (14 pages
   département, dont entreprise-renovation-alpes-maritimes.html). */
.local-contexte > p:last-child,
.local-zones__departements + p.mt-2 {
  margin-inline: auto;
  text-align: center;
}

/* Listes de pastilles (sommaire de page) : à la ligne et centrées, jamais
   de défilement horizontal qui couperait une pastille */
.local-sommaire {
  flex-wrap: wrap;
  justify-content: center;
  overflow: visible;
}

/* Tableau des prix sur téléphone : chaque ligne devient une carte bien
   séparée (16 px entre les cartes, bordure + fond), libellé et valeur
   espacés. Ordinateur : tableau inchangé. */
@media (max-width: 47.99875em) {
  .local-tableau,
  .local-tableau tbody {
    display: block;
  }

  .local-tableau caption {
    display: block;
  }

  .local-tableau tbody tr {
    margin: 0 0 var(--esp-4);
    border: 1px solid var(--c-bordure);
    background-color: var(--c-fond-carte);
  }

  .local-tableau tbody tr:last-child {
    margin-bottom: 0;
  }

  .local-tableau tbody td {
    gap: var(--esp-4);
    padding: var(--esp-3) 0;
  }

  .local-tableau tbody td::before {
    padding-right: var(--esp-2);
  }

  .local-tableau tbody td:first-child {
    padding-top: 0;
  }

  /* valeur longue (« 2 000 à 8 000 € pour un logement ») : elle passe à la
     ligne au lieu de sortir de la carte */
  .local-tableau tbody td {
    text-align: right;
  }

  .local-tableau tbody td::before,
  .local-tableau tbody td:first-child {
    text-align: left;
  }

  .local-tableau__prix {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}


/* ==========================================================================
   18. PREMIER ÉCRAN EN DEUX COLONNES, FIL D'ARIANE, BLOC PRIX / ÉTAPES
       (09/11/2026)
   --------------------------------------------------------------------------
   « Formulaire à côté » = dès 48em (768 px à 100 %, ou un PC zoomé dont la
   largeur CSS dépasse 48em) ; « formulaire dessous » = téléphone.

   a) Premier écran, formulaire à côté : la colonne de gauche empile titre,
      suite (accroche, téléphone, atouts) PUIS l'image ; le formulaire occupe
      toute la hauteur à droite. La 3e rangée (image) est flexible : l'image
      se réduit pour que son bas tombe exactement sur le bas du formulaire.
      Hauteur minimale lisible : 200 px. Si le texte est trop long pour la
      laisser, la grille grandit et la carte du formulaire s'étire jusqu'au
      bas de l'image (contenu du formulaire en haut). Texte aligné à gauche.
   b) Fil d'Ariane : centré sur téléphone, aligné à gauche (bord gauche du
      texte du premier écran) dès que le formulaire est à côté.
   c) Bloc prix / étapes, deux colonnes (dès 64em) : grille de 4 rangées
      partagée par les deux colonnes (subgrid) :
        1. titres (h3 du tableau, h3 des étapes) ;
        2. en-tête du tableau / 1re étape (même ligne de départ) ;
        3. note « ordres de grandeur » ;
        4. rangée flexible (second tableau éventuel ; fin de la liste des
           étapes, qui couvre les rangées 2 à 4).
      Le titre du tableau est un <h3 class="local-tarifs__titre"> relié au
      tableau par aria-labelledby (corriger_tableaux_prix.py) ; en une
      colonne il garde l'aspect de l'ancienne légende.
   ========================================================================== */
:root {
  --hero-image-min: 200px;
}

@media (min-width: 48em) {
  /* a) Premier écran */
  .local-hero__grille {
    grid-template-areas:
      "titre formulaire"
      "suite formulaire"
      "image formulaire";
    grid-template-rows: auto auto 1fr;
    row-gap: 0;
    align-items: start;
  }

  .local-hero__titre,
  .local-hero__suite {
    text-align: left;
  }

  .local-hero__texte h1,
  .local-hero__accroche {
    margin-inline: 0;
  }

  .local-hero__preuves {
    justify-content: flex-start;
  }

  .local-hero__formulaire {
    align-self: stretch;
    display: flex;
    flex-direction: column;
  }

  .local-hero__formulaire > .form-devis {
    flex: 1 1 auto;
  }

  .local-hero__image {
    align-self: stretch;
    min-height: var(--hero-image-min);
    margin-top: var(--esp-6);
  }

  .local-hero__image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
  }

  /* b) Fil d'Ariane aligné à gauche */
  .local-breadcrumb .container {
    text-align: left;
  }

  .local-breadcrumb ol {
    justify-content: flex-start;
  }
}

/* c) Titre du tableau en une colonne : aspect de l'ancienne légende */
@media (max-width: 63.99875em) {
  .local-tarifs__titre {
    margin: 0;
    padding: 0 var(--esp-4) var(--esp-2);
    font-size: var(--fs-base);
    font-weight: 800;
    line-height: var(--interligne);
    letter-spacing: normal;
    text-wrap: wrap;
  }
}

@media (min-width: 48em) and (max-width: 63.99875em) {
  .local-tarifs__titre {
    padding-bottom: var(--esp-3);
  }
}

/* c) Deux colonnes : titres et premiers blocs sur les mêmes lignes */
@media (min-width: 64em) {
  .local-tarifs__grille {
    grid-template-rows: auto auto auto 1fr;
    row-gap: 0;
  }

  .local-tarifs__grille > * {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span 4;
    row-gap: 0;
    align-content: start;
    min-width: 0;
  }

  .local-tarifs__grille .etapes {
    grid-row: 2 / span 3;
    align-self: start;
    margin-top: 0;
  }
}


/* ==========================================================================
   TITRE DE L'ENCART RÉGIONAL / LOCAL CENTRÉ (09/11/2026)
   --------------------------------------------------------------------------
   « Installations électriques en Provence-Alpes-Côte d'Azur : les points
   propres à la région », et ses équivalents sur toutes les pages hub,
   département et ville (bloc vert .local-contexte) : titre centré, lignes
   équilibrées, sur ordinateur comme sur téléphone. La liste à puces qui
   suit reste alignée à gauche.
   ========================================================================== */
.local-contexte > h3 {
  margin-inline: auto;
  text-align: center;
  text-wrap: balance;
}


/* ==========================================================================
   GALERIE DU BLOC « CHANTIER TERMINÉ » : PLUS DE CASES VIDES (13/11/2026)
   --------------------------------------------------------------------------
   Dès 1280 px la galerie était une grille fixe de 4 colonnes : avec 3, 2 ou
   1 photo (une cinquantaine de pages département / ville), les colonnes
   restantes laissaient un blanc à droite. Désormais les photos présentes se
   partagent toute la largeur, quel que soit leur nombre ; leur format
   s'adapte pour garder la même hauteur de rangée qu'avec 4 photos (~145 px).
   4 photos : rendu identique à avant. En dessous de 1280 px (mosaïque 2 × 2,
   dernière photo sur toute la rangée) : inchangé, il n'y avait pas de vide.
   ========================================================================== */
@media (min-width: 80em) {
  .local-chantier__galerie {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
  }

  /* 3 photos */
  .local-chantier__vignette:first-child:nth-last-child(3) img,
  .local-chantier__vignette:first-child:nth-last-child(3) ~ .local-chantier__vignette img {
    aspect-ratio: 4 / 3;
  }

  /* 2 photos */
  .local-chantier__vignette:first-child:nth-last-child(2) img,
  .local-chantier__vignette:first-child:nth-last-child(2) ~ .local-chantier__vignette img {
    aspect-ratio: 2 / 1;
  }

  /* 1 photo */
  .local-chantier__vignette:only-child img {
    aspect-ratio: 3 / 1;
  }
}


/* ==========================================================================
   PHOTO DU LIEU SUR LES CARTES VILLE / DÉPARTEMENT (13/11/2026)
   --------------------------------------------------------------------------
   Bloc « Zones d'intervention » : chaque carte (li.local-zones__departement)
   commence par <img class="local-zones__photo" data-no-zoom> — photo de la
   ville (page département) ou du département (hub), dans assets/img/villes/
   et assets/img/departements/. La photo va d'un bord à l'autre de la carte
   (elle annule la marge intérieure), coins hauts arrondis comme la carte.
   Toute la carte reste un seul lien (h3 a::after) : la photo n'ouvre pas la
   visionneuse. Une carte sans photo garde son rendu d'origine, texte centré
   en hauteur à côté des cartes illustrées.
   ========================================================================== */
.local-zones__photo {
  align-self: stretch;
  width: calc(100% + var(--esp-5) * 2);
  max-width: none;
  height: auto;
  margin: calc(var(--esp-5) * -1) calc(var(--esp-5) * -1) var(--esp-2);
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

.local-zones__departement:not(:has(.local-zones__photo)) {
  justify-content: center;
}

/* Téléphone : une carte par rangée, photo plus basse pour garder des cartes
   courtes */
@media (max-width: 47.99875em) {
  .local-zones__photo {
    aspect-ratio: 16 / 9;
  }
}


/* ==========================================================================
   BLOC PRIX / ÉTAPES : TABLEAU EN PLEINE LARGEUR, ÉTAPES ILLUSTRÉES DESSOUS
   (13/11/2026)
   --------------------------------------------------------------------------
   Les étapes portent désormais une photo (ol.etapes--illustrees, style.css) :
   elles ne tiennent plus dans une colonne à côté du tableau. Sur ordinateur
   aussi, le tableau des prix prend toute la largeur, puis les étapes
   s'alignent en une rangée de cartes sur toute la largeur. Remplace la
   grille à deux colonnes (subgrid) de la section 15 c).
   ========================================================================== */
@media (min-width: 64em) {
  .local-tarifs__grille {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    row-gap: var(--esp-7);
  }

  .local-tarifs__grille > * {
    display: block;
    grid-row: auto;
  }

  .local-tarifs__grille .etapes {
    grid-row: auto;
  }

  .local-tarifs__titre {
    text-align: center;
  }
}

.local-tarifs__grille > :has(> .etapes--illustrees) > h3 {
  text-align: center;
}

.local-tarifs ol.etapes.etapes--illustrees > li {
  padding: 0;
}


/* ==========================================================================
   BLOC PRIX / ÉTAPES : TITRES À ÉGALE DISTANCE DE CE QUI LES ENTOURE
   (13/11/2026)
   --------------------------------------------------------------------------
   Le titre du tableau (« Prix indicatifs… ») se place exactement à mi-chemin
   entre le texte d'introduction et le tableau ; le titre des étapes (« Le
   déroulement… ») à mi-chemin entre la note du tableau et les cartes
   d'étapes. Même écart au-dessus et au-dessous (--tarifs-ecart), à toutes
   les largeurs ; les deux titres sont centrés.
   ========================================================================== */
.local-tarifs {
  --tarifs-ecart: var(--esp-6);
}

.local-tarifs .local-section__entete {
  margin-bottom: var(--tarifs-ecart);
}

.local-tarifs .local-tarifs__grille {
  row-gap: var(--tarifs-ecart);
}

.local-tarifs .local-tarifs__grille > * > h3 {
  margin: 0 0 var(--tarifs-ecart);
  padding: 0;
  text-align: center;
  text-wrap: balance;
}

.local-tarifs .local-tarifs__grille > * > h3 + .etapes,
.local-tarifs .local-tarifs__grille > * > h3 + .local-tableau {
  margin-top: 0;
}

/* L'interligne du texte d'introduction ajoute ~4 px au-dessus du titre sur
   tablette et ordinateur : on les retire pour un écart identique des deux côtés */
@media (min-width: 48em) {
  .local-tarifs .local-section__entete {
    margin-bottom: calc(var(--tarifs-ecart) - 0.25rem);
  }
}


/* ==========================================================================
   CHIFFRES CLÉS : RANGÉE INCOMPLÈTE CENTRÉE (13/11/2026)
   --------------------------------------------------------------------------
   ul.local-cles (2, 3 ou 4 blocs) : la grille automatique laissait un bloc
   seul à gauche sur la dernière rangée (3 + 1 entre 560 et 767 px, 2 + 1 sur
   petit téléphone). Flux centré à colonnes égales : 2 par rangée sur
   téléphone, tous sur une rangée dès 768 px ; un bloc seul est centré.
   ========================================================================== */
.local-cles {
  --cles-colonnes: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.local-cles > li {
  flex: 0 1 calc((100% - var(--esp-3) * (var(--cles-colonnes) - 1)) / var(--cles-colonnes));
  min-width: 0;
}

@media (min-width: 48em) {
  .local-cles {
    --cles-colonnes: 4;
  }

  .local-cles:has(> li:nth-child(3):last-child) {
    --cles-colonnes: 3;
  }

  .local-cles:has(> li:nth-child(2):last-child) {
    --cles-colonnes: 2;
  }
}


/* ==========================================================================
   FAQ : IMAGE DÉCORATIVE SOUS L'INTRODUCTION (13/11/2026)
   --------------------------------------------------------------------------
   <figure class="local-faq__image"><img alt="" data-no-zoom></figure>, dernier
   enfant de .local-faq__grille : reprise de l'image du premier écran de la
   page. Purement décorative (alt vide, pas de légende, pas de visionneuse).
   Même comportement que la FAQ de l'accueil (pages.css, « FAQ de l'accueil :
   image illustrative ») :
     - téléphone : introduction, questions, puis image pleine largeur (16:10) ;
     - dès 768 px : introduction puis image dans la colonne de gauche,
       questions à droite sur toute la hauteur ; l'image remplit l'espace
       libre et son bas tombe sur celui de la dernière question, que les
       questions soient ouvertes ou fermées (88 px au moins).
   La FAQ passe donc en deux colonnes dès 768 px, comme sur l'accueil
   (au lieu de 1024 px).
   ========================================================================== */
.local-faq__grille {
  grid-template-areas:
    "intro"
    "faq"
    "image";
}

.local-faq__intro         { grid-area: intro; }
.local-faq__grille > .faq { grid-area: faq; min-width: 0; }

.local-faq__image {
  grid-area: image;
  position: relative;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--ombre-douce);
}

.local-faq__image img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 0;
}

@media (min-width: 48em) {
  .local-faq__grille {
    grid-template-columns: 1fr 1.6fr;
    grid-template-areas:
      "intro faq"
      "image faq";
    grid-template-rows: auto 1fr;
    row-gap: 0;
  }

  .local-faq__image {
    align-self: stretch;
    min-height: 88px;
    margin-top: var(--esp-6);
  }

  .local-faq__image img {
    position: absolute;
    inset: 0;
    height: 100%;
    aspect-ratio: auto;
  }
}
