/* =====================================================================
   SOS Patrimoine : styles du site (en-tête, pages service, familles,
   régions, zone d'intervention, accueil, pages légales).
   Complète sos-form.css (couleurs, polices et formulaire).
   ===================================================================== */

/* ---------- Couleur de famille ---------- */
:root { --fam: #1f4fb5; --fam-soft: #eef3fd; }
[data-family="toiture"] { --fam: #2563eb; --fam-soft: #eaf1fe; }
[data-family="facade"] { --fam: #c2410c; --fam-soft: #fdefe7; }
[data-family="humidite"] { --fam: #0e7490; --fam-soft: #e6f5f8; }
[data-family="energie"] { --fam: #b45309; --fam-soft: #fdf3e3; }
[data-family="exterieurs"] { --fam: #15803d; --fam-soft: #e9f7ee; }
[data-family="menuiseries"] { --fam: #4f46e5; --fam-soft: #eeedfd; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; color: #fff; background: var(--navy-900); border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; color: #fff; }

/* ---------- En-tête du site ---------- */
.site-head { position: sticky; top: 0; z-index: 40; color: #fff; background: var(--navy-900); box-shadow: 0 1px 0 rgb(255 255 255 / .06), 0 10px 30px -18px rgb(0 0 0 / .6); }
.site-head__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.site-head .brand { color: #fff; text-decoration: none; }
.site-head .brand:hover { color: #fff; }
.site-head .brand__logo { width: 38px; height: 38px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 11px; font-size: 14.5px; font-weight: 700; color: rgb(255 255 255 / .86); text-decoration: none; border-radius: 10px; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgb(255 255 255 / .1); }
.nav__cta { margin-left: 6px; color: #fff !important; background: var(--tile-600) !important; }
.nav__cta:hover { background: #bb410e !important; }
.menu { display: none; }
@media (max-width: 1023px) {
  .nav { display: none; }
  .menu { display: block; position: relative; }
  .menu > summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; font-weight: 700; list-style: none; cursor: pointer;
    border: 1.5px solid rgb(255 255 255 / .25); border-radius: 12px; }
  .menu > summary::-webkit-details-marker { display: none; }
  .menu[open] > summary { background: rgb(255 255 255 / .1); }
  .menu__panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(86vw, 320px); padding: 8px; background: #fff; border-radius: 16px; box-shadow: 0 24px 48px -16px rgb(0 0 0 / .45); }
  .menu__panel a { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 12px; color: var(--ink); font-weight: 700; text-decoration: none; border-radius: 10px; }
  .menu__panel a:hover { background: var(--blue-50); }
  .menu__panel .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
  .menu__panel a.menu__cta { justify-content: center; margin-top: 6px; color: #fff; background: var(--tile-600); }
  .menu__panel a.menu__cta:hover { color: #fff; background: #bb410e; }
}

/* ---------- Bandeau d'en-tête des pages de contenu ---------- */
/* Même décor que le bandeau des pages formulaire (.band dans sos-form.css) : écailles de tuiles qui s'estompent
   vers le bas, puis une ligne de petites maisons posée sur le filet de couleur de la famille.
   z-index 2 : la liste de la recherche de l'accueil, qui déborde sous le bandeau, reste au-dessus des cartes. */
.page-hero { position: relative; z-index: 2; color: #fff; padding: 34px 0 72px; background: radial-gradient(120% 120% at 50% 0%, var(--navy-800) 0%, var(--navy-900) 55%, var(--navy-950) 100%); }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background-size: 48px 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.07' stroke-width='1.2'%3E%3Cpath d='M0 24a24 24 0 0 1 48 0'/%3E%3Cpath d='M-24 48a24 24 0 0 1 48 0M24 48a24 24 0 0 1 48 0'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: linear-gradient(180deg, #000, rgb(0 0 0 / .3)); mask-image: linear-gradient(180deg, #000, rgb(0 0 0 / .3)); }
.page-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: -1; height: 76px; pointer-events: none;
  background: linear-gradient(var(--fam), var(--fam)) left bottom / 100% 4px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='72' viewBox='0 0 240 72'%3E%3Cg fill='%23fff' fill-opacity='.05'%3E%3Cpath d='M6 72V46L52 14l46 32v26z'/%3E%3Cpath d='M72 27.9V12h10v22.9z'/%3E%3Cpath d='M118 72V52l56-30 56 30v20z'/%3E%3C/g%3E%3C/svg%3E") repeat-x left 0 bottom 4px / 240px 72px; }
.page-hero h1 { margin: 10px 0 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.8rem, 1.2rem + 2.6vw, 2.8rem); line-height: 1.08; letter-spacing: -.025em; text-wrap: balance; }
.page-hero p.lead { max-width: 64ch; margin: 14px 0 0; font-size: 17px; color: rgb(255 255 255 / .84); text-wrap: pretty; }
.page-hero .eyebrow { margin: 0; }
.page-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.page-hero__actions .btn { width: auto; margin: 0; }
@media (max-width: 559px) { .page-hero__actions .btn { flex: 1 1 100%; } }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 6px; padding: 0; list-style: none; font-size: 13.5px; color: rgb(255 255 255 / .7); }
.crumbs a { color: rgb(255 255 255 / .85); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: rgb(255 255 255 / .4); }
.crumbs--light { color: var(--muted); }
.crumbs--light a { color: var(--blue-600); }
.crumbs--light li + li::before { color: var(--line-strong); }

/* ---------- Mise en page du contenu ---------- */
.container { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 16px; }
@media (min-width: 768px) { .container { padding-inline: 24px; } }
.section { padding: 36px 0 8px; }
.section__title { margin: 0 0 14px; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.85rem); line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.section__lead { max-width: 68ch; margin: -4px 0 18px; color: var(--muted); font-size: 16.5px; }
.prose { max-width: 72ch; }
.prose p { margin: 0 0 14px; font-size: 16.5px; line-height: 1.65; }
.prose h2 { margin: 34px 0 12px; font-family: var(--font-display); font-size: clamp(1.25rem, 1.1rem + .8vw, 1.6rem); line-height: 1.2; letter-spacing: -.015em; }
.prose h3 { margin: 24px 0 8px; font-size: 18px; }
.prose ul { margin: 0 0 14px; padding-left: 20px; }
.prose li { margin: 4px 0; line-height: 1.6; }
/* Liste de liens (page Qui sommes-nous) : zone tactile d'au moins 32 px */
.prose .link-list li { margin: 0; }
.prose .link-list a { display: inline-flex; align-items: center; min-height: 34px; }

/* ---------- Page service : guide sous le formulaire ---------- */
.guide { margin-top: 40px; padding-top: 8px; border-top: 1px solid var(--line); }
.guide .crumbs--light { margin-top: 18px; }
.guide__intro { max-width: 72ch; font-size: 17px; line-height: 1.65; }
.keypoints { display: grid; gap: 10px; margin: 18px 0 0; padding: 0; list-style: none; }
.keypoints li { display: flex; gap: 12px; padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--fam); border-radius: 12px; line-height: 1.55; }
.keypoints .ic { width: 22px; height: 22px; margin-top: 1px; color: var(--fam); }
.cards { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .cards--2 { grid-template-columns: 1fr 1fr; } .cards--3 { grid-template-columns: repeat(3, 1fr); } }
.tile { padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
/* Carte dont le titre est un lien : toute la carte est cliquable (zone tactile confortable) */
.tile:has(> h3 a) { position: relative; transition: border-color .2s, box-shadow .2s; }
.tile:has(> h3 a):hover { border-color: var(--fam); box-shadow: 0 12px 28px -18px rgb(11 35 80 / .5); }
.tile > h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.tile > h3 a { display: inline-block; padding-block: 6px; margin-block: -6px; }
.tile h3 { margin: 0 0 6px; font-size: 16.5px; line-height: 1.3; }
.tile p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { position: relative; padding: 16px 16px 16px 62px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 16px; top: 16px; display: grid; place-items: center; width: 32px; height: 32px;
  font-family: var(--font-display); font-weight: 800; color: #fff; background: var(--fam); border-radius: 10px; }
.steps h3 { margin: 2px 0 4px; font-size: 16.5px; }
.steps p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.note { padding: 18px 20px; background: var(--fam-soft); border-radius: 16px; }
.note h3 { margin: 0 0 6px; font-size: 17px; }
.note p { margin: 0; line-height: 1.6; }
.regions { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .regions { grid-template-columns: 1fr 1fr; } }
.regions > li { padding: 16px 18px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.regions h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 16px; }
.regions h3 a { display: inline-flex; align-items: center; min-height: 32px; }
.regions h3 .ic { width: 20px; height: 20px; color: var(--fam); }
.regions p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.regions a { font-weight: 700; }
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 56px; padding: 14px 18px; font-weight: 700; line-height: 1.35; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 28px; height: 28px; font-size: 20px; color: var(--fam); background: var(--fam-soft); border-radius: 50%; }
.faq details[open] summary::after { content: "−"; }
.faq details > div { padding: 0 18px 16px; color: var(--ink); line-height: 1.65; }
.faq details > div p { margin: 0; }
.cta-band { margin: 40px 0 8px; padding: 26px 22px; color: #fff; text-align: center; background: var(--navy-900); border-radius: 22px; }
.cta-band h2 { margin: 0; font-family: var(--font-display); font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem); }
.cta-band p { margin: 8px auto 16px; max-width: 52ch; color: rgb(255 255 255 / .82); }
.cta-band .btn { width: auto; min-width: 260px; margin: 0; }
.related { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .related { grid-template-columns: 1fr 1fr; } }
.dept-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.dept-list li { padding: 6px 12px; font-size: 14px; font-weight: 600; background: #fff; border: 1px solid var(--line); border-radius: 999px; }
.dept-list li:has(> a) { padding: 0; }
.dept-list li > a { display: inline-flex; align-items: center; min-height: 38px; padding: 6px 14px; color: var(--ink); text-decoration: none; border-radius: 999px; }
.dept-list li > a:hover { color: var(--blue-600); }
/* Arguments sous le titre : alignés à gauche comme le reste du bandeau (centrés sur les pages formulaire) */
.page-hero .trust { justify-content: flex-start; }

/* ---------- Cartes service (familles, accueil) ---------- */
.svc-grid--3 { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .svc-grid--3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .svc-grid--3 { grid-template-columns: repeat(3, 1fr); } }
.svc__icon { color: var(--fam); background: var(--fam-soft); }
.svc:hover { border-color: var(--fam); box-shadow: 0 12px 28px -18px rgb(11 35 80 / .5); }
.svc__more { margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 700; color: var(--fam); }

/* ---------- Recherche de travaux (accueil, page introuvable) ---------- */
.home-hero { padding: 28px 0 72px; }
.home-hero h1 { max-width: 24ch; }
.hsearch { position: relative; max-width: 700px; margin-top: 22px; scroll-margin-top: 84px; }
.hsearch__label { display: block; margin: 0 0 8px; font-family: var(--font-display); font-weight: 800; font-size: 19px; line-height: 1.25; }
.hsearch__field { position: relative; }
.hsearch__field > .ic { position: absolute; left: 16px; top: 29px; width: 24px; height: 24px; transform: translateY(-50%); color: var(--blue-600); pointer-events: none; }
.hsearch__input { width: 100%; min-height: 58px; padding: 14px 16px 14px 50px; font: 600 17px/1.3 var(--font-body); color: var(--ink); background: #fff;
  border: 2px solid #fff; border-radius: 16px; box-shadow: 0 14px 34px -16px rgb(0 0 0 / .55); -webkit-appearance: none; appearance: none; }
.hsearch__input::placeholder { color: #6b7385; font-weight: 500; opacity: 1; }
.hsearch__input:focus { outline: none; border-color: var(--tile-400); }
.hsearch__help { margin: 8px 0 0; font-size: 14px; color: rgb(255 255 255 / .78); }
.hsearch__list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); max-height: min(62vh, 440px); overflow-y: auto; margin: 0; padding: 6px;
  list-style: none; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-card); overscroll-behavior: contain; }
.hsearch__opt { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 10px; color: var(--ink); text-decoration: none; border-radius: 12px; }
.hsearch__opt:hover, .hsearch__opt:focus-visible { color: var(--ink); background: var(--fam-soft); }
.hsearch__opt:focus-visible { box-shadow: inset 0 0 0 2px var(--fam); }
.hsearch__ic { display: grid; place-items: center; flex: none; width: 38px; height: 38px; color: var(--fam); background: var(--fam-soft); border-radius: 11px; }
.hsearch__ic .ic { width: 22px; height: 22px; }
.hsearch__opt b { display: block; font-weight: 700; line-height: 1.25; }
.hsearch__opt small { display: block; margin-top: 1px; font-size: 13px; color: var(--muted); }
.hsearch__empty { padding: 12px 10px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.hsearch__popular { margin-top: 18px; }
.hsearch__popular > p { margin: 0; font-size: 14px; font-weight: 700; color: rgb(255 255 255 / .78); }
.hsearch__popular .chips-nav { margin-top: 8px; }
/* Variante claire (page introuvable) */
.hsearch--light { margin: 18px 0 22px; }
.hsearch--light .hsearch__input { border-color: var(--line-strong); box-shadow: none; }
.hsearch--light .hsearch__input:focus { border-color: var(--blue-600); }
.hsearch--light .hsearch__help { color: var(--muted); }
@media (min-width: 768px) {
  .home-hero { padding: 44px 0 80px; }
  .hsearch__label { font-size: 21px; }
  .hsearch__input { min-height: 64px; font-size: 18px; }
  .hsearch__field > .ic { top: 32px; }
}

/* ---------- Familles (accueil) ---------- */
.fam-grid { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 720px) { .fam-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .fam-grid { grid-template-columns: repeat(3, 1fr); } }
.fam { display: flex; flex-direction: column; height: 100%; padding: 20px; background: #fff; border: 1px solid var(--line); border-top: 5px solid var(--fam); border-radius: 18px; }
.fam__head { display: flex; align-items: center; gap: 12px; }
.fam__icon { display: grid; place-items: center; width: 48px; height: 48px; color: var(--fam); background: var(--fam-soft); border-radius: 14px; }
.fam__icon .ic { width: 28px; height: 28px; }
.fam h3 { margin: 0; font-family: var(--font-display); font-size: 19px; line-height: 1.2; }
.fam h3 a { color: var(--ink); text-decoration: none; }
.fam h3 a::after { content: ""; position: absolute; inset: 0; }
.fam { position: relative; }
.fam p { margin: 10px 0 12px; font-size: 15px; line-height: 1.55; color: var(--muted); }
.fam ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.fam ul li { position: relative; z-index: 1; }
.fam ul a { display: inline-flex; align-items: center; min-height: 34px; padding: 6px 12px; font-size: 13.5px; font-weight: 600; color: var(--ink); text-decoration: none; background: var(--fam-soft); border-radius: 999px; }
.fam ul a:hover { color: var(--fam); }
.fam__more { margin-top: auto; font-weight: 700; color: var(--fam); }

/* ---------- Pôles (pages famille) ---------- */
.pole-block { padding-top: 26px; scroll-margin-top: 80px; }
.pole-block h2 { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-family: var(--font-display); font-size: 21px; letter-spacing: -.01em; }
.pole-block h2::before { content: ""; width: 6px; height: 26px; background: var(--fam); border-radius: 3px; }
.chips-nav { display: flex; gap: 8px; margin: 22px 0 0; padding: 0; overflow-x: auto; list-style: none; scrollbar-width: none; }
.chips-nav::-webkit-scrollbar { display: none; }
.chips-nav a { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; font-size: 14px; font-weight: 700; color: #fff; text-decoration: none; white-space: nowrap;
  background: rgb(255 255 255 / .1); border: 1px solid rgb(255 255 255 / .2); border-radius: 999px; }
@media (min-width: 768px) { .chips-nav { flex-wrap: wrap; overflow: visible; } }
.chips-nav a:hover { background: rgb(255 255 255 / .18); color: #fff; }

/* ---------- Étapes « comment ça marche » (accueil) ---------- */
.how3 { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: how; }
@media (min-width: 820px) { .how3 { grid-template-columns: repeat(3, 1fr); } }
.how3 li { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.how3 li::before { counter-increment: how; content: counter(how); display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 12px;
  font-family: var(--font-display); font-weight: 800; color: #fff; background: var(--tile-600); border-radius: 12px; }
.how3 h3 { margin: 0 0 6px; font-size: 17px; }
.how3 p { margin: 0; color: var(--muted); line-height: 1.55; }
.pillars { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 820px) { .pillars { grid-template-columns: 1fr 1fr; } }
.pillars li { display: flex; gap: 14px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.pillars .ic { width: 28px; height: 28px; color: var(--blue-600); }
.pillars h3 { margin: 0 0 4px; font-size: 16.5px; }
.pillars p { margin: 0; color: var(--muted); line-height: 1.55; font-size: 15px; }

/* ---------- Zone d'intervention ---------- */
.zone-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 16px; }
.zone-tools .input { max-width: 420px; }
.zone-count { font-size: 14px; color: var(--muted); }
.dept { margin: 0 0 12px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.dept > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 14px 18px; font-weight: 800; cursor: pointer; list-style: none; }
.dept > summary::-webkit-details-marker { display: none; }
.dept > summary span { font-size: 13.5px; font-weight: 600; color: var(--muted); }
/* Pages métier : lien vers la page du département, puis les communes en pastilles */
.hub-dept__link { margin: -4px 18px 4px; font-size: 14.5px; }
.hub-dept__link a { display: inline-block; padding-block: 6px; }
.hub-dept > .chips { margin: 4px 0 0; padding: 0 18px 18px; }
.communes { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 16px; margin: 0; padding: 4px 18px 18px; list-style: none; font-size: 14.5px; }
.communes li { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.communes small { flex: none; font-size: 12px; font-weight: 700; color: var(--muted); }
.terroir-tag { display: inline-block; padding: 2px 8px; font-size: 11.5px; font-weight: 700; border-radius: 999px; background: var(--paper); color: var(--muted); }
.terroirs { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 820px) { .terroirs { grid-template-columns: 1fr 1fr; } }
.terroirs > li { padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 18px; }
.terroirs h3 { margin: 0 0 6px; font-size: 17px; }
.terroirs p { margin: 0 0 10px; color: var(--muted); line-height: 1.55; font-size: 15px; }
.terroirs .links { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.terroirs .links a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; font-size: 13.5px; font-weight: 700; text-decoration: none; border-radius: 999px; background: var(--paper); }
.terroirs .links a:hover { background: var(--blue-50); }
.communes a { color: var(--ink); text-decoration: none; font-weight: 600; }
.communes a:hover { color: var(--blue-600); text-decoration: underline; }

/* ---------- Pied de page du site ---------- */
.site-foot { margin-top: 56px; padding: 36px 0 28px; color: rgb(255 255 255 / .78); background: var(--navy-950); font-size: 14.5px; }
.site-foot a { color: #fff; text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot ul a { display: inline-block; padding-block: 7px; }
.site-foot__grid { display: grid; gap: 24px; }
@media (min-width: 820px) { .site-foot__grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.site-foot h2 { margin: 0 0 10px; font-size: 15px; color: #fff; letter-spacing: .02em; }
.site-foot ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0; }
.site-foot p { margin: 8px 0 0; line-height: 1.6; }
.site-foot__legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 28px; padding-top: 18px; border-top: 1px solid rgb(255 255 255 / .1); font-size: 13.5px; }

/* ---------- Formulaire : écran d'erreur ---------- */
.retry { display: grid; gap: 10px; max-width: 360px; margin: 18px auto 0; }
.btn--light { color: var(--ink); background: var(--paper); border: 1.5px solid var(--line-strong); }
.btn--light:hover:not(:disabled) { background: #ece6db; }
/* « a.btn » impose un texte blanc : le bouton clair doit rester lisible */
a.btn--light, a.btn--light:hover { color: var(--ink); background: #fff; }
a.btn--light:hover { border-color: var(--blue-600); }
.err-mark { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 14px; color: var(--err-700); background: #fdecea; border-radius: 50%; }
.err-mark .ic { width: 40px; height: 40px; }

/* Thème de famille sur les pages service */
[data-family] .eyebrow__dot { background: var(--tile-400); }
[data-family] .progress__bar span::after { background: var(--fam); }
[data-family] .opt[aria-pressed="true"] { border-color: var(--fam); box-shadow: inset 0 0 0 1px var(--fam); background: var(--fam-soft); }
[data-family] .opt[aria-pressed="true"] .opt__icon { background: var(--fam); }
[data-family] .opt__icon { color: var(--fam); background: var(--fam-soft); }
[data-family] .opt--urgent .opt__icon { color: var(--tile-600); background: var(--tile-50); }
[data-family] .progress__label { color: var(--fam); }

/* ---------- 404 et pages légales ---------- */
/* padding-top et padding-bottom seulement : le .container garde ses marges latérales sur mobile */
.legal { padding-top: 30px; padding-bottom: 10px; }
.legal h2 { margin-top: 30px; }
.todo { padding: 1px 6px; color: var(--tile-700); background: var(--tile-50); border-radius: 6px; font-weight: 700; }
.center { text-align: center; }

/* ---------- Pages locales (communes, métier × ville) ---------- */
.communes .deleg { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; }
.facts li { padding: 14px 16px; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.facts b { display: block; font-family: var(--font-display); font-size: 22px; line-height: 1.15; color: var(--ink); }
.facts span { display: block; margin-top: 4px; font-size: 14px; line-height: 1.4; color: var(--muted); }
.local-block { max-width: 76ch; }
.local-block p { margin: 0 0 12px; font-size: 16.5px; line-height: 1.65; }
.local-block > h3, .local-block > .local-block__title { margin: 22px 0 8px; font-size: 18px; line-height: 1.3; }
.local-block > h3 a { display: inline-block; padding-block: 6px; }
.chips a { min-height: 36px; display: inline-flex; align-items: center; }
/* Listes de texte seulement : les grilles (cartes, pastilles, chiffres) gardent leur propre mise en page */
.local-block ul:not([class]) { margin: 0 0 14px; padding-left: 20px; }
.local-block ul:not([class]) > li { margin: 4px 0; line-height: 1.55; }
.local-block .cards, .local-block .facts { margin-bottom: 18px; }
.local-block .tile h3 { margin: 0 0 6px; font-size: 16.5px; line-height: 1.3; }
.local-block .tile h3 a { text-decoration: none; }
.local-block .tile h3 a:hover { text-decoration: underline; }
.dpe-bars { display: grid; gap: 6px; max-width: 560px; margin: 6px 0 16px; padding: 0; list-style: none; }
.dpe-bars li { display: grid; grid-template-columns: 30px 1fr 64px; align-items: center; gap: 10px; font-size: 14px; }
.dpe-bars .l { display: grid; place-items: center; height: 24px; font-weight: 800; border-radius: 6px; color: #fff; }
.dpe-bars .bar { height: 14px; overflow: hidden; background: var(--line); border-radius: 7px; }
.dpe-bars .bar i { display: block; height: 100%; border-radius: 7px; background: currentColor; }
.dpe-bars .v { text-align: right; font-weight: 700; color: var(--ink); }
.dpe-A { color: #00845a; } .dpe-A .l { background: #00845a; }
.dpe-B { color: #3f9a44; } .dpe-B .l { background: #3f9a44; }
.dpe-C { color: #8fb85a; } .dpe-C .l { background: #8fb85a; color: #14260a; }
.dpe-D { color: #e8d51c; } .dpe-D .l { background: #f4e70f; color: #2b2600; }
.dpe-E { color: #f0b40f; } .dpe-E .l { background: #f0b40f; color: #2b1d00; }
.dpe-F { color: #e07020; } .dpe-F .l { background: #e07020; color: #1f0d00; }
.dpe-G { color: #c81e1b; } .dpe-G .l { background: #c81e1b; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.chips a { display: inline-block; padding: 7px 12px; font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 999px; }
.chips a:hover { border-color: var(--fam); color: var(--fam); }
.chips small { font-weight: 600; color: var(--muted); }
.sources { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.sources li { margin: 3px 0; }
.updated { font-size: 13.5px; color: var(--muted); }
.city-table { width: 100%; max-width: 860px; border-collapse: collapse; font-size: 14.5px; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.city-table th, .city-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
.city-table th { font-size: 13px; font-weight: 800; color: var(--muted); background: var(--paper); }
.city-table td.n { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.svc-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.svc-mini a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 12px 14px; font-weight: 700; color: var(--ink); text-decoration: none; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--fam); border-radius: 12px; }
.svc-mini a:hover { border-color: var(--fam); color: var(--fam); }
.svc-mini .ic { flex: none; width: 18px; height: 18px; color: var(--fam); }
