* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; margin: 0; color: #1c2733; background: #f4f6f8; }
a { color: #0b5cad; }
h1 { font-size: 1.4rem; }
h2 { font-size: 1.15rem; margin-top: 1.5rem; }

header.site { position: relative; z-index: 100; background: #17324c; color: #fff; padding: .6rem 1.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
header.site .marque { font-weight: 700; letter-spacing: .04em; }
header.site .logo-entete { height: 30px; width: auto; background: #fff; border-radius: 5px; padding: 2px 7px; margin-right: .55rem; vertical-align: middle; }
header.site .identite { margin-left: auto; font-size: .9rem; color: #9fb8d1; }

/* Menu principal : volet vertical dépliable sous la barre d'en-tête */
.bouton-menu { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.45); border-radius: 6px; padding: .35rem 1rem; cursor: pointer; font-size: .95rem; }
.bouton-menu:hover { background: rgba(255,255,255,.12); }
header.site .menu-volet { position: absolute; top: 100%; left: 0; right: 0; background: #132a40; border-top: 1px solid rgba(255,255,255,.18); box-shadow: 0 12px 24px rgba(10,25,40,.35); max-height: 0; overflow: hidden; transition: max-height .25s ease; }
header.site .menu-volet.ouvert { max-height: calc(100vh - 60px); overflow-y: auto; }
header.site .menu-contenu { padding: .3rem 1.2rem .9rem; display: flex; flex-direction: column; }
header.site .menu-contenu a { display: block; padding: .45rem .6rem; border-radius: 5px; color: #cfe0f2; text-decoration: none; font-size: .95rem; }
header.site .menu-contenu a:hover { color: #fff; background: rgba(255,255,255,.1); }
header.site .menu-contenu a.menu-lien { color: #fff; font-weight: 600; }
header.site details.menu-groupe > summary { list-style: none; display: flex; align-items: center; padding: .55rem .6rem; border-radius: 5px; color: #fff; font-weight: 600; font-size: .95rem; cursor: pointer; user-select: none; }
header.site details.menu-groupe > summary::-webkit-details-marker { display: none; }
header.site details.menu-groupe > summary:hover { background: rgba(255,255,255,.1); }
header.site details.menu-groupe > summary::after { content: ""; width: .45em; height: .45em; border-right: 2px solid #cfe0f2; border-bottom: 2px solid #cfe0f2; transform: rotate(45deg); transition: transform .2s ease; margin: 0 .3em 0 auto; flex: none; }
header.site details.menu-groupe[open] > summary::after { transform: rotate(-135deg); }
header.site details.menu-groupe .sous-menu { display: flex; flex-direction: column; padding: .1rem 0 .3rem; }
header.site details.menu-groupe .sous-menu a { padding-left: 1.5rem; font-size: .93rem; }
header.site .intitule-sous-menu { color: #9fb8d1; font-size: .85rem; padding: .3rem .6rem .15rem 2.1rem; }
header.site .menu-contenu a.niveau-3 { padding-left: 2.4rem; font-size: .9rem; }

main { max-width: 1100px; margin: 1.2rem auto 3rem; padding: 0 1rem; }

.flash { border-radius: 6px; padding: .6rem .9rem; margin: .8rem 0; list-style: none; }
.flash li { margin: .15rem 0; }
.flash.succes { background: #e2f3e6; border: 1px solid #66bb7a; }
.flash.erreur { background: #fbe4e4; border: 1px solid #e06666; }
.flash.info { background: #e3edf8; border: 1px solid #7aa7d9; }

table.liste { width: 100%; border-collapse: collapse; background: #fff; font-size: .92rem; }
table.liste th, table.liste td { border: 1px solid #d7dde3; padding: .45rem .6rem; text-align: left; vertical-align: top; }
table.liste th { background: #eef2f6; }
table.liste tr:nth-child(even) td { background: #fafcfe; }

form.ordonnee label { display: block; font-weight: 600; margin-top: .9rem; }
form.ordonnee label.choix { display: inline-block; font-weight: 400; margin: .25rem 1.2rem .25rem 0; }
form.ordonnee label.choix-vertical { display: block; font-weight: 400; margin: .3rem 0; }
form.ordonnee input[type=text], form.ordonnee input[type=email], form.ordonnee input[type=password],
form.ordonnee input[type=number], form.ordonnee input[type=date], form.ordonnee select, form.ordonnee textarea {
  width: 100%; max-width: 480px; padding: .45rem; border: 1px solid #b7c1cc; border-radius: 4px;
}
.champs-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0 1.4rem; }

.boutons { margin-top: 1rem; display: flex; gap: .6rem; flex-wrap: wrap; }
button, .btn { background: #17324c; color: #fff; border: 0; border-radius: 5px; padding: .5rem 1rem; cursor: pointer; text-decoration: none; display: inline-block; font-size: .95rem; }
button.secondaire, .btn.secondaire { background: #5b7288; }
button.danger { background: #a33; }

.badge { display: inline-block; border-radius: 10px; padding: .1rem .55rem; font-size: .8rem; font-weight: 600; }
.badge-neutre { background: #e0e6ec; color: #33465a; }
.badge-ok { background: #d9f0de; color: #1e6b34; }
.badge-alerte { background: #fdeeda; color: #8a5a10; }
.badge-erreur { background: #fbe0e0; color: #933; }

.carte { background: #fff; border: 1px solid #d7dde3; border-radius: 8px; padding: 1rem 1.2rem; margin: .8rem 0; }
.filtres { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; margin: .8rem 0; }
.filtres input, .filtres select { padding: .4rem; border: 1px solid #b7c1cc; border-radius: 4px; }
.filtres input[type=checkbox] { padding: 0; width: auto; }
.filtres label.choix-filtre { display: inline-flex; align-items: center; gap: .3rem; font-weight: 400; white-space: nowrap; }
.barre { height: 14px; background: #17324c; border-radius: 3px; display: inline-block; vertical-align: middle; }
.graphe { background: #fff; border: 1px solid #d7dde3; border-radius: 8px; display: block; max-width: 760px; }
.legende { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; padding: 0; margin: .5rem 0 1rem; font-size: .88rem; }
.legende li { display: inline-flex; align-items: center; gap: .35rem; }
.legende span { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.connexion { max-width: 380px; margin: 4rem auto; background: #fff; border: 1px solid #d7dde3; border-radius: 8px; padding: 1.5rem; }
.champ-mdp { position: relative; max-width: 480px; }
.champ-mdp input { padding-right: 2.5rem; }
.voir-mdp { position: absolute; top: 50%; right: .3rem; transform: translateY(-50%); display: inline-flex; padding: .3rem; background: transparent; color: #5b7288; border-radius: 4px; }
.voir-mdp:hover { background: #eef2f6; color: #17324c; }
.voir-mdp svg { width: 18px; height: 18px; display: block; }
.voir-mdp svg[hidden] { display: none; }
.muted { color: #64748b; font-size: .88rem; }
code { background: #eef2f6; padding: .1rem .3rem; border-radius: 3px; }

.bandeau-prise-de-role { background: #fdf1dc; border-bottom: 1px solid #c98f2b; color: #7a5410; padding: .55rem 1.2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; }
.bandeau-prise-de-role form { margin: 0; }
.bandeau-prise-de-role button { padding: .3rem .8rem; font-size: .88rem; }

.carte-osm { height: 360px; border: 1px solid #d7dde3; border-radius: 8px; margin: .6rem 0; }

label.libelle-bloc { display: block; font-weight: 600; margin: .9rem 0 .25rem; }
select.select-multiple { min-width: 320px; max-width: 480px; padding: .45rem; border: 1px solid #b7c1cc; border-radius: 4px; }
small.aide-bloc { display: block; margin: .4rem 0 1.2rem; }
table.liste.marge-haute { margin-top: 1.2rem; }
table.liste tr.reseau-inactif td, table.liste tr.membre-inactif td { background: #fbe4e4; }
details.action-statut { margin-top: .6rem; }
details.action-statut summary { cursor: pointer; }
details.action-statut form { margin-top: .6rem; }
.suggestions { position: absolute; background: #fff; border: 1px solid #b7c1cc; border-radius: 4px; z-index: 1000; max-height: 240px; overflow: auto; min-width: 260px; }
.suggestions div { padding: .3rem .5rem; cursor: pointer; font-size: .9rem; }
.suggestions div:hover { background: #eef2f6; }
.avertissement-cp { display: block; color: #933; font-size: .85rem; margin: .15rem 0 .4rem; }
.pastille-alerte { display: inline-block; min-width: 1rem; padding: .05rem .32rem; margin-left: .25rem; background: #c8102e; color: #fff; border-radius: 10px; font-size: .72rem; font-weight: 700; text-align: center; vertical-align: middle; }

/* Indicateur de complexité du mot de passe (public/mot-de-passe.js) */
.jauge-mdp { margin: .2rem 0 .4rem; }
.jauge-mdp-barre { height: 6px; border-radius: 3px; background: #e0e6ec; overflow: hidden; }
.jauge-mdp-barre span { display: block; height: 100%; width: 0; border-radius: 3px; transition: width .25s ease; }
.jauge-mdp.niveau-0 .jauge-mdp-barre span { width: 15%; background: #e06666; }
.jauge-mdp.niveau-1 .jauge-mdp-barre span { width: 50%; background: #e0a444; }
.jauge-mdp.niveau-2 .jauge-mdp-barre span { width: 80%; background: #66bb7a; }
.jauge-mdp.niveau-3 .jauge-mdp-barre span { width: 100%; background: #2e8b57; }
.jauge-mdp-texte { margin: .25rem 0 0; font-size: .85rem; color: #55606b; }
.jauge-mdp.niveau-0 .jauge-mdp-texte { color: #933; }
