:root {
  --fond: #f7f4f1;
  --surface: #ffffff;
  --texte: #2a2420;
  --texte-2: #6b625b;
  --ligne: #e8e0d8;
  /* couleurs de Candiac : orange #eb7923, jaune #fdb714, gris chaud #f4f0ed.
     --accent = l'orange assombri pour que le texte blanc reste lisible (contraste 4,8:1). */
  --accent: #b8570d;
  --accent-fonce: #9a470b;
  --accent-doux: #fdf0e4;
  --orange: #eb7923;
  --jaune: #fdb714;
  --ombre: 0 2px 10px rgba(45, 35, 25, .12), 0 1px 2px rgba(45, 35, 25, .08);
  --rayon: 10px;
  --panneau: 360px;
  --c-fleur: #e5559b;
  --c-fruit: #8e3fb0;
  --c-chatons: #cdb52e;
  --c-bourgeon: #8fd14f;
  --c-seve: #5aa9e6;
  --c-chute: #9c7b5b;
  --c-feuillage: #4e8a3e;
  --c-persistant: #1d5537;
  --c-dormant: #b7aa9a;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--texte);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--fond); }
button { font: inherit; color: inherit; cursor: pointer; }
#app { position: fixed; inset: 0; display: flex; }

/* ---------------- Panneau ---------------- */
#panneau {
  width: var(--panneau); flex: none; height: 100%; display: flex; flex-direction: column;
  background: var(--fond); border-right: 1px solid var(--ligne); z-index: 1000;
}
#panneau:not(.ouvert) { display: none; }
.entete { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 16px 8px; }
h1 { font-size: 19px; margin: 0; letter-spacing: -.01em; }
.sous-titre { margin: 3px 0 0; color: var(--texte-2); font-size: 13px; }
.icone { border: 1px solid var(--ligne); background: var(--surface); border-radius: 8px; width: 32px; height: 32px; line-height: 1; font-size: 18px; }
.icone:hover { background: var(--accent-doux); }
.flottant { position: absolute; top: 12px; left: 12px; z-index: 1001; box-shadow: var(--ombre); }

.recherche { position: relative; padding: 4px 16px 10px; }
#recherche { width: 100%; padding: 9px 12px; border: 1px solid var(--ligne); border-radius: 8px; font: inherit; font-size: 14px; background: var(--surface); }
#recherche:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
#suggestions { position: absolute; left: 16px; right: 16px; top: 44px; margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--ligne); border-radius: 8px; box-shadow: var(--ombre); max-height: 320px; overflow: auto; z-index: 5; }
#suggestions li { padding: 7px 9px; border-radius: 6px; cursor: pointer; font-size: 14px; display: flex; justify-content: space-between; gap: 8px; }
#suggestions li:hover, #suggestions li.sel { background: var(--accent-doux); }
#suggestions small { color: var(--texte-2); }

