/* =========================================================
   Ravaux Maçonnerie : site d'exemple (entreprise fictive)
   Idée visuelle : l'appareillage d'un mur. Les travaux sont
   posés comme des briques en quinconce, la page est faite de
   bandes de matériaux : terre cuite, sable, béton.
   Mobile d'abord.
   ========================================================= */

/* Polices auto-hébergées : Zilla Slab (titres) et Public Sans (texte, variable) */
@font-face {
  font-family: "Zilla Slab";
  src: url("fonts/zilla-slab-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("fonts/public-sans-var.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  /* Couleurs : 1 fond, 1 texte, 1 accent, plus des neutres */
  --fond: #efe6d8;          /* sable */
  --texte: #2b211c;         /* brun presque noir */
  --terre: #a54a24;         /* terre cuite : bandes, prix (5:1 sur le sable) */
  --terre-fonce: #7f3517;   /* survol */
  --brique: #e4c8b2;        /* briques claires du mur */
  --beton: #d5d2cb;         /* bande béton */
  --gris: #66594f;          /* texte secondaire (5,3:1 sur le sable) */
  --clair: #f7efe4;         /* texte sur terre cuite */

  --slab: "Zilla Slab", Rockwell, Georgia, serif;
  --sans: "Public Sans", "Segoe UI", Arial, sans-serif;

  --gouttiere: 1.25rem;
  --section: 4.5rem;
  --largeur: 74rem;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--pp-bandeau) + 4.5rem); }

body {
  margin: 0;
  background: var(--fond);
  color: var(--texte);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  padding-bottom: 3.75rem; /* place pour le bouton d'appel fixe sur mobile */
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0; font-family: var(--slab); font-weight: 700; line-height: 1.02; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--terre); outline-offset: 3px; }

.visuellement-cache { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bouton {
  display: inline-block;
  padding: 0.75rem 1.2rem;
  background: var(--terre);
  color: var(--clair);
  font-weight: 700;
  text-decoration: none;
}
.bouton:hover { background: var(--terre-fonce); }

/* ---------- En-tête ---------- */
.entete {
  position: sticky;
  top: var(--pp-bandeau);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem var(--gouttiere);
  background: var(--fond);
  border-bottom: 1px solid rgba(43, 33, 28, 0.2);
}
.marque { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; }
/* Trois petites briques en quinconce, dessinées en CSS */
.marque-briques { display: grid; grid-template-columns: repeat(4, 0.55rem); gap: 2px; }
.marque-briques i { height: 0.6rem; background: var(--terre); grid-column: span 2; }
.marque-briques i:nth-child(3) { grid-column: 2 / span 2; }
.marque-nom { font-family: var(--slab); font-weight: 700; font-size: 1.6rem; line-height: 0.9; }
.marque-nom small { display: block; font-family: var(--sans); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--terre); }

/* Menu des 4 pages : sur mobile, une rangée sous le nom, qui défile si besoin */
.entete { flex-wrap: wrap; row-gap: 0.6rem; }
.menu { overflow-x: auto; margin: 0 calc(var(--gouttiere) * -1) -0.8rem; padding: 0 var(--gouttiere); width: calc(100% + 2 * var(--gouttiere)); border-top: 1px solid rgba(43, 33, 28, 0.15); }
.menu ul { list-style: none; display: flex; gap: 1.4rem; margin: 0; padding: 0; }
.menu a { display: block; padding: 0.65rem 0; font-weight: 600; font-size: 0.95rem; text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; }
.menu a:hover { color: var(--terre); }
/* Page en cours : soulignée en terre cuite */
.menu a[aria-current="page"] { border-bottom-color: var(--terre); color: var(--terre); }
@media (max-width: 25rem) { .entete-appel { display: inline-block; font-size: 0.85rem; padding: 0.45rem 0.6rem; } }

.entete-appel {
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.5rem 0.8rem;
  background: var(--terre);
  color: var(--clair);
  text-decoration: none;
  white-space: nowrap;
}
.entete-appel:hover { background: var(--terre-fonce); }
@media (max-width: 25rem) { .entete-appel { display: none; } }

