/*
 * protection-chantier.fr : mise en forme du contenu des pages, commune aux 5 templates.
 * Chaque template ne change que les variables ci-dessous et sa propre structure (en-tête, menu, pied).
 */
:root {
  --accent: #428bca;
  --accent-fonce: #2f6fa7;
  --accent-texte: #ffffff;
  --accent-leger: rgba(66, 139, 202, .12);
  --titre: #1f3548;
  --texte: #444b55;
  --texte-doux: #6b7480;
  --fond: #ffffff;
  --fond-alt: #f4f8fb;
  --fond-carte: #ffffff;
  --bord: #e3e9ef;
  --rayon: 6px;
  --rayon-bouton: 4px;
  --ombre: 0 6px 24px rgba(16, 38, 62, .08);
  --police-texte: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --police-titre: "Raleway", var(--police-texte);
  --titre-graisse: 700;
  --titre-casse: none;
  --largeur: 1180px;
  --section-espace: 64px;
}

body { background: var(--fond); color: var(--texte); font-family: var(--police-texte); font-size: 16px; line-height: 1.7; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-fonce); text-decoration: underline; }
h1, h2, h3, h4 { color: var(--titre); font-family: var(--police-titre); font-weight: var(--titre-graisse); text-transform: var(--titre-casse); line-height: 1.25; }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); }
h3 { font-size: 1.2rem; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.pc-contenu { max-width: var(--largeur); margin: 0 auto; padding: 32px 16px var(--section-espace); }
.pc-contenu > section, .pc-section { margin: 0 0 var(--section-espace); }
.pc-contenu > *:last-child { margin-bottom: 0; }
.pc-fond { background: var(--fond-alt); border-radius: var(--rayon); padding: 40px 24px; }

/* Titres de page et de section */
header.main { margin: 0 0 28px; }
header.main h1 { font-size: clamp(1.8rem, 1.2rem + 2vw, 2.7rem); margin: 0 0 6px; }
header.major { text-align: center; max-width: 820px; margin: 0 auto 32px; }
header.major h2 { margin: 0 0 10px; position: relative; padding-bottom: 14px; }
header.major h2:after { content: ""; position: absolute; left: 50%; bottom: 0; width: 56px; height: 3px; margin-left: -28px; background: var(--accent); border-radius: 2px; }
header.major p { color: var(--texte-doux); margin: 0; }
.pc-chapo { font-size: 1.15rem; color: var(--titre); }
.pc-centre { text-align: center; margin-top: 24px; }
.fw-meta { color: var(--texte-doux); font-size: .9rem; }

/* Boutons */
.button, input[type=submit], button.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 26px; border-radius: var(--rayon-bouton);
  border: 2px solid var(--accent); background: transparent; color: var(--accent); font-weight: 600; letter-spacing: .02em; line-height: 1.2;
  cursor: pointer; transition: background .2s, color .2s, transform .2s; text-decoration: none !important; font-family: var(--police-titre);
}
.button:hover, input[type=submit]:hover { background: var(--accent); color: var(--accent-texte); }
.button.primary, input[type=submit].primary { background: var(--accent); color: var(--accent-texte); }
.button.primary:hover, input[type=submit].primary:hover { background: var(--accent-fonce); border-color: var(--accent-fonce); }
.button.small { padding: 8px 16px; font-size: .9rem; }
ul.actions { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; padding: 0; margin: 20px 0 0; }

/* Texte + image */
.pc-split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: center; }
.pc-split-inverse .pc-split-media { order: 2; }
.pc-split-media img { width: 100%; border-radius: var(--rayon); box-shadow: var(--ombre); object-fit: cover; aspect-ratio: 4 / 3; }
.pc-split-texte > *:first-child { margin-top: 0; }
.pc-split-texte header.major { text-align: left; margin: 0 0 18px; }
.pc-split-texte header.major h2:after { left: 0; margin-left: 0; }

