/* =====================================================================
   SIG FIER II – feuille de style unique (espace public et espace gestion)
   Les jetons de conception sont en tête : couleurs et polices ne se modifient qu'ici.
   ===================================================================== */
@font-face { font-family: "Public Sans"; font-weight: 400; font-display: swap; src: url("../fonts/public-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 600; font-display: swap; src: url("../fonts/public-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-weight: 700; font-display: swap; src: url("../fonts/public-sans-latin-700-normal.woff2") format("woff2"); }

:root {
  --bleu: #2B5197;            /* bleu du logo FIER II */
  --bleu-fonce: #1C3566;
  --bleu-pale: #E4EBF6;       /* régions de concentration sur les cartes */
  --sable: #F6F0E1;           /* régions d'extension sur les cartes */
  --encre: #1D2433;
  --gris: #586174;
  --trait: #D5DBE6;
  --surface: #F3F5F9;
  --blanc: #FFFFFF;
  --alerte: #8A2A12;
  --succes: #1F6F4A;
  --focus: #F2B705;
  --rayon: 4px;
  --police: "Public Sans", "Segoe UI", Roboto, Arial, sans-serif;
  --largeur: none;             /* plein écran (27/10/2026) : le contenu occupe toute la largeur */
  --gouttiere: clamp(1rem, 3vw, 3.5rem);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--police); font-size: 1rem; line-height: 1.55; color: var(--encre); background: var(--blanc); }
