

:root {
  /* Couleurs globales (palette du cahier des charges §7) */
  --c-primaire: #00765d;      /* Vert Auzon — texte possible sur blanc (5,6:1) */
  --c-primaire-fonce: #005a47;/* survols, liens visités */
  --c-nuit: #0d3a30;          /* fonds sombres : barre haute, pied de page */
  --c-lime: #becf00;          /* aplats uniquement, avec texte foncé */
  --c-lime-pale: #f1f5c8;
  --c-ciel: #afe1f6;          /* aplats uniquement, avec texte foncé */
  --c-ciel-pale: #e5f4fb;
  --c-creme: #f5f7f2;         /* fonds de sections alternées */
  --c-texte: #14302a;
  --c-texte-doux: #46594f;    /* 6,9:1 sur blanc */
  --c-bord: #d8e2dc;
  --c-blanc: #ffffff;
  --c-alerte: #b42318;

  /* Typographies globales */
  --f-titre: "Fraunces", Georgia, serif;
  --f-texte: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  
  --t-h1: clamp(2rem, 1.2rem + 3vw, 3.25rem);
  --t-h2: clamp(1.6rem, 1.2rem + 1.4vw, 2.25rem);
  --t-h3: clamp(1.2rem, 1.05rem + .5vw, 1.45rem);
  --t-h4: 1.1rem;
  --t-texte: 1.0625rem;
  --t-petit: .9rem;

  /* Espacements et formes */
  --conteneur: 1240px;
  --gouttiere: clamp(16px, 4vw, 32px);
  --section-y: clamp(36px, 5vw, 64px);
  --rayon: 14px;
  --rayon-s: 8px;
  --ombre: 0 1px 2px rgba(13,58,48,.06), 0 6px 24px rgba(13,58,48,.08);
  --ombre-forte: 0 12px 40px rgba(13,58,48,.18);
  --focus: 0 0 0 3px #fff, 0 0 0 6px #0d3a30;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--c-blanc); color: var(--c-texte);
  font-family: var(--f-texte); font-size: var(--t-texte); line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--c-primaire); text-underline-offset: 3px; }