/* Solutions (liste {solutions}) */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 24px; }
.features article { display: flex; gap: 16px; background: var(--fond-carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 24px; transition: box-shadow .2s, transform .2s; }
.features article:hover { box-shadow: var(--ombre); transform: translateY(-2px); }
.features .icon { flex: 0 0 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: var(--accent-leger); color: var(--accent); font-size: 1.5rem; }
.features h3 { margin: 0 0 8px; font-size: 1.1rem; }
.features h3 a { color: var(--titre); }
.features .content p { margin: 0; font-size: .95rem; }

/* Cartes */
.pc-cartes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.pc-cartes-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.pc-carte { background: var(--fond-carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 26px 22px; position: relative; }
.pc-carte > i { font-size: 2rem; color: var(--accent); display: block; margin-bottom: 10px; }
.pc-carte h3 { margin: 0 0 8px; }
.pc-carte p { margin: 0 0 8px; font-size: .95rem; }
.pc-carte > a { font-weight: 600; font-size: .92rem; }
.pc-carte > a:after { content: " →"; }

/* Étapes numérotées */
.pc-etapes { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; counter-reset: etape; }
.pc-etapes li { counter-increment: etape; position: relative; background: var(--fond-carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 28px 22px 22px; }
.pc-etapes li:before { content: counter(etape, decimal-leading-zero); position: absolute; top: 14px; right: 18px; font-family: var(--police-titre); font-weight: 800; font-size: 2rem; color: var(--accent-leger); line-height: 1; }
.pc-etapes li > i { font-size: 1.9rem; color: var(--accent); }
.pc-etapes h3 { margin: 10px 0 6px; }
.pc-etapes p { margin: 0; font-size: .95rem; }

/* Chiffres */
.pc-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; text-align: center; }
.pc-chiffres div { padding: 10px; }
.pc-chiffres i { font-size: 2rem; color: var(--accent); }
.pc-chiffres strong { display: block; font-family: var(--police-titre); font-size: 2.1rem; color: var(--titre); line-height: 1.2; margin-top: 6px; }
.pc-chiffres span { color: var(--texte-doux); }

/* Galerie */
.pc-galerie { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.pc-galerie figure { margin: 0; }
.pc-galerie a { display: block; overflow: hidden; border-radius: var(--rayon); background: var(--fond-alt); }
.pc-galerie img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform .4s; }
.pc-galerie figure:hover img { transform: scale(1.05); }
.pc-galerie figcaption { padding: 10px 2px 0; color: var(--titre); font-weight: 600; font-size: .95rem; }

/* Garanties, coordonnées, listes */
.pc-garanties, .pc-coordonnees { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.pc-garanties li, .pc-coordonnees li { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; align-items: start; background: var(--fond-alt); border-radius: var(--rayon); padding: 16px; }
.pc-garanties i, .pc-coordonnees i { grid-row: span 2; font-size: 1.6rem; color: var(--accent); line-height: 1; padding-top: 2px; }
.pc-garanties strong, .pc-coordonnees strong { color: var(--titre); }
.pc-garanties span, .pc-coordonnees span { font-size: .92rem; color: var(--texte-doux); }
.pc-coordonnees { grid-template-columns: 1fr; margin: 0; }
.pc-pastilles { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.pc-pastilles li { border: 1px solid var(--bord); background: var(--fond-carte); border-radius: 999px; padding: 6px 16px; font-size: .92rem; }
.pc-liste-coches { list-style: none; padding: 0; columns: 2 300px; column-gap: 32px; }
.pc-liste-coches li { padding: 6px 0 6px 30px; position: relative; break-inside: avoid; }
.pc-liste-coches li:before { content: "\F26A"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: 6px; color: var(--accent); }
.pc-contenu ul:not([class]) li { margin-bottom: 4px; }

/* Bandeau d'appel */
.pc-appel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; background: var(--titre); color: #fff; border-radius: var(--rayon); padding: 30px 32px; margin: 0 0 var(--section-espace); position: relative; }
.pc-appel-texte strong { display: block; font-family: var(--police-titre); font-size: 1.45rem; color: #fff; }
.pc-appel-texte span { opacity: .85; }
.pc-appel ul.actions { margin: 0; }
.pc-appel .button:not(.primary) { color: #fff; border-color: rgba(255, 255, 255, .6); }
.pc-appel .button:not(.primary):hover { background: #fff; color: var(--titre); }
.pc-appel-note { position: absolute; right: 32px; bottom: 6px; margin: 0; font-size: .75rem; opacity: .7; }

/* Tableau comparatif */
.pc-tableau { overflow-x: auto; }
.pc-tableau table { width: 100%; border-collapse: collapse; min-width: 560px; background: var(--fond-carte); }
.pc-tableau th, .pc-tableau td { padding: 12px 14px; border-bottom: 1px solid var(--bord); text-align: left; }
.pc-tableau thead th { background: var(--fond-alt); color: var(--titre); }
.pc-tableau td:last-child, .pc-tableau th:last-child { background: var(--accent-leger); font-weight: 600; color: var(--titre); }

/* Contact */
.pc-contact { display: grid; grid-template-columns: minmax(260px, 1fr) 1.6fr; gap: 32px; align-items: start; }
.fw-form { background: var(--fond-carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 24px; }
.fw-form .row { --bs-gutter-y: 14px; }
.fw-form label { font-weight: 600; font-size: .92rem; color: var(--titre); margin-bottom: 4px; }
.fw-form input[type=text], .fw-form input[type=tel], .fw-form input[type=email], .fw-form textarea, .fw-choix-zone select {
  width: 100%; border: 1px solid var(--bord); border-radius: var(--rayon-bouton); padding: 10px 12px; background: var(--fond); color: var(--texte); font: inherit;
}
.fw-form input:focus, .fw-form textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-leger); }
.fw-form input[type=checkbox] { margin-right: 8px; }
.fw-form input[type=checkbox] + label { display: inline; font-weight: 400; }

/* Grilles d'articles et de réalisations */
.posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.posts article { background: var(--fond-carte); border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; padding: 0 0 20px; display: flex; flex-direction: column; }
.posts article > *:not(.image) { padding: 0 20px; }
.posts .image img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; margin-bottom: 16px; }
.posts article > h3:first-child { margin-top: 20px; }
.posts h3 { margin: 0 0 6px; font-size: 1.12rem; }
.posts h3 a { color: var(--titre); }
.posts p { margin: 0 0 10px; font-size: .95rem; }
.posts ul.actions { margin-top: auto; }
.image.main img { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--rayon); margin: 0 0 24px; }
.fw-article-contenu { max-width: 780px; }
.fw-article-contenu h2 { margin-top: 1.6em; }
.fw-pagination { list-style: none; display: flex; gap: 8px; padding: 0; justify-content: center; margin-top: 28px; }
.fw-pagination a { display: block; min-width: 40px; text-align: center; padding: 8px; border: 1px solid var(--bord); border-radius: var(--rayon-bouton); }
.fw-pagination a.active { background: var(--accent); color: var(--accent-texte); border-color: var(--accent); }

/* Pages de villes et de départements (blocs automatiques) */
.fw-local { background: var(--fond-alt); border-radius: var(--rayon); padding: 32px; margin-bottom: var(--section-espace); }
.fw-local header.major { text-align: left; margin-left: 0; }
.fw-local header.major h2:after { left: 0; margin-left: 0; }
.fw-colonnes { columns: 3 220px; column-gap: 28px; list-style: none; padding: 0; }
.fw-colonnes li { break-inside: avoid; padding: 3px 0; }
.fw-colonnes a, .fw-liste-villes a { color: var(--texte); }
.fw-colonnes a:hover, .fw-liste-villes a:hover { color: var(--accent); }
.fw-lettres { text-align: center; }
.fw-lettres a { display: inline-block; min-width: 30px; padding: 2px 6px; margin: 2px; border: 1px solid var(--bord); border-radius: var(--rayon-bouton); }
.fw-zones-accueil .posts article { padding-top: 20px; }
.fw-zones-accueil .fw-liste-villes { list-style: none; padding: 0 20px; margin: 0; font-size: .93rem; }
#banner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 32px; align-items: center; margin-bottom: var(--section-espace); }
#banner .image.object img { width: 100%; border-radius: var(--rayon); aspect-ratio: 4 / 3; object-fit: cover; }
.box.alt .row { --bs-gutter-x: 12px; --bs-gutter-y: 12px; }
.fw-faq { max-width: 860px; margin-left: auto; margin-right: auto; }
.fw-faq details { background: var(--fond-carte); border: 1px solid var(--bord); border-radius: var(--rayon); margin-bottom: 10px; }
.fw-faq summary { padding: 16px 48px 16px 18px; color: var(--titre); }
.fw-faq details p { padding: 0 18px 16px; margin: 0; }
blockquote.fw-avis-item { background: var(--fond-carte); border-left: 3px solid var(--accent); }

/* Fil d'Ariane, messages */
.ariane { font-size: .88rem; margin: 0 0 18px; }
.fw-alerte { border-radius: var(--rayon); }

@media (max-width: 860px) {
  :root { --section-espace: 44px; }
  .pc-split, #banner, .pc-contact { grid-template-columns: 1fr; gap: 22px; }
  .pc-split-inverse .pc-split-media { order: 0; }
  .pc-galerie { grid-template-columns: 1fr 1fr; }
  .pc-appel { padding: 24px 20px 30px; }
  .pc-appel-note { right: 20px; }
}
@media (max-width: 576px) {
  .fw-form .col-6 { width: 100%; }
  .pc-galerie { grid-template-columns: 1fr; }
  .pc-fond, .fw-local { padding: 24px 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Éléments communs aux templates : pied de page, visionneuse, retour en haut ---------- */
:root { --pied-fond: #1f3548; --pied-texte: rgba(255, 255, 255, .78); --pied-titre: #ffffff; --pied-lien: #ffffff; --pied-bas: rgba(0, 0, 0, .18); }
.pc-pied { background: var(--pied-fond); color: var(--pied-texte); font-size: .93rem; }
.pc-pied-haut { max-width: var(--largeur); margin: 0 auto; padding: 56px 16px 32px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.pc-pied h2 { color: var(--pied-titre); font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 14px; }
.pc-pied ul { list-style: none; padding: 0; margin: 0; }
.pc-pied li { padding: 3px 0; }
.pc-pied a { color: var(--pied-lien); }
.pc-pied p { margin: 0 0 10px; }
.pc-pied i { opacity: .8; margin-right: 4px; }
.pc-pied-logo img { max-width: 170px; height: auto; background: #fff; border-radius: 6px; padding: 8px 12px; margin-bottom: 14px; }
.pc-pied-cnaps { font-size: .82rem; opacity: .8; }
.pc-pied .button.small { color: var(--accent-texte); }
.pc-pied-bas { background: var(--pied-bas); padding: 16px; display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: center; font-size: .85rem; }
.pc-haut { position: fixed; right: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: var(--accent-texte) !important; display: grid; place-items: center; font-size: 1.6rem; opacity: 0; visibility: hidden; transition: .3s; z-index: 90; text-decoration: none !important; }
.pc-haut.visible { opacity: 1; visibility: visible; }
.pc-visionneuse { position: fixed; inset: 0; background: rgba(5, 10, 18, .92); z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.pc-visionneuse img { max-width: 100%; max-height: 82vh; border-radius: 6px; }
.pc-visionneuse p { color: #fff; margin: 12px 0 0; }
.pc-visionneuse button { position: absolute; top: 12px; right: 18px; background: none; border: 0; color: #fff; font-size: 2.4rem; line-height: 1; cursor: pointer; }
body.pc-bloque { overflow: hidden; }
.fw-choix-zone { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.fw-choix-zone .fw-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fw-choix-zone select { width: auto; min-width: 210px; flex: 1 1 210px; }
.fw-aller-contenu { position: absolute; left: -9999px; }
.fw-aller-contenu:focus { left: 16px; top: 16px; z-index: 3000; background: #fff; padding: 8px 12px; }
@media (max-width: 960px) { .pc-pied-haut { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pc-pied-haut { grid-template-columns: 1fr; padding-top: 40px; } }
