/* CalendArc - interface de gestion
   Marine des tenues, rouge des engins, jaune des bandes réfléchissantes. */

:root {
  /* Thème « sapeurs-pompiers » : noir de l'écusson, rouge incendie, or des lauriers */
  --beton: #F3F1ED;
  --papier: #FFFFFF;
  --marine: #18181B;
  --marine-2: #2C2C31;
  --nuit: #111113;
  --rouge: #C8102E;
  --rouge-fonce: #9E0B22;
  --or: #C9A24B;
  --jaune: #F2C230;
  --trait: #DAD6D0;
  --gris: #5F5F66;
  --vert: #2E7D4F;
  --rayon: 6px;
  --titre: "Barlow Condensed", "Arial Narrow", sans-serif;
  --texte: "Barlow", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 400 16px/1.5 var(--texte);
  color: var(--marine);
  background: var(--beton);
}
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--titre); font-weight: 700; line-height: 1.1; margin: 0; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
:focus-visible { outline: 3px solid var(--jaune); outline-offset: 2px; }

/* Bande de livrée : rouge et jaune en biais, comme sur les engins */
.livree {
  height: 10px;
  background: repeating-linear-gradient(-45deg,
    var(--rouge) 0 14px, var(--jaune) 14px 28px);
}

.marque {
  font-family: var(--titre);
  font-size: 3.2rem;
  letter-spacing: .01em;
  color: var(--marine);
}
.marque-petite { font-size: 1.9rem; color: #fff; }

.bascule {
  display: block; width: 100%; text-align: center; margin-bottom: 1rem;
  font: 600 .95rem var(--texte); color: var(--marine); background: var(--jaune);
  padding: .65rem .8rem; border-radius: var(--rayon); text-decoration: none;
}
.bascule:hover { background: #F6D35E; }

/* ---------- Boutons ---------- */
.btn {
  font: 600 .95rem/1 var(--texte);
  padding: .7rem 1rem;
  border-radius: var(--rayon);
  border: 1px solid var(--trait);
  background: var(--papier);
  color: var(--marine);
  cursor: pointer;
}
.btn:hover { border-color: var(--marine); }
.btn-rouge { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.btn-rouge:hover { background: var(--rouge-fonce); border-color: var(--rouge-fonce); }
.btn-jaune { background: var(--jaune); border-color: var(--jaune); color: var(--marine); }
.btn-lien {
  font: 500 .95rem var(--texte);
  background: none; border: 0; padding: .4rem 0;
  color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.btn-petit { padding: .4rem .7rem; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Formulaires ---------- */
label { display: block; font-weight: 500; margin-bottom: .9rem; font-size: .95rem; }
input, select {
  display: block; width: 100%; margin-top: .3rem;
  font: 400 1rem var(--texte); color: var(--marine);
  padding: .6rem .7rem; border: 1px solid var(--trait); border-radius: var(--rayon);
  background: var(--papier);
}
input[type=color] { padding: .2rem; height: 2.6rem; }
input[type=checkbox] { display: inline; width: auto; margin: 0 .5rem 0 0; }
.erreur-form { color: var(--rouge); font-weight: 500; min-height: 1.5em; margin: .2rem 0 .6rem; }
.ligne-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.cases { max-height: 15rem; overflow: auto; border: 1px solid var(--trait); border-radius: var(--rayon); padding: .5rem .8rem; }
.cases label { font-weight: 400; margin: .3rem 0; display: flex; align-items: center; }

/* ---------- Connexion ---------- */
.connexion { min-height: 100vh; display: flex; flex-direction: column; }
.connexion-carte {
  width: min(24rem, 100% - 2rem);
  margin: 12vh auto 2rem;
}
.connexion-sous { color: var(--gris); margin: .2rem 0 2rem; }
.connexion-carte .btn { width: 100%; padding: .9rem; font-size: 1rem; }

/* ---------- Mise en page ---------- */
.appli { display: grid; grid-template-columns: 15rem 1fr; min-height: 100vh; }
.barre {
  background: var(--marine); color: #fff;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.barre-haut { padding: 1.2rem 1.2rem .8rem; }
.choix-campagne { color: #C9C9CF; font-size: .85rem; margin: 1rem 0 0; }
.choix-campagne select { background: var(--marine-2); color: #fff; border-color: var(--marine-2); }
.nav { display: flex; flex-direction: column; padding: .5rem 0; }
.nav-lien {
  text-align: left; background: none; border: 0; color: #C9C9CF;
  font: 500 1.05rem var(--texte); padding: .65rem 1.2rem; cursor: pointer;
  border-left: 4px solid transparent;
}
.nav-lien:hover { color: #fff; background: var(--marine-2); }
.nav-lien[aria-current="page"] { color: #fff; border-left-color: var(--rouge); background: var(--marine-2); }
.barre-bas { margin-top: auto; padding: 1.2rem; font-size: .9rem; color: #C9C9CF; display: flex; flex-direction: column; align-items: flex-start; }
.barre-bas .btn-lien { color: #fff; }

.contenu { min-width: 0; }
.vue { padding: 2rem 2.5rem 3rem; max-width: 72rem; }
.vue-tete { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }

/* ---------- Tableaux ---------- */
.tableau { width: 100%; border-collapse: collapse; background: var(--papier); border: 1px solid var(--trait); }
.tableau th { text-align: left; font-weight: 600; font-size: .85rem; color: var(--gris); padding: .7rem .9rem; border-bottom: 2px solid var(--marine); }
.tableau td { padding: .7rem .9rem; border-bottom: 1px solid var(--trait); vertical-align: middle; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau .num { text-align: right; font-variant-numeric: tabular-nums; }
.tableau .actions { text-align: right; white-space: nowrap; }
.inactif td { color: var(--gris); }
.vide { padding: 2.5rem 1rem; text-align: center; color: var(--gris); }

.statut { display: inline-block; font-weight: 600; font-size: .85rem; padding: .15rem .55rem; border-radius: 999px; border: 1px solid currentColor; }
.statut-en_cours { color: var(--vert); }
.statut-preparation { color: var(--gris); }
.statut-cloturee { color: var(--marine); background: var(--beton); }
.role { font-size: .9rem; }

/* ---------- Équipes ---------- */
.equipes { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.equipe {
  background: var(--papier); border: 1px solid var(--trait); border-top: 4px solid var(--marine);
  padding: 1rem 1.1rem; border-radius: 0 0 var(--rayon) var(--rayon);
}
.equipe h3 { margin-bottom: .5rem; }
.equipe ul { list-style: none; padding: 0; margin: 0 0 .8rem; }
.equipe li { padding: .15rem 0; }
.equipe .meta { color: var(--gris); font-size: .9rem; margin: 0 0 .8rem; }
.equipe .actions { display: flex; gap: 1rem; }

/* ---------- Carte ---------- */
.vue-carte { padding: 0; max-width: none; display: grid; grid-template-columns: 1fr 21rem; height: 100vh; }
.carte { height: 100%; min-height: 20rem; background: #dde3e8; }
.carte.en-dessin { cursor: crosshair; }
.panneau { background: var(--papier); border-left: 1px solid var(--trait); padding: 1.2rem; overflow: auto; display: flex; flex-direction: column; gap: 1rem; }
.panneau-tete { display: flex; flex-direction: column; gap: .8rem; align-items: flex-start; }
.barre-dessin { background: #FFF6D6; border-left: 4px solid var(--jaune); padding: .8rem; }
.barre-dessin p { margin: 0 0 .7rem; }
.barre-dessin-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

.secteurs { list-style: none; padding: 0; margin: 0; }
.secteur { border-bottom: 1px solid var(--trait); padding: .8rem 0; }
.secteur-tete { display: flex; align-items: center; gap: .6rem; }
.secteur-tete button { background: none; border: 0; padding: 0; font: 600 1.05rem var(--texte); color: var(--marine); cursor: pointer; text-align: left; }
.secteur .meta { color: var(--gris); font-size: .9rem; margin: .2rem 0 .4rem 1.6rem; }
.secteur .actions { margin-left: 1.6rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.avancement { height: 5px; background: var(--beton); margin: .3rem 0 .4rem 1.6rem; border-radius: 3px; overflow: hidden; }
.avancement span { display: block; height: 100%; background: var(--vert); }

.pastille { display: inline-block; width: 1rem; height: 1rem; border-radius: 50%; flex: none; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--trait); }
.pastille-libre { background: #8A93A0; }
.legende { font-size: .9rem; color: var(--gris); display: flex; flex-direction: column; gap: .3rem; }
.legende span { display: flex; align-items: center; gap: .5rem; }

.popup-adresse { font: 400 .95rem/1.4 var(--texte); min-width: 13rem; }
.popup-adresse strong { font-size: 1rem; }
.popup-adresse select, .popup-adresse input { margin: .3rem 0 .6rem; }
.popup-adresse .btn { width: 100%; }

/* ---------- Stock et caisse ---------- */
[data-vue="stock"] h3 { font-size: 1.5rem; margin: 0 0 .8rem; }
.titre-section { margin-top: 2.5rem !important; }
.chiffres-cles { display: flex; flex-wrap: wrap; gap: 0; margin: 0 0 1.2rem; border: 1px solid var(--trait); background: var(--papier); }
.chiffres-cles div { flex: 1 1 9rem; padding: .8rem 1rem; border-right: 1px solid var(--trait); }
.chiffres-cles div:last-child { border-right: 0; }
.chiffres-cles dt { font-size: .85rem; color: var(--gris); }
.chiffres-cles dd { margin: .1rem 0 0; font: 700 2rem/1.1 var(--titre); font-variant-numeric: tabular-nums; }
.chiffres-cles .en-avant dd { color: var(--rouge); }
.historique { margin: .8rem 0 0; }
.historique summary { cursor: pointer; font-weight: 600; padding: .5rem 0; }
.historique .tableau { margin-top: .4rem; }
.ecart-ok { color: var(--vert); font-weight: 600; }
.ecart-ko { color: var(--rouge); font-weight: 600; }
.attendu { background: var(--beton); padding: .8rem 1rem; margin: 0 0 1rem; border-left: 4px solid var(--marine); }
.attendu p { margin: 0; }
.attendu p + p { margin-top: .3rem; }
.ecart-direct { font-weight: 600; margin: -.3rem 0 .8rem; }
.actions .btn + .btn { margin-left: .4rem; }

/* ---------- État des comptes ---------- */
.etat-compte small, .carnets { display: block; color: var(--gris); font-size: .85rem; font-weight: 400; }
.compte { font-weight: 600; font-size: .9rem; white-space: nowrap; }
.etat-compte { min-width: 10rem; }
.compte::before { content: ""; display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .4rem; vertical-align: .05rem; }
.compte-ok::before { background: var(--vert); }
.compte-attente::before { background: var(--jaune); }
.compte-expire { color: var(--rouge); }
.compte-expire::before { background: var(--rouge); }
.compte-off::before { background: var(--gris); }
.aide-fenetre { color: var(--gris); margin: -.4rem 0 1rem; }
.tableau .actions-pile { white-space: normal; width: 1%; }
.actions-pile > div { display: flex; flex-direction: column; align-items: stretch; gap: .35rem; min-width: 11rem; }

/* ---------- Groupes et droits ---------- */
.intro-vue { color: var(--gris); max-width: 46rem; margin: -.6rem 0 1.5rem; }
.groupes { display: grid; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); gap: 1rem; }
.groupe { background: var(--papier); border: 1px solid var(--trait); border-top: 4px solid var(--rouge); padding: 1rem 1.1rem; border-radius: 0 0 var(--rayon) var(--rayon); }
.groupe header { margin-bottom: .6rem; }
.groupe header h3 { margin-bottom: .5rem; }
.groupe header .actions { display: flex; gap: 1rem; align-items: center; }
.groupe .meta { color: var(--gris); font-size: .9rem; margin: .6rem 0; }
.droits-lecture { width: 100%; border-collapse: collapse; font-size: .95rem; }
.droits-lecture td { padding: .3rem 0; border-bottom: 1px solid var(--beton); }
.droits-lecture .niveau { text-align: right; font-weight: 600; }
.niveau-modification { color: var(--rouge); }
.niveau-lecture { color: var(--marine); }
.membres-groupe { margin: 0; font-size: .95rem; }
.membre-inactif { text-decoration: line-through; color: var(--gris); }
.grille-droits { width: 100%; border-collapse: collapse; margin: .2rem 0 1rem; font-size: .9rem; }
.grille-droits th, .grille-droits td { padding: .45rem .3rem; border-bottom: 1px solid var(--trait); }
.grille-droits thead th { font-weight: 600; color: var(--gris); font-size: .8rem; text-align: center; }
.grille-droits thead th:first-child, .grille-droits tbody th { text-align: left; font-weight: 500; }
.grille-droits td { text-align: center; }
.grille-droits input[type=radio] { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--rouge); }
.bloc-droits { border: 1px solid var(--trait); border-radius: var(--rayon); padding: .7rem .9rem .3rem; margin: 0 0 1rem; }
.bloc-droits legend { font-weight: 600; padding: 0 .3rem; }
.bloc-droits label { font-weight: 400; display: flex; align-items: flex-start; gap: .1rem; }
.bloc-droits .meta, .fenetre .meta { color: var(--gris); font-size: .9rem; margin: .3rem 0 .7rem; }
.fenetre { width: min(36rem, 100% - 2rem); max-height: calc(100vh - 2rem); }
.oubli { text-align: center; margin: 1rem 0 0; }
.oubli a { color: var(--marine); }

/* ---------- Modification d'un contour ---------- */
.poignee { background: var(--jaune); border: 2px solid var(--marine); border-radius: 50%; cursor: grab; box-shadow: 0 1px 3px rgba(17,17,19,.4); }
.poignee:active { cursor: grabbing; }
.poignee-milieu { background: #fff; border: 2px solid var(--marine); border-radius: 50%; opacity: .85; cursor: copy; }
.aide-edition { margin: .2rem 0 .6rem; padding-left: 1.1rem; font-size: .9rem; }
.aide-edition li { margin: .15rem 0; }
.barre-dessin .meta { color: var(--gris); font-size: .85rem; margin: 0 0 .7rem; }
.secteur .actions { row-gap: .2rem; }

/* ---------- Fenêtre et notifications ---------- */
.fenetre { border: 0; border-top: 6px solid var(--rouge); border-radius: 0 0 var(--rayon) var(--rayon); padding: 1.5rem; width: min(30rem, 100% - 2rem); color: var(--marine); }
.fenetre::backdrop { background: rgba(17, 17, 19, .55); }
.fenetre-actions { display: flex; justify-content: flex-end; align-items: center; gap: 1.2rem; }

.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translate(-50%, 1rem);
  background: var(--marine); color: #fff; padding: .8rem 1.2rem; border-radius: var(--rayon);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 2000; max-width: calc(100% - 2rem);
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.toast.erreur { background: var(--rouge); }

/* ---------- Téléphone et tablette ---------- */
@media (max-width: 860px) {
  .appli { grid-template-columns: 1fr; }
  .barre { position: static; height: auto; }
  .nav { flex-direction: row; overflow-x: auto; }
  .nav-lien { border-left: 0; border-bottom: 4px solid transparent; white-space: nowrap; }
  .nav-lien[aria-current="page"] { border-bottom-color: var(--rouge); }
  .barre-bas { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; padding: .6rem 1.2rem; }
  .bascule { margin-bottom: 0; }
  .vue { padding: 1.2rem 1rem 2rem; }
  .tableau { display: block; overflow-x: auto; }
  .vue-carte { grid-template-columns: 1fr; height: auto; }
  .carte { height: 60vh; }
  .panneau { border-left: 0; border-top: 1px solid var(--trait); }
  .ligne-2 { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; }
}

/* ---------- Secteurs par commune ---------- */
.boutons-secteur { display: flex; flex-wrap: wrap; gap: .5rem; }
.secteur-commune { border-left: 4px solid var(--marine); padding-left: .7rem; }
.secteur-commune > .actions { margin-top: .3rem; align-items: center; }
.sous-secteurs { list-style: none; margin: .6rem 0 0 1rem; padding: 0; border-left: 2px solid var(--trait); }
.sous-secteurs .secteur { padding: .55rem 0 .55rem .8rem; border-bottom: 0; }
.sous-secteurs .secteur-tete button { font-size: .98rem; }
.fenetre.fenetre-large { width: min(50rem, 100% - 2rem); }
.fenetre h4 { font: 700 1.2rem var(--titre); margin: 1.2rem 0 .5rem; display: flex; gap: .8rem; align-items: baseline; flex-wrap: wrap; }
.fenetre h4 .meta { font: 400 .9rem var(--texte); margin: 0; }
.option-commune { display: flex; gap: .2rem; align-items: flex-start; background: #FFF6D6; border-left: 4px solid var(--jaune); padding: .7rem .8rem; font-weight: 500; }
.agents-commune { list-style: none; margin: 0 0 .7rem; padding: 0; }
.agents-commune li { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid var(--beton); }
.agents-commune li span { font-weight: 600; }
.agents-commune li small { color: var(--gris); flex: 1; }
.ajout-agent, .filtre-rues, .tout-attribuer { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-bottom: .6rem; }
.ajout-agent select, .filtre-rues input[type=search] { flex: 1; min-width: 12rem; margin: 0; }
.ajout-agent .btn { white-space: nowrap; }
.filtre-rues label { margin: 0; font-weight: 400; display: flex; align-items: center; }
.tout-attribuer select { width: auto; margin: 0; }
.tout-attribuer span { color: var(--gris); font-size: .9rem; }
.liste-rues { max-height: 45vh; overflow: auto; border: 1px solid var(--trait); margin-bottom: .6rem; }
.tableau-rues { border: 0; }
.tableau-rues td { padding: .4rem .7rem; }
.tableau-rues td small { display: block; color: var(--gris); font-size: .8rem; }
.tableau-rues select { margin: 0; min-width: 11rem; padding: .35rem .5rem; }
.tableau-rues tr[hidden] { display: none; }

/* ---------- Zones des agents ---------- */
.zones-agent { margin: .3rem 0 0 1.6rem; font-size: .9rem; }
.zones-agent summary { cursor: pointer; color: var(--gris); font-weight: 600; padding: .2rem 0; }
.zones-agent ul { list-style: none; margin: .2rem 0 0; padding: 0; }
.zones-agent li { display: flex; justify-content: space-between; align-items: baseline; gap: .6rem; padding: .2rem 0; border-bottom: 1px solid var(--beton); }
.zones-agent li > .btn-lien { text-decoration: none; text-align: left; font-weight: 500; }
.zones-agent li > .btn-lien:hover { text-decoration: underline; }
.actions-zone { display: flex; gap: .7rem; white-space: nowrap; }
.actions-zone .btn-lien { font-size: .85rem; color: var(--gris); }

/* ---------- Résultat du passage dans la fenêtre d'une adresse ---------- */
.passage { display: flex; flex-direction: column; gap: .15rem; margin: .6rem 0 .3rem; padding: .5rem .6rem;
  border-left: 4px solid var(--resultat, var(--trait)); background: var(--beton); border-radius: 0 6px 6px 0; }
.passage-statut { font-weight: 700; color: var(--resultat); font-size: 1rem; }
.passage-quand { color: var(--gris); font-size: .85rem; }
.passage small { color: var(--gris); font-size: .8rem; margin-top: .2rem; }
.passage-vide { color: var(--gris); border-left-color: var(--trait); }
.choix-couleurs { display: grid; grid-template-columns: 1fr 1fr; background: #E3E6EA; border-radius: var(--rayon); padding: 3px; margin-bottom: .4rem; }
.choix-couleurs button { font: 600 .85rem var(--texte); border: 0; background: none; padding: .45rem .3rem; border-radius: 4px; color: var(--marine); cursor: pointer; }
.choix-couleurs button[aria-pressed="true"] { background: var(--papier); box-shadow: 0 1px 2px rgba(17,17,19,.2); }
#legende-points { display: flex; flex-wrap: wrap; gap: .3rem .9rem; }
#legende-points small { color: var(--gris); }
.case-zones { display: flex; align-items: center; gap: .1rem; font-weight: 500; color: var(--marine); margin: 0 0 .5rem; }
.supprimer-zones { color: var(--rouge); font-size: .85rem; margin-top: .3rem; }
.boutons-adresses { display: flex; flex-direction: column; gap: .5rem; }

/* ---------- Onglets de secteurs ---------- */
.vue-carte { grid-template-columns: 1fr 23rem; }
.outils-onglets { display: flex; justify-content: flex-end; gap: 1rem; margin-bottom: -.5rem; font-size: .85rem; }
.secteurs > li { margin-bottom: .5rem; }
.onglet { background: var(--papier); border: 1px solid var(--trait); border-left: 5px solid var(--marine); border-radius: var(--rayon); }
.onglet-libre { border-left-color: var(--gris); }
.onglet > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: .6rem;
  padding: .65rem .7rem .4rem; border-radius: var(--rayon);
}
.onglet > summary::-webkit-details-marker { display: none; }
.onglet > summary::after {
  content: ""; width: .55rem; height: .55rem; flex: none; margin-left: .2rem;
  border-right: 2px solid var(--gris); border-bottom: 2px solid var(--gris);
  transform: rotate(45deg) translateY(-2px); transition: transform .15s;
}
.onglet[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.onglet > summary:hover { background: var(--beton); }
.onglet > summary:focus-visible { outline: 3px solid var(--jaune); outline-offset: 1px; }
.onglet-titre { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.onglet-titre strong { font: 700 1.15rem var(--titre); letter-spacing: .01em; }
.onglet-titre small { color: var(--gris); font-size: .82rem; }
.a-attribuer { color: var(--rouge); font-weight: 600; }
.onglet-pct { font: 700 1rem var(--titre); color: var(--vert); white-space: nowrap; }
.onglet > .avancement { margin: 0 .7rem .55rem; }
.onglet[open] { box-shadow: 0 2px 8px rgba(17,17,19,.08); }
.onglet[open] > summary { border-radius: var(--rayon) var(--rayon) 0 0; }
.onglet-corps { border-top: 1px solid var(--trait); padding: .7rem .7rem .6rem; }
.onglet-corps .actions { margin: 0; display: flex; gap: .4rem 1rem; flex-wrap: wrap; align-items: center; }
.onglet-corps > .meta { color: var(--gris); font-size: .88rem; margin: .6rem 0 0; }
.lien-danger { color: var(--rouge); }
.agents { list-style: none; margin: .7rem 0 0; padding: 0; }
.agent { padding: .55rem 0 .55rem .7rem; border-left: 3px solid var(--trait); margin-top: .3rem; }
.agent + .agent { border-top: 1px solid var(--beton); }
.agent-tete { display: flex; align-items: center; gap: .5rem; }
.agent-nom { background: none; border: 0; padding: 0; font: 600 1rem var(--texte); color: var(--marine); cursor: pointer; text-align: left; flex: 1; }
.agent-nom:hover { text-decoration: underline; }
.agent-tete small { color: var(--gris); font-size: .82rem; white-space: nowrap; }
.agent .avancement { margin: .3rem 0 .35rem 1.5rem; }
.agent .actions { margin-left: 1.5rem; font-size: .9rem; }
.agent .zones-agent { margin-left: 1.5rem; }
.agent > .meta { color: var(--gris); font-size: .82rem; margin: .2rem 0 0 1.5rem; }
@media (prefers-reduced-motion: reduce) { .onglet > summary::after { transition: none; } }

/* ---------- Déplacer / supprimer un point d'adresse ---------- */
.popup-outils { display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-top: .6rem; font-size: .88rem; }
.poignee-adresse { box-shadow: 0 0 0 4px rgba(242,194,48,.35), 0 1px 4px rgba(17,17,19,.5); }
#btn-deplacement-ok:disabled { opacity: .5; cursor: not-allowed; }
.points-supprimes { list-style: none; margin: 0; padding: 0; max-height: 50vh; overflow: auto; }
.points-supprimes li { display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .5rem 0; border-bottom: 1px solid var(--beton); }
.points-supprimes li span { display: flex; flex-direction: column; }
.points-supprimes small { color: var(--gris); font-size: .85rem; }
.points-supprimes li.retabli strong { color: var(--vert); }
#btn-points-supprimes { align-self: flex-start; font-size: .9rem; }

/* ---------- Infobulle au survol d'un point d'adresse ---------- */
.leaflet-tooltip.infobulle-adresse { padding: .35rem .6rem; border: 0; border-radius: var(--rayon); box-shadow: 0 2px 8px rgba(17,17,19,.25); font: 400 .88rem/1.3 var(--texte); color: var(--marine); }
.bulle-adresse { display: flex; flex-direction: column; border-left: 4px solid var(--resultat); padding-left: .5rem; }
.bulle-adresse strong { font-weight: 600; white-space: nowrap; }
.bulle-etat { color: var(--resultat); font-weight: 700; white-space: nowrap; }

/* ---------- Aide ---------- */
.nav-aide { margin-top: .6rem; border-top: 1px solid rgba(255,255,255,.15); }
.vue-aide { max-width: 52rem; }
.aide-sommaire { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.2rem; }
.aide-sommaire a { font: 500 .9rem var(--texte); color: var(--marine); background: var(--papier); border: 1px solid var(--trait); border-radius: 999px; padding: .3rem .8rem; text-decoration: none; }
.aide-sommaire a:hover { border-color: var(--marine); }
.aide-bloc { background: var(--papier); border: 1px solid var(--trait); border-radius: var(--rayon); margin-bottom: .7rem; scroll-margin-top: 1rem; }
.aide-bloc > summary { list-style: none; cursor: pointer; padding: .9rem 1.2rem; font: 700 1.35rem var(--titre); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.aide-bloc > summary small { font: 400 .9rem var(--texte); color: var(--gris); margin-left: .4rem; }
.aide-bloc > summary::-webkit-details-marker { display: none; }
.aide-bloc > summary::after { content: "+"; font: 600 1.4rem var(--texte); color: var(--gris); margin-left: auto; }
.aide-bloc[open] > summary::after { content: "−"; }
.aide-bloc[open] > summary { border-bottom: 1px solid var(--trait); }
.aide-bloc > :not(summary) { margin-left: 1.2rem; margin-right: 1.2rem; }
.aide-bloc > :last-child { margin-bottom: 1.1rem; }
.aide-bloc h4 { font: 700 1.1rem var(--titre); margin: 1rem 1.2rem .2rem; }
.aide-etapes, .aide-liste { padding-left: 1.4rem; margin-top: .8rem; line-height: 1.5; }
.aide-etapes > li, .aide-liste > li { margin-bottom: .55rem; }
.aide-etapes ul, .aide-liste ul { padding-left: 1.2rem; margin: .35rem 0; }
.aide-astuce { background: var(--beton); border-left: 4px solid var(--marine); padding: .6rem .9rem; border-radius: 0 6px 6px 0; }

/* ---------- Thème sapeurs-pompiers : barre latérale, logo, connexion ---------- */
.barre { background: linear-gradient(180deg, #1F1F23 0%, var(--nuit) 60%); border-right: 3px solid var(--rouge); }
.barre-marque { display: flex; align-items: center; gap: .7rem; }
.barre-marque img { height: 3.6rem; width: auto; filter: drop-shadow(0 2px 4px rgba(0,0,0,.6)); }
.barre-marque > span { display: flex; flex-direction: column; line-height: 1; }
.barre-marque small { font: 600 .78rem var(--texte); letter-spacing: .08em; text-transform: uppercase; color: var(--or); margin-top: .3rem; }
.nav-lien:hover { background: #26262B; }
.nav-lien[aria-current="page"] { background: linear-gradient(90deg, rgba(200,16,46,.28), rgba(200,16,46,0) 85%); }
.nav-aide { border-top-color: rgba(201,162,75,.35); }
.choix-campagne select { border-color: #3A3A41; }
.connexion { background: radial-gradient(ellipse at top, #FFFFFF 0%, var(--beton) 60%); }
.connexion-carte { text-align: center; margin-top: 7vh; }
.connexion-carte label, .connexion-carte .erreur-form { text-align: left; }
.connexion-logo { width: 8.5rem; height: auto; display: block; margin: 0 auto 1rem; filter: drop-shadow(0 6px 14px rgba(17,17,19,.35)); }
.connexion-sous strong { color: var(--rouge); font-family: var(--titre); font-size: 1.1rem; letter-spacing: .06em; text-transform: uppercase; }
.vue-tete h2 { border-left: 6px solid var(--rouge); padding-left: .7rem; }
.aide-astuce { border-left-color: var(--or); background: #F7F1E3; }
.aide-bloc[open] > summary { box-shadow: inset 4px 0 0 var(--rouge); }
@media (max-width: 860px) {
  .barre { border-right: 0; border-bottom: 3px solid var(--rouge); }
  .barre-marque img { height: 2.8rem; }
}