.onglets { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--ligne); }
.onglet { border: 0; background: none; padding: 9px 9px 10px; font-size: 14px; color: var(--texte-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.onglet.actif { color: var(--texte); border-bottom-color: var(--accent); font-weight: 600; }
.contenu { flex: 1; overflow-y: auto; padding: 12px 16px 16px; font-size: 14px; }
.pied { padding: 10px 16px; font-size: 11.5px; color: var(--texte-2); border-top: 1px solid var(--ligne); line-height: 1.4; }

/* En ce moment */
.bloc { margin-bottom: 18px; }
.bloc h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--texte-2); margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.pastille { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.ligne-esp { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; align-items: baseline; }
.ligne-esp:hover { background: var(--accent-doux); }
.ligne-esp.focus { background: var(--accent-doux); outline: 1px solid var(--accent); }
.ligne-esp .nom { font-weight: 550; }
.ligne-esp .n { color: var(--texte-2); font-variant-numeric: tabular-nums; font-size: 13px; }
.ligne-esp .note { grid-column: 1 / -1; color: var(--texte-2); font-size: 12.5px; }
.badge { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 99px; background: #fff0c7; color: #7a4a00; margin-left: 4px; vertical-align: 1px; font-weight: 500; }
.badge.toxique { background: #fbe1e1; color: #a1161f; }
.vide { color: var(--texte-2); font-style: italic; padding: 4px 8px; }
.filtre-actif { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--accent-doux); border-radius: 8px; padding: 8px 10px; margin-bottom: 12px; font-size: 13px; }
.lien { border: 0; background: none; color: var(--accent); text-decoration: underline; padding: 0; font-size: 13px; }

/* Calendrier (Gantt) */
.gantt { font-size: 12px; }
.gantt-mois { display: grid; grid-template-columns: 112px 1fr; position: sticky; top: -12px; background: var(--fond); padding: 4px 0; z-index: 2; }
.gantt-mois .echelle { display: grid; grid-template-columns: repeat(12, 1fr); color: var(--texte-2); }
.gantt-mois .echelle span { border-left: 1px solid var(--ligne); padding-left: 2px; }
.gantt-ligne { display: grid; grid-template-columns: 112px 1fr; align-items: center; min-height: 20px; cursor: pointer; border-radius: 4px; }
.gantt-ligne:hover { background: var(--accent-doux); }
.gantt-ligne .etiq { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 6px; }
.gantt-piste { position: relative; height: 14px; overflow: hidden; background: repeating-linear-gradient(90deg, transparent 0 calc(100%/12 - 1px), var(--ligne) calc(100%/12 - 1px) calc(100%/12)); }
.gantt-barre { position: absolute; top: 2px; height: 10px; border-radius: 3px; opacity: .85; }
.gantt-barre.fond { opacity: .45; }
.gantt-auj { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--texte); z-index: 1; pointer-events: none; }
.gantt-legende { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 4px 0 10px; color: var(--texte-2); font-size: 12px; }
.gantt-legende span { display: inline-flex; align-items: center; gap: 5px; }

/* Essences */
.genre { border-bottom: 1px solid var(--ligne); }
.genre-tete { display: flex; align-items: center; gap: 8px; padding: 7px 2px; }
.genre-tete input { margin: 0; accent-color: var(--accent); }
.genre-tete .nom { flex: 1; cursor: pointer; }
.genre-tete .n { color: var(--texte-2); font-variant-numeric: tabular-nums; font-size: 13px; }
.genre-tete .deplier { border: 0; background: none; width: 22px; color: var(--texte-2); }
.especes { padding: 0 0 6px 26px; }
.especes label { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 13px; }
.especes label .n { margin-left: auto; color: var(--texte-2); font-size: 12px; }
.actions-filtre { display: flex; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; align-items: center; }
.case { display: flex; align-items: center; gap: 6px; font-size: 13px; }

/* Fiche arbre */
.fiche h2 { font-size: 18px; margin: 0; }
.fiche .latin { font-style: italic; color: var(--texte-2); margin: 2px 0 12px; }
.fiche dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px 10px; margin: 0 0 14px; }
.fiche dt { color: var(--texte-2); }
.fiche dd { margin: 0; }
.fiche .etat-ok { color: var(--accent); }
.fiche .etat-mal { color: #b4232f; }
.mini-cal { margin: 8px 0 14px; }

/* ---------------- Carte ---------------- */
#carte { flex: 1; height: 100%; background: #e6e6e4; }
/* Fonds OSM désaturés : nets à tous les zooms */
.fond-gris { filter: grayscale(1) brightness(1.06) contrast(.78); }
.fond-sombre { filter: grayscale(1) invert(1) brightness(.88) contrast(.9); }
body.carte-sombre #carte { background: #262626; }
.leaflet-container { font: inherit; }
.barre-modes {
  position: absolute; top: 12px; right: 12px; z-index: 1000; display: flex; background: var(--surface);
  border-radius: 10px; box-shadow: var(--ombre); padding: 3px;
}
.barre-modes button { display: inline-flex; align-items: center; height: 33px; border: 0; background: none; padding: 0 12px; border-radius: 7px; font-size: 14px; color: var(--texte-2); }
.barre-modes button.actif { background: var(--accent); color: #fff; font-weight: 600; }
/* pastille : même espace à droite qu'en haut et en bas (bouton de 33 px, pastille de 22 px ; 30 px sur cellulaire) */
.barre-modes button:has(.compte) { padding-right: 5.5px; }
.barre-modes .compte { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; line-height: 1; margin-left: 4px; border-radius: 4px; background: var(--jaune); color: #3a2a00; font-size: 12px; font-weight: 700; }
.legende-mode {
  position: absolute; top: 58px; right: 12px; z-index: 999; background: rgba(255,255,255,.95); border-radius: 10px;
  box-shadow: var(--ombre); padding: 8px 10px; font-size: 12.5px; max-width: 270px; max-height: calc(100% - 200px); overflow: auto;
}
.leg-actions { display: flex; gap: 10px; padding: 0 2px 5px; margin-bottom: 3px; border-bottom: 1px solid var(--ligne); white-space: nowrap; }
.leg-actions { gap: 6px; }
.bouton-contour { flex: 1; border: 1px solid var(--accent); border-radius: 4px; background: transparent; color: var(--accent); font-size: 12px; font-weight: 600; padding: 3px 7px; line-height: 1.3; white-space: nowrap; }
.bouton-contour:hover { background: var(--accent-doux); }
.leg-item { display: flex; align-items: center; gap: 7px; width: 100%; border: 0; background: none; padding: 2.5px 4px; border-radius: 5px; text-align: left; font-size: 12.5px; }
.leg-item:hover { background: var(--accent-doux); }
.leg-item.cache { opacity: .38; }
.leg-item.cache .nom { text-decoration: line-through; }
.leg-item .nom { flex: 1; min-width: 0; }
/* icône « isoler » juste à gauche du nombre : place toujours réservée (pas de décalage), visible au survol */
.leg-item .isoler { flex: none; display: grid; place-items: center; width: 20px; height: 18px; margin-left: 6px; border-radius: 4px; color: var(--accent); visibility: hidden; }
.leg-item:hover .isoler, .leg-item:focus-visible .isoler, .leg-item.isole .isoler { visibility: visible; }
.leg-item .isoler:hover { background: #fff; box-shadow: 0 0 0 1px var(--accent); }
@media (hover: none) { .leg-item .isoler { visibility: visible; } }
.leg-item .n { margin-left: 4px; min-width: 3.8em; text-align: right; /* largeur fixe : icône isoler toujours dans la même colonne */ color: var(--texte-2); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.leg-note { color: var(--texte-2); font-size: 11.5px; padding: 1px 4px 4px; }
.leg-plus { color: var(--texte-2); padding: 3px 4px 0; }
.leaflet-control-layers { border-radius: 10px !important; }
body.panneau-ferme .leaflet-top.leaflet-left { top: 48px; }

/* ---------------- Ligne de temps ---------------- */
.ligne-temps {
  position: absolute; left: calc(var(--panneau) + 16px); right: 16px; bottom: 18px; z-index: 1000;
  display: flex; gap: 12px; align-items: center; background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-radius: 14px; box-shadow: var(--ombre); padding: 10px 16px 8px 12px;
}
body.panneau-ferme .ligne-temps { left: 16px; }
.rond { width: 44px; height: 44px; border-radius: 50%; font-size: 16px; background: var(--accent); color: #fff; border: 0; flex: none; }
.rond:hover { background: var(--accent-fonce); }
.lt-centre { flex: 1; min-width: 0; }
.lt-haut { display: flex; align-items: baseline; gap: 12px; }
.date-affichee { font-size: 20px; font-weight: 700; letter-spacing: -.01em; min-width: 140px; }
/* bouton « Aujourd'hui » : même hauteur et même style que le sélecteur de vitesse */
.bouton-jour { border: 1px solid var(--accent); background: #fff; color: var(--accent); border-radius: 7px; padding: 3px 10px; font-size: 12px; font-weight: 600; line-height: 1.4; flex: none; }
.bouton-jour:hover { background: var(--accent-doux); }
.vitesses { display: flex; background: var(--fond); border: 1px solid var(--ligne); border-radius: 7px; padding: 2px; flex: none; }
.vitesses button { border: 0; background: none; padding: 2px 7px; border-radius: 5px; font-size: 12px; color: var(--texte-2); font-variant-numeric: tabular-nums; }
.vitesses button.actif { background: var(--accent); color: #fff; font-weight: 600; }
.date-resume { color: var(--texte-2); font-size: 13px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-piste { position: relative; margin-top: 4px; }
#spectre { width: 100%; height: 34px; display: block; cursor: pointer; touch-action: none; }
#curseur { width: 100%; margin: 1px 0 0; display: block; accent-color: var(--accent); }
.mois { display: grid; grid-template-columns: repeat(12, 1fr); font-size: 11px; color: var(--texte-2); }
.mois span { padding-left: 2px; border-left: 1px solid var(--ligne); cursor: pointer; }

/* Popup */
.leaflet-popup-content { margin: 12px 14px; font-size: 13.5px; min-width: 220px; }
.pop h4 { margin: 0; font-size: 15px; }
.pop .latin { font-style: italic; color: var(--texte-2); font-size: 12.5px; }
.pop .etat { margin: 6px 0; display: flex; align-items: center; gap: 6px; font-weight: 550; }
.pop .faits { color: var(--texte-2); }
.pop button { margin-top: 6px; }

/* ---------------- Mobile ---------------- */
@media (max-width: 760px) {
  :root { --panneau: 100%; }
  #panneau { position: absolute; inset: auto 0 0 0; height: 55%; border-right: 0; border-top: 1px solid var(--ligne); border-radius: 14px 14px 0 0; box-shadow: var(--ombre); }
  .ligne-temps { left: 8px !important; right: 8px; bottom: 8px; padding: 8px 10px 6px 8px; }
  body:not(.panneau-ferme) .ligne-temps { bottom: calc(55% + 22px); }
  .barre-modes { left: 56px; right: 8px; top: 8px; overflow-x: auto; }
  .barre-modes button { height: 30px; padding: 0 9px; font-size: 13px; }
  .barre-modes button:has(.compte) { padding-right: 4px; }
  .legende-mode { display: none; }
  .date-affichee { font-size: 17px; min-width: 0; }
  .date-resume { display: none; }
  .pied { display: none; }
}

/* Contrôle Affichage (taille / opacité) */
.ctl-affichage { background: var(--surface); position: relative; }
.ctl-bouton { width: 44px; height: 44px; border: 0; background: none; display: grid; place-items: center; color: #444; border-radius: 4px; }
.ctl-bouton:hover { background: #f4f4f4; }
.ctl-panneau { position: absolute; left: 52px; top: 0; width: 220px; background: var(--surface); border-radius: 10px; box-shadow: var(--ombre); padding: 10px 12px; display: grid; gap: 10px; }
.ctl-panneau[hidden] { display: none; }
/* Ma position : bleu quand on suit, contour bleu quand le point est affiché sans suivi */
.ctl-position.actif .ctl-bouton { color: #1a73e8; }
.ctl-position.actif:not(.suivi) .ctl-bouton svg circle:first-child { fill: none; stroke: currentColor; stroke-width: 2; }
.ctl-position.attente .ctl-bouton svg { animation: clignote 1s ease-in-out infinite; }
@keyframes clignote { 50% { opacity: .3; } }
.ctl-avis { position: absolute; left: 52px; top: 6px; width: max-content; max-width: 240px; background: var(--surface); border-radius: 8px; box-shadow: var(--ombre); padding: 7px 10px; font-size: 13px; }
.ctl-avis[hidden] { display: none; }
.ctl-panneau label { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 13px; }
.ctl-panneau output { color: var(--texte-2); font-variant-numeric: tabular-nums; }
.ctl-panneau input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.ctl-panneau .lien { justify-self: start; font-size: 12px; }

/* Bulle au survol */
.bulle-survol { font-size: 12.5px; line-height: 1.45; padding: 6px 9px; border-radius: 8px; border: 0; box-shadow: var(--ombre); }
.bulle-survol .pastille { width: 9px; height: 9px; vertical-align: -1px; }
.bulle-survol .survol-adr { color: var(--texte-2); }

/* Filtres actifs : étiquette + tags rectangulaires */
.filtres-panneau { display: flex; align-items: flex-start; gap: 10px; margin: 0 16px 10px; }
.filtres-panneau .puces { flex: 1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.etiq-filtres { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); line-height: 25px; flex: none; }
.puce-filtre { display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 4px; padding: 4px 7px 4px 8px; background: var(--accent); color: #fff; font-size: 12.5px; line-height: 1.3; text-align: left; max-width: 100%; }
.puce-filtre:hover { background: var(--accent-fonce); }
.puce-filtre i { font-style: normal; opacity: .75; }
.puce-filtre b { font-weight: 600; }
.puce-filtre .x { font-size: 10px; opacity: .8; flex: none; }
.puce-filtre:hover .x { opacity: 1; }
.tout-effacer { border: 1px solid var(--accent); border-radius: 4px; background: transparent; color: var(--accent); font-size: 12.5px; font-weight: 600; padding: 3px 8px; line-height: 1.3; }
.tout-effacer:hover { background: var(--accent-doux); }
.filtres-carte { position: absolute; left: calc(var(--panneau) + 16px); right: 16px; bottom: 112px; z-index: 1000; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; pointer-events: none; }
body.panneau-ferme .filtres-carte { left: 16px; }
.filtres-carte > * { pointer-events: auto; }
.filtres-carte .puce-filtre { box-shadow: var(--ombre); padding: 6px 9px 6px 10px; font-size: 13px; }
.filtres-carte .tout-effacer { background: #fff; padding: 5px 10px; font-size: 13px; box-shadow: var(--ombre); }
.filtres-carte .tout-effacer:hover { background: var(--accent-doux); }
@media (max-width: 760px) {
  .filtres-carte { left: 8px !important; right: 8px; bottom: 104px; }
  body:not(.panneau-ferme) .filtres-carte { display: none; }
}

/* Bouton de langue */
.entete-actions { display: flex; gap: 6px; align-items: center; }
.langue { height: 32px; min-width: 38px; padding: 0 8px; border: 1px solid var(--ligne); border-radius: 8px; background: var(--surface); font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--texte-2); }
.langue:hover { border-color: var(--accent); color: var(--accent); }

/* Fiche : photo et lien Wikipédia */
.wiki { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; margin: 0 0 14px; }
.wiki img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; background: var(--ligne); display: block; }
.wiki .credit { font-size: 11.5px; color: var(--texte-2); margin-top: 4px; }
.wiki a { color: var(--accent); font-weight: 600; }
.pop .pop-photo { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; margin: 8px 0 4px; display: block; background: var(--ligne); }

/* ---------------- Contributions citoyennes ---------------- */
/* dans le panneau, juste au-dessus de la note sur les données */
.actions-citoyen.dans-panneau { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--ligne); }
.actions-citoyen.dans-panneau .bouton-citoyen { flex: 1; box-shadow: none; }
/* icône collée à gauche : même espace à gauche, en haut et en bas (bouton 34 px, icône 16 px → 8 px) ; libellé centré dans le reste */
.actions-citoyen.dans-panneau .bouton-citoyen { justify-content: flex-start; padding: 8px 10px 8px 8px; }
.actions-citoyen.dans-panneau .bouton-citoyen::before { width: 16px; height: 16px; }
.actions-citoyen.dans-panneau .bouton-citoyen span { flex: 1; text-align: center; }
.actions-citoyen.flottantes { display: none; }
.bouton-citoyen { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--accent); border-radius: 8px; background: #fff; color: var(--accent); font-size: 13.5px; font-weight: 600; line-height: 1.2; padding: 8px 12px; box-shadow: var(--ombre); white-space: nowrap; }
.bouton-citoyen:hover { background: var(--accent-doux); }
.bouton-citoyen.ajouter { background: var(--accent); color: #fff; }
.bouton-citoyen.ajouter:hover { background: var(--accent-fonce); }
/* icônes vectorielles (masque = couleur du texte), centrées avec le libellé */
.bouton-citoyen::before { content: ""; flex: none; width: 14px; height: 14px; background: currentColor; -webkit-mask: var(--icone) center / contain no-repeat; mask: var(--icone) center / contain no-repeat; }
.bouton-citoyen.ajouter { --icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M7 1.5v11M1.5 7h11' stroke='%23000' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.bouton-citoyen.corriger { --icone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M9.6 1.6l2.8 2.8-7.9 7.9H1.7V9.5z' fill='%23000'/%3E%3C/svg%3E"); }
body.formulaire-ouvert .legende-mode { display: none; }

.bandeau-citoyen { position: absolute; top: 60px; left: 50%; transform: translateX(-50%); z-index: 1001; display: flex; align-items: center; gap: 12px; background: var(--orange); color: #fff; border-radius: 4px; box-shadow: var(--ombre); padding: 6px 6px 6px 12px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.bandeau-citoyen .tout-effacer { border-color: #fff; color: #fff; padding: 3px 10px; }
.bandeau-citoyen .tout-effacer:hover { background: rgba(255,255,255,.18); }
.bandeau-citoyen[hidden] { display: none; }
.leaflet-container.placement { cursor: crosshair; }
.repere-citoyen { background: none; border: 0; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }

.formulaire { position: absolute; right: 16px; top: 60px; bottom: 144px; width: 380px; z-index: 1002; background: var(--surface); border-radius: 12px; box-shadow: var(--ombre); overflow: auto; padding: 14px 16px 16px; font-size: 13.5px; }
.formulaire[hidden] { display: none; }
.formulaire h2 { margin: 0 0 4px; font-size: 17px; }
.formulaire .aide { margin: 0 0 10px; color: var(--texte-2); }
.formulaire .aide.petit { font-size: 12px; margin-top: -4px; }
.formulaire label { display: block; margin: 0 0 10px; font-weight: 600; font-size: 13px; }
.formulaire label small { font-weight: 400; color: var(--texte-2); }
.formulaire input:not([type=radio]), .formulaire textarea, .formulaire select { display: block; width: 100%; margin-top: 3px; font: inherit; font-weight: 400; padding: 7px 9px; border: 1px solid var(--ligne); border-radius: 7px; background: #fff; color: var(--texte); }
.formulaire input:focus, .formulaire textarea:focus, .formulaire select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.formulaire textarea { resize: vertical; }
.formulaire .deux { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.formulaire fieldset { border: 0; margin: 0 0 8px; padding: 0; }
.formulaire legend { font-weight: 600; font-size: 13px; margin-bottom: 4px; padding: 0; }
.formulaire label.choix { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; padding: 5px 0; font-size: 13.5px; }
.formulaire label.choix input { accent-color: var(--accent); margin: 0; }
.formulaire .piege { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.formulaire .note-vie-privee { font-size: 11.5px; color: var(--texte-2); margin: 0 0 10px; line-height: 1.4; }
.formulaire .erreur-form { color: #b3261e; font-weight: 600; margin: 0 0 10px; }
.boutons-form { display: flex; justify-content: flex-end; gap: 8px; }
.boutons-form .tout-effacer { padding: 7px 14px; font-size: 13.5px; }
.bouton-plein { border: 0; border-radius: 4px; background: var(--accent); color: #fff; font-size: 13.5px; font-weight: 600; padding: 8px 16px; }
.bouton-plein:hover { background: var(--accent-fonce); }
.bouton-plein:disabled { opacity: .6; cursor: default; }
.merci p { margin: 0 0 10px; }

.bloc-citoyen { border: 1px solid var(--orange); border-radius: 4px; padding: 8px 12px; margin: 0 0 12px; }
.bloc-citoyen h3 { margin: 0 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent-fonce); }
.bloc-citoyen ul { margin: 0; padding-left: 16px; }
.fiche .signaler { margin: 10px 0 0; }

@media (max-width: 760px) {
  .actions-citoyen.flottantes { display: flex; position: absolute; right: 8px; bottom: 126px; z-index: 1000; gap: 6px; }
  .actions-citoyen.flottantes .bouton-citoyen { font-size: 12.5px; padding: 7px 10px; }
  body:not(.panneau-ferme) .actions-citoyen.flottantes, body.formulaire-ouvert .actions-citoyen.flottantes { display: none; }
  /* mention OpenStreetMap (obligatoire) : au-dessus du panneau ouvert plutôt que par-dessus ses boutons */
  body:not(.panneau-ferme) .leaflet-bottom.leaflet-right { bottom: 55%; }
  .filtres-carte { right: 8px; bottom: 168px; }
  .bandeau-citoyen { top: 48px; font-size: 13px; max-width: calc(100% - 16px); white-space: normal; }
  .formulaire { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 62%; border-radius: 14px 14px 0 0; padding: 12px 14px calc(14px + env(safe-area-inset-bottom)); }
  .formulaire .deux { grid-template-columns: 1fr; }
}

/* Formulaire : mesures (tronc, hauteur) */
.groupe-mesure { margin: 0 0 10px; }
.groupe-mesure .etiq { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.groupe-mesure .etiq small { font-weight: 400; color: var(--texte-2); }
.segments { display: inline-flex; border: 1px solid var(--accent); border-radius: 4px; overflow: hidden; margin-bottom: 5px; }
.formulaire .segments label { margin: 0; font-weight: 400; }
.segments input { position: absolute; opacity: 0; pointer-events: none; }
.segments span { display: block; padding: 4px 12px; font-size: 13px; color: var(--accent); cursor: pointer; }
.segments label + label span { border-left: 1px solid var(--accent); }
.segments input:checked + span { background: var(--accent); color: #fff; font-weight: 600; }
.segments input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.mesure-ligne { display: grid; grid-template-columns: 1fr 76px; gap: 6px; }
.formulaire .mesure-ligne input, .formulaire .mesure-ligne select { margin-top: 0; }
.formulaire .groupe-mesure .aide.petit { margin: 4px 0 0; }
.formulaire .hors-liste { color: var(--accent-fonce); margin-top: -6px; }

.formulaire .avis-pourriel { border: 1px solid var(--orange); border-radius: 4px; padding: 7px 10px; color: var(--accent-fonce); font-weight: 600; }

/* Lien discret vers l'administration (bas du panneau) */
.pied { position: relative; padding-right: 54px; }
.lien-admin { position: absolute; right: 16px; bottom: 10px; font-size: 11.5px; color: var(--texte-2); text-decoration: none; }
.lien-admin:hover { color: var(--accent); text-decoration: underline; }