img { max-width: 100%; height: auto; }
a { color: var(--bleu); text-underline-offset: 2px; }
a:hover { color: var(--bleu-fonce); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; color: var(--bleu-fonce); }
code { font-size: .9em; background: var(--surface); padding: .1rem .3rem; border-radius: 3px; word-break: break-all; }
.lien-evitement { position: absolute; left: -999px; top: 0; background: var(--bleu); color: var(--blanc); padding: .5rem 1rem; z-index: 1000; }
.lien-evitement:focus { left: .5rem; top: .5rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pastille { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; flex: none; background: var(--c, var(--gris)); }
.nb { font-variant-numeric: tabular-nums; color: var(--gris); font-size: .9em; }

/* ---------- En-tête : voir le bloc « Menu principal » en fin de fichier ---------- */

/* ---------- Messages ---------- */
.messages { max-width: var(--largeur); margin: 1rem auto 0; padding: 0 var(--gouttiere); }
.message { margin: 0 0 .5rem; padding: .6rem .9rem; border-left: 4px solid var(--bleu); background: var(--surface); }
.message-success { border-color: var(--succes); }
.message-error { border-color: var(--alerte); background: #FBEFEB; }

/* ---------- Accueil : ouverture sur la carte de la zone ---------- */
.ouverture { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 2.5rem; align-items: center;
  max-width: var(--largeur); margin: 0 auto; padding: 2.5rem var(--gouttiere) 3rem; }
.ouverture h1 { font-size: clamp(2rem, 3.6vw, 3rem); letter-spacing: -.015em; margin: 0 0 1rem; max-width: 16ch; }
.chapeau { font-size: 1.1rem; color: var(--gris); max-width: 46ch; margin: 0 0 1.75rem; }
.recherche label { display: block; font-weight: 600; margin-bottom: .35rem; }
.recherche-champ { display: flex; gap: .5rem; max-width: 30rem; }
.recherche-champ input { flex: 1; min-width: 0; font: inherit; padding: .65rem .8rem; border: 1px solid #8F99AB; border-radius: var(--rayon); }
.acces-regions { margin-top: 1.75rem; }
.acces-regions p { margin: 0 0 .4rem; font-size: .9rem; color: var(--gris); }
.acces-regions ul { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.acces-regions a { display: inline-flex; gap: .4rem; padding: .3rem .75rem; border: 1px solid var(--trait); border-radius: 999px; text-decoration: none; color: var(--encre); }
.acces-regions a:hover { border-color: var(--bleu); color: var(--bleu); }
.ouverture-carte { margin: 0; }
.carte-accueil { aspect-ratio: 4 / 3.2; background: linear-gradient(180deg, #EEF2F8, #F7F9FC); border-radius: var(--rayon); }
.carte-accueil.indisponible::after { content: "La carte de la zone n'a pas pu être chargée depuis le serveur cartographique."; display: block; padding: 2rem; color: var(--gris); }
.ouverture-carte figcaption { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: center; font-size: .85rem; color: var(--gris); margin-top: .5rem; }
.cle { display: inline-flex; align-items: center; gap: .4rem; }
.cle span { width: 1rem; height: .75rem; border: 1px solid var(--bleu-fonce); }
.cle-concentration { background: var(--bleu); }
.cle-extension { background: repeating-linear-gradient(45deg, var(--sable) 0 3px, #D9C79C 3px 4px); border-color: #B9A77C !important; }
.ouverture-carte figcaption a { margin-left: auto; font-weight: 600; }

/* ---------- Blocs de page ---------- */
.bloc { padding: 3rem var(--gouttiere); }
.bloc-gris { background: var(--surface); }
.bloc-int { max-width: var(--largeur); margin: 0 auto; }
.bloc h2 { font-size: 1.6rem; margin: 0 0 1.25rem; }
.bloc-titre { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }

/* Thématiques : six lignes, la couleur de la thématique en filet */
.thematiques { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
.thematiques a { display: grid; grid-template-columns: 1fr auto; gap: .15rem 1rem; padding: 1rem 0 1rem 1rem; border-left: 4px solid var(--c);
  border-bottom: 1px solid var(--trait); text-decoration: none; color: var(--encre); }
.thematiques a:hover .th-nom { color: var(--c); text-decoration: underline; }
.th-nom { font-weight: 700; font-size: 1.1rem; }
.th-desc { grid-column: 1; color: var(--gris); font-size: .92rem; }
.th-nb { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-size: .85rem; color: var(--gris); font-variant-numeric: tabular-nums; }

/* ---------- Pages intérieures ---------- */
.page { max-width: var(--largeur); margin: 0 auto; padding: 2rem var(--gouttiere) 4rem; }
.page > h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0 0 1.25rem; }
.page-texte { max-width: 46rem; }
.page-texte h2 { font-size: 1.25rem; margin: 2rem 0 .5rem; }
.liste-def dt { font-weight: 700; display: flex; align-items: center; gap: .5rem; margin-top: .75rem; }
.liste-def dd { margin: 0 0 0 1.2rem; color: var(--gris); }
.fil { margin: 0 0 .3rem; font-size: .9rem; }
.entete-thematique { border-left: 6px solid var(--c); padding: .25rem 0 .25rem 1.1rem; margin-bottom: 1.5rem; }
.entete-thematique h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0 0 .4rem; }
.entete-thematique p:last-child { margin: 0; color: var(--gris); max-width: 60ch; }
.autres-thematiques { margin-top: 3rem; border-top: 1px solid var(--trait); padding-top: 1rem; }
.autres-thematiques h2 { font-size: 1rem; }
.autres-thematiques ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.autres-thematiques a { display: inline-flex; align-items: center; gap: .4rem; }

/* Filtres de la cartothèque */
.filtres-form { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: flex-end; padding: 1rem; background: var(--surface); border-radius: var(--rayon); }
.filtres-form .champ { display: flex; flex-direction: column; gap: .25rem; }
.filtres-form .champ-large { flex: 1 1 16rem; }
.filtres-form label { font-size: .85rem; font-weight: 600; }
.filtres-form input, .filtres-form select { font: inherit; padding: .5rem .6rem; border: 1px solid #8F99AB; border-radius: var(--rayon); background: var(--blanc); }
.effacer { font-size: .9rem; align-self: center; }
.compte { color: var(--gris); font-size: .9rem; margin: 1.25rem 0 .25rem; }

/* Fiches de carte */
.liste { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--trait); }
.fiche { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid var(--trait); }
.fiche img, .sans-apercu { display: block; width: 220px; height: 160px; object-fit: cover; border: 1px solid var(--trait); border-radius: var(--rayon); background: var(--surface); }
.sans-apercu { background: repeating-linear-gradient(135deg, var(--surface) 0 10px, #fff 10px 20px); border-left: 4px solid var(--c); }
.fiche .theme { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--gris); margin: 0 0 .3rem; }
.fiche h3 { font-size: 1.2rem; margin: 0 0 .35rem; }
.fiche h3 a { text-decoration: none; color: var(--encre); }
.fiche h3 a:hover { color: var(--bleu); text-decoration: underline; }
.fiche .lieu { margin: 0 0 .5rem; font-weight: 600; }
.fiche .resume { margin: 0 0 .6rem; color: var(--gris); max-width: 65ch; }
.fiche .details { font-size: .85rem; color: var(--gris); margin: 0; }
.vide { padding: 1.5rem 0; color: var(--gris); max-width: 60ch; }

/* ---------- Pied de page ---------- */
.pied { border-top: 1px solid var(--trait); padding: 2rem var(--gouttiere); font-size: .85rem; color: var(--gris); }
.pied-int { max-width: var(--largeur); margin: 0 auto; }
.pied p { max-width: 80ch; margin: 0 0 .5rem; }

/* ---------- Boutons ---------- */
.bouton { font: inherit; font-size: .92rem; display: inline-block; padding: .5rem .9rem; border: 1px solid var(--bleu); color: var(--bleu);
  background: var(--blanc); border-radius: var(--rayon); cursor: pointer; text-decoration: none; line-height: 1.3; }
.bouton:hover { background: var(--surface); color: var(--bleu-fonce); }
.bouton-plein { background: var(--bleu); color: var(--blanc); }
.bouton-plein:hover { background: var(--bleu-fonce); color: var(--blanc); }
.bouton-danger { border-color: var(--alerte); color: var(--alerte); }
.bouton-lien { border: 0; background: none; padding: 0; color: var(--bleu); text-decoration: underline; cursor: pointer; font: inherit; }

/* ---------- Visionneuse ---------- */
.page-carte { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.page-carte .messages { display: none; }
.visionneuse { flex: 1; display: grid; grid-template-columns: 1fr 380px; min-height: 0; }
#carte { position: relative; min-height: 0; background: #E9EDF3; }
#carte:focus-visible { outline-offset: -3px; }
.panneau { overflow-y: auto; border-left: 1px solid var(--trait); background: var(--blanc); padding: 1.25rem 1.25rem 2rem; }
.panneau h1 { font-size: 1.3rem; margin: .2rem 0 .3rem; }
.panneau .theme { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--gris); margin: 0; }
.panneau .lieu { margin: 0 0 1rem; font-weight: 600; }
.panneau h2 { font-size: .95rem; margin: 1.5rem 0 .5rem; padding-top: 1rem; border-top: 1px solid var(--trait); }
.panneau p { margin: 0 0 .75rem; }
.bandeau-apercu { background: #FFF4E5; border: 1px solid #E8B97E; color: var(--alerte); padding: .5rem .7rem; border-radius: var(--rayon); font-size: .9rem; }
.chiffres { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.chiffres li { border-left: 3px solid var(--bleu); padding-left: .55rem; }
.chiffres strong { display: block; font-size: 1.35rem; line-height: 1.1; color: var(--bleu-fonce); font-variant-numeric: tabular-nums; }
.chiffres span { font-size: .8rem; color: var(--gris); }
.legende figure { margin: 0 0 .6rem; }
.legende figcaption { font-size: .85rem; font-weight: 600; margin-bottom: .2rem; }
.legende img { display: block; max-width: 100%; }
.couches { list-style: none; margin: 0; padding: 0; }
.couches li { padding: .2rem 0; }
.couches label { display: flex; gap: .5rem; align-items: center; cursor: pointer; }
.couches input { width: 1.05rem; height: 1.05rem; accent-color: var(--bleu); }
.meta { display: grid; grid-template-columns: max-content 1fr; gap: .25rem .75rem; margin: 0; font-size: .9rem; }
.meta dt { color: var(--gris); }
.meta dd { margin: 0; }
.telechargements { list-style: none; padding: 0; margin: 0; }
.telechargements li { margin: .3rem 0; }
.notes { font-size: .85rem; color: var(--gris); padding-left: 1.1rem; margin: 0; }
.retour { font-size: .9rem; }
.alerte { position: absolute; top: .75rem; left: 50%; transform: translateX(-50%); z-index: 5; max-width: min(90%, 34rem);
  background: #FFF4E5; color: var(--alerte); border: 1px solid #E8B97E; border-radius: var(--rayon); padding: .6rem .9rem; font-size: .9rem; }
.alerte[hidden] { display: none; }
.chargement { position: absolute; bottom: 2.6rem; left: 50%; transform: translateX(-50%); z-index: 5; margin: 0;
  background: rgba(255,255,255,.92); border: 1px solid #C9D1DE; border-radius: 999px; padding: .35rem .9rem; font-size: .85rem; color: var(--gris);
  box-shadow: 0 1px 4px rgba(29,36,51,.15); }
.chargement::before { content: ""; display: inline-block; width: .8em; height: .8em; margin-right: .5em; vertical-align: -.1em;
  border: 2px solid #9AA4B5; border-top-color: transparent; border-radius: 50%; animation: tourne .9s linear infinite; }
.chargement[hidden] { display: none; }
@keyframes tourne { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .chargement::before { animation: none; } }
.bulle { position: relative; background: var(--blanc); border: 1px solid #9AA4B5; border-radius: var(--rayon); box-shadow: 0 2px 10px rgba(29,36,51,.25);
  padding: .7rem .9rem .8rem; min-width: 220px; max-width: 300px; font-size: .9rem; }
.bulle::after { content: ""; position: absolute; left: 50%; bottom: -8px; margin-left: -8px; border: 8px solid transparent; border-bottom: 0; border-top-color: var(--blanc); }
.bulle .type { margin: 0; font-size: .8rem; color: var(--gris); }
.bulle h3 { margin: 0 1.5rem .35rem 0; font-size: 1rem; color: var(--bleu); }   /* nom de l'élément en bleu du logo FIER II (17/10/2026) */
.bulle table { border-collapse: collapse; width: 100%; }
.bulle th { text-align: left; font-weight: 400; color: var(--gris); padding: .1rem .6rem .1rem 0; vertical-align: top; }
.bulle td { text-align: right; font-variant-numeric: tabular-nums; padding: .1rem 0; }
.bulle .entite + .entite { border-top: 1px solid var(--trait); margin-top: .5rem; padding-top: .5rem; }
.bulle .fermer { position: absolute; top: .3rem; right: .35rem; border: 0; background: none; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--gris); padding: .2rem .4rem; }
.bascule-panneau { display: none; }
.ol-control button { background: var(--bleu) !important; color: var(--blanc) !important; }
.ol-scale-line { background: rgba(29,36,51,.7); }
.ol-scale-line-inner { color: #fff; border-color: #fff; }

/* =====================================================================
   Espace gestion
   ===================================================================== */
.gestion { background: var(--surface); min-height: 100vh; }
.gestion .entete { background: var(--bleu-fonce); }
.nav-gestion { background: var(--blanc); border-bottom: 1px solid var(--trait); }
.nav-gestion ul { max-width: var(--largeur); margin: 0 auto; padding: 0 var(--gouttiere); display: flex; gap: 1.5rem; list-style: none; overflow-x: auto; }
.nav-gestion a { display: block; padding: .75rem 0; text-decoration: none; color: var(--encre); border-bottom: 3px solid transparent; white-space: nowrap; }
.nav-gestion a[aria-current="page"] { border-bottom-color: var(--bleu); color: var(--bleu); font-weight: 600; }
.compte-utilisateur { margin-left: auto; display: flex; align-items: center; gap: .75rem; font-size: .85rem; }
.compte-utilisateur form { margin: 0; }
.compte-utilisateur button { font: inherit; color: var(--blanc); background: none; border: 1px solid rgba(255,255,255,.6); border-radius: var(--rayon); padding: .25rem .6rem; cursor: pointer; }
.zone-gestion { max-width: var(--largeur); margin: 0 auto; padding: 1.75rem var(--gouttiere) 4rem; }
.zone-gestion > h1 { font-size: 1.6rem; margin: 0 0 1rem; }
.entete-zone { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.entete-zone h1 { margin: 0; font-size: 1.6rem; }
.boite { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 1.25rem; margin-bottom: 1.25rem; }
.boite > h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
.boite > p.aide { margin-top: -.4rem; color: var(--gris); font-size: .9rem; }
.compteurs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: 1.25rem; }
.compteurs a { display: block; background: var(--blanc); border: 1px solid var(--trait); border-top: 4px solid var(--c, var(--bleu)); border-radius: var(--rayon); padding: 1rem 1.1rem; text-decoration: none; color: var(--encre); }
.compteurs strong { display: block; font-size: 2rem; line-height: 1.1; color: var(--bleu-fonce); font-variant-numeric: tabular-nums; }
.deux-colonnes { display: grid; grid-template-columns: 3fr 2fr; gap: 1.25rem; align-items: start; }
.tableau { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tableau th, .tableau td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--trait); vertical-align: top; }
.tableau th { font-size: .82rem; color: var(--gris); font-weight: 600; background: var(--surface); }
.tableau td.nombre { text-align: right; font-variant-numeric: tabular-nums; }
.tableau .secondaire { display: block; color: var(--gris); font-size: .82rem; }
.statut { display: inline-block; font-size: .78rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.statut-publiee { color: var(--succes); border-color: #9CC9B2; background: #EEF7F2; }
.statut-brouillon { color: #7A5A00; border-color: #E1C66F; background: #FFF8E1; }
.statut-archivee { color: var(--gris); border-color: var(--trait); background: var(--surface); }
.onglets { display: flex; gap: .4rem; flex-wrap: wrap; margin: 0 0 1rem; padding: 0; list-style: none; }
.onglets a { display: inline-block; padding: .3rem .8rem; border: 1px solid var(--trait); border-radius: 999px; background: var(--blanc); text-decoration: none; color: var(--encre); font-size: .9rem; }
.onglets a[aria-current="true"] { background: var(--encre); color: var(--blanc); border-color: var(--encre); }
.pagination { display: flex; gap: 1rem; justify-content: center; margin-top: 1rem; font-size: .9rem; }

/* Formulaires */
.formulaire .grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.formulaire .grille-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.formulaire .plein { grid-column: 1 / -1; }
.formulaire .champ { display: flex; flex-direction: column; gap: .3rem; }
.formulaire label, .formulaire legend { font-weight: 600; font-size: .92rem; }
.formulaire input[type=text], .formulaire input[type=email], .formulaire input[type=password], .formulaire input[type=number], .formulaire input[type=date],
.formulaire input[type=search], .formulaire select, .formulaire textarea, .formulaire input:not([type]) {
  font: inherit; padding: .5rem .6rem; border: 1px solid #8F99AB; border-radius: var(--rayon); background: var(--blanc); width: 100%; }
.formulaire input[type=color] { width: 4rem; height: 2.4rem; padding: .15rem; border: 1px solid #8F99AB; border-radius: var(--rayon); }
.formulaire textarea { resize: vertical; }
.formulaire .aide { font-size: .82rem; color: var(--gris); margin: 0; }
.formulaire .erreur { font-size: .85rem; color: var(--alerte); margin: 0; }
.formulaire .avec-erreur input, .formulaire .avec-erreur select, .formulaire .avec-erreur textarea { border-color: var(--alerte); }
.formulaire .case { flex-direction: row; align-items: center; gap: .5rem; }
.formulaire .case input { width: 1.1rem; height: 1.1rem; accent-color: var(--bleu); }
.formulaire fieldset { border: 0; margin: 0; padding: 0; }
.formulaire .radio-liste { list-style: none; margin: .3rem 0 0; padding: 0; }
.formulaire .radio-liste li { margin: .3rem 0; }
.formulaire .radio-liste label { font-weight: 400; display: flex; gap: .5rem; align-items: baseline; }
.erreurs-generales { border-left: 4px solid var(--alerte); background: #FBEFEB; padding: .6rem .9rem; margin-bottom: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; position: sticky; bottom: 0; z-index: 2; background: var(--blanc);
  border: 1px solid var(--trait); border-radius: var(--rayon); box-shadow: 0 -2px 8px rgba(29,36,51,.08); padding: .9rem 1.25rem; }
.boite .actions { position: static; box-shadow: none; border-width: 1px 0 0; border-radius: 0; margin: 1.25rem -1.25rem -1.25rem; }
.actions .droite { margin-left: auto; display: flex; gap: .75rem; }
.bandeau-statut { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.bandeau-statut form { margin: 0; }

/* Éditeur de couches */
.ligne-couche { border: 1px solid var(--trait); border-radius: var(--rayon); padding: .9rem; margin-bottom: .75rem; background: #FBFCFE; }
.ligne-couche .grille-couche { display: grid; grid-template-columns: 4.5rem minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1.6fr); gap: .75rem; }
.ligne-couche .cases { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: .6rem 0; }
.ligne-couche .attributs { font-size: .82rem; color: var(--gris); }
.ligne-couche .attributs button { font: inherit; font-size: .8rem; margin: .15rem .2rem 0 0; padding: .05rem .4rem; border: 1px solid var(--trait); background: var(--blanc); border-radius: 3px; cursor: pointer; }
.ligne-simple { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 2fr) auto; gap: .75rem; align-items: end; margin-bottom: .6rem; }
.ligne-chiffre { grid-template-columns: 4.5rem minmax(0, 2fr) minmax(0, 1fr) minmax(0, 2fr) auto; }
input.court { max-width: 4.5rem; }
.supprimer { font-size: .85rem; color: var(--alerte); }
.etat-geoserver { font-size: .85rem; color: var(--gris); }
.etat-geoserver.ko { color: var(--alerte); }
.connexion-boite { max-width: 24rem; margin: 4rem auto; }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .ouverture { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 1.75rem; }
  .thematiques { grid-template-columns: 1fr; }
  .deux-colonnes, .formulaire .grille, .compteurs { grid-template-columns: 1fr; }
  .formulaire .grille-4 { grid-template-columns: 1fr 1fr; }
  .ligne-couche .grille-couche { grid-template-columns: 1fr 1fr; }
  .ligne-simple { grid-template-columns: 4rem 1fr; }
  .ligne-chiffre { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .marque .nom small { display: none; }
  .fiche { grid-template-columns: 1fr; gap: .75rem; }
  .fiche img, .sans-apercu { width: 100%; height: 180px; }
  .visionneuse { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .panneau { border-left: 0; border-top: 1px solid var(--trait); max-height: 45dvh; }
  .panneau.replie { max-height: 3.2rem; overflow: hidden; }
  .bascule-panneau { display: block; margin: 0 0 .5rem; }
  .tableau .masquable { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print {
  .entete nav, .menu-bascule, .acces-gestion, .bascule-panneau, .ol-control { display: none; }
  .visionneuse { grid-template-columns: 1fr; }
}
.legende .aide, .gestion .aide { font-size: .85rem; color: var(--gris); }

/* Accueil : appel vers le géoportail */
.appel-geoportail { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 0 0 1.5rem; }
.appel-geoportail span { color: var(--gris); font-size: .92rem; flex: 1 1 14rem; }
.bouton-grand { padding: .75rem 1.3rem; font-size: 1.02rem; font-weight: 600; border-radius: 10px; }

/* =====================================================================
   Plein écran (27/10/2026) : pages sur toute la largeur de l'écran ; les textes gardent une longueur de ligne lisible.
   ===================================================================== */
/* Accueil : l'ouverture remplit la hauteur de l'écran, la carte prend la plus grande part */
@media (min-width: 901px) {
  .ouverture { grid-template-columns: minmax(22rem, 4fr) minmax(0, 8fr); gap: clamp(2rem, 4vw, 5rem);
    min-height: calc(100vh - 4.5rem); padding-top: 1.5rem; padding-bottom: 1.5rem; }
  .carte-accueil { aspect-ratio: auto; height: min(calc(100vh - 9rem), 62vw); min-height: 26rem; }
}
/* Thématiques : 3 colonnes sur grand écran */
@media (min-width: 1400px) { .thematiques { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Listes de cartes : en grille sur grand écran plutôt qu'une longue colonne */
@media (min-width: 1500px) {
  .liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(42rem, 1fr)); column-gap: 3rem; }
}
.page-texte { max-width: 52rem; }

/* =====================================================================
   Menu principal modernisé (27/10/2026) : en-tête collant, sous-menu « Thématiques » en grand panneau,
   recherche intégrée, menu latéral sur mobile. Script : statique/js/menu.js
   ===================================================================== */
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.entete svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.entete { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 1.25rem; min-height: 4rem;
  padding: .45rem var(--gouttiere); color: var(--blanc); background: linear-gradient(120deg, #2B5197 0%, #23467F 60%, #1F3D72 100%);
  transition: box-shadow .2s; }
.entete.defile { box-shadow: 0 4px 18px rgba(22,36,79,.28); }
.entete a { color: inherit; text-decoration: none; }
.marque { display: flex; align-items: center; gap: .75rem; flex: none; }
.marque img { width: 44px; height: 44px; border-radius: 9px; background: var(--blanc); padding: 2px; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.marque .nom { font-weight: 700; font-size: 1.08rem; line-height: 1.15; letter-spacing: .01em; }
.marque .nom small { display: block; font-weight: 400; font-size: .78rem; opacity: .82; letter-spacing: 0; }

.nav-principale { flex: 1; display: flex; align-items: center; gap: 1rem; min-width: 0; }
.nav-liste { display: flex; align-items: center; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.nav-lien { display: inline-flex; align-items: center; gap: .45rem; padding: .5rem .8rem; border: 0; border-radius: 10px; background: none;
  color: rgba(255,255,255,.92); font: inherit; font-size: .95rem; font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.nav-lien svg { opacity: .8; }
.nav-lien:hover, .nav-deroulant.ouvert > .nav-lien { background: rgba(255,255,255,.13); color: #fff; }
.nav-lien[aria-current="page"], .nav-lien.actif { background: rgba(255,255,255,.2); color: #fff; box-shadow: inset 0 -2px 0 #fff; }
.nav-lien .chevron { width: 15px; height: 15px; margin-left: -.1rem; transition: transform .2s; }
.nav-deroulant.ouvert .chevron { transform: rotate(180deg); }
.nav-geoportail { background: rgba(255,255,255,.1); }

.nav-outils { margin-left: auto; display: flex; align-items: center; gap: .6rem; }
.nav-recherche { position: relative; display: flex; align-items: center; }
.nav-recherche svg { position: absolute; left: .7rem; opacity: .75; pointer-events: none; }
.nav-recherche input { width: 13.5rem; font: inherit; font-size: .88rem; color: #fff; padding: .5rem .8rem .5rem 2.2rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.1); transition: width .2s, background .2s; }
.nav-recherche input::placeholder { color: rgba(255,255,255,.7); }
.nav-recherche input:focus { width: 18rem; background: #fff; color: var(--encre); outline: 3px solid var(--focus); outline-offset: 1px; }
.nav-recherche:focus-within svg { color: var(--gris); opacity: 1; }
.acces-gestion { display: inline-flex; align-items: center; gap: .5rem; padding: .4rem .85rem; border: 1px solid rgba(255,255,255,.5); border-radius: 999px;
  font-size: .85rem; font-weight: 600; white-space: nowrap; transition: background .15s; }
.acces-gestion:hover { background: rgba(255,255,255,.14); }
.acces-gestion span { display: flex; flex-direction: column; line-height: 1.1; }
.acces-gestion small { font-weight: 400; font-size: .72rem; opacity: .8; }

/* Sous-menu Thématiques : panneau sous l'en-tête */
.nav-deroulant { position: static; }
.mega { position: absolute; left: 0; right: 0; top: 100%; display: none; color: var(--encre); background: #fff;
  border-top: 1px solid #E2E7F0; box-shadow: 0 18px 40px rgba(22,36,79,.18); max-height: calc(100dvh - 4rem); overflow-y: auto; }
.nav-deroulant.ouvert .mega { display: block; animation: mega-entree .16s ease-out; }
@keyframes mega-entree { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.mega-int { padding: 1.5rem var(--gouttiere) 1.25rem; }
.mega-entete { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.mega-titre { margin: 0; font-weight: 700; color: var(--bleu-fonce); font-size: 1.05rem; }
.mega-sous-titre { margin: 0; color: var(--gris); font-size: .88rem; }
.mega-grille { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.mega-theme { position: relative; padding: .9rem 1rem 1rem; border: 1px solid #E5E9F1; border-radius: 14px; background: #FAFBFD;
  transition: border-color .15s, box-shadow .15s, background .15s; }
.mega-theme::before { content: ""; position: absolute; left: 0; top: .9rem; bottom: .9rem; width: 4px; border-radius: 0 4px 4px 0; background: var(--c); }
.mega-theme:hover, .mega-theme.courant { background: #fff; border-color: color-mix(in srgb, var(--c) 35%, #E5E9F1); box-shadow: 0 6px 18px rgba(22,36,79,.08); }
.mega-theme-tete { display: flex; align-items: center; gap: .7rem; color: var(--encre) !important; }
.mega-theme-tete:hover .mega-nom { color: var(--c); }
.mega-icone { width: 2.4rem; height: 2.4rem; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); flex: none; }
.mega-icone svg { width: 20px; height: 20px; }
.mega-nom { display: flex; flex-direction: column; font-weight: 700; font-size: .98rem; line-height: 1.25; }
.mega-nb { font-weight: 500; font-size: .78rem; color: var(--gris); margin-top: .1rem; }
.mega-desc { margin: .55rem 0 .5rem; font-size: .84rem; color: var(--gris); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mega-cartes { list-style: none; margin: 0; padding: 0; display: grid; gap: .1rem; }
.mega-cartes a { display: block; padding: .3rem .5rem; margin: 0 -.5rem; border-radius: 7px; font-size: .86rem; color: var(--bleu) !important;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mega-cartes a:hover { background: color-mix(in srgb, var(--c) 9%, #fff); }
.mega-tout { display: inline-block; margin-top: .35rem; font-size: .82rem; font-weight: 600; color: var(--c) !important; }
.mega-vide { margin: .4rem 0 0; font-size: .84rem; color: #8F99AB; font-style: italic; }
.mega-pied { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid #E5E9F1; }
.mega-pied a { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .9rem; color: var(--bleu) !important; }
.mega-pied a:hover { text-decoration: underline !important; }
.mega-pied svg { width: 17px; height: 17px; }
.voile-menu { position: fixed; inset: 0; z-index: 55; background: rgba(16,26,48,.32); animation: mega-entree .16s ease-out; }
.voile-menu[hidden] { display: none; }

.menu-bascule { display: none; margin-left: auto; width: 2.6rem; height: 2.6rem; border: 1px solid rgba(255,255,255,.4); border-radius: 10px;
  background: rgba(255,255,255,.08); color: #fff; cursor: pointer; align-items: center; justify-content: center; }
.menu-bascule svg { width: 22px; height: 22px; }
.menu-bascule .ico-fermer, .menu-bascule[aria-expanded="true"] .ico-ouvrir { display: none; }
.menu-bascule[aria-expanded="true"] .ico-fermer { display: inline; }

@media (max-width: 1240px) {
  .nav-recherche input { width: 10rem; }
  .nav-recherche input:focus { width: 14rem; }
}
@media (max-width: 1080px) and (min-width: 981px) {
  .nav-lien svg:not(.chevron) { display: none; }
  .marque .nom small { display: none; }
}
/* Tablette et mobile : menu latéral */
@media (max-width: 980px) {
  .menu-bascule { display: inline-flex; }
  .nav-principale { position: fixed; top: 4rem; right: 0; bottom: 0; width: min(25rem, 100%); z-index: 58; flex-direction: column; align-items: stretch;
    gap: 1rem; padding: 1rem; overflow-y: auto; background: #fff; color: var(--encre); box-shadow: -10px 0 30px rgba(22,36,79,.2);
    transform: translateX(100%); visibility: hidden; transition: transform .22s ease, visibility .22s; }
  .nav-principale.ouvert { transform: none; visibility: visible; }
  body.menu-ouvert { overflow: hidden; }
  .nav-liste { flex-direction: column; align-items: stretch; gap: .15rem; }
  .nav-lien { width: 100%; color: var(--encre); padding: .75rem .8rem; font-size: 1rem; }
  .nav-lien svg { opacity: 1; color: var(--bleu); }
  .nav-lien:hover, .nav-deroulant.ouvert > .nav-lien { background: var(--surface); color: var(--encre); }
  .nav-lien[aria-current="page"], .nav-lien.actif { background: var(--bleu-pale); color: var(--bleu-fonce); box-shadow: inset 3px 0 0 var(--bleu); }
  .nav-geoportail { background: none; }
  .nav-lien .chevron { margin-left: auto; }
  .mega { position: static; display: none; box-shadow: none; border: 0; max-height: none; background: none; animation: none; }
  .nav-deroulant.ouvert .mega { display: block; }
  .mega-int { padding: .25rem 0 .5rem .5rem; }
  .mega-entete, .mega-desc, .mega-cartes, .mega-tout, .mega-vide { display: none; }
  .mega-grille { grid-template-columns: 1fr; gap: .2rem; }
  .mega-theme { padding: .45rem .6rem; border: 0; background: none; border-radius: 10px; }
  .mega-theme::before { top: .55rem; bottom: .55rem; }
  .mega-theme:hover, .mega-theme.courant { box-shadow: none; background: var(--surface); }
  .mega-icone { width: 2rem; height: 2rem; border-radius: 8px; }
  .mega-pied { display: none; }
  .nav-outils { margin: auto 0 0; flex-direction: column; align-items: stretch; gap: .6rem; padding-top: 1rem; border-top: 1px solid var(--trait); }
  .nav-recherche input, .nav-recherche input:focus { width: 100%; color: var(--encre); background: var(--surface); border-color: var(--trait); }
  .nav-recherche input::placeholder { color: var(--gris); }
  .nav-recherche svg { color: var(--gris); }
  .acces-gestion { justify-content: center; color: #fff !important; background: var(--bleu); border-color: var(--bleu); padding: .7rem 1rem; border-radius: 12px; }
  .acces-gestion span { flex-direction: row; gap: .35rem; align-items: baseline; }
  .voile-menu { top: 4rem; }
}
@media (max-width: 480px) { .marque .nom { font-size: 1rem; } .marque img { width: 38px; height: 38px; } }

/* Choix du fond de carte dans la fiche (aucun / plan / satellite) – 27/10/2026 */
.couches .choix-fond { display: block; margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--trait); }
.choix-fond-titre { display: block; font-size: .8rem; font-weight: 600; color: var(--gris); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .3rem; }
.choix-fond-options { display: inline-flex; border: 1px solid var(--trait); border-radius: 999px; overflow: hidden; }
.choix-fond-options label { position: relative; padding: .3rem .8rem; font-size: .88rem; cursor: pointer; border-right: 1px solid var(--trait); }
.choix-fond-options label:last-child { border-right: 0; }
.choix-fond-options input { position: absolute; opacity: 0; pointer-events: none; }
.choix-fond-options label:has(input:checked) { background: var(--bleu); color: #fff; }
.choix-fond-options label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: -3px; }
.choix-fond .aide-sat { display: block; margin-top: .4rem; font-size: .8rem; color: var(--gris); }
.choix-fond .aide-sat[hidden] { display: none; }
.telechargements-kml + .aide { font-size: .82rem; color: var(--gris); margin-top: .3rem; }

/* Légende dessinée par le portail (cercles proportionnels à leur vraie taille) */
.legende-cercles { list-style: none; margin: .2rem 0 0; padding: 0; }
.legende-cercles li { display: flex; align-items: center; gap: .5rem; min-height: 1.2rem; font-size: .8rem; line-height: 1.1; }
.legende-cercles svg { flex: none; display: block; }
.legende-note { font-size: .75rem; color: var(--gris); margin: .3rem 0 0; }