/* ---------- Accroche : bande terre cuite ---------- */
.accroche { background: var(--terre); color: var(--clair); }
.accroche-inner { max-width: var(--largeur); margin: 0 auto; padding: 2.5rem var(--gouttiere) 0; }
.surtitre { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.accroche h1 { margin-top: 0.9rem; font-size: clamp(2.6rem, 11vw, 5.6rem); line-height: 0.95; letter-spacing: -0.02em; }
.accroche-intro { margin-top: 1.25rem; max-width: 32rem; font-size: 1.12rem; }
.accroche-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: 1.75rem; }
.bouton-clair {
  display: inline-block;
  padding: 0.8rem 1.2rem;
  background: var(--clair);
  color: var(--texte);
  font-weight: 700;
  text-decoration: none;
}
.bouton-clair:hover { background: #fff; }
.lien-clair { color: inherit; font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.accroche :focus-visible, .contact :focus-visible { outline-color: var(--clair); }

/* La photo descend sous la bande, comme une brique qui dépasse */
.accroche-photo { margin: 2.5rem 0 -3rem; }
.accroche-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: center 35%; border-radius: 6px; }

/* ---------- Sections ---------- */
.section { max-width: var(--largeur); margin: 0 auto; padding: var(--section) var(--gouttiere) 0; }
.travaux { padding-top: calc(var(--section) + 3rem); }
.section-entete h2, .methode h2, .contact h2 { font-size: clamp(2.1rem, 8vw, 3.6rem); }
.section-entete p { margin-top: 0.75rem; max-width: 34rem; color: var(--gris); }
.note { margin-top: 1rem; font-size: 0.88rem; color: var(--gris); }

/* ---------- Le mur de travaux ---------- */
.mur { list-style: none; display: grid; gap: 6px; margin: 2rem 0 0; padding: 6px; background: #cdbca7; } /* le fond = le joint de mortier */
.brique { padding: 1.2rem 1.1rem 1.1rem; background: var(--brique); }
/* Sur mobile, une brique sur deux est décalée, comme un appareillage */
.brique:nth-of-type(even) { margin-left: 1.5rem; }
.demi { display: none; }
.brique h3 { font-size: 1.45rem; }
.brique p { margin-top: 0.4rem; font-size: 0.98rem; }
.brique .brique-prix { margin-top: 0.75rem; font-weight: 700; color: var(--terre); }

/* ---------- Démarches : bande béton ---------- */
.demarches { margin-top: var(--section); background: var(--beton); }
.demarches-inner { max-width: var(--largeur); margin: 0 auto; padding: 3.5rem var(--gouttiere); }
.demarches .section-entete p { color: #564a42; }
.table-defilante { margin-top: 2rem; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.98rem; }
thead th { text-align: left; font-family: var(--slab); font-size: 1.05rem; padding: 0 0.75rem 0.6rem 0; border-bottom: 3px solid var(--texte); }
tbody th, tbody td { text-align: left; vertical-align: top; padding: 0.8rem 0.75rem 0.8rem 0; border-bottom: 1px solid rgba(43, 33, 28, 0.25); }
tbody th { font-weight: 600; width: 50%; }
tbody td { font-weight: 400; }
.demarches-note { margin-top: 1.25rem; max-width: 40rem; padding-left: 0.9rem; border-left: 4px solid var(--terre); font-size: 0.95rem; }

/* ---------- Chantiers ---------- */
.chantiers-liste { display: grid; gap: 2.25rem; margin-top: 2rem; }
.chantier img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; }
.chantier-fiche { padding: 1rem 0 0; border-bottom: 3px solid var(--texte); }
.chantier h3 { font-size: 1.5rem; }
.chantier dl { margin: 0.6rem 0 0; }
.chantier dl div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-top: 1px solid rgba(43, 33, 28, 0.2); font-size: 0.95rem; }
.chantier dt { color: var(--gris); }
.chantier dd { margin: 0; font-weight: 600; text-align: right; }

/* ---------- Méthode ---------- */
.methode-grille { display: grid; gap: 2rem; }
.methode-photo { margin: 1.75rem 0 0; }
.methode-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; }
.etapes { list-style: none; counter-reset: etape; margin: 0; padding: 0; }
.etapes li { counter-increment: etape; display: grid; grid-template-columns: 3.2rem 1fr; padding: 1.1rem 0; border-top: 1px solid rgba(43, 33, 28, 0.25); }
.etapes li::before { content: counter(etape); grid-row: span 2; font-family: var(--slab); font-weight: 700; font-size: 2.6rem; line-height: 0.9; color: var(--terre); }
.etapes h3 { font-size: 1.35rem; }
.etapes p { margin-top: 0.3rem; color: var(--gris); }

