/* faireconstruire.com : charte A « Atelier », variante A4 « Contraste ».
   Fond gris chaud, textes longs sur blanc, menu et grandes sections sur fond noir,
   colonne de titre à gauche, une seule police (Figtree) avec un mot en italique serif. */

:root {
  --fond: #F6F5F2;
  --surface: #FFFFFF;
  --texte: #262523;
  --secondaire: #5F5C57;
  --filet: #E3E0DA;
  --sombre: #1E1D1C;
  --sombre-2: #2B2A29;
  --sombre-filet: #3A3836;
  --sur-sombre: #E9E6E1;
  --sur-sombre-2: #B9B4AC;
  --brique: #B5372B;
  --brique-fonce: #93291F;
  --brique-clair: #F59C92;
  --brique-pale: #F7E9E6;
  --alerte-fond: #FBF1DA;
  --alerte-texte: #5E4300;
  --logo-1: #CE3436;
  --logo-2: #F24E46;
  --police: 'Figtree', Arial, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
  --largeur: 1200px;
  --gouttiere: 32px;
  --rayon: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font-family: var(--police); font-size: 16px; line-height: 1.5; }
img { max-width: 100%; height: auto; }
a { color: var(--brique); }
a:hover { color: var(--brique-fonce); }
:focus-visible { outline: 2px solid var(--brique-clair); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.accent { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.12em; letter-spacing: 0; }
.fleche { display: inline-block; vertical-align: -1px; flex: 0 0 auto; }
.conteneur { max-width: var(--largeur); margin: 0 auto; padding: 0 var(--gouttiere); }
.nombre { font-variant-numeric: tabular-nums; }

/* ---------- En-tête ---------- */
.entete { background: var(--sombre); border-bottom: 1px solid var(--sombre-filet); }
.entete .conteneur { padding-top: 8px; padding-bottom: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #FFF; }
.marque:hover { color: #FFF; }
.marque-mot { display: flex; flex-direction: column; align-items: flex-end; text-align: right; line-height: 1; }
.marque-mot .m1 { font-size: 17px; font-weight: 400; }
.marque-mot .m2 { font-size: 15px; font-weight: 700; letter-spacing: 0.08em; }
.logo-svg { display: block; flex: 0 0 auto; }
.nav-principale { display: flex; flex-wrap: wrap; gap: 4px 28px; flex: 1 1 360px; }
.nav-principale a { color: var(--sur-sombre-2); text-decoration: none; font-size: 15px; font-weight: 500; padding: 9px 0; border-bottom: 2px solid transparent; }
.nav-principale a:hover { color: #FFF; }
.nav-principale a[aria-current="page"] { color: #FFF; font-weight: 600; border-bottom-color: var(--brique); }
.recherche-entete { display: flex; flex: 0 1 280px; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--sombre-filet); border-radius: 8px; }
.recherche-entete input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; color: #FFF; font: 15px var(--police); height: 34px; outline: none; }
.recherche-entete input::placeholder { color: var(--sur-sombre-2); }
.boutons-mobile { display: none; margin-left: auto; gap: 8px; }
.boutons-mobile button { background: none; border: 0; padding: 10px; color: #FFF; cursor: pointer; }

/* ---------- Bandeau (hero) ---------- */
.bandeau { background: var(--sombre); color: #FFF; }
.bandeau .grille { display: flex; flex-wrap: wrap; gap: 40px 64px; align-items: flex-start; padding: 36px 0 52px; }
.bandeau .principal { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.bandeau .lateral { flex: 1 1 360px; min-width: 0; }
.surtitre { font-size: 14px; font-weight: 600; color: var(--brique); }
.bandeau .surtitre, .section-sombre .surtitre { color: var(--brique-clair); }
.bandeau h1 { margin: 0; font-size: 46px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; color: #FFF; }
.bandeau .chapo { margin: 0; font-size: 20px; line-height: 1.55; color: var(--sur-sombre); max-width: 56ch; }
.ariane { padding-top: 16px; font-size: 14px; color: var(--sur-sombre-2); }
.ariane ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.ariane li + li::before { content: "/"; margin-right: 4px; color: var(--secondaire); }
.ariane a { color: var(--sur-sombre-2); }
.ariane a:hover { color: #FFF; }
.ariane [aria-current] { color: #FFF; font-weight: 500; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; background: var(--sombre-2); color: #FFF; border: 1px solid var(--sombre-filet); border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; }
a.puce:hover { color: #FFF; border-color: var(--sur-sombre-2); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; color: var(--sur-sombre-2); }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.alerte { background: var(--alerte-fond); color: var(--alerte-texte); border-radius: 10px; padding: 12px 16px; font-size: 15px; margin: 18px 0 0; }

/* ---------- Recherche du bandeau d'accueil ---------- */
.recherche-grande { display: flex; gap: 8px; flex-wrap: wrap; }
.recherche-grande input { flex: 1 1 260px; height: 52px; padding: 0 18px; border: 0; border-radius: 8px; font: 17px var(--police); color: var(--texte); }
.souvent { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--sur-sombre-2); }

/* ---------- Boutons ---------- */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 8px; border: 1px solid var(--brique); background: var(--brique); color: #FFF; font: 600 16px var(--police); text-decoration: none; cursor: pointer; }
.bouton:hover { background: var(--brique-fonce); border-color: var(--brique-fonce); color: #FFF; }
.bouton-grand { min-height: 52px; padding: 0 24px; font-size: 17px; }
.bouton-contour { background: transparent; color: #FFF; border-color: #FFF; }
.bouton-contour:hover { background: #FFF; color: var(--texte); border-color: #FFF; }
.lien-fleche { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--brique); text-decoration: none; }
.lien-fleche:hover { color: var(--brique-fonce); }
.section-sombre .lien-fleche { color: var(--brique-clair); }

/* ---------- Rangée de chiffres ---------- */
.chiffres { display: flex; flex-wrap: wrap; border-top: 1px solid var(--filet); border-bottom: 1px solid var(--filet); margin-top: 48px; }
.chiffres > div { flex: 1 1 220px; padding: 24px 24px 28px 0; display: flex; flex-direction: column; gap: 6px; }
.chiffres > div + div { padding-left: 24px; border-left: 1px solid var(--filet); }
.chiffres .libelle { font-size: 14px; font-weight: 600; color: var(--secondaire); }
.chiffres .valeur { font-family: var(--serif); font-size: 48px; line-height: 1; }
.chiffres .detail { font-size: 14px; color: var(--secondaire); }

/* ---------- Sections : colonne de titre + panneau blanc ---------- */
.section { display: flex; flex-wrap: wrap; gap: 32px 64px; padding-top: 64px; align-items: flex-start; }
.section:last-child { padding-bottom: 72px; }
.section-titre { flex: 1 1 260px; display: flex; flex-direction: column; gap: 14px; padding-top: 8px; }
.section-titre h2 { margin: 0; font-size: 30px; line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; }
.section-titre p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--secondaire); }
.panneau { background: var(--surface); border-radius: var(--rayon); padding: 48px 56px; display: flex; flex-direction: column; gap: 28px; flex: 3 1 560px; min-width: 0; }
/* Publicité (helper pub()) : étiquetée, masquée si Google n'a pas d'annonce à servir */
.annonce { display: block; max-width: 970px; margin: 64px auto 0; text-align: center; }
.annonce-libelle { display: block; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--secondaire); margin-bottom: 8px; }
.annonce:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
.section-sombre { background: var(--sombre); color: #FFF; margin-top: 64px; }
.section-sombre .section { padding-bottom: 72px; }
.section-sombre .section-titre h2 { color: #FFF; }
.section-sombre .section-titre p { color: var(--sur-sombre); }
.section-sombre .liste-sombre { flex: 3 1 560px; min-width: 0; }
.liste-sombre a, .liste-sombre .ligne { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 0; border-top: 1px solid var(--sombre-filet); color: #FFF; text-decoration: none; font-size: 19px; font-weight: 500; }
.liste-sombre a:last-child { border-bottom: 1px solid var(--sombre-filet); }
.liste-sombre a:hover { color: var(--brique-clair); }

/* ---------- Cartes ---------- */
.cartes { display: flex; flex-wrap: wrap; gap: 12px; }
.carte { display: flex; flex-direction: column; gap: 8px; padding: 20px; background: var(--fond); border-radius: 12px; text-decoration: none; color: var(--texte); flex: 1 1 220px; min-height: 140px; }
a.carte:hover { background: var(--brique-pale); color: var(--texte); }
.carte .num { font-size: 13px; font-weight: 700; color: var(--brique); letter-spacing: 0.04em; }
.carte .titre { font-size: 19px; font-weight: 700; line-height: 1.25; }
.carte .texte { font-size: 15px; line-height: 1.5; color: var(--secondaire); }
.carte .pied { margin-top: auto; }
.etiquette { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--filet); color: var(--secondaire); font-size: 12px; font-weight: 600; }
.etiquette-brouillon { background: var(--alerte-fond); color: var(--alerte-texte); }

/* ---------- Contenu des guides ---------- */
.contenu { font-size: 18px; line-height: 1.65; }
.panneau.contenu { display: block; }
.contenu > :first-child { margin-top: 0; }
.contenu > :last-child { margin-bottom: 0; }
.contenu p, .contenu ul, .contenu ol { margin: 0 0 1em; max-width: 68ch; }
.contenu li { margin-bottom: 0.35em; }
.contenu h3 { font-size: 20px; line-height: 1.3; margin: 1.6em 0 0.5em; letter-spacing: -0.01em; }
.contenu strong { font-weight: 700; }
.contenu code { font-size: 0.9em; background: var(--fond); padding: 1px 5px; border-radius: 4px; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--filet); border-radius: 12px; }
.contenu table { border-collapse: collapse; width: 100%; font-size: 16px; line-height: 1.5; }
.contenu th { text-align: left; padding: 10px 16px; background: var(--fond); font-size: 14px; font-weight: 600; }
.contenu td { padding: 12px 16px; border-top: 1px solid var(--filet); vertical-align: top; }
.encart { border-radius: 12px; padding: 20px 24px; margin: 0 0 1.2em; font-size: 16px; line-height: 1.6; }
.encart p { margin: 0 0 0.6em; max-width: none; }
.encart p:last-child { margin-bottom: 0; }
.encart-titre { font-size: 14px; font-weight: 600; }
.encart-averifier { background: var(--alerte-fond); color: var(--alerte-texte); }
.encart-bref { background: var(--surface); color: var(--texte); border-left: 4px solid var(--brique); }
.encart-forum { background: var(--fond); border-left: 4px solid var(--secondaire); }
.encart-forum .encart-titre { color: var(--secondaire); }
.encart-chiffre { background: var(--brique-pale); }
.bandeau .encart-bref { background: var(--sombre-2); color: var(--sur-sombre); border-left-color: var(--brique-clair); font-size: 17px; }
.bandeau .encart-bref .encart-titre { color: #FFF; }
.sommaire { background: var(--sombre-2); border: 1px solid var(--sombre-filet); border-radius: var(--rayon); padding: 24px 28px; }
.sommaire p { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: var(--sur-sombre-2); }
.sommaire ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 2px; }
.sommaire li { counter-increment: s; display: flex; gap: 12px; }
.sommaire li::before { content: counter(s, decimal-leading-zero); color: var(--brique-clair); font-weight: 700; font-size: 13px; padding-top: 7px; min-width: 22px; }
.sommaire a { color: var(--sur-sombre); text-decoration: none; padding: 5px 0; font-size: 15px; }
.sommaire a:hover { color: #FFF; text-decoration: underline; }
.sources ul { padding-left: 20px; }
.sources li { margin-bottom: 6px; font-size: 16px; }
.signaler { border-top: 1px solid var(--filet); padding-top: 20px; font-size: 14px; color: var(--secondaire); }

/* ---------- Listes à filets (départements, signaux, agences) ---------- */
.lignes { display: flex; flex-direction: column; }
.lignes > a, .lignes > div { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 11px 0; border-top: 1px solid var(--filet); color: var(--texte); text-decoration: none; font-size: 16px; }
.lignes > a:hover { color: var(--brique); }
.lignes .compte { font-size: 14px; color: var(--secondaire); font-variant-numeric: tabular-nums; }
.colonnes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); column-gap: 32px; }
.pastilles { display: flex; flex-wrap: wrap; gap: 8px; }
.pastille { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--filet); border-radius: 999px; background: var(--surface); color: var(--texte); text-decoration: none; font-size: 15px; font-weight: 500; }
.pastille:hover { border-color: var(--brique); color: var(--brique); }
.note-ordre { font-size: 14px; color: var(--secondaire); margin: 0; }

/* ---------- Constructeurs ---------- */
.logo-cons { flex: 0 0 auto; width: 52px; height: 52px; background: #FFF; border: 1px solid var(--filet); border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 18px; font-weight: 700; color: var(--secondaire); }
.logo-cons img { max-width: 44px; max-height: 44px; object-fit: contain; }
.logo-cons.grand { width: 88px; height: 88px; }
.logo-cons.grand img { max-width: 76px; max-height: 76px; }
.cons-carte { display: flex; gap: 14px; align-items: center; }
.cons-carte .nom { font-size: 17px; font-weight: 700; line-height: 1.25; color: var(--texte); }
.cons-carte .info { font-size: 14px; color: var(--secondaire); }
.tableau { width: 100%; border-collapse: collapse; }
.tableau th { text-align: left; padding: 10px 16px; background: var(--fond); font-size: 14px; font-weight: 600; }
.tableau td { padding: 14px 16px; border-top: 1px solid var(--filet); font-size: 16px; }
.tableau-cadre { border: 1px solid var(--filet); border-radius: 12px; overflow: hidden; }
.tableau-cadre caption { caption-side: top; text-align: left; padding: 14px 16px; font-size: 14px; color: var(--secondaire); }
.cadre { border: 1px solid var(--filet); border-radius: 12px; padding: 20px 22px; font-size: 15px; }
.cadre-titre { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.signal-ok { color: #2E6B45; font-weight: 600; }
.signal-alerte { color: var(--brique); font-weight: 600; }
.filtres { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filtres select, .filtres input[type=search] { height: 40px; border: 1px solid var(--filet); border-radius: 8px; padding: 0 12px; font: 15px var(--police); background: #FFF; }
.pagination { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pagination a, .pagination span { display: inline-flex; min-width: 40px; height: 40px; align-items: center; justify-content: center; padding: 0 10px; border-radius: 8px; border: 1px solid var(--filet); background: #FFF; color: var(--texte); text-decoration: none; font-size: 15px; }
.pagination span[aria-current] { background: var(--sombre); color: #FFF; border-color: var(--sombre); }

/* ---------- Formulaires (calculateurs) ---------- */
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ label { font-size: 15px; font-weight: 600; }
.champ .aide { font-size: 13px; color: var(--secondaire); }
.champ input, .champ select { height: 48px; border: 1px solid var(--filet); border-radius: 8px; padding: 0 14px; font: 17px var(--police); color: var(--texte); background: #FFF; }
.champ input:focus, .champ select:focus { border-color: var(--brique); outline: none; }
/* Formulaires (contact) */
.formulaire { display: flex; flex-direction: column; gap: 22px; }
.champ textarea { border: 1px solid var(--filet); border-radius: 8px; padding: 12px 14px; font: 17px/1.5 var(--police); color: var(--texte); background: #FFF; resize: vertical; }
.champ textarea:focus { border-color: var(--brique); outline: none; }
.champ [aria-invalid="true"] { border-color: var(--brique); }
.champ .erreur { font-size: 14px; font-weight: 600; color: var(--brique); }
.succes { background: #E7F3EA; color: #1E4D2B; border-radius: 10px; padding: 14px 18px; font-size: 16px; margin: 0; }
.grille-champs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.resultat { background: var(--sombre); color: #FFF; border-radius: var(--rayon); padding: 28px 32px; display: flex; flex-direction: column; gap: 10px; }
.resultat .valeur { font-family: var(--serif); font-size: 56px; line-height: 1; }
.resultat .detail { color: var(--sur-sombre); font-size: 15px; }

/* ---------- Pied de page ---------- */
.pied { max-width: var(--largeur); margin: 64px auto 24px; padding: 0 var(--gouttiere); }
.pied-bloc { background: var(--brique); color: #FFF; border-radius: var(--rayon); padding: 24px 32px; display: flex; flex-direction: column; gap: 18px; }
.pied-haut { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.pied .marque { background: #FFF; border-radius: 8px; padding: 8px 12px; color: var(--texte); }
.pied .marque:hover { color: var(--texte); }
.pied nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.pied nav a, .pied nav button { color: #FFF; font: 600 15px var(--police); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.pied-bas { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; border-top: 1px solid rgba(255,255,255,.35); padding-top: 16px; font-size: 14px; }

/* ---------- Bannière cookies ---------- */
.cookies { position: fixed; left: 16px; right: 16px; bottom: 16px; max-width: 720px; margin: 0 auto; background: var(--sombre); color: var(--sur-sombre); border: 1px solid var(--sombre-filet); border-radius: var(--rayon); padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; z-index: 50; box-shadow: 0 10px 30px rgba(0,0,0,.25); font-size: 15px; }
.cookies[hidden] { display: none; }
.cookies p { margin: 0; }
.cookies .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookies .bouton-contour { min-height: 40px; }
.cookies .bouton { min-height: 40px; }

/* ---------- Mobile (maquettes A4m) ---------- */
@media (max-width: 760px) {
  :root { --gouttiere: 20px; }
  .entete .conteneur { gap: 12px; }
  .boutons-mobile { display: flex; }
  .nav-principale, .recherche-entete { display: none; flex: 1 1 100%; }
  .entete.ouvert .nav-principale { display: flex; flex-direction: column; gap: 0; }
  .entete.ouvert .recherche-entete, .entete.recherche-ouverte .recherche-entete { display: flex; }
  .bandeau .grille { padding: 24px 0 48px; gap: 32px; }
  .bandeau h1 { font-size: 34px; }
  .bandeau .chapo { font-size: 18px; }
  .section { padding-top: 48px; gap: 20px; }
  .section-titre h2 { font-size: 24px; }
  .panneau { padding: 28px 20px; border-radius: 12px; }
  .contenu { font-size: 17px; }
  .chiffres > div { flex-basis: 100%; padding: 20px 0; }
  .chiffres > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--filet); }
  .liste-sombre a { font-size: 17px; }
  .pied-bloc { padding: 20px; }
}

/* ---------- Saisie avec unité, jauge (calculateurs) ---------- */
.saisie { display: flex; border: 1px solid var(--secondaire); border-radius: 8px; overflow: hidden; background: #FFF; }
.saisie:focus-within { border-color: var(--brique); box-shadow: 0 0 0 2px var(--brique-pale); }
.saisie input { flex: 1 1 auto; min-width: 0; border: 0; height: 48px; padding: 0 14px; font: 17px var(--police); color: var(--texte); outline: none; }
.saisie span { display: flex; align-items: center; padding: 0 14px; border-left: 1px solid var(--filet); color: var(--secondaire); font-size: 15px; }
.jauge { position: relative; height: 8px; border-radius: 4px; background: var(--sombre-filet); margin-top: 12px; }
.jauge span { display: block; height: 100%; border-radius: 4px; width: 0; transition: width .2s; }
.jauge i { position: absolute; top: -4px; width: 2px; height: 16px; background: #FFF; }
.jauge-legende { display: flex; justify-content: space-between; font-size: 12px; color: var(--sur-sombre-2); }
