/* HKC — site public. Polices système uniquement : aucun appel à un service tiers. */
:root {
  --encre: #13202f;
  --encre-2: #3c4a5a;
  --gris: #6b7684;
  --ligne: #dfe3e8;
  --fond: #ffffff;
  --fond-2: #f4f2ee;
  --accent: #d9542b;
  --accent-fonce: #b8411c;
  --nuit: #0f1a26;
  --rayon: 10px;
  --ombre: 0 1px 2px rgb(19 32 47 / .06), 0 8px 24px rgb(19 32 47 / .08);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font: 17px/1.6 var(--sans); color: var(--encre); background: var(--fond); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--fond); padding: 8px 12px; }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 20; background: rgb(255 255 255 / .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--ligne); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-mark { display: inline-flex; align-items: center; height: 36px; padding: 0 10px; border-radius: 6px; background: var(--encre); color: #fff; font: 700 1.05rem/1 var(--mono); letter-spacing: .02em; }
.logo-mark::after { content: ""; width: 6px; height: 6px; margin-left: 3px; border-radius: 50%; background: var(--accent); align-self: end; margin-bottom: 9px; }
.logo-mark.small { height: 30px; font-size: .95rem; }
.logo-text { font-size: .8rem; color: var(--gris); letter-spacing: .04em; text-transform: uppercase; }
.nav { display: flex; gap: 28px; }
.nav a { text-decoration: none; font-weight: 500; font-size: .95rem; color: var(--encre-2); padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current] { color: var(--encre); border-bottom-color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; margin: 5px 0; background: var(--encre); transition: transform .2s; }

/* Boutons */
.btn { display: inline-block; padding: 13px 22px; border-radius: 999px; background: var(--accent); color: #fff; text-decoration: none; font-weight: 600; font-size: .95rem; border: 2px solid var(--accent); transition: background .15s, border-color .15s; }
.btn:hover { background: var(--accent-fonce); border-color: var(--accent-fonce); }
.btn-ghost { background: transparent; color: var(--encre); border-color: var(--encre); }
.btn-ghost:hover { background: var(--encre); color: #fff; border-color: var(--encre); }
.btn-clair { background: #fff; color: var(--encre); border-color: #fff; }
.btn-clair:hover { background: var(--fond-2); border-color: var(--fond-2); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.lien-fleche { color: var(--accent-fonce); font-weight: 600; text-decoration: none; }
.lien-fleche:hover { text-decoration: underline; }

/* Accueil */
.hero { padding: clamp(64px, 10vw, 120px) 0 clamp(56px, 8vw, 96px); background:
  radial-gradient(900px 400px at 85% 0%, rgb(217 84 43 / .10), transparent 70%),
  linear-gradient(var(--fond-2), var(--fond)); }
.hero-inner > * { max-width: 860px; }
.surtitre { font: 600 .8rem/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent-fonce); margin-bottom: 20px; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--encre-2); max-width: 720px; }

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-serree { padding-top: 40px; }
.section-alt { background: var(--fond-2); }
.section-titre { margin-bottom: 40px; }
.section-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 40px; }
.section-tete .section-titre { margin: 0; }

.offres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.offre { position: relative; padding: 32px 28px; border: 1px solid var(--ligne); border-radius: var(--rayon); background: var(--fond); transition: border-color .2s, box-shadow .2s; }
.offre:hover { border-color: transparent; box-shadow: var(--ombre); }
.offre-num { font: 600 .85rem var(--mono); color: var(--accent); }
.offre h3 { font-size: 1.6rem; margin: 10px 0 8px; }
.offre-resume { color: var(--encre-2); font-weight: 500; }
.offre ul { list-style: none; margin: 20px 0 0; padding: 20px 0 0; border-top: 1px solid var(--ligne); }
.offre li { position: relative; padding-left: 20px; margin-bottom: 8px; font-size: .95rem; color: var(--encre-2); }
.offre li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 2px; background: var(--accent); }

.section-ia { background: var(--nuit); color: #e8ecf1; }
.ia-inner { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; align-items: start; }
.section-ia h2 { color: #fff; margin: 0; }
.section-ia p, .section-ia .texte-riche { color: #b9c3cf; font-size: 1.05rem; }

.etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: etape; }
.etapes li { counter-increment: etape; padding-top: 20px; border-top: 2px solid var(--encre); }
.etapes li::before { content: "0" counter(etape); display: block; font: 600 .85rem var(--mono); color: var(--accent); margin-bottom: 10px; }
.etapes p, .etapes .texte-riche { color: var(--encre-2); font-size: .95rem; }

.contact { background: var(--encre); color: #fff; }
.contact-inner { display: flex; justify-content: space-between; align-items: center; gap: 40px; flex-wrap: wrap; }
.contact h2 { color: #fff; }
.contact p, .contact .texte-riche { color: #c3ccd6; max-width: 560px; margin: 0; }
.contact-liens { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.contact-liens a:not(.btn) { color: #fff; }

/* Bénéfices */
.benefices { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.benefice { padding: 28px 24px; border-radius: var(--rayon); background: var(--fond-2); }
.benefice-icone { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--fond); color: var(--accent); margin-bottom: 16px; }
.benefice-icone svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.benefice h3 { margin-bottom: 8px; }
.benefice p, .benefice .texte-riche { margin: 0; font-size: .95rem; color: var(--encre-2); }

/* Réalisations */
.page-tete { padding: clamp(48px, 7vw, 88px) 0 8px; background: linear-gradient(var(--fond-2), var(--fond)); }
.fil { margin-bottom: 16px; font-size: .9rem; }
.fil a { color: var(--gris); text-decoration: none; }
.fil a:hover { color: var(--accent-fonce); }

.grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.carte-lien { display: flex; flex-direction: column; height: 100%; text-decoration: none; border-radius: var(--rayon); }
.carte-lien:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.carte .ecran { transition: transform .25s ease, box-shadow .25s ease; }
.carte-lien:hover .ecran { transform: translateY(-4px); box-shadow: 0 2px 4px rgb(19 32 47 / .06), 0 18px 40px rgb(19 32 47 / .16); }
.carte-corps { padding: 18px 4px 0; }
.carte h3 { margin: 6px 0 8px; font-size: 1.25rem; }
.carte-lien:hover h3 { color: var(--accent-fonce); }
.carte-desc { font-size: .93rem; color: var(--encre-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; font: 500 .75rem var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--gris); }
.meta span + span::before { content: "·"; margin-right: 8px; }
.trajet { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .8rem; margin: 0; }
.trajet span:not(.fleche) { padding: 3px 9px; border-radius: 999px; }
.trajet .avant { background: var(--fond-2); color: var(--encre-2); text-decoration: line-through; text-decoration-color: rgb(19 32 47 / .35); }
.trajet .apres { background: rgb(217 84 43 / .1); color: var(--accent-fonce); font-weight: 600; }
.trajet .fleche { color: var(--gris); }

/* Cadre « navigateur » autour des captures */
.ecran { margin: 0; overflow: hidden; border-radius: var(--rayon); border: 1px solid var(--ligne); background: var(--fond); box-shadow: var(--ombre); }
.ecran-barre { display: flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; background: #eef0f3; border-bottom: 1px solid var(--ligne); }
.ecran-barre i { width: 9px; height: 9px; border-radius: 50%; background: #cfd5dc; }
.ecran-barre b { flex: 1; margin-left: 10px; font: 500 .7rem var(--mono); color: var(--gris); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ecran img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.ecran-vide { display: grid; place-items: center; aspect-ratio: 16 / 10; padding: 24px; text-align: center; font: 600 1.3rem var(--serif); color: var(--encre-2); background: repeating-linear-gradient(135deg, var(--fond-2) 0 12px, #ece9e3 12px 24px); }
.ecran figcaption { padding: 10px 14px; font: 500 .75rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--gris); border-top: 1px solid var(--ligne); }

.filtres { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin-bottom: 36px; padding-bottom: 24px; border-bottom: 1px solid var(--ligne); }
.filtres label { display: flex; flex-direction: column; gap: 4px; font: 500 .72rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--gris); }
.filtres select { min-width: 170px; padding: 9px 34px 9px 12px; font: 500 .95rem var(--sans); color: var(--encre); background: var(--fond) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2313202f' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center; border: 1px solid var(--ligne); border-radius: 8px; appearance: none; cursor: pointer; }
.filtres select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.compteur { margin: 0 0 0 auto; font-size: .9rem; color: var(--gris); }
.carte[hidden] { display: none; }
.vide { color: var(--gris); padding: 40px 0; }

.fiche { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 48px; align-items: start; }
.fiche-visuels { display: grid; gap: 28px; }
.fiche-infos { position: sticky; top: 100px; }
.fiche-infos dl { margin: 0 0 28px; }
.fiche-infos dl div { padding: 12px 0; border-bottom: 1px solid var(--ligne); }
.fiche-infos dt { font: 500 .72rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--gris); }
.fiche-infos dd { margin: 2px 0 0; font-weight: 500; }
.note { margin-top: 14px; font-size: .8rem; color: var(--gris); }

.texte { max-width: 760px; }
.texte h2 { font-size: 1.4rem; margin-top: 36px; }
.a-completer { color: var(--accent-fonce); }

/* Pages intérieures d'une réalisation */
.pages-site { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.ecran.page .ecran-barre b { font-size: .65rem; }
.ecran.page figcaption { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; font: 400 .85rem/1.45 var(--sans); text-transform: none; letter-spacing: 0; color: var(--encre-2); }
.ecran.page figcaption strong { font: 600 1rem/1.3 var(--serif); color: var(--encre); }
.ecran.page figcaption span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ecran.page figcaption a { margin-top: 4px; font-size: .8rem; font-weight: 600; color: var(--accent-fonce); text-decoration: none; }
.ecran.page figcaption a:hover { text-decoration: underline; }
.zoomable { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.zoomable:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.zoom { max-width: min(1200px, 94vw); padding: 0; border: 0; border-radius: var(--rayon); background: var(--fond); overflow: visible; }
.zoom::backdrop { background: rgb(15 26 38 / .8); }
.zoom img { width: 100%; border-radius: var(--rayon); cursor: zoom-out; }
.zoom-fermer { position: absolute; top: -14px; right: -14px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--fond); color: var(--encre); font-size: 1.4rem; line-height: 1; cursor: pointer; box-shadow: var(--ombre); }

/* Bénéfices d'une réalisation */
.benefices-projet { margin-top: 56px; }
.benefices-projet h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin-bottom: 24px; }

/* Réalisation précédente / suivante */
.voisines { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 20px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--ligne); }
.voisine { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; border: 1px solid var(--ligne); border-radius: var(--rayon); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.voisine:hover, .voisine:focus-visible { border-color: transparent; box-shadow: var(--ombre); }
.voisine.suivante { text-align: right; }
.voisine-sens { font: 500 .75rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--accent-fonce); }
.voisine-titre { font: 600 1.05rem/1.3 var(--serif); }
.voisines-aide { align-self: center; margin: 0; font-size: .8rem; color: var(--gris); white-space: nowrap; }
kbd { display: inline-block; min-width: 1.6em; padding: 1px 5px; border: 1px solid var(--ligne); border-bottom-width: 2px; border-radius: 4px; font: .75rem var(--mono); text-align: center; background: var(--fond); }
.nav .langue { align-self: center; line-height: 1.5; padding: 3px 9px; border: 1px solid var(--ligne); border-radius: 6px; font: 600 .75rem var(--mono); letter-spacing: .06em; }
.nav .langue:hover { border-color: var(--encre); }

/* Plan du site */
.plan { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; }
.plan h2 { font-size: 1.3rem; margin: 0 0 12px; }
.plan h2 + h2, .plan ul + h2 { margin-top: 28px; }
.plan h2 small { font: 500 .85rem var(--sans); color: var(--gris); }
.plan h3 { font: 600 .75rem var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--gris); margin: 20px 0 8px; }
.plan ul { margin: 0; padding-left: 18px; }
.plan li { margin: 4px 0; }
.plan a { text-decoration: none; }
.plan a:hover { color: var(--accent-fonce); text-decoration: underline; }
.plan-annee { margin-left: 6px; font-size: .8rem; color: var(--gris); }

/* Pied de page */
.site-footer { padding: 40px 0; border-top: 1px solid var(--ligne); font-size: .9rem; color: var(--gris); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer-inner p { margin: 10px 0 0; max-width: 380px; }
.footer-nav { display: flex; gap: 22px; }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: var(--encre); }
.copyright { margin: 0; }

/* Apparition douce au défilement (désactivée si l'utilisateur limite les animations) */
@media (prefers-reduced-motion: no-preference) {
  .js .apparait { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
  .js .apparait.visible { opacity: 1; transform: none; }
}

@media (max-width: 960px) {
  .offres, .grille, .benefices { grid-template-columns: repeat(2, 1fr); }
  .pages-site { grid-template-columns: repeat(3, 1fr); }
  .etapes { grid-template-columns: repeat(2, 1fr); }
  .ia-inner, .fiche, .plan { grid-template-columns: 1fr; gap: 28px; }
  .fiche-infos { position: static; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .logo-text { display: none; }
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 16px 16px; background: var(--fond); border-bottom: 1px solid var(--ligne); }
  .nav.ouvert { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--ligne); }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .offres, .grille, .etapes, .benefices, .pages-site { grid-template-columns: 1fr; }
  .voisines { grid-template-columns: 1fr 1fr; }
  .voisines-aide { display: none; }
  .nav .langue { align-self: flex-start; margin-top: 12px; }
  .filtres label, .filtres select { width: 100%; }
  .compteur { margin: 0; }
}

/* Textes mis en forme depuis le back-office */
.texte-riche > :last-child { margin-bottom: 0; }
.texte-riche p { margin: 0 0 1em; }
.texte-riche ul, .texte-riche ol { margin: 0 0 1em; padding-left: 1.2em; }
.texte-riche li { margin-bottom: .3em; }
.texte-riche a { color: var(--accent-fonce); text-underline-offset: 2px; }
.section-ia .texte-riche a, .contact .texte-riche a { color: #fff; }

/* Bandeau de consentement (affiché seulement si Google Analytics est configuré) */
.consentement { position: fixed; z-index: 50; left: 16px; right: 16px; bottom: 16px; max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; gap: 20px; padding: 18px 20px; border-radius: var(--rayon);
  background: var(--fond); border: 1px solid var(--ligne); box-shadow: 0 10px 40px rgb(19 32 47 / .18); font-size: .92rem; }
.consentement[hidden] { display: none; }
.consentement p { margin: 0; color: var(--encre-2); }
.consentement a { color: var(--accent-fonce); }
.consentement-choix { display: flex; gap: 8px; flex-shrink: 0; }
.consentement .btn { padding: 9px 18px; }
@media (max-width: 720px) { .consentement { flex-direction: column; align-items: stretch; } .consentement-choix .btn { flex: 1; text-align: center; } }