a:hover { color: var(--c-primaire-fonce); }
/* L'anneau de focus suit la forme de l'élément (rond, pilule, coins arrondis) : on ne force aucun arrondi. */
:focus-visible { outline: none; box-shadow: var(--focus); }
a:focus-visible { border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--f-titre); line-height: 1.15; margin: 0 0 .5em; color: var(--c-nuit); font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); }
h4 { font-size: var(--t-h4); font-family: var(--f-texte); font-weight: 700; letter-spacing: 0; }
p { margin: 0 0 1em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.conteneur { width: 100%; max-width: var(--conteneur); margin: 0 auto; padding: 0 var(--gouttiere); }
.section { padding: var(--section-y) 0; }
.section--creme { background: var(--c-creme); }
.section--ciel { background: var(--c-ciel-pale); }
.section--nuit { background: var(--c-nuit); color: #fff; }
.section--nuit h2, .section--nuit h3 { color: #fff; }
.section__tete { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section__tete h2 { margin: 0; }
.surtitre { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-primaire); margin-bottom: .5rem; }
.trait { display: block; width: 56px; height: 5px; border-radius: 3px; background: var(--c-lime); margin: .6rem 0 0; }
.chapo { font-size: 1.2rem; color: var(--c-texte-doux); max-width: 62ch; }
.grille { display: grid; gap: 24px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .g-4 { grid-template-columns: repeat(2, 1fr); } .g-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .g-2, .g-3, .g-4 { grid-template-columns: 1fr; } }

/* Lien d'évitement (RGAA 12.7) */
.evitement { position: absolute; left: 8px; top: -100px; z-index: 1000; display: flex; gap: 8px; }
.evitement a { background: var(--c-nuit); color: #fff; padding: 10px 16px; border-radius: 6px; font-weight: 600; }
.evitement:focus-within { top: 8px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em; justify-content: center;
  font: 600 1rem/1.2 var(--f-texte); padding: .85em 1.35em; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer; text-decoration: none; transition: background .2s, color .2s, transform .2s;
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn--primaire { background: var(--c-primaire); color: #fff; }
.btn--primaire:hover { background: var(--c-primaire-fonce); color: #fff; }
.btn--lime { background: var(--c-lime); color: var(--c-nuit); }
.btn--lime:hover { background: #a9b800; color: var(--c-nuit); }
.btn--contour { border-color: var(--c-primaire); color: var(--c-primaire); background: transparent; }
.btn--contour:hover { background: var(--c-primaire); color: #fff; }
.btn--blanc { background: #fff; color: var(--c-nuit); }
.btn--petit { padding: .55em 1em; font-size: .9rem; }
.lien-fleche { font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; gap: .4em; }
.lien-fleche::after { content: "→"; transition: transform .2s; }
.lien-fleche:hover::after { transform: translateX(4px); }

/* Pastilles / étiquettes de catégorie */
.tag { display: inline-block; font-size: .78rem; font-weight: 700; padding: .25em .7em; border-radius: 999px; background: var(--c-lime-pale); color: var(--c-nuit); }
.tag--ciel { background: var(--c-ciel-pale); }
.tag--vert { background: var(--c-primaire); color: #fff; }
.tag--lime { background: var(--c-lime); }

/* Filtres (puces) */
.filtres { display: flex; flex-wrap: wrap; gap: 8px; }
.filtre {
  font: 600 .9rem var(--f-texte); padding: .5em 1em; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--c-bord); background: #fff; color: var(--c-texte);
}
.filtre:hover { border-color: var(--c-primaire); }
.filtre[aria-pressed="true"] { background: var(--c-primaire); border-color: var(--c-primaire); color: #fff; }

/* ---------- Barre haute ---------- */
.barre-haute { background: var(--c-nuit); color: #fff; font-size: .85rem; }
.barre-haute .conteneur { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 42px; }
.barre-haute ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 22px; align-items: center; }
.barre-haute a, .barre-haute button { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; font: inherit; cursor: pointer; padding: 4px 0; }
.barre-haute a:hover, .barre-haute button:hover { text-decoration: underline; }
.barre-haute svg { width: 16px; height: 16px; }
.reseaux { display: flex; gap: 10px; }
.reseaux a { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.12); justify-content: center; padding: 0 !important; }
@media (max-width: 900px) { .barre-haute .bh-secondaire { display: none; } }
@media (max-width: 640px) { .barre-haute .bh-principale li:not(:first-child) { display: none; } }

/* ---------- En-tête ---------- */
.entete { background: #fff; position: sticky; top: calc(-1 * var(--h-haut)); z-index: 100; box-shadow: 0 1px 0 var(--c-bord); }
:root { --h-haut: 88px; }
.entete__haut { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--h-haut); }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.logo img { height: 58px; width: auto; }
.logo span { font: 650 1.15rem/1.05 var(--f-titre); color: var(--c-nuit); }
.logo small { display: block; font: 500 .75rem var(--f-texte); color: var(--c-texte-doux); }
.entete__actions { display: flex; gap: 10px; align-items: center; }
.btn-recherche { height: 46px; padding: 0 18px 0 14px; border-radius: 999px; border: 1.5px solid var(--c-bord); background: #fff; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--c-nuit); font: 600 .95rem var(--f-texte); }
.btn-recherche:hover { border-color: var(--c-primaire); color: var(--c-primaire); }
.btn-recherche svg { width: 20px; height: 20px; }
.entete__cta { height: 46px; padding: 0 20px; white-space: nowrap; }
.entete__cta.actif { box-shadow: 0 0 0 3px var(--c-lime); }

/* Rangée 2 : menu principal, collant au défilement */
.entete__nav { border-top: 1px solid var(--c-bord); }
.nav__liste { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; gap: 4px; }
.nav__item { position: relative; }
.nav__item--mobile { display: none; }
.nav__bouton {
  display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 56px; white-space: nowrap;
  font: 600 1rem/1 var(--f-texte); color: var(--c-texte); background: none; border: 0; cursor: pointer;
}
.nav__item:first-child .nav__bouton { padding-left: 0; }
.nav__bouton .chevron { width: 12px; height: 12px; transition: transform .2s; flex: none; color: var(--c-primaire); }
.nav__bouton:hover, .nav__bouton[aria-expanded="true"] { color: var(--c-primaire); }
.nav__bouton[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.nav__item.actif > .nav__bouton { color: var(--c-primaire); box-shadow: inset 0 -4px 0 var(--c-lime); }
.mega { display: none; grid-template-columns: 1fr 1.3fr; gap: 24px; }
.mega.ouvert { display: grid; }
.mega-fond { display: none; }

/* Ordinateur : panneau arrondi détaché du menu, qui glisse d'une rubrique à l'autre */
@media (min-width: 1201px) {
  .nav { position: relative; }
  .mega {
    --ecart: 12px;
    display: grid; position: absolute; z-index: 2; top: calc(100% + var(--ecart));
    left: 50%; transform: translateX(-50%);
    width: min(660px, 90vw); padding: 28px;
    visibility: hidden; opacity: 0; pointer-events: none;
    transition: opacity .15s ease, visibility 0s linear .15s;
  }
  .mega.ouvert {
    visibility: visible; opacity: 1; pointer-events: auto;
    transition: opacity .25s ease .08s, visibility 0s;
  }
  /* Pont invisible : la souris peut traverser l'espace sans refermer le menu */
  .mega::before { content: ""; position: absolute; left: 0; right: 0; top: calc(-1 * var(--ecart) - 2px); height: calc(var(--ecart) + 2px); }
  .nav__item:nth-child(-n+2) .mega { left: 0; transform: none; }
  .nav__item:nth-last-child(-n+3) .mega { left: auto; right: 0; transform: none; }

  .mega-fond {
    display: block; position: absolute; z-index: 1; left: 0; top: 0; width: 0; height: 0;
    background: #fff; border-radius: 18px; border-top: 4px solid var(--c-primaire); box-shadow: var(--ombre-forte);
    opacity: 0; pointer-events: none;
    transition: transform .35s cubic-bezier(.2,.8,.2,1), width .35s cubic-bezier(.2,.8,.2,1), height .35s cubic-bezier(.2,.8,.2,1), opacity .2s ease, margin-top .3s cubic-bezier(.2,.8,.2,1);
  }
  .mega-fond.visible { opacity: 1; }
  .mega-fond.sans-anim { margin-top: 8px; }
  .mega-fond.sans-anim { transition: opacity .2s ease; }
  /* Liseré vert et petite flèche qui suit la rubrique survolée */
  .mega-fond::after {
    content: ""; position: absolute; top: -11px; left: var(--fleche, 50%); width: 14px; height: 14px; margin-left: -7px;
    background: var(--c-primaire); transform: rotate(45deg); border-radius: 3px 0 0 0;
    transition: left .35s cubic-bezier(.2,.8,.2,1);
  }
  .mega-fond.sans-anim::after { transition: none; }
}
.mega__intro h3 { font-size: 1.25rem; margin-bottom: .3em; }
.mega__intro p { color: var(--c-texte-doux); font-size: .95rem; }
.mega__liens { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mega__liens a { display: flex; justify-content: space-between; padding: 9px 12px; border-radius: 8px; text-decoration: none; color: var(--c-texte); font-weight: 500; }
.mega__liens a:hover { background: var(--c-lime-pale); color: var(--c-nuit); }
.mega__liens a::after { content: "→"; color: var(--c-primaire); }
.burger { display: none; }

/* Entre 1200 et 1320 px : on resserre un peu */
@media (max-width: 1320px) {
  .nav__bouton { padding: 0 10px; font-size: .95rem; }
}

/* Tablette et mobile : menu burger plein écran */
@media (max-width: 1200px) {
  :root { --h-haut: 76px; }
  .entete { top: 0; }
  .entete__nav { border: 0; }
  .nav { display: none; position: fixed; inset: 0; background: #fff; z-index: 200; overflow-y: auto; padding: 84px var(--gouttiere) 32px; }
  .nav.ouvert { display: block; }
  .nav__liste { flex-direction: column; gap: 0; }
  .nav__item, .nav__item--mobile { display: block; border-bottom: 1px solid var(--c-bord); }
  .nav__bouton, .nav__item:first-child .nav__bouton { width: 100%; justify-content: space-between; font-size: 1.1rem; height: auto; padding: 18px 4px; white-space: normal; text-align: left; }
  .nav__item.actif > .nav__bouton { box-shadow: none; }
  .mega { position: static; transform: none !important; width: auto; box-shadow: none; padding: 0 0 16px; border: 0; grid-template-columns: 1fr; gap: 8px; }
  .mega__intro p, .mega__intro h3 { display: none; }
  .burger { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--c-primaire); color: #fff; cursor: pointer; position: relative; z-index: 210; }
  .burger svg { width: 22px; height: 22px; }
  .entete__cta { display: none; }
}
@media (max-width: 640px) { .btn-recherche { width: 46px; padding: 0; justify-content: center; } .btn-recherche span { display: none; } }
@media (max-width: 480px) { .logo img { height: 46px; } .logo span { font-size: 1.02rem; } .logo small { display: none; } }

/* Fil d'Ariane */
.ariane { font-size: .88rem; color: var(--c-texte-doux); padding: 14px 0; }
.ariane ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ariane li + li::before { content: "›"; margin-right: 6px; color: var(--c-texte-doux); }
.ariane a { color: var(--c-texte-doux); }
.ariane [aria-current] { color: var(--c-texte); font-weight: 600; }

/* ---------- Recherche plein écran ---------- */
.recherche-modale { position: fixed; inset: 0; background: rgba(13,58,48,.6); z-index: 300; display: none; padding: 10vh var(--gouttiere); backdrop-filter: blur(4px); }
.recherche-modale.ouvert { display: block; }
.recherche-modale__boite { max-width: 760px; margin: 0 auto; background: #fff; border-radius: var(--rayon); padding: 28px; box-shadow: var(--ombre-forte); }
.recherche-modale__tete { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.recherche-modale__tete h2 { font-size: 1.4rem; margin: 0; }
.fermer { width: 42px; height: 42px; border-radius: 50%; border: 0; background: var(--c-creme); cursor: pointer; font-size: 1.4rem; line-height: 1; color: var(--c-nuit); }
.suggestions { margin-top: 18px; }
.suggestions h3 { font: 700 .8rem var(--f-texte); text-transform: uppercase; letter-spacing: .08em; color: var(--c-texte-doux); }
.suggestions ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.suggestions a { display: inline-block; padding: .45em .9em; border-radius: 999px; background: var(--c-creme); text-decoration: none; font-weight: 500; font-size: .92rem; }
.resultats-instant { list-style: none; margin: 12px 0 0; padding: 0; max-height: 46vh; overflow-y: auto; }
.resultats-instant a { display: block; padding: 12px; border-radius: 8px; text-decoration: none; color: var(--c-texte); }
.resultats-instant a:hover, .resultats-instant a:focus { background: var(--c-lime-pale); }
.resultats-instant small { display: block; color: var(--c-texte-doux); }

/* Champ de recherche (hero + modale + page) */
.champ-recherche { display: flex; background: #fff; border-radius: 999px; padding: 6px; box-shadow: var(--ombre); border: 1.5px solid var(--c-bord); }
.champ-recherche:focus-within { border-color: var(--c-primaire); }
/* Focus dans le champ : l'anneau entoure toute la pilule, pas seulement l'<input> */
.champ-recherche:has(input:focus-visible) { box-shadow: var(--focus), var(--ombre); }
.champ-recherche input { flex: 1; border: 0; background: transparent; font: 400 1.05rem var(--f-texte); padding: 0 18px; min-width: 0; color: var(--c-texte); }
.champ-recherche input:focus, .champ-recherche input:focus-visible { outline: none; box-shadow: none; }
.champ-recherche button { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--c-primaire); color: #fff; cursor: pointer; display: grid; place-items: center; }
.champ-recherche button:hover { background: var(--c-primaire-fonce); }
.champ-recherche svg { width: 22px; height: 22px; }

/* ---------- Hero accueil ---------- */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--c-nuit); }
.hero__image { position: absolute; inset: 0; background-size: cover; background-position: center 60%; }
.hero__image::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,45,37,.88) 0%, rgba(10,45,37,.62) 45%, rgba(10,45,37,.15) 100%); }
.hero .conteneur { position: relative; padding-top: clamp(40px, 6.5vw, 80px); padding-bottom: clamp(34px, 5vw, 60px); display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; }
.hero h1 { color: #fff; max-width: 15ch; margin-bottom: .2em; }
.hero h1 em { font-style: normal; color: var(--c-lime); }
.hero__accroche { font-size: 1.2rem; max-width: 46ch; opacity: .95; margin-bottom: 28px; }
.hero .champ-recherche { max-width: 640px; border: 0; }
.acces-rapides { margin-top: 28px; }
.acces-rapides__titre { font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 12px; opacity: .9; }
.acces-rapides ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.acces-rapide {
  display: flex; flex-direction: column; align-items: center; gap: 8px; width: 112px; padding: 14px 8px;
  background: rgba(255,255,255,.96); color: var(--c-nuit); border-radius: 12px; text-decoration: none; text-align: center;
  font-size: .82rem; font-weight: 600; line-height: 1.2; transition: transform .2s, background .2s;
}
.acces-rapide:hover { transform: translateY(-3px); background: var(--c-lime); color: var(--c-nuit); }
.acces-rapide svg { width: 28px; height: 28px; color: var(--c-primaire); }
.chiffres { display: grid; gap: 10px; }
.chiffre { background: rgba(255,255,255,.96); color: var(--c-nuit); border-radius: 12px; padding: 12px 18px; display: flex; align-items: center; gap: 12px; min-width: 190px; }
.chiffre strong { font: 650 1.6rem/1 var(--f-titre); display: block; }
.chiffre span { font-size: .8rem; color: var(--c-texte-doux); }
.chiffre svg { width: 26px; height: 26px; color: var(--c-primaire); flex: none; }
.credit-photo { position: absolute; right: 12px; bottom: 8px; font-size: .72rem; opacity: .8; }
@media (max-width: 900px) {
  .hero .conteneur { grid-template-columns: 1fr; }
  .chiffres { grid-template-columns: repeat(3, 1fr); }
  .chiffre { min-width: 0; flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 12px; }
  .chiffre svg { display: none; }
}
@media (max-width: 640px) {
  .acces-rapides ul { display: grid; grid-template-columns: repeat(3, 1fr); }
  .acces-rapide { width: auto; }
  .chiffre strong { font-size: 1.25rem; }
}

/* ---------- « Vous êtes… » ---------- */
.profils { display: grid; grid-template-columns: 180px repeat(4, 1fr); gap: 20px; align-items: stretch; }
.profils__titre { align-self: center; }
.profils__titre h2 { margin: 0; }
.profil { position: relative; display: flex; flex-direction: column; background: #fff; border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); text-decoration: none; color: var(--c-texte); transition: transform .2s, box-shadow .2s; }
.profil:hover { transform: translateY(-4px); box-shadow: var(--ombre-forte); color: var(--c-texte); }
.profil__image { aspect-ratio: 16/10; background-size: cover; background-position: center; }
.profil__corps { padding: 16px 18px 18px; position: relative; flex: 1; }
.profil__icone { position: absolute; top: -26px; left: 16px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; border: 4px solid #fff; color: #fff; }
.profil__icone svg { width: 22px; height: 22px; }
.profil h3 { font: 700 1.1rem var(--f-texte); margin: 12px 0 4px; color: var(--c-nuit); }
.profil p { font-size: .9rem; color: var(--c-texte-doux); margin: 0; padding-right: 24px; }
.profil__fleche { position: absolute; right: 16px; bottom: 18px; color: var(--c-primaire); font-weight: 700; }
@media (max-width: 1024px) { .profils { grid-template-columns: repeat(2, 1fr); } .profils__titre { grid-column: 1 / -1; } }
@media (max-width: 520px) { .profils { grid-template-columns: 1fr; } }

/* ---------- Cartes (actualités, événements, services) ---------- */
.carte { background: #fff; border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); display: flex; flex-direction: column; position: relative; transition: transform .2s, box-shadow .2s; }
.carte:hover { transform: translateY(-3px); box-shadow: var(--ombre-forte); }
.carte__image { aspect-ratio: 16/10; background: var(--c-creme) center/cover; position: relative; }
.carte__image .tag { position: absolute; left: 12px; top: 12px; }
.carte__corps { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.carte__corps h3 { font: 700 1.1rem/1.3 var(--f-texte); margin: 0; color: var(--c-nuit); }
.carte__corps h3 a { color: inherit; text-decoration: none; }
.carte__corps h3 a::after { content: ""; position: absolute; inset: 0; } /* carte entièrement cliquable */
.carte__corps h3 a:focus-visible { box-shadow: none; }
.carte:focus-within { box-shadow: var(--focus); }
.carte__meta { font-size: .85rem; color: var(--c-texte-doux); display: flex; gap: 12px; flex-wrap: wrap; }
.carte__resume { font-size: .95rem; color: var(--c-texte-doux); margin: 0; }

/* Actualités accueil : une à la une + liste */
.actus-grille { display: grid; grid-template-columns: 1.25fr 1fr; gap: 20px; }
.actu-une { position: relative; border-radius: var(--rayon); overflow: hidden; min-height: 380px; display: flex; align-items: flex-end; background: var(--c-nuit) center/cover; color: #fff; }
.actu-une::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(10,45,37,.92)); }
.actu-une__corps { position: relative; padding: 24px; }
.actu-une h3 { color: #fff; font-size: 1.5rem; margin: 10px 0 6px; }
.actu-une h3 a { color: #fff; text-decoration: none; }
.actu-une h3 a::after { content: ""; position: absolute; inset: 0; }
.actu-une .badge-une { position: absolute; top: 16px; left: 16px; z-index: 1; }
.actu-liste { display: grid; gap: 14px; align-content: start; }
.actu-ligne { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center; position: relative; padding: 8px; border-radius: 12px; }
.actu-ligne:hover { background: var(--c-creme); }
.actu-ligne__img { aspect-ratio: 4/3; border-radius: 10px; background: var(--c-creme) center/cover; }
.actu-ligne h3 { font: 700 1rem/1.3 var(--f-texte); margin: 4px 0; }
.actu-ligne h3 a { color: var(--c-nuit); text-decoration: none; }
.actu-ligne h3 a::after { content: ""; position: absolute; inset: 0; }
.actu-ligne time { font-size: .82rem; color: var(--c-texte-doux); }
@media (max-width: 860px) { .actus-grille { grid-template-columns: 1fr; } .actu-une { min-height: 300px; } }

/* ---------- Carte interactive ---------- */
.territoire { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: stretch; }
.carte-svg { background: var(--c-ciel-pale); border-radius: var(--rayon); padding: 20px; position: relative; }
.carte-svg svg { width: 100%; height: auto; display: block; }
.carte-svg path { fill: #d6e9cf; stroke: #fff; stroke-width: 1.4; cursor: pointer; transition: fill .15s; }
.carte-svg path:nth-child(3n) { fill: #c3ddb6; }
.carte-svg path:nth-child(3n+1) { fill: #e1efd9; }
.carte-svg path:hover, .carte-svg path:focus { fill: var(--c-lime); outline: none; }
.carte-svg path.actif { fill: var(--c-primaire); }
.carte-svg .epingle { pointer-events: none; }
.carte-svg text { font: 600 9px var(--f-texte); fill: var(--c-nuit); pointer-events: none; paint-order: stroke; stroke: rgba(255,255,255,.85); stroke-width: 2.5px; }
.carte-svg text.actif { fill: #fff; stroke: var(--c-primaire); }
.carte-iso { display: block; width: 100%; height: 740px; border: 0; }
@media (max-width: 899px) { .carte-iso { width: calc(100% + 2 * var(--gouttiere)); margin-inline: calc(-1 * var(--gouttiere)); } }
.carte-legende { font-size: .85rem; color: var(--c-texte-doux); margin-top: 8px; }
.fiche-commune-mini { background: #fff; border-radius: var(--rayon); box-shadow: var(--ombre); padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.fiche-commune-mini h3 { margin: 0; color: var(--c-primaire); }
.fiche-commune-mini dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: .95rem; }
.fiche-commune-mini dt { color: var(--c-texte-doux); }
.fiche-commune-mini dd { margin: 0; font-weight: 600; }
.liens-commune { display: flex; gap: 8px; flex-wrap: wrap; }
.liste-communes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.liste-communes button { font: 500 .82rem var(--f-texte); border: 1px solid var(--c-bord); background: #fff; border-radius: 999px; padding: .35em .8em; cursor: pointer; color: var(--c-texte); }
.liste-communes button[aria-pressed="true"] { background: var(--c-primaire); color: #fff; border-color: var(--c-primaire); }
@media (max-width: 900px) { .territoire { grid-template-columns: 1fr; } }

/* ---------- Services les plus consultés ---------- */
.services { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.service { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; padding: 18px 10px; border-radius: 12px; background: #fff; border: 1.5px solid var(--c-bord); text-decoration: none; color: var(--c-texte); font-size: .88rem; font-weight: 600; line-height: 1.25; transition: border-color .2s, transform .2s; }
.service:hover { border-color: var(--c-primaire); transform: translateY(-2px); color: var(--c-nuit); }
.service__icone { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; }
.service__icone svg { width: 24px; height: 24px; }
.ic-vert { background: #dcefe9; color: var(--c-primaire); }
.ic-lime { background: var(--c-lime-pale); color: #5a6300; }
.ic-ciel { background: var(--c-ciel-pale); color: #0b5c7a; }
.ic-nuit { background: #e3e9e7; color: var(--c-nuit); }
@media (max-width: 640px) { .services { grid-template-columns: repeat(2, 1fr); } }

/* Agenda (lignes) */
.evts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.evt { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; background: #fff; border-radius: 12px; padding: 12px; position: relative; border: 1.5px solid var(--c-bord); }
.evt:hover { border-color: var(--c-primaire); }
.date-bloc { background: var(--c-primaire); color: #fff; border-radius: 10px; text-align: center; padding: 8px 4px; line-height: 1; }
.date-bloc strong { display: block; font: 650 1.5rem var(--f-titre); }
.date-bloc span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.evt h3 { font: 700 1rem/1.3 var(--f-texte); margin: 0 0 2px; }
.evt h3 a { color: var(--c-nuit); text-decoration: none; }
.evt h3 a::after { content: ""; position: absolute; inset: 0; }
.evt p { margin: 0; font-size: .85rem; color: var(--c-texte-doux); }
.evt > span { color: var(--c-primaire); font-weight: 700; }

/* Publications (lignes) */
.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.doc { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; align-items: center; background: #fff; border-radius: 12px; padding: 12px 14px; border: 1.5px solid var(--c-bord); position: relative; }
.doc:hover { border-color: var(--c-primaire); }
.doc__icone { width: 44px; height: 52px; border-radius: 6px; background: #fbe9e7; color: var(--c-alerte); display: grid; place-items: center; font: 800 .7rem var(--f-texte); }
.doc h3 { font: 700 .98rem/1.3 var(--f-texte); margin: 0 0 2px; }
.doc h3 a { color: var(--c-nuit); text-decoration: none; }
.doc h3 a::after { content: ""; position: absolute; inset: 0; }
.doc p { margin: 0; font-size: .82rem; color: var(--c-texte-doux); }
.doc__dl { color: var(--c-primaire); }
.doc__dl svg { width: 22px; height: 22px; }

.trio { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 28px; }
.trio h2 { font-size: 1.5rem; }
@media (max-width: 1024px) { .trio { grid-template-columns: 1fr; } }

/* Bandeau contact intelligent */
.bandeau-question { background: var(--c-ciel); border-radius: 20px; padding: clamp(24px, 4vw, 40px); display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; position: relative; overflow: hidden; }
.bandeau-question h2 { margin: 0 0 4px; font-size: 1.7rem; }
.bandeau-question p { margin: 0; }
.bandeau-question__icone { width: 72px; height: 72px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--c-primaire); }
.bandeau-question__icone svg { width: 34px; height: 34px; }
.bandeau-question form { display: flex; gap: 10px; flex-wrap: wrap; }
.select { font: 500 1rem var(--f-texte); padding: .8em 2.6em .8em 1em; border-radius: 999px; border: 1.5px solid var(--c-bord); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2300765d'%3E%3Cpath d='M5.3 7.3a1 1 0 0 1 1.4 0L10 10.6l3.3-3.3a1 1 0 1 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E") no-repeat right 14px center/18px; appearance: none; color: var(--c-texte); min-width: 240px; }
@media (max-width: 900px) { .bandeau-question { grid-template-columns: 1fr; } .bandeau-question__icone { display: none; } }

/* Réseaux sociaux (flux) */
.flux { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.post { background: #fff; border-radius: var(--rayon); overflow: hidden; box-shadow: var(--ombre); font-size: .9rem; }
.post__tete { display: flex; align-items: center; gap: 10px; padding: 12px 14px; }
.post__tete img { width: 34px; height: 34px; border-radius: 50%; object-fit: contain; background: #fff; border: 1px solid var(--c-bord); }
.post__tete strong { display: block; font-size: .85rem; }
.post__tete small { color: var(--c-texte-doux); font-size: .75rem; }
.post__image { aspect-ratio: 1; background: var(--c-creme) center/cover; }
.post p { padding: 12px 14px; margin: 0; color: var(--c-texte-doux); }
@media (max-width: 1024px) { .flux { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Pied de page ---------- */
.pied { background: var(--c-nuit); color: #dfe9e5; position: relative; overflow: hidden; font-size: .93rem; }
.pied::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 380px; height: 260px; background: var(--c-lime); transform: rotate(-28deg); border-radius: 40px; opacity: .95; }
.pied .conteneur { position: relative; z-index: 1; }
.pied__haut { display: grid; grid-template-columns: 1.3fr 1.2fr 1fr 1fr 1fr; gap: 32px; padding: 48px 0 34px; }
.pied h2 { font: 700 .95rem var(--f-texte); color: #fff; margin-bottom: 14px; }
.pied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.pied a { color: #dfe9e5; text-decoration: none; }
.pied a:hover { color: #fff; text-decoration: underline; }
.pied__logo { background: #fff; border-radius: 12px; padding: 10px; display: inline-block; margin-bottom: 14px; }
.pied__logo img { height: 74px; }
.pied address { font-style: normal; display: grid; gap: 6px; }
.pied__bas { border-top: 1px solid rgba(255,255,255,.15); padding: 18px 0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .85rem; }
.pied__bas ul { display: flex; flex-wrap: wrap; gap: 18px; }
@media (max-width: 1024px) { .pied__haut { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pied__haut { grid-template-columns: 1fr; } .pied::after { width: 200px; height: 140px; right: -60px; bottom: -70px; } }

/* ---------- En-têtes de pages intérieures ---------- */
.page-tete { background: var(--c-creme); position: relative; overflow: hidden; }
.page-tete .conteneur { padding-bottom: clamp(26px, 4vw, 46px); }
.page-tete h1 { margin: .2em 0 .3em; }
.page-tete--image { color: #fff; background: var(--c-nuit); }
.page-tete--image .page-tete__fond { position: absolute; inset: 0; background: center/cover; }
.page-tete--image .page-tete__fond::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,45,37,.9), rgba(10,45,37,.45)); }
.page-tete--image .conteneur { position: relative; }
.page-tete--image h1, .page-tete--image .chapo, .page-tete--image .ariane, .page-tete--image .ariane a, .page-tete--image .ariane [aria-current] { color: #fff; }
.page-tete--image .ariane li + li::before { color: #fff; }
.page-tete__deco { position: absolute; right: -60px; top: -40px; width: 260px; height: 260px; border-radius: 50%; background: var(--c-lime); opacity: .35; }
.page-tete--rubrique { padding-bottom: 0; }

/* Rubrique : tuiles de sous-pages */
.tuiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tuile { position: relative; background: #fff; border-radius: var(--rayon); box-shadow: var(--ombre); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.tuile:hover { transform: translateY(-3px); box-shadow: var(--ombre-forte); }
.tuile__image { aspect-ratio: 16/9; background: var(--c-creme) center/cover; }
.tuile__corps { padding: 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tuile h3 { font: 700 1.15rem var(--f-texte); margin: 0; }
.tuile h3 a { color: var(--c-nuit); text-decoration: none; }
.tuile h3 a::after { content: ""; position: absolute; inset: 0; }
.tuile p { margin: 0; color: var(--c-texte-doux); font-size: .95rem; }
.tuile .lien-fleche { margin-top: auto; padding-top: 8px; }
@media (max-width: 1024px) { .tuiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tuiles { grid-template-columns: 1fr; } }

/* Page de contenu : colonne + barre latérale */
.contenu-grille { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; }
.contenu { max-width: 72ch; }
.contenu h2 { margin-top: 1.6em; font-size: 1.6rem; }
.contenu h3 { margin-top: 1.4em; }
.contenu ul { padding-left: 1.2em; }
.contenu li { margin-bottom: .35em; }
.contenu img { border-radius: var(--rayon); margin: 1.5em 0; }
.encadre { background: var(--c-lime-pale); border-left: 5px solid var(--c-lime); border-radius: 0 12px 12px 0; padding: 18px 22px; margin: 1.5em 0; }
.encadre--ciel { background: var(--c-ciel-pale); border-color: var(--c-ciel); }
.encadre p:last-child { margin: 0; }
.laterale { display: grid; gap: 20px; position: sticky; top: 110px; }
.bloc-lateral { background: var(--c-creme); border-radius: var(--rayon); padding: 22px; }
.bloc-lateral h2 { font: 700 1rem var(--f-texte); margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.bloc-lateral h2 svg { width: 20px; height: 20px; color: var(--c-primaire); }
.bloc-lateral dl { margin: 0; display: grid; gap: 10px; font-size: .95rem; }
.bloc-lateral dt { font-weight: 700; font-size: .82rem; color: var(--c-texte-doux); text-transform: uppercase; letter-spacing: .04em; }
.bloc-lateral dd { margin: 0; }
.bloc-lateral ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bloc-lateral--vert { background: var(--c-primaire); color: #fff; }
.bloc-lateral--vert h2, .bloc-lateral--vert a { color: #fff; }
.bloc-lateral--vert h2 svg { color: var(--c-lime); }
.horaires { width: 100%; border-collapse: collapse; font-size: .92rem; }
.horaires th { text-align: left; font-weight: 600; padding: 5px 0; }
.horaires td { text-align: right; padding: 5px 0; }
.horaires tr + tr { border-top: 1px solid var(--c-bord); }
.sous-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.sous-nav a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--c-texte); font-size: .95rem; }
.sous-nav a:hover { background: #fff; }
.sous-nav a[aria-current] { background: #fff; color: var(--c-primaire); font-weight: 700; }
@media (max-width: 960px) { .contenu-grille { grid-template-columns: 1fr; } .laterale { position: static; } }

/* Partage / pied d'article */
.partage { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 24px; margin-top: 32px; border-top: 1px solid var(--c-bord); font-size: .9rem; }
.partage a, .partage button { width: 40px; height: 40px; border-radius: 50%; background: var(--c-creme); display: grid; place-items: center; color: var(--c-nuit); border: 0; cursor: pointer; }
.partage svg { width: 18px; height: 18px; }

/* Barre d'outils de liste (filtres + tri) */
.outils-liste { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; justify-content: space-between; background: #fff; border-radius: var(--rayon); padding: 18px 20px; box-shadow: var(--ombre); margin-bottom: 28px; }
.champ { display: grid; gap: 6px; }
.champ label, .champ legend { font-size: .85rem; font-weight: 700; color: var(--c-nuit); }
.champ input, .champ select, .champ textarea { font: 400 1rem var(--f-texte); padding: .75em 1em; border-radius: 10px; border: 1.5px solid #b9c7c0; background: #fff; color: var(--c-texte); width: 100%; }
.champ select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2300765d'%3E%3Cpath d='M5.3 7.3a1 1 0 0 1 1.4 0L10 10.6l3.3-3.3a1 1 0 1 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 0-1.4z'/%3E%3C/svg%3E") no-repeat right 12px center/18px; padding-right: 2.5em; }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: none; border-color: var(--c-primaire); }
.champ input:focus-visible, .champ select:focus-visible, .champ textarea:focus-visible, .select:focus-visible { box-shadow: var(--focus); }
.champ .aide { font-size: .82rem; color: var(--c-texte-doux); font-weight: 400; }
.champ .erreur { color: var(--c-alerte); font-size: .85rem; font-weight: 600; }
.champ [aria-invalid="true"] { border-color: var(--c-alerte); }
.compteur { font-size: .9rem; color: var(--c-texte-doux); margin-bottom: 16px; }
.vide { text-align: center; padding: 48px 16px; background: var(--c-creme); border-radius: var(--rayon); color: var(--c-texte-doux); }
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 36px; list-style: none; padding: 0; }
.pagination a, .pagination span { min-width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; border: 1.5px solid var(--c-bord); text-decoration: none; font-weight: 600; padding: 0 10px; }
.pagination [aria-current] { background: var(--c-primaire); color: #fff; border-color: var(--c-primaire); }

/* Agenda : vue liste groupée par mois */
.mois-titre { font: 700 1rem var(--f-texte); text-transform: uppercase; letter-spacing: .08em; color: var(--c-primaire); margin: 32px 0 12px; display: flex; align-items: center; gap: 12px; }
.mois-titre::after { content: ""; flex: 1; height: 1px; background: var(--c-bord); }
.evt-carte { display: grid; grid-template-columns: 90px 200px 1fr; gap: 20px; align-items: center; background: #fff; border-radius: var(--rayon); box-shadow: var(--ombre); padding: 14px; position: relative; margin-bottom: 14px; }
.evt-carte .date-bloc { padding: 14px 4px; }
.evt-carte .date-bloc strong { font-size: 2rem; }
.evt-carte__img { aspect-ratio: 4/3; border-radius: 10px; background: var(--c-creme) center/cover; }
.evt-carte h3 { font: 700 1.15rem var(--f-texte); margin: 6px 0; }
.evt-carte h3 a { color: var(--c-nuit); text-decoration: none; }
.evt-carte h3 a::after { content: ""; position: absolute; inset: 0; }
.evt-carte p { margin: 0; font-size: .92rem; color: var(--c-texte-doux); }
@media (max-width: 720px) { .evt-carte { grid-template-columns: 70px 1fr; } .evt-carte__img { display: none; } }

/* Publications : tableau */
.annee { margin-bottom: 32px; }
.annee > h2 { font-size: 1.5rem; }
details.mois { background: #fff; border-radius: 12px; border: 1.5px solid var(--c-bord); margin-bottom: 10px; }
details.mois summary { padding: 14px 18px; cursor: pointer; font-weight: 700; display: flex; justify-content: space-between; list-style: none; }
details.mois summary::-webkit-details-marker { display: none; }
details.mois summary::after { content: "+"; font-size: 1.3rem; color: var(--c-primaire); line-height: 1; }
details.mois[open] summary::after { content: "–"; }
details.mois .docs { padding: 0 14px 14px; }
details.mois .doc { border-color: transparent; background: var(--c-creme); }

/* Élus */
.elus { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.elu { background: #fff; border-radius: var(--rayon); box-shadow: var(--ombre); padding: 22px; text-align: center; }
.elu__photo { width: 112px; height: 112px; border-radius: 50%; margin: 0 auto 14px; background: var(--c-creme); display: grid; place-items: center; font: 650 2rem var(--f-titre); color: var(--c-primaire); border: 4px solid var(--c-lime-pale); }
.elu h3 { font: 700 1.05rem var(--f-texte); margin: 0 0 4px; }
.elu .fonction { color: var(--c-primaire); font-weight: 600; font-size: .92rem; margin: 0 0 6px; }
.elu .delegation { font-size: .87rem; color: var(--c-texte-doux); margin: 0 0 10px; }
.elu--president { grid-column: span 2; display: grid; grid-template-columns: 150px 1fr; text-align: left; gap: 24px; align-items: center; background: var(--c-primaire); color: #fff; }
.elu--president .elu__photo { width: 150px; height: 150px; margin: 0; border-color: var(--c-lime); background: #fff; }
.elu--president h3, .elu--president .fonction, .elu--president .delegation { color: #fff; }
.elu--president h3 { font-size: 1.4rem; font-family: var(--f-titre); }
@media (max-width: 1024px) { .elus { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .elus { grid-template-columns: 1fr; } .elu--president { grid-column: auto; grid-template-columns: 1fr; text-align: center; } .elu--president .elu__photo { margin: 0 auto; } }

/* Organigramme simplifié */
.organigramme { display: grid; gap: 16px; justify-items: center; }
.organigramme__niveau { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.organigramme__boite { background: #fff; border: 2px solid var(--c-primaire); border-radius: 12px; padding: 12px 18px; text-align: center; font-size: .92rem; min-width: 180px; }
.organigramme__boite strong { display: block; color: var(--c-nuit); }
.organigramme__boite--tete { background: var(--c-primaire); color: #fff; }
.organigramme__boite--tete strong { color: #fff; }

/* Formulaire de contact */
.form-contact { background: #fff; border-radius: var(--rayon); box-shadow: var(--ombre); padding: clamp(20px, 4vw, 36px); display: grid; gap: 20px; }
.form-contact .ligne { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-contact .ligne { grid-template-columns: 1fr; } }
.sujets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border: 0; padding: 0; margin: 0; }
.sujets legend { margin-bottom: 10px; }
.sujet { position: relative; }
.sujet input { position: absolute; opacity: 0; }
.sujet label { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1.5px solid var(--c-bord); border-radius: 12px; cursor: pointer; font-weight: 600; font-size: .92rem; height: 100%; }
.sujet label svg { width: 24px; height: 24px; color: var(--c-primaire); }
.sujet input:checked + label { border-color: var(--c-primaire); background: #e8f4f0; box-shadow: inset 0 0 0 1px var(--c-primaire); }
.sujet input:focus-visible + label { box-shadow: var(--focus); }
@media (max-width: 720px) { .sujets { grid-template-columns: 1fr 1fr; } }
.routage { display: flex; gap: 12px; align-items: center; background: var(--c-ciel-pale); border-radius: 12px; padding: 14px 16px; font-size: .95rem; }
.routage svg { width: 22px; height: 22px; color: var(--c-primaire); flex: none; }
.obligatoire { color: var(--c-alerte); }
.confirmation { text-align: center; padding: 40px 20px; }
.confirmation__icone { width: 80px; height: 80px; border-radius: 50%; background: var(--c-lime); display: grid; place-items: center; margin: 0 auto 16px; color: var(--c-nuit); }
.confirmation__icone svg { width: 40px; height: 40px; }
.case { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; }
.case input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--c-primaire); flex: none; }

/* Démarches externes */
.demarches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.demarche { display: flex; gap: 14px; align-items: flex-start; background: #fff; border: 1.5px solid var(--c-bord); border-radius: 12px; padding: 16px; text-decoration: none; color: var(--c-texte); position: relative; }
.demarche:hover { border-color: var(--c-primaire); }
.demarche strong { display: block; color: var(--c-nuit); }
.demarche small { color: var(--c-texte-doux); }
.demarche .externe { position: absolute; top: 12px; right: 12px; width: 16px; height: 16px; color: var(--c-texte-doux); }
@media (max-width: 900px) { .demarches { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .demarches { grid-template-columns: 1fr; } }

/* Fiche commune */
.commune-chiffres { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.commune-chiffres div { background: rgba(255,255,255,.14); border-radius: 12px; padding: 10px 16px; }
.commune-chiffres strong { display: block; font: 650 1.4rem var(--f-titre); }
.commune-chiffres span { font-size: .82rem; }
.mini-carte svg { width: 100%; height: auto; }
.mini-carte path { fill: #dfe8e3; stroke: #fff; stroke-width: 1.2; }
.mini-carte path.actif { fill: var(--c-primaire); }

/* Résultats de recherche */
.resultat { padding: 20px 0; border-bottom: 1px solid var(--c-bord); }
.resultat h2 { font: 700 1.15rem var(--f-texte); margin: 6px 0; }
.resultat p { margin: 0; color: var(--c-texte-doux); }
mark { background: var(--c-lime-pale); color: inherit; padding: 0 2px; border-radius: 3px; }

/* ---------- Module d'accessibilité ---------- */
.interrupteur { position: relative; width: 48px; height: 28px; border-radius: 999px; background: #c7d3cd; border: 0; cursor: pointer; flex: none; }
.interrupteur::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .2s; }
.interrupteur[aria-checked="true"] { background: var(--c-primaire); }
.interrupteur[aria-checked="true"]::after { left: 23px; }
/* ==========================================================================
   Module d'accessibilité (assets/js/accessibilite.js)
   ========================================================================== */
.a11y-bouton { position: fixed; left: 16px; bottom: 16px; z-index: 250; width: 56px; height: 56px; border-radius: 50%; background: var(--c-nuit); color: #fff; border: 3px solid #fff; box-shadow: var(--ombre-forte); cursor: pointer; display: grid; place-items: center; }
.a11y-bouton svg { width: 28px; height: 28px; }
.a11y-bouton.a11y-actif { border-color: var(--c-lime); }
.a11y-badge { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--c-lime); color: var(--c-nuit); font: 800 .75rem/22px var(--f-texte); text-align: center; border: 2px solid #fff; }
.a11y-voile { position: fixed; inset: 0; z-index: 9050; background: rgba(13,58,48,.45); opacity: 0; transition: opacity .25s ease; }
.a11y-voile.ouvert { opacity: 1; }
/* Le panneau garde toujours le même affichage, quels que soient les réglages choisis */
.a11y-panneau {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 9100; width: min(420px, 100vw);
  background: #fff; color: var(--c-texte); box-shadow: 0 0 60px rgba(13,58,48,.3);
  display: flex; flex-direction: column; transform: translateX(-100%); transition: transform .28s cubic-bezier(.2,.8,.2,1);
  font-family: var(--f-texte); letter-spacing: normal; word-spacing: normal; line-height: 1.5; text-align: left;
}
.a11y-panneau.ouvert { transform: none; }
.a11y-tete { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; background: var(--c-nuit); color: #fff; }
.a11y-tete h2 { margin: 0; color: #fff; font: 700 1.25rem var(--f-texte); display: flex; align-items: center; gap: 10px; }
.a11y-tete h2 svg { width: 26px; height: 26px; color: var(--c-lime); }
.a11y-fermer { width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; display: grid; place-items: center; }
.a11y-fermer svg { width: 22px; height: 22px; }
.a11y-fermer:hover { background: rgba(255,255,255,.25); }
.a11y-corps { flex: 1; overflow-y: auto; padding: 4px 20px 20px; overscroll-behavior: contain; }
.a11y-intro { font-size: .92rem; color: var(--c-texte-doux); margin: 14px 0 4px; }
.a11y-btn { display: inline-flex; align-items: center; gap: 8px; padding: .6em 1em; border-radius: 999px; border: 1.5px solid var(--c-primaire); background: #fff; color: var(--c-primaire); font: 600 .9rem var(--f-texte); cursor: pointer; }
.a11y-btn svg { width: 18px; height: 18px; }
.a11y-btn:hover { background: #e8f4f0; }
.a11y-btn--plein { background: var(--c-primaire); color: #fff; }
.a11y-btn--plein:hover { background: var(--c-primaire-fonce); }
.a11y-note { font-size: .82rem; color: var(--c-texte-doux); margin: 8px 0 0; }
.a11y-note kbd { font: 700 .78rem var(--f-texte); padding: 1px 6px; border-radius: 5px; border: 1px solid var(--c-bord); background: var(--c-creme); }
@media (max-width: 480px) { .a11y-panneau { width: 100vw; } }

/* Panneau d'accessibilité : grille de tuiles */
.a11y-tuiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.a11y-tuile {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 6px; min-height: 112px;
  padding: 14px 6px 10px; border-radius: 14px; border: 1.5px solid var(--c-bord); background: #fff; color: var(--c-nuit);
  font: 600 .84rem/1.2 var(--f-texte); text-align: center; cursor: pointer; transition: background .15s, border-color .15s;
}
.a11y-tuile > svg { width: 28px; height: 28px; color: var(--c-primaire); flex: none; }
.a11y-tuile:hover { border-color: var(--c-primaire); background: #f2f8f5; }
.a11y-tuile__nom { min-height: 2.4em; display: flex; align-items: center; }
.a11y-tuile__niveau { font-size: .74rem; font-weight: 700; min-height: 1.2em; color: var(--c-primaire); }
.a11y-tuile__points { display: flex; gap: 4px; margin-top: auto; }
.a11y-tuile__points i { width: 7px; height: 7px; border-radius: 50%; background: var(--c-bord); }
.a11y-tuile[aria-pressed="true"] { background: var(--c-primaire); border-color: var(--c-primaire); color: #fff; }
.a11y-tuile[aria-pressed="true"] > svg, .a11y-tuile[aria-pressed="true"] .a11y-tuile__niveau { color: var(--c-lime); }
.a11y-tuile[aria-pressed="true"] .a11y-tuile__points i { background: rgba(255,255,255,.35); }
.a11y-tuile .a11y-tuile__points i.on { background: var(--c-lime); }
@media (max-width: 360px) { .a11y-tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.a11y-voix { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; padding: 12px; border-radius: 12px; background: var(--c-ciel-pale); font-size: .85rem; }
.a11y-voix[hidden] { display: none; }
.a11y-profils { margin-top: 16px; border: 1.5px solid var(--c-bord); border-radius: 14px; }
.a11y-profils summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; cursor: pointer; border-radius: 14px; }
.a11y-profils summary::-webkit-details-marker { display: none; }
.a11y-profils summary svg { width: 18px; height: 18px; color: var(--c-primaire); transition: transform .2s; flex: none; }
.a11y-profils[open] summary svg { transform: rotate(180deg); }
.a11y-profils summary strong { display: block; font-size: .95rem; }
.a11y-profils summary small { display: block; font-size: .8rem; color: var(--c-texte-doux); }
.a11y-profils__liste { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 14px; }
.a11y-profil { padding: .55em 1em; border-radius: 999px; border: 1.5px solid var(--c-bord); background: #fff; color: var(--c-nuit); font: 600 .88rem var(--f-texte); cursor: pointer; }
.a11y-profil:hover { border-color: var(--c-primaire); }
.a11y-profil[aria-pressed="true"] { background: var(--c-primaire); border-color: var(--c-primaire); color: #fff; }
.a11y-pied { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--c-bord); background: var(--c-creme); font-size: .88rem; }
.a11y-btn:disabled { opacity: .45; cursor: not-allowed; }

/* Guide de lecture */
.a11y-regle, .a11y-masque { display: none; position: fixed; left: 0; right: 0; pointer-events: none; z-index: 9000; }
.a11y-regle { top: 0; height: 12px; background: rgba(190,207,0,.35); border-top: 3px solid var(--c-nuit); border-bottom: 3px solid var(--c-nuit); }
.a11y-masque { background: rgba(5,20,16,.62); }
.a11y-masque--haut { top: 0; }
.a11y-masque--bas { bottom: 0; }
html.a11y-guide-regle .a11y-regle, html.a11y-guide-masque .a11y-masque { display: block; }

/* ---- Effets des réglages ---- */
/* Taille du texte (WCAG 1.4.4 : jusqu'à 200 % sans perte) */
html.a11y-texte-1 { font-size: 112%; }
html.a11y-texte-2 { font-size: 125%; }
html.a11y-texte-3 { font-size: 150%; }
html.a11y-texte-4 { font-size: 175%; }
/* Quand le texte grandit ou s'élargit, le menu passe sur plusieurs lignes plutôt que de déborder */
@media (min-width: 1201px) {
  html:is(.a11y-texte-2, .a11y-texte-3, .a11y-texte-4, .a11y-espacement, .a11y-police-dyslexie) .nav__liste { flex-wrap: wrap; justify-content: flex-start; column-gap: 8px; }
  html:is(.a11y-texte-2, .a11y-texte-3, .a11y-texte-4, .a11y-espacement, .a11y-police-dyslexie) .nav__bouton { white-space: normal; height: auto; min-height: 52px; padding: 8px 10px; }
  html:is(.a11y-texte-2, .a11y-texte-3, .a11y-texte-4) .entete__haut { flex-wrap: wrap; padding-block: 10px; }
}
/* Polices */
html.a11y-police-lisible :is(body, button, input, select, textarea, h1, h2, h3, h4, .logo span):not(.a11y-ui *) { font-family: "Atkinson Hyperlegible", var(--f-texte) !important; }
html.a11y-police-dyslexie :is(body, button, input, select, textarea, h1, h2, h3, h4, .logo span):not(.a11y-ui *) { font-family: "OpenDyslexic", var(--f-texte) !important; }
/* Espacement du texte (WCAG 1.4.12) */
html.a11y-espacement :is(main, .pied, .entete) :is(p, li, dd, dt, td, th, label, a, h1, h2, h3, h4, span, button) { line-height: 1.8 !important; letter-spacing: .12em !important; word-spacing: .16em !important; }
html.a11y-espacement :is(main, .pied) p { margin-bottom: 2em !important; }
/* Alignement à gauche */
html.a11y-gauche :is(main, .pied) :is(p, li, h1, h2, h3, h4, dd, td, th, .chapo, .carte__resume) { text-align: left !important; }
/* Couleurs : contraste renforcé */
html.a11y-couleurs-contraste { --c-primaire: #004d3c; --c-primaire-fonce: #00382b; --c-texte: #000; --c-texte-doux: #1d2a26; --c-bord: #5c6f67; }
html.a11y-couleurs-contraste .hero__image::after, html.a11y-couleurs-contraste .page-tete__fond::after { background: rgba(5,30,24,.92); }
html.a11y-couleurs-contraste :is(.tag, .surtitre) { color: #000; }
/* Couleurs : mode sombre, niveaux de gris, couleurs atténuées (filtres, hors panneau d'accessibilité) */
html.a11y-couleurs-sombre { --a11y-filtre: invert(1) hue-rotate(180deg); }
html.a11y-couleurs-gris { --a11y-filtre: grayscale(1); }
html.a11y-couleurs-attenuees { --a11y-filtre: saturate(.45); }
html:is(.a11y-couleurs-sombre, .a11y-couleurs-gris, .a11y-couleurs-attenuees) :is(.evitement, .barre-haute, .entete, main, .pied, .recherche-modale, .cookies) { filter: var(--a11y-filtre); }
html:is(.a11y-couleurs-sombre, .a11y-couleurs-gris, .a11y-couleurs-attenuees).menu-ouvert .entete { filter: none; }
html:is(.a11y-couleurs-sombre, .a11y-couleurs-gris, .a11y-couleurs-attenuees).menu-ouvert .nav { filter: var(--a11y-filtre); }
html.a11y-couleurs-sombre body { background: #000; }
/* En mode sombre, photos et visuels gardent leurs vraies couleurs */
html.a11y-couleurs-sombre :is(.hero, .page-tete--image, .actu-une, img, video, iframe, .carte__image, .profil__image, .actu-ligne__img, .tuile__image, .evt-carte__img, .post__image, .pied__logo):not(:is(.hero, .page-tete--image, .actu-une, .pied__logo) *) { filter: invert(1) hue-rotate(180deg); }
/* Liens et titres mis en évidence */
html.a11y-liens a { text-decoration: underline !important; text-decoration-thickness: 2px !important; text-underline-offset: 3px !important; }
html.a11y-liens :is(main, .pied, .barre-haute) a:not(.btn) { background-color: #fff3a0 !important; color: #0d3a30 !important; }
html.a11y-liens .btn { outline: 3px dashed currentColor; outline-offset: 3px; }
html.a11y-titres :is(main, .pied) :is(h1, h2, h3, h4) { outline: 2px dashed currentColor; outline-offset: 6px; border-radius: 4px; }
/* Focus renforcé */
html.a11y-focus { --focus: 0 0 0 3px #fff, 0 0 0 6px #000, 0 0 0 10px #ffd400; }
/* Grand curseur */
html.a11y-curseur, html.a11y-curseur * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 10.5-6.8 1.4 3.9 7.3-3 1.6-3.9-7.4L4 20.3z' fill='%23000' stroke='%23fff' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") 8 4, auto !important; }
html.a11y-curseur :is(a, button, label, select, [role="button"], [role="switch"]), html.a11y-curseur :is(a, button, label) * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 10.5-6.8 1.4 3.9 7.3-3 1.6-3.9-7.4L4 20.3z' fill='%2300765d' stroke='%23fff' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") 8 4, pointer !important; }
/* Arrêt des animations */
html.a11y-animations *, html.a11y-animations *::before, html.a11y-animations *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
/* Masquer les images */
html.a11y-images main img { display: none !important; }
html.a11y-images :is(.hero__image, .page-tete__fond, .carte__image, .profil__image, .actu-une, .actu-ligne__img, .tuile__image, .evt-carte__img, .post__image) { background-image: none !important; }
html.a11y-images :is(.carte__image, .profil__image, .actu-ligne__img, .tuile__image, .evt-carte__img, .post__image) { display: none !important; }
/* Lecture vocale */
html.a11y-lecture main :is(h1, h2, h3, h4, p, li, td, th, dt, dd, .chapo) { cursor: help; }
.a11y-lu { background: #fff3a0 !important; color: #0d3a30 !important; box-shadow: 0 0 0 4px #fff3a0; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Bandeau de consentement (gestion des cookies, CDC §13) */
.cookies { position: fixed; right: 16px; bottom: 16px; z-index: 260; width: min(420px, calc(100vw - 32px)); background: #fff; border-radius: var(--rayon); box-shadow: var(--ombre-forte); padding: 20px; font-size: .9rem; display: none; }
.cookies.visible { display: block; }
.cookies h2 { font-size: 1.05rem; font-family: var(--f-texte); font-weight: 700; margin-bottom: 6px; }
.cookies .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }


.maquette-barre { position: fixed; right: 16px; top: 50%; transform: translateY(-50%); z-index: 240; display: flex; flex-direction: column; gap: 8px; }
.maquette-barre button, .maquette-barre a { width: 44px; height: 44px; border-radius: 12px; border: 0; background: #2b2b2b; color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: var(--ombre-forte); text-decoration: none; position: relative; }
.maquette-barre button[aria-pressed="true"] { background: #e8590c; }
.maquette-barre svg { width: 20px; height: 20px; }
.maquette-barre [data-info]:hover::before { content: attr(data-info); position: absolute; right: 52px; white-space: nowrap; background: #2b2b2b; color: #fff; padding: 6px 10px; border-radius: 6px; font-size: .8rem; }

.zoning { position: fixed; inset: 0; z-index: 9400; pointer-events: none; overflow: hidden; }
.zoning__boite { position: absolute; border: 2px dashed var(--z); border-radius: 2px; }
.zoning__etiquette {
  position: absolute; max-width: min(520px, 90vw); padding: 2px 7px; border-radius: 0 0 6px 0;
  background: var(--z); color: #fff; font: 600 11px/1.35 ui-monospace, Menlo, monospace; letter-spacing: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.zoning--section { --z: #e8590c; }
.zoning--conteneur { --z: #1c7ed6; }
.zoning--widget { --z: #9c36b5; }
.zoning__legende { position: fixed; right: 72px; bottom: 16px; display: flex; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(20,20,20,.88); color: #fff; font: 600 11px/1 ui-monospace, Menlo, monospace; }
.zoning__legende span { display: inline-flex; align-items: center; gap: 6px; }
.zoning__legende span::before { content: ""; width: 12px; height: 12px; border: 2px dashed var(--z); border-radius: 2px; }
@media (max-width: 640px) { .zoning__legende { right: auto; left: 84px; bottom: 22px; flex-direction: column; gap: 6px; } }
@media print { .maquette-barre, .a11y-bouton, .cookies { display: none !important; } }


/* Correctifs après relecture visuelle */
.pied svg { width: 18px; height: 18px; flex: none; }
.pied address span { display: flex; gap: 8px; align-items: flex-start; }
.pied address span svg { margin-top: 3px; color: var(--c-lime); }
.hero h1 { max-width: 19ch; font-size: clamp(2rem, 1.2rem + 2.6vw, 3rem); }
@media (max-width: 520px) {
  .profil { flex-direction: row; align-items: stretch; }
  .profil__image { aspect-ratio: auto; width: 110px; flex: none; }
  .profil__icone { top: 12px; left: -24px; width: 40px; height: 40px; border-width: 3px; }
  .profil__corps { padding: 14px 16px 14px 26px; }
  .profil h3 { margin-top: 0; }
  .maquette-barre { top: auto; bottom: 84px; transform: none; }
  .laterale { order: -1; }
}
.mini-carte h2 svg { width: 20px; height: 20px; }

/* Mode capture Figma : on masque les outils flottants */
html.capture-figma .cookies, html.capture-figma .maquette-barre, html.capture-figma .a11y-bouton { display: none !important; }
html.capture-figma .entete { position: relative; top: 0; }

/* Pied de page : liens sur une seule ligne (ordinateur) */
@media (min-width: 1025px) {
  .pied__haut { grid-template-columns: 1.15fr 1.25fr .95fr 1fr 1.25fr; gap: 28px; }
  .pied ul a, .pied ul button { white-space: nowrap; }
}
html.menu-ouvert .a11y-bouton, html.menu-ouvert .maquette-barre, html.menu-ouvert .cookies { display: none !important; }

/* Tuiles de même hauteur : accès rapides (hero) et services les plus consultés.
   Chaque libellé réserve deux lignes, centrées verticalement : les icônes restent alignées. */
.acces-rapides ul { display: grid; grid-template-columns: repeat(auto-fill, 7em); grid-auto-rows: 1fr; }
.acces-rapides li { display: flex; }
.acces-rapide { flex: 1; justify-content: flex-start; }
.acces-rapide span, .service__libelle { min-height: 2.5em; display: flex; align-items: center; justify-content: center; hyphens: none; overflow-wrap: normal; word-break: normal; }
.services { grid-auto-rows: 1fr; }
.service { justify-content: flex-start; padding: 18px 4px; font-size: .86rem; }
@media (max-width: 640px) { .acces-rapides ul { grid-template-columns: repeat(3, 1fr); } }

/* Texte agrandi à 150 % et plus : la mise en page passe à moins de colonnes (WCAG 1.4.4, pas de défilement horizontal) */
html:is(.a11y-texte-3, .a11y-texte-4) :is(.g-3, .g-4, .tuiles, .profils, .services, .demarches, .elus, .flux, .sujets) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html:is(.a11y-texte-3, .a11y-texte-4) :is(.trio, .contenu-grille, .territoire, .actus-grille, .hero .conteneur, .bandeau-question, .form-contact .ligne) { grid-template-columns: minmax(0, 1fr); }
html:is(.a11y-texte-3, .a11y-texte-4) .profils__titre { grid-column: 1 / -1; }
html:is(.a11y-texte-3, .a11y-texte-4) .elu--president { grid-column: 1 / -1; }
html:is(.a11y-texte-3, .a11y-texte-4) .laterale { position: static; }
html:is(.a11y-texte-3, .a11y-texte-4) .pied__haut { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html:is(.a11y-texte-3, .a11y-texte-4) .pied ul :is(a, button) { white-space: normal; }
html:is(.a11y-texte-3, .a11y-texte-4) .chiffres { grid-template-columns: repeat(3, minmax(0, 1fr)); }
html:is(.a11y-texte-3, .a11y-texte-4) .btn-recherche span { display: none; }
html:is(.a11y-texte-3, .a11y-texte-4) .btn-recherche { width: 46px; padding: 0; justify-content: center; }
html:is(.a11y-texte-3, .a11y-texte-4) :is(.carte__corps, .tuile__corps, .contenu, .bloc-lateral, .evt, .doc) { overflow-wrap: anywhere; }
@media (max-width: 900px) {
  html:is(.a11y-texte-3, .a11y-texte-4) :is(.g-3, .g-4, .tuiles, .profils, .services, .demarches, .elus, .flux, .sujets, .pied__haut) { grid-template-columns: minmax(0, 1fr); }
  html:is(.a11y-texte-3, .a11y-texte-4) .logo span { display: none; }
}
/* Mode sombre : les zones déjà sombres (barre haute, pied de page) gardent leurs couleurs */
html.a11y-couleurs-sombre :is(.barre-haute, .pied) { filter: none; }
/* Menu sur plusieurs lignes (texte agrandi) : les méga-menus se calent sous le menu, à gauche */
@media (min-width: 1201px) {
  html:is(.a11y-texte-2, .a11y-texte-3, .a11y-texte-4, .a11y-espacement, .a11y-police-dyslexie) .nav__item { position: static; }
  html:is(.a11y-texte-2, .a11y-texte-3, .a11y-texte-4, .a11y-espacement, .a11y-police-dyslexie) .mega { left: 0 !important; right: auto !important; transform: none !important; }
}
/* L'attribut hidden doit toujours masquer le panneau d'accessibilité (sinon il reste joignable au clavier hors écran) */
.a11y-panneau[hidden], .a11y-voile[hidden] { display: none !important; }

/* ==========================================================================
   Menu : éléments propres au mobile (masqués sur ordinateur)
   ========================================================================== */
@media (min-width: 1201px) {
  .nav__pastille, .nav__txt small, .nav__mobile-tete, .nav__recherche, .nav__mobile-pied { display: none; }
}
@media (max-width: 1200px) {
  html.menu-ouvert .burger { visibility: hidden; }
  /* Panneau plein écran qui glisse depuis la droite */
  .nav {
    display: block; position: fixed; inset: 0; z-index: 300; padding: 0 0 28px; overflow-y: auto; overscroll-behavior: contain;
    background: var(--c-creme); visibility: hidden; opacity: 0; transform: translateX(24px); pointer-events: none;
    transition: opacity .25s ease, transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s linear .3s;
  }
  .nav.ouvert { visibility: visible; opacity: 1; transform: none; pointer-events: auto; transition: opacity .25s ease, transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s; }
  .nav__mobile-tete {
    position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    min-height: 76px; padding: 0 var(--gouttiere); background: #fff; box-shadow: 0 1px 0 var(--c-bord);
  }
  .nav__mobile-tete .logo span { display: block; }
  .nav__fermer { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--c-primaire); color: #fff; display: grid; place-items: center; cursor: pointer; flex: none; }
  .nav__fermer svg { width: 22px; height: 22px; }
  .nav__recherche { margin: 18px var(--gouttiere) 6px; }
  .nav__recherche input { font-size: 1rem; padding: 0 14px; }
  .nav__recherche button { width: 46px; height: 46px; }
  /* Rubriques en cartes */
  .nav__liste { display: flex; flex-direction: column; gap: 10px; padding: 12px var(--gouttiere); }
  .nav__item { border: 0 !important; background: #fff; border-radius: 16px; box-shadow: 0 1px 2px rgba(13,58,48,.06), 0 4px 14px rgba(13,58,48,.06); overflow: hidden; }
  .nav__item.nav__item--mobile { display: none; }
  .nav__bouton, .nav__item:first-child .nav__bouton {
    width: 100%; height: auto; min-height: 0; padding: 12px 14px; gap: 14px; justify-content: flex-start;
    white-space: normal; text-align: left; font-size: 1rem; color: var(--c-nuit); border-radius: 0;
  }
  .nav__bouton:hover, .nav__bouton[aria-expanded="true"] { background: #f2f8f5; color: var(--c-nuit); }
  .nav__pastille { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; }
  .nav__pastille svg { width: 23px; height: 23px; }
  .nav__item:nth-child(6n+1) .nav__pastille { background: #dcefe9; color: var(--c-primaire); }
  .nav__item:nth-child(6n+2) .nav__pastille { background: var(--c-lime-pale); color: #5a6300; }
  .nav__item:nth-child(6n+3) .nav__pastille { background: var(--c-ciel-pale); color: #0b5c7a; }
  .nav__item:nth-child(6n+4) .nav__pastille { background: #e3e9e7; color: var(--c-nuit); }
  .nav__item:nth-child(6n+5) .nav__pastille { background: #fde9df; color: #a3400d; }
  .nav__item:nth-child(6n+6) .nav__pastille { background: #efe6f7; color: #6b3a8c; }
  .nav__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
  .nav__titre { font: 700 1.03rem/1.25 var(--f-texte); }
  .nav__txt small { font-size: .84rem; font-weight: 400; color: var(--c-texte-doux); line-height: 1.3; }
  .nav__item.actif .nav__titre { color: var(--c-primaire); }
  .nav__item.actif > .nav__bouton { box-shadow: inset 4px 0 0 var(--c-lime); }
  .nav__bouton .chevron { width: 30px; height: 30px; padding: 7px; border-radius: 50%; background: var(--c-creme); color: var(--c-primaire); margin-left: auto; }
  .nav__bouton[aria-expanded="true"] .chevron { background: var(--c-primaire); color: #fff; }
  /* Sous-pages : dépliage en douceur */
  .mega {
    display: flex !important; flex-direction: column; gap: 0; position: static; width: auto; transform: none !important;
    max-height: 0; overflow: hidden; visibility: hidden; padding: 0 14px; border: 0; box-shadow: none; background: transparent;
    transition: max-height .3s ease, padding .3s ease, visibility 0s linear .3s;
  }
  .mega.ouvert { max-height: 900px; visibility: visible; padding: 0 14px 14px; transition: max-height .4s ease, padding .3s ease, visibility 0s; }
  .mega__liens { order: 1; border-top: 1px solid var(--c-bord); padding-top: 6px; gap: 0; }
  .mega__liens a { padding: 11px 8px 11px 60px; border-radius: 10px; font-weight: 500; font-size: .98rem; }
  .mega__liens a::after { content: "›"; font-size: 1.3rem; line-height: 1; }
  .mega__intro { order: 2; padding-top: 8px; }
  .mega__intro .btn { width: 100%; justify-content: center; background: var(--c-lime-pale); color: var(--c-nuit); font-size: .95rem; padding: .8em; }
  .mega__intro .btn::after { content: "→"; }
  /* Pied du menu */
  .nav__mobile-pied { display: grid; gap: 14px; padding: 8px var(--gouttiere) 0; }
  .nav__cta { width: 100%; justify-content: center; padding: 1em; font-size: 1.02rem; box-shadow: var(--ombre); }
  .nav__raccourcis { display: flex; flex-wrap: wrap; gap: 8px; }
  .nav__raccourcis :is(a, button) {
    display: inline-flex; align-items: center; gap: 8px; padding: .6em .95em; border-radius: 999px; border: 1.5px solid var(--c-bord);
    background: #fff; color: var(--c-nuit); font: 600 .9rem var(--f-texte); text-decoration: none; cursor: pointer;
  }
  .nav__raccourcis svg { width: 18px; height: 18px; color: var(--c-primaire); }
}
@media (max-width: 1200px) {
  .nav__raccourcis { flex-wrap: nowrap; }
  .nav__raccourcis :is(a, button) { padding: .55em .8em; font-size: .86rem; white-space: nowrap; }
  .nav__raccourcis a[aria-label] { padding: .55em; margin-left: auto; }
}
@media (max-width: 340px) { .nav__raccourcis { flex-wrap: wrap; } }
/* Réseaux sociaux : un post par ligne sur mobile */
@media (max-width: 640px) { .flux { grid-template-columns: minmax(0, 1fr); } }