/* ---------- Contact : bande terre cuite ---------- */
.contact { margin-top: var(--section); background: var(--terre); color: var(--clair); }
.contact-inner { max-width: var(--largeur); margin: 0 auto; padding: 3.5rem var(--gouttiere); }
.contact-grille { display: grid; gap: 2.5rem; }
.contact-intro { margin-top: 1rem; max-width: 30rem; }
.contact-label { margin-top: 1.75rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.contact-tel { display: block; margin: 0.2rem 0 0.9rem; font-family: var(--slab); font-weight: 700; font-size: clamp(2.4rem, 11vw, 4.2rem); line-height: 1; text-decoration: none; }
.contact-tel:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.contact-infos { margin: 2rem 0 0; border-top: 3px solid var(--clair); }

/* Faux formulaire : un bloc sable posé sur la bande terre cuite */
.formulaire { display: grid; gap: 1rem; align-content: start; padding: 1.75rem 1.5rem; background: var(--fond); color: var(--texte); border-radius: 6px; }
.formulaire h3 { font-size: 1.8rem; }
.champs-duo { display: grid; gap: 1rem; }
.champ { display: grid; gap: 0.3rem; }
.champ label { font-weight: 700; font-size: 0.92rem; }
.champ label span { font-weight: 400; color: var(--gris); }
.champ input, .champ select, .champ textarea {
  width: 100%;
  padding: 0.7rem 0.75rem;
  font: inherit;
  color: var(--texte);
  background: #fff;
  border: 2px solid #cdbca7;
  border-radius: 4px;
}
.contact .champ input:focus, .contact .champ select:focus, .contact .champ textarea:focus { outline: 3px solid var(--terre); outline-offset: 0; border-color: var(--terre); }
.formulaire-bouton { justify-self: start; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.contact .formulaire :focus-visible { outline-color: var(--terre); }
.formulaire-note { font-size: 0.85rem; color: var(--gris); }
.contact-infos div { padding: 0.6rem 0; border-bottom: 1px solid rgba(247, 239, 228, 0.35); }
.contact-infos dt { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.contact-infos dd { margin: 0.1rem 0 0; }

/* ---------- Pied de page ---------- */
.pied { display: grid; gap: 2.5rem; padding: 3rem var(--gouttiere); background: var(--texte); color: #d8ccbf; font-size: 0.95rem; }
.pied a { color: #fff; }
.pied .marque-nom { display: block; color: var(--clair); font-size: 2rem; margin-bottom: 0.75rem; }
.pied .marque-nom small { color: #e39a76; }
.pied-ravaux p + p { margin-top: 0.5rem; }
.pied :focus-visible { outline-color: var(--clair); }

/* Encadré Pearce'pective Web */
.pied-pp { padding: 1.5rem; background: var(--fond); color: var(--texte); border-left: 8px solid var(--terre); }
.pied-pp a { color: var(--texte); font-weight: 700; }
.pied-pp .bouton { color: var(--clair); }
.pied-pp-sur { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--terre); }
.pied-pp h2 { margin-top: 0.4rem; font-size: 1.55rem; }
.pied-pp > p:not(.pied-pp-sur) { margin-top: 0.6rem; }
.pied-pp ul { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin: 1.25rem 0 0; padding: 0; }
.pied-pp :focus-visible { outline-color: var(--terre); }

/* ---------- Bouton d'appel fixe (mobile) ---------- */
.appel-mobile {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 0.95rem;
  background: var(--terre);
  color: var(--clair);
  text-align: center;
  text-decoration: none;
  font-family: var(--slab);
  font-weight: 700;
  font-size: 1.15rem;
}
.appel-mobile:focus-visible { outline: 3px solid var(--clair); outline-offset: -6px; }

/* =========================================================
   Tablette : 768 px et plus
   ========================================================= */
@media (min-width: 48rem) {
  :root { --gouttiere: 2rem; --section: 6rem; }
  body { padding-bottom: 0; }
  .appel-mobile { display: none; }

  /* Accroche : texte à gauche, photo haute à droite qui déborde sous la bande */
  .accroche-inner { display: grid; grid-template-columns: 1.25fr 1fr; gap: 3rem; padding-top: 4rem; }
  .accroche-texte { padding-bottom: 4rem; align-self: center; }
  .accroche-photo { margin: 0 0 -5rem; align-self: end; }
  .accroche-photo img { aspect-ratio: 4 / 5; }
  .travaux { padding-top: calc(var(--section) + 4rem); }

  /* Le mur : 14 colonnes, briques de 4, demi-briques de 2.
     Rang 1 : 3 briques + 1 demi ; rang 2 : 1 demi + 3 briques (quinconce) */
  .mur { grid-template-columns: repeat(14, 1fr); }
  .brique { grid-column: span 4; }
  .brique:nth-of-type(even) { margin-left: 0; }
  .demi { display: block; grid-column: span 2; background: var(--brique); opacity: 0.55; }

  .chantiers-liste { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .chantier img { aspect-ratio: 4 / 5; }

  .methode-grille { grid-template-columns: 1fr 1.1fr; gap: 3.5rem; align-items: start; }

  .contact-grille { grid-template-columns: 1fr 1fr; column-gap: 3.5rem; align-items: start; }
  .champs-duo { grid-template-columns: 1fr 1fr; }
  .formulaire { padding: 2rem; }

  .pied { grid-template-columns: 1fr 1.2fr; padding: 3.5rem var(--gouttiere); }
  .pied-pp { padding: 2rem; }
}

/* =========================================================
   Ordinateur : 1024 px et plus
   ========================================================= */
@media (min-width: 64rem) {
  /* Sur ordinateur, le menu se place entre le nom et le bouton d'appel */
  .entete { flex-wrap: nowrap; padding-top: 0; padding-bottom: 0; }
  .marque { padding: 0.8rem 0; }
  .menu { order: 2; width: auto; margin: 0 1.5rem 0 auto; padding: 0; border-top: 0; overflow: visible; }
  .menu ul { gap: 1.75rem; }
  .menu a { padding: 1.35rem 0 1.15rem; }
  .entete-appel { order: 3; }

  .entete, .pied { padding-left: max(var(--gouttiere), calc((100% - var(--largeur)) / 2 + var(--gouttiere))); padding-right: max(var(--gouttiere), calc((100% - var(--largeur)) / 2 + var(--gouttiere))); }

  .section-entete { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: end; }
  .section-entete p { margin-top: 0; }
  .brique { padding: 1.5rem 1.4rem 1.3rem; }
}

/* Mouvements réduits */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* =========================================================
   Site de 4 pages : éléments des pages intérieures
   ========================================================= */

/* Lien « suite » sous une section de l'accueil */
.suite { margin-top: 1.5rem; }
.lien-fort { font-weight: 700; color: var(--terre); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.lien-fort::after { content: " →"; }
.lien-fort:hover { color: var(--terre-fonce); }

/* En-tête des pages intérieures : bande terre cuite, plus courte que l'accueil */
.page-entete { background: var(--terre); color: var(--clair); }
.page-entete-inner { max-width: var(--largeur); margin: 0 auto; padding: 2.5rem var(--gouttiere) 2.75rem; }
.page-entete h1 { margin-top: 0.8rem; font-size: clamp(2.2rem, 8vw, 4rem); line-height: 1; letter-spacing: -0.02em; max-width: 20ch; }
.page-entete-intro { margin-top: 1rem; max-width: 36rem; font-size: 1.1rem; }

/* Travaux en détail : une fiche par type, numéro en grand */
.fiches { display: grid; gap: 0; }
.fiche { display: grid; gap: 1.5rem; padding: 2.25rem 0; border-top: 3px solid var(--texte); }
.fiche:first-child { padding-top: 0; border-top: 0; }
.fiche-num { font-family: var(--slab); font-weight: 700; font-size: 3rem; line-height: 1; color: var(--terre); }
.fiche h2 { margin-top: 0.3rem; font-size: clamp(1.8rem, 6vw, 2.6rem); }
.fiche-texte > p:not(.fiche-num):not(.fiche-prix) { margin-top: 0.75rem; max-width: 36rem; }
.fiche-compris { list-style: none; margin: 1.1rem 0 0; padding: 0; max-width: 36rem; }
.fiche-compris li { padding: 0.45rem 0 0.45rem 1.6rem; border-bottom: 1px solid rgba(43, 33, 28, 0.15); position: relative; }
/* puce : une petite brique */
.fiche-compris li::before { content: ""; position: absolute; left: 0; top: 0.95rem; width: 0.9rem; height: 0.45rem; background: var(--terre); }
.fiche-prix { display: inline-block; margin-top: 1.25rem; padding: 0.45rem 0.8rem; background: var(--brique); font-weight: 700; color: var(--terre-fonce); }
.fiche-photo { margin: 0; }
.fiche-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; }

/* Chantiers en détail */
.chantiers-detail { display: grid; gap: 3rem; }
.chantier-long { display: grid; gap: 1.5rem; }
.chantier-long img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.chantier-long h2 { font-size: clamp(1.8rem, 6vw, 2.5rem); }
.chantier-long h3 { margin-top: 1.25rem; font-size: 1.2rem; color: var(--terre); }
.chantier-long h3 + p { margin-top: 0.3rem; max-width: 34rem; }
.chantier-long-fiche { display: flex; flex-wrap: wrap; gap: 0; margin: 1rem 0 0; border-top: 3px solid var(--texte); border-bottom: 1px solid rgba(43, 33, 28, 0.2); }
.chantier-long-fiche div { flex: 1 1 8rem; padding: 0.6rem 0.75rem 0.6rem 0; }
.chantier-long-fiche dt { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gris); }
.chantier-long-fiche dd { margin: 0.1rem 0 0; font-weight: 600; }

/* Bande d'appel à contact, en bas des pages */
.bande-projet { margin-top: var(--section); background: var(--terre); color: var(--clair); }
.bande-projet-inner { max-width: var(--largeur); margin: 0 auto; padding: 3rem var(--gouttiere); display: grid; gap: 1.5rem; }
.bande-projet h2 { font-size: clamp(2rem, 7vw, 3.2rem); }
.bande-projet-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }
.bande-projet-tel { font-family: var(--slab); font-weight: 700; font-size: clamp(1.9rem, 8vw, 2.8rem); line-height: 1; color: inherit; text-decoration: none; }
.bande-projet-tel:hover { text-decoration: underline; }
.bande-projet :focus-visible { outline-color: var(--clair); }

/* Page contact : la bande commence sous l'en-tête, avec le titre de la page */
.contact-page { margin-top: 0; }
.contact-page h1 { margin-top: 0.8rem; font-size: clamp(2.2rem, 8vw, 3.6rem); line-height: 1; }
.formulaire h2 { font-size: 1.8rem; }

/* Questions fréquentes (details / summary, sans JavaScript) */
.faq-liste { margin-top: 2rem; border-top: 3px solid var(--texte); max-width: 48rem; }
.faq-liste details { border-bottom: 1px solid rgba(43, 33, 28, 0.25); }
.faq-liste summary { position: relative; padding: 1rem 2.5rem 1rem 0; font-family: var(--slab); font-weight: 700; font-size: 1.2rem; cursor: pointer; list-style: none; }
.faq-liste summary::-webkit-details-marker { display: none; }
.faq-liste summary::after { content: "+"; position: absolute; right: 0.25rem; top: 0.75rem; font-size: 1.6rem; color: var(--terre); }
.faq-liste details[open] summary::after { content: "–"; }
.faq-liste details p { padding: 0 0 1.1rem; max-width: 40rem; }
.faq-liste a { color: var(--terre); font-weight: 700; }

/* Liens du pied de page */
.pied-nav { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin: 0 0 1rem; padding: 0; }
.pied-nav a { font-weight: 600; }

@media (min-width: 48rem) {
  .page-entete-inner { padding: 3.5rem var(--gouttiere) 3.75rem; }
  .fiche { grid-template-columns: 1.1fr 1fr; column-gap: 3rem; align-items: start; }
  .fiche:nth-child(even) .fiche-photo { order: -1; }   /* une photo sur deux à gauche */
  .chantier-long { grid-template-columns: 1fr 1.1fr; column-gap: 3rem; align-items: start; }
  .chantier-long:nth-child(even) img { order: 2; }
  .bande-projet-inner { grid-template-columns: 1.2fr 1fr; align-items: center; }
  .bande-projet-actions { justify-content: flex-end; }
}
@media (min-width: 48rem) {
  /* fiche sans photo : le texte prend toute la largeur */
  .fiche:not(:has(.fiche-photo)) .fiche-texte { grid-column: 1 / -1; }
}
.demarches + .bande-projet { margin-top: 0; }
