/* Rombach-le-Franc — Signalements
   Habillage clair et contemporain : typographie sans empattement, cartes arrondies,
   ombres douces. Les noms de classes sont ceux attendus par le JavaScript. */

:root {
  --fond: #f4f7f5;
  --surface: #ffffff;
  --surface-douce: #fafcfb;
  --encre: #16241d;
  --encre-doux: #5c6d64;
  --encre-tres-doux: #8a978f;

  --primaire: #1d6f4f;
  --primaire-fonce: #14523a;
  --primaire-doux: #e6f2ec;
  --frelon: #b45309;
  --frelon-doux: #fdf3e7;
  --danger: #b42318;
  --danger-doux: #fdeceb;
  --succes: #1d6f4f;
  --succes-doux: #e6f2ec;
  --alerte: #a16207;
  --alerte-doux: #fef7e6;

  --bordure: #dde6e0;
  --bordure-douce: #eaf0ec;
  --rayon: 14px;
  --rayon-petit: 9px;
  --ombre: 0 1px 2px rgba(16, 40, 30, .05), 0 10px 28px -16px rgba(16, 40, 30, .22);
  --ombre-forte: 0 2px 6px rgba(16, 40, 30, .08), 0 24px 48px -24px rgba(16, 40, 30, .3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--encre);
  background: var(--fond);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primaire); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--primaire-fonce); }

.page { max-width: 1240px; margin: 0 auto; padding: 28px 20px 56px; }

/* ---------------------------------------------------------------- en-tête */

header.site {
  background: linear-gradient(135deg, var(--primaire-fonce), var(--primaire) 62%, #2a8a63);
  color: #fff;
  border-radius: var(--rayon);
  padding: 30px 32px;
  margin-bottom: 22px;
  box-shadow: var(--ombre);
}
header.site h1 {
  font-size: clamp(1.45rem, 3.4vw, 2.05rem);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.2;
}
header.site .sous-titre {
  font-size: 1.02rem;
  margin-top: 8px;
  color: rgba(255, 255, 255, .9);
  max-width: 62ch;
}
header.site .meta {
  font-size: 0.9rem;
  margin-top: 16px;
  color: rgba(255, 255, 255, .82);
  max-width: 72ch;
}
header.site .meta b { color: #fff; font-weight: 600; }
header.site a { color: #fff; }

.etiquettes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.etiquette {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .24);
  color: #fff;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.83rem;
  font-weight: 500;
}
.etiquette b { font-weight: 700; }

/* ---------------------------------------------------------------- onglets */

nav.onglets {
  display: inline-flex;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 22px;
  box-shadow: var(--ombre);
}
nav.onglets button {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  background: transparent;
  color: var(--encre-doux);
  border: none;
  padding: 9px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
nav.onglets button:hover { color: var(--encre); background: var(--surface-douce); }
nav.onglets button[aria-selected="true"] { background: var(--primaire); color: #fff; }
nav.onglets button[aria-selected="true"]:hover { background: var(--primaire-fonce); }
nav.onglets button:focus-visible { outline: 2px solid var(--primaire); outline-offset: 2px; }

.panneau { display: none; }
.panneau.actif { display: block; animation: apparait .18s ease-out; }
@keyframes apparait { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- accueil

   Troisième état de index.html : ni carte, ni formulaire, seulement le choix
   de la rubrique. body.vue-accueil est posée par app.js selon l'adresse. */

/* Sur l'accueil, les onglets n'ont rien à désigner, et les étiquettes de
   l'en-tête feraient doublon avec les chiffres des cartes. */
body.vue-accueil nav.onglets,
body.vue-accueil .etiquettes { display: none; }

/* La provenance des photos du constat ne concerne que la rubrique sangliers. */
body.vue-accueil .note-photos { display: none; }

/* Inversement, le retour à l'accueil n'a de sens que depuis une rubrique. */
.retour-accueil {
  display: inline-flex; align-items: center;
  margin-bottom: 10px;
  padding: 4px 2px;
  font-size: 0.9rem; font-weight: 600;
  color: var(--encre-doux); text-decoration: none;
}
.retour-accueil:hover { color: var(--primaire); }
.retour-accueil:focus-visible { outline: 2px solid var(--primaire); outline-offset: 3px; border-radius: 4px; }
body.vue-accueil .retour-accueil { display: none; }

.choix {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 22px;
}

.carte-choix {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 26px 26px 22px;
  box-shadow: var(--ombre);
  text-decoration: none;
  color: var(--encre);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.carte-choix::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--primaire), #2a8a63);
}
.carte-choix.frelon::before { background: linear-gradient(90deg, var(--frelon), #d97706); }
.carte-choix.arbre::before { background: linear-gradient(90deg, #6d4c1f, #8a6a33); }
.carte-choix:hover, .carte-choix:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--ombre-forte);
  border-color: var(--primaire);
  color: var(--encre);
}
.carte-choix.frelon:hover, .carte-choix.frelon:focus-visible { border-color: var(--frelon); }
.carte-choix:focus-visible { outline: 2px solid var(--primaire); outline-offset: 3px; }

.carte-choix .vignette {
  width: 62px; height: 62px;
  border-radius: 16px;
  display: grid; place-items: center;
  background: var(--primaire-doux);
  color: var(--primaire);
  margin-bottom: 16px;
}
.carte-choix.frelon .vignette { background: var(--frelon-doux); color: var(--frelon); }
.carte-choix.arbre .vignette { background: #f3ede2; color: #6d4c1f; }
.carte-choix .vignette svg { width: 34px; height: 34px; }

.carte-choix h2 {
  font-size: 1.3rem; font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.25;
}
.carte-choix p {
  margin-top: 9px;
  color: var(--encre-doux);
  font-size: 0.95rem;
  max-width: 44ch;
}
.carte-choix .compte {
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--bordure-douce);
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  font-size: 0.86rem;
  color: var(--encre-tres-doux);
}
.carte-choix .compte b { color: var(--encre); font-weight: 600; }

.carte-choix .entrer {
  margin-top: 18px;
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 0.95rem;
  color: var(--primaire);
}
.carte-choix.frelon .entrer { color: var(--frelon); }
.carte-choix.arbre .entrer { color: #6d4c1f; }
.carte-choix.arbre:hover, .carte-choix.arbre:focus-visible { border-color: #6d4c1f; }
.carte-choix .entrer svg { width: 17px; height: 17px; transition: transform .18s ease; }
.carte-choix:hover .entrer svg { transform: translateX(3px); }

.rassurance {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 20px 24px;
  margin-bottom: 22px;
  box-shadow: var(--ombre);
}
.rassurance div { font-size: 0.9rem; color: var(--encre-doux); }
.rassurance b { display: block; color: var(--encre); font-size: 0.95rem; margin-bottom: 2px; }

/* ---------------------------------------------------------------- blocs */

.disposition { display: flex; gap: 22px; align-items: flex-start; }
.principal { flex: 1 1 0; min-width: 0; }
aside.lateral { flex: 0 0 372px; }

.note-cle {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-left: 4px solid var(--primaire);
  border-radius: var(--rayon);
  padding: 18px 22px;
  margin-bottom: 20px;
  font-size: 0.95rem;
  color: var(--encre-doux);
  box-shadow: var(--ombre);
}
.note-cle b { color: var(--encre); font-weight: 600; }
.note-cle .titre-note { display: block; color: var(--primaire-fonce); font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.note-frelon { border-left-color: var(--frelon); }
.note-frelon .titre-note { color: var(--frelon); }
.note-cle .avertissement {
  display: block; margin-top: 10px; padding: 10px 14px;
  background: var(--danger-doux); border-radius: var(--rayon-petit);
  color: #7a1c14; font-size: 0.9rem;
}

.carte {
  height: 620px;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  margin-bottom: 12px;
  background: #e8eeea;
  overflow: hidden;
  box-shadow: var(--ombre);
}
.legende-carte {
  font-size: 0.86rem;
  color: var(--encre-doux);
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 14px 18px;
  margin-bottom: 20px;
}
.legende-carte b { color: var(--encre); font-weight: 600; }
.legende-carte .ligne-pastilles { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 8px 0 10px; }

h2 {
  font-size: 1.06rem;
  font-weight: 700;
  color: var(--encre);
  letter-spacing: -0.01em;
  margin: 0 0 14px;
}
h3 { font-size: 0.97rem; font-weight: 600; color: var(--encre); margin: 14px 0 6px; }

.pastille {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.5;
}
.vide {
  border: 1px dashed var(--bordure);
  border-radius: var(--rayon);
  color: var(--encre-tres-doux);
  padding: 26px;
  text-align: center;
  font-size: 0.92rem;
  background: var(--surface-douce);
  margin-bottom: 14px;
}

details.aide-gps {
  font-size: 0.89rem;
  margin-top: 14px;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 14px 18px;
  color: var(--encre-doux);
  box-shadow: var(--ombre);
}
details.aide-gps summary { cursor: pointer; color: var(--primaire); font-weight: 600; list-style: none; }
details.aide-gps summary::-webkit-details-marker { display: none; }
details.aide-gps summary::before { content: "▸ "; display: inline-block; transition: transform .15s; }
details.aide-gps[open] summary::before { content: "▾ "; }
details.aide-gps p { margin-top: 10px; }
details.aide-gps ol, details.aide-gps ul { margin: 8px 0 8px 20px; }
details.aide-gps li { margin-bottom: 4px; }

.anonymat {
  font-size: 0.85rem;
  color: #2e4a3c;
  background: var(--primaire-doux);
  border: 1px solid #cfe5da;
  border-radius: var(--rayon-petit);
  padding: 12px 15px;
  margin-top: 14px;
  line-height: 1.55;
}
.anonymat b { color: var(--primaire-fonce); }

.bandeau-demo {
  background: var(--alerte-doux);
  border: 1px solid #f0dcae;
  color: #6b4a07;
  padding: 12px 18px;
  border-radius: var(--rayon-petit);
  font-size: 0.88rem;
  margin-bottom: 18px;
}

/* ---------------------------------------------------------------- repères */

.marqueur-num {
  background: var(--primaire); color: #fff; border-radius: 50%;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  font-family: inherit; font-weight: 700; font-size: 13px;
  border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.marqueur-signalement {
  background: #fff; color: var(--primaire); border-radius: 50%;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px;
  border: 2px dashed var(--primaire); box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.marqueur-attente {
  background: #fff8e6; color: var(--alerte); border-radius: 50%;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  border: 2px dashed var(--alerte); box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.marqueur-obs {
  background: #16241d; color: #fff; border-radius: 5px; transform: rotate(45deg);
  width: 26px; height: 26px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 10px;
  border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.marqueur-obs span { transform: rotate(-45deg); }
.marqueur-coulee {
  width: 0; height: 0; border-left: 14px solid transparent; border-right: 14px solid transparent;
  border-bottom: 25px solid #6d28d9; position: relative;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4));
}
.marqueur-coulee span { position: absolute; left: -7px; top: 7px; color: #fff; font-weight: 700; font-size: 9px; }
.marqueur-drone {
  background: #fff; border: 2px solid var(--primaire); border-radius: 50%;
  width: 12px; height: 12px; box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.marqueur-moi {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: #1d4ed8;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px rgba(29, 78, 216, .5), 0 2px 8px rgba(16, 40, 30, .4);
}
.marqueur-arbre {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  border-radius: 50%;
  background: #6d4c1f; color: #fff;
  border: 2px solid #fff;
  font-weight: 700; font-size: 0.78rem;
  box-shadow: 0 2px 6px rgba(16, 40, 30, .35);
}
.marqueur-frelon {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
  border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.marqueur-frelon.nid { background: #b42318; color: #fff; }
.marqueur-frelon.nid-primaire { background: var(--frelon); color: #fff; }
.marqueur-frelon.individu { background: #eab308; color: #16241d; }
.marqueur-frelon.piege { background: #1d4ed8; color: #fff; }
.marqueur-frelon.autre { background: #64748b; color: #fff; }
.marqueur-cible {
  background: #fff; border: 3px solid var(--danger); border-radius: 50%;
  width: 18px; height: 18px; box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(0, 0, 0, .35);
}
.leaflet-container.placement { cursor: crosshair; }
.leaflet-container { font-family: inherit; }
.leaflet-popup-content-wrapper { border-radius: var(--rayon-petit); box-shadow: var(--ombre-forte); }

/* ---------------------------------------------------------------- fenêtres de carte */

.popup-photo { width: 276px; max-height: 440px; overflow-y: auto; }
.popup-photo .titre { font-weight: 700; font-size: 0.94rem; margin-bottom: 2px; color: var(--encre); }
.popup-photo .sous { font-size: 0.78rem; color: var(--encre-tres-doux); margin-bottom: 6px; }
.popup-photo .desc { font-size: 0.85rem; margin: 6px 0; color: var(--encre-doux); }
.popup-photo img.principale {
  width: 100%; margin-top: 4px; border-radius: var(--rayon-petit);
  border: 1px solid var(--bordure); background: #eee; display: block;
}
.popup-photo .vignettes { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.popup-photo .vignettes img {
  width: calc(33.333% - 3px); aspect-ratio: 4/3; object-fit: cover;
  border-radius: 6px; border: 1px solid var(--bordure); background: #eee;
}
.popup-photo .coords {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem; margin-top: 7px; color: var(--encre-tres-doux);
}
.zoomable { cursor: zoom-in; transition: opacity .12s; }
.zoomable:hover { opacity: .88; }

/* ------------------------------------------------- boutons de village (carte) */

.boutons-communes {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 10px;
}
.btn-commune {
  font: inherit; font-size: 0.86rem; font-weight: 600;
  background: var(--surface); color: var(--encre-doux);
  border: 1px solid var(--bordure);
  padding: 7px 14px; border-radius: 999px;
  cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-commune:hover { color: var(--encre); border-color: var(--encre-tres-doux); }
.btn-commune.actif { background: var(--primaire); border-color: var(--primaire); color: #fff; }
.btn-commune:focus-visible { outline: 2px solid var(--primaire); outline-offset: 2px; }

@media (max-width: 760px) {
  /* Cinq pastilles ne tiennent pas sur une ligne de téléphone : on les fait
     défiler horizontalement plutôt que de les empiler sur trois rangs. */
  .boutons-communes {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin: 0 -16px 10px; padding: 0 16px 2px;
  }
  .boutons-communes::-webkit-scrollbar { display: none; }
  .btn-commune { min-height: 40px; }
}

/* ---------------------------------------------------------------- visionneuse */

#visionneuse {
  display: none; position: fixed; inset: 0;
  background: rgba(9, 18, 14, .94); backdrop-filter: blur(3px);
  z-index: 10000; align-items: center; justify-content: center; flex-direction: column; padding: 16px;
}
#visionneuse.ouverte { display: flex; }
#visionneuse img {
  max-width: 96vw; max-height: 76vh; border-radius: var(--rayon-petit);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .55); cursor: zoom-out; background: #222;
}
#visionneuse .legende {
  color: #e9f1ec; font-size: 0.92rem; max-width: 900px; text-align: center; margin-top: 14px; line-height: 1.55;
}
#visionneuse .legende b { color: #7fd3a8; }
#visionneuse .actions { margin-top: 12px; display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; font-size: 0.85rem; }
#visionneuse .actions a { color: #7fd3a8; }
#visionneuse .actions button {
  font: inherit; font-size: 0.85rem; background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .28); color: #e9f1ec;
  padding: 5px 14px; border-radius: 999px; cursor: pointer;
}
#visionneuse .aide { color: #8ba294; font-size: 0.78rem; margin-top: 8px; text-align: center; }

/* Passage d'une photo à l'autre à l'intérieur d'une même fenêtre. */
#visionneuse .nav-photo {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  font: inherit; font-size: 2rem; line-height: 1;
  /* Fond sombre plutôt que clair : les flèches passent au-dessus de la photo,
     et beaucoup de nos clichés ont un ciel blanc en haut. */
  background: rgba(9, 18, 14, .55);
  border: 1px solid rgba(255, 255, 255, .35);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .45);
  color: #e9f1ec; cursor: pointer;
  transition: background .15s;
}
#visionneuse .nav-photo[hidden] { display: none; }
#visionneuse .nav-photo:hover { background: rgba(9, 18, 14, .85); }
#visionneuse .nav-photo:focus-visible { outline: 2px solid #7fd3a8; outline-offset: 3px; }
#visionneuse .precedente { left: 14px; }
#visionneuse .suivante { right: 14px; }
#visionneuse .compteur {
  margin-top: 12px; color: #8ba294;
  font-size: 0.82rem; letter-spacing: .05em; font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
  #visionneuse .nav-photo { width: 44px; height: 44px; font-size: 1.6rem; }
  #visionneuse .precedente { left: 6px; }
  #visionneuse .suivante { right: 6px; }
}

/* ---------------------------------------------------------------- formulaire */

.formulaire {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 20px 22px;
  font-size: 0.93rem;
  box-shadow: var(--ombre);
}
.formulaire h2 { margin-bottom: 4px; }
.formulaire .accroche { font-size: 0.87rem; color: var(--encre-doux); margin-bottom: 16px; }
.formulaire .champ { margin-bottom: 15px; }
.formulaire label { display: block; font-size: 0.83rem; font-weight: 600; color: var(--encre); margin-bottom: 5px; }
.formulaire input, .formulaire select, .formulaire textarea {
  width: 100%; font: inherit; font-size: 0.93rem;
  padding: 10px 12px;
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-petit);
  background: var(--surface);
  color: var(--encre);
  transition: border-color .15s, box-shadow .15s;
}
.formulaire input:focus, .formulaire select:focus, .formulaire textarea:focus {
  outline: none; border-color: var(--primaire); box-shadow: 0 0 0 3px var(--primaire-doux);
}
.formulaire textarea { min-height: 88px; resize: vertical; }
.formulaire input[type="file"] { padding: 7px; }
.formulaire .aide { font-size: 0.79rem; color: var(--encre-tres-doux); margin-top: 5px; line-height: 1.5; }
.formulaire .position {
  font-size: 0.83rem; padding: 10px 12px;
  border: 1px dashed var(--bordure); border-radius: var(--rayon-petit);
  background: var(--surface-douce); margin-top: 6px; color: var(--encre-doux);
}
.formulaire .position.ok { border: 1px solid #b9dcca; background: var(--succes-doux); color: var(--primaire-fonce); font-weight: 500; }
.formulaire .position.hors-zone { border: 1px solid #f2c0bb; background: var(--danger-doux); color: #7a1c14; font-weight: 500; }
.formulaire .boutons { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-top: 8px; }

/* Champ invisible destiné aux automates. Ne pas nommer « piege » : ce nom sert déjà
   au type de signalement « piège posé » sur la carte. */
.champ-piege { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.zone-turnstile:not(:empty) { margin: 12px 0; }

button.btn {
  font: inherit; font-size: 0.88rem; font-weight: 600;
  padding: 9px 16px; border-radius: var(--rayon-petit);
  border: 1px solid var(--primaire); background: var(--primaire); color: #fff;
  cursor: pointer; transition: background .15s, border-color .15s, transform .08s;
}
button.btn:hover { background: var(--primaire-fonce); border-color: var(--primaire-fonce); }
button.btn:active { transform: translateY(1px); }
button.btn:focus-visible { outline: 2px solid var(--primaire); outline-offset: 2px; }
button.btn.secondaire { background: var(--surface); color: var(--primaire); border-color: var(--bordure); }
button.btn.secondaire:hover { background: var(--primaire-doux); border-color: var(--primaire); }
button.btn.secondaire.actif { background: var(--alerte-doux); border-color: var(--alerte); color: #6b4a07; }
button.btn.danger { background: var(--surface); color: var(--danger); border-color: #f2c0bb; }
button.btn.danger:hover { background: var(--danger-doux); }
button.btn.ok { background: var(--primaire); border-color: var(--primaire); }
button.btn:disabled { opacity: .5; cursor: default; transform: none; }

.apercus { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 9px; }
.apercus img {
  width: 78px; height: 58px; object-fit: cover;
  border-radius: 7px; border: 1px solid var(--bordure);
  transition: opacity .12s;
}
.apercus img:hover { opacity: .7; }

.message { padding: 11px 14px; border-radius: var(--rayon-petit); margin-top: 12px; font-size: 0.87rem; display: none; line-height: 1.5; }
.message.ok { display: block; background: var(--succes-doux); border: 1px solid #b9dcca; color: var(--primaire-fonce); }
.message.erreur { display: block; background: var(--danger-doux); border: 1px solid #f2c0bb; color: #7a1c14; }

.consentement { display: flex; gap: 9px; align-items: flex-start; font-size: 0.84rem; }
.consentement input { width: auto; margin-top: 4px; flex: 0 0 auto; accent-color: var(--primaire); }
.consentement label { font-weight: 400; color: var(--encre-doux); }

/* ---------------------------------------------------------------- page de validation */

.filtres { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.carte-signalement {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 18px 20px; margin-bottom: 14px;
  display: grid; grid-template-columns: 220px 1fr; gap: 18px;
  font-size: 0.9rem;
  box-shadow: var(--ombre);
}
.carte-signalement .photos img {
  width: 100%; margin-bottom: 6px; border-radius: var(--rayon-petit);
  border: 1px solid var(--bordure); cursor: zoom-in;
}
.carte-signalement .etat {
  font-size: 0.75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; display: inline-block;
}
.etat.attente { background: var(--alerte-doux); color: #6b4a07; border: 1px solid #f0dcae; }
.etat.valide { background: var(--succes-doux); color: var(--primaire-fonce); border: 1px solid #b9dcca; }
.etat.refuse { background: var(--danger-doux); color: #7a1c14; border: 1px solid #f2c0bb; }
.carte-signalement dl { display: grid; grid-template-columns: 118px 1fr; gap: 3px 10px; margin: 10px 0; }
.carte-signalement dt { color: var(--encre-tres-doux); font-size: 0.82rem; }
.carte-signalement dd { color: var(--encre-doux); }

/* Priorité de relecture : un nid de frelons signalé passe devant tout le reste. */
.carte-signalement.prioritaire {
  border-color: var(--danger);
  border-left: 4px solid var(--danger);
  padding-left: 17px;   /* compense le liseré, pour que le contenu ne se décale pas */
}
.badge-priorite {
  font-size: 0.75rem; font-weight: 700;
  padding: 3px 10px; border-radius: 999px; display: inline-block;
  background: var(--danger-doux); color: #7a1c14; border: 1px solid #f2c0bb;
}
.alerte-nids {
  background: var(--danger-doux);
  border: 1px solid #f2c0bb;
  border-radius: var(--rayon-petit);
  padding: 11px 16px; margin-bottom: 14px;
  color: #7a1c14; font-weight: 600; font-size: 0.92rem;
}
.alerte-nids[hidden] { display: none; }

/* « Avant de partir en balade » : le seul endroit où le site regarde où vous êtes,
   et il le fait sans rien envoyer. */
.autour {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--ombre);
}
.autour h2 { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.015em; }
.autour > p { margin-top: 8px; font-size: 0.92rem; color: var(--encre-doux); max-width: 70ch; }
.autour .boutons { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.autour .ou-je-suis { margin-top: 16px; font-size: 0.92rem; color: var(--encre-doux); }

.liste-autour { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.liste-autour li {
  display: flex; align-items: baseline; gap: 12px;
  padding: 9px 14px;
  background: var(--surface-douce);
  border: 1px solid var(--bordure-douce);
  border-radius: var(--rayon-petit);
  font-size: 0.9rem;
}
.liste-autour li.risque { background: var(--danger-doux); border-color: #f2c0bb; }
.liste-autour .distance {
  flex: 0 0 auto; min-width: 62px;
  font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--encre);
}
.liste-autour li.risque .distance { color: #7a1c14; }
.liste-autour .aide { display: block; }

.avertissement-autour {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--bordure-douce);
  font-size: 0.85rem; color: var(--encre-tres-doux);
}
.avertissement-autour b { color: var(--encre-doux); }

/* Reconnaître le frelon asiatique : planche comparative. */
.reconnaitre { font-size: 0.92rem; color: var(--encre-doux); }
.reconnaitre .chapo { margin-bottom: 10px; }
.reconnaitre b { color: var(--encre); }
.reconnaitre .signes { margin: 0 0 14px 20px; display: flex; flex-direction: column; gap: 6px; }
.planche { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 4px 0 14px; }
.planche figure {
  background: var(--surface-douce);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-petit);
  overflow: hidden;
}
/* « contain » et non « cover » : sur une planche de reconnaissance, une patte coupée
   est une patte qu'on ne peut pas comparer. Fond blanc, l'insecte entier, quitte à
   laisser des marges. */
.planche img { width: 100%; height: 210px; object-fit: contain; display: block; background: #fff; padding: 6px; }
.planche figcaption { font-size: 0.82rem; line-height: 1.45; padding: 9px 11px; }
.planche .credit { display: block; margin-top: 4px; font-size: 0.73rem; color: var(--encre-tres-doux); }
@media (max-width: 760px) { .planche { grid-template-columns: 1fr; } .planche img { height: 240px; } }

/* Le repli « comment le reconnaître » se présente comme un bouton : il est au-dessus
   de la carte, et doit se voir sans pour autant repousser la carte hors de l'écran. */
.repli-reconnaitre > summary {
  background: var(--frelon-doux);
  border: 1px solid #f0d7b4;
  color: #7a4a09;
  font-weight: 600;
}
.repli-reconnaitre > summary:hover { background: #fbe9d2; }
.repli-reconnaitre > summary .jeton { background: var(--frelon); color: #fff; }

.planche-3 { margin: 4px 0 14px; }
.planche-3 img {
  width: 100%; height: auto; display: block;
  border: 1px solid var(--bordure); border-radius: var(--rayon-petit);
  background: #fff;
}
.planche-3 figcaption { font-size: 0.82rem; color: var(--encre-tres-doux); margin-top: 6px; }
.planche-3 .aide { display: inline; }

table.criteres {
  width: 100%; border-collapse: collapse;
  margin: 0 0 10px; font-size: 0.86rem;
  background: var(--surface);
  border: 1px solid var(--bordure); border-radius: var(--rayon-petit);
  overflow: hidden;
}
table.criteres caption { text-align: left; font-weight: 700; color: var(--encre); padding: 0 0 7px; }
table.criteres th, table.criteres td { padding: 8px 11px; text-align: left; vertical-align: top; }
table.criteres thead th { background: var(--surface-douce); font-size: 0.82rem; color: var(--encre); }
table.criteres tbody th { font-weight: 600; color: var(--encre-doux); width: 26%; }
table.criteres tbody tr + tr th, table.criteres tbody tr + tr td { border-top: 1px solid var(--bordure-douce); }
table.criteres td b { color: var(--encre); }
@media (max-width: 620px) {
  table.criteres, table.criteres tbody, table.criteres tr, table.criteres td, table.criteres th { display: block; }
  table.criteres thead { display: none; }
  table.criteres tbody th { width: auto; background: var(--surface-douce); }
  table.criteres td::before { content: attr(data-espece) ' : '; color: var(--encre-tres-doux); }
  table.criteres tbody tr { border-top: 1px solid var(--bordure); }
  table.criteres tbody tr + tr th, table.criteres tbody tr + tr td { border-top: none; }
}

.fiche-officielle {
  display: flex; align-items: flex-start; gap: 14px;
  margin: 4px 0 14px; padding: 14px 16px;
  background: var(--primaire-doux);
  border: 1px solid #b9dcca;
  border-radius: var(--rayon-petit);
  text-decoration: none; color: var(--primaire-fonce);
  transition: background .15s, border-color .15s;
}
.fiche-officielle:hover { background: #d8ebe0; border-color: var(--primaire); color: var(--primaire-fonce); }
.fiche-officielle:focus-visible { outline: 2px solid var(--primaire); outline-offset: 3px; }
.icone-fiche { flex: 0 0 auto; }
.icone-fiche svg { width: 30px; height: 30px; }
.fiche-officielle b { display: block; font-size: 0.95rem; }
.fiche-officielle .aide { display: block; margin-top: 3px; color: var(--encre-doux); }

.reconnaitre p { margin-bottom: 10px; }
.reconnaitre .source { font-size: 0.8rem; color: var(--encre-tres-doux); }
@media (max-width: 760px) { .planche { grid-template-columns: 1fr; } }

/* Confirmations : « c'est toujours là », plutôt qu'un doublon. */
.confirme {
  margin-top: 8px; padding: 6px 10px;
  background: var(--primaire-doux); color: var(--primaire-fonce);
  border-radius: var(--rayon-petit);
  font-size: 0.82rem;
}
.actions-popup { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions-popup .aide { flex: 1 1 100%; margin: 0; }

.doublon:empty { display: none; }
.doublon {
  margin: 4px 0 16px;
  padding: 14px 16px;
  background: var(--alerte-doux);
  border: 1px solid #f0dca8;
  border-radius: var(--rayon-petit);
}
.doublon .titre-doublon { font-weight: 700; color: #6b4d06; }
.doublon .aide { color: #6b4d06; }
.ligne-doublon {
  margin-top: 10px; padding: 10px 12px;
  background: var(--surface); border: 1px solid var(--bordure);
  border-radius: var(--rayon-petit); font-size: 0.88rem;
}

/* On insiste : une photo géolocalisée évite tout le reste. */
.conseil-gps {
  margin-top: 8px; padding: 10px 12px;
  background: var(--primaire-doux);
  border-left: 3px solid var(--primaire);
  border-radius: var(--rayon-petit);
  font-size: 0.85rem; color: var(--primaire-fonce);
}
.conseil-gps .aide { display: block; margin-top: 5px; color: var(--encre-doux); }

/* Bandeau d'alerte de proximité, pendant une balade. */
.alerte-proximite {
  margin-top: 14px;
  padding: 14px 18px;
  background: var(--danger-doux);
  border: 1px solid #f2c0bb;
  border-left: 4px solid var(--danger);
  border-radius: var(--rayon-petit);
  color: #7a1c14;
  font-size: 0.95rem;
}
.alerte-proximite[hidden] { display: none; }
.btn.secondaire.actif { background: var(--danger); border-color: var(--danger); color: #fff; }

/* Accès réservé, sur l'accueil : visible pour qui le cherche, discret pour les autres. */
.acces-reserve {
  margin: 0 0 22px;
  padding: 12px 18px;
  background: var(--surface);
  border: 1px dashed var(--bordure);
  border-radius: var(--rayon-petit);
  font-size: 0.88rem;
  color: var(--encre-tres-doux);
  text-align: center;
}
.acces-reserve b { color: var(--encre-doux); }

/* Onglet « Comptes », mis à part des filtres d'état auxquels il ne ressemble pas. */
.onglet-comptes { margin-left: auto; }
.onglet-comptes[hidden] { display: none; }
.jetons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-height: 26px; align-items: center; }
.jeton-choix {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primaire-doux); color: var(--primaire-fonce);
  border: 1px solid #b9dcca; border-radius: 999px;
  padding: 3px 6px 3px 12px; font-size: 0.85rem; font-weight: 600;
}
.jeton-choix button {
  font: inherit; font-size: 1rem; line-height: 1;
  background: none; border: none; color: inherit; cursor: pointer;
  padding: 0 4px; border-radius: 50%;
}
.jeton-choix button:hover { background: rgba(0,0,0,.08); }

/* Comptes et référents (page de relecture) */
.cases { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 4px; }
.cases label {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.9rem; color: var(--encre-doux); cursor: pointer;
}
.ligne-compte {
  display: flex; flex-wrap: wrap; gap: 10px 16px;
  align-items: center; justify-content: space-between;
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon-petit);
  padding: 12px 16px; margin-bottom: 8px;
}
.ligne-compte.inactif { opacity: .6; }
.ligne-compte .aide { margin-top: 2px; }
.ligne-compte .boutons { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------------------------------------------------------------- page de texte */

.page-texte { max-width: 820px; }
.bloc-texte {
  background: var(--surface);
  border: 1px solid var(--bordure);
  border-radius: var(--rayon);
  padding: 24px 28px;
  margin-bottom: 16px;
  box-shadow: var(--ombre);
}
.bloc-texte h2 { font-size: 1.08rem; margin-bottom: 10px; color: var(--primaire-fonce); }
.bloc-texte p { margin-bottom: 12px; color: var(--encre-doux); }
.bloc-texte p:last-child { margin-bottom: 0; }
.bloc-texte ul { margin: 0 0 12px 22px; color: var(--encre-doux); }
.bloc-texte li { margin-bottom: 6px; }
.bloc-texte b { color: var(--encre); font-weight: 600; }
.bloc-texte .coordonnees {
  background: var(--surface-douce); border: 1px solid var(--bordure-douce);
  border-radius: var(--rayon-petit); padding: 12px 16px; margin: 4px 0 12px;
  font-size: 0.9rem; line-height: 1.7;
}
.a-completer {
  display: inline-block; background: var(--alerte-doux); border: 1px dashed var(--alerte);
  color: #6b4a07; padding: 2px 10px; border-radius: 6px; font-weight: 600; font-size: 0.88rem;
}
.retour { display: inline-block; margin-bottom: 18px; font-weight: 600; }

/* ---------------------------------------------------------------- pied */

footer.site {
  margin-top: 34px; padding-top: 18px;
  border-top: 1px solid var(--bordure);
  font-size: 0.82rem; color: var(--encre-tres-doux); line-height: 1.6;
}

/* ---------------------------------------------------------------- adaptations */

@media (max-width: 900px) {
  .disposition { flex-direction: column; }
  aside.lateral { flex: 1 1 auto; width: 100%; }
  .carte { height: 460px; }
  .carte-signalement { grid-template-columns: 1fr; }
  header.site { padding: 24px 22px; }
  .page { padding: 18px 16px 44px; }
  nav.onglets { display: flex; width: 100%; }
  nav.onglets button { flex: 1; padding: 10px 12px; }
  .choix, .rassurance { grid-template-columns: 1fr; }
  .rassurance { gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media print {
  body { background: #fff; }
  .page { padding: 0; max-width: none; }
  header.site { background: none; color: var(--encre); box-shadow: none; border-bottom: 2px solid var(--primaire); border-radius: 0; }
  header.site .sous-titre, header.site .meta { color: var(--encre-doux); }
  .etiquette { background: none; border-color: var(--bordure); color: var(--encre-doux); }
  .carte { height: 460px; box-shadow: none; }
  #visionneuse, nav.onglets, aside.lateral, .bandeau-demo,
  .retour-accueil { display: none !important; }
  .panneau { display: block !important; }
  /* L'écran de choix n'a aucun sens sur papier ; l'identifiant l'emporte sur .panneau. */
  #panneau-accueil { display: none !important; }
}


/* ================================================================ disposition téléphone
   Ajoutée le 23/09. Le DOM n'a presque pas bougé : c'est ce bloc qui réordonne
   l'écran sous 760 px. Au-dessus, l'affichage en deux colonnes est inchangé. */

/* ---- volets repliables, communs aux deux largeurs ---- */

.repli { border: 0; }
.repli > summary {
  list-style: none;
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; cursor: pointer;
}
.repli > summary::-webkit-details-marker { display: none; }
.repli > summary::after {
  content: "›"; margin-left: auto;
  font-size: 1.4rem; color: var(--encre-tres-doux);
  transform: rotate(90deg); transition: transform .18s;
}
.repli[open] > summary::after { transform: rotate(-90deg); }
.repli > summary .jeton {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: 999px;
  background: var(--primaire-doux); color: var(--primaire);
  display: grid; place-items: center; font-size: .82rem; font-weight: 700;
}

/* Au-dessus de 760 px, rien de neuf n'apparaît : les éléments propres au
   téléphone restent masqués et les volets se comportent comme les anciens blocs. */
.barre-action, .compteurs, .temoin-action, .reserve-action { display: none; }
.repli > summary { margin-bottom: 10px; }

@media (max-width: 760px) {

  /* ---- en-tête réduit à une barre ---- */
  header.site { padding: 12px 16px; border-radius: 0; margin: -18px -16px 0; }
  header.site h1 { font-size: 1.02rem; line-height: 1.3; margin: 0; }
  header.site .sous-titre,
  header.site .meta,
  header.site .etiquettes { display: none; }

  /* Sur l'accueil, aucune carte à dégager : l'en-tête reprend sa hauteur et
     explique à quoi sert le site, ce qui est tout l'intérêt de cet écran. */
  body.vue-accueil header.site { padding: 20px 16px; }
  body.vue-accueil header.site h1 { font-size: 1.24rem; }
  body.vue-accueil header.site .sous-titre { display: block; font-size: .95rem; margin-top: 7px; }
  body.vue-accueil header.site .meta { display: block; font-size: .86rem; margin-top: 12px; }

  /* Cible tactile confortable pour le retour ; les onglets sous lui ont déjà
     leur propre marge haute. */
  .retour-accueil { min-height: 44px; margin-bottom: 0; }
  .carte-choix { padding: 20px 18px 18px; }

  .page { padding: 18px 16px 24px; }

  /* ---- ordre de l'écran : carte d'abord, contexte à la fin ---- */
  .panneau.actif { display: flex; flex-direction: column; }
  /* .disposition porte align-items: flex-start ; en colonne, ses enfants se
     dimensionneraient alors sur leur contenu et la carte n'atteindrait pas les bords. */
  .disposition { order: 1; gap: 0; align-items: stretch; }
  .principal { width: 100%; }
  .repli-contexte { order: 2; margin-top: 16px; }

  /* ---- la carte prend la place ---- */
  .carte { height: 54vh; min-height: 320px; margin: 0 -16px; border-radius: 0; }

  /* ---- onglets en segments pleine largeur, 52 px ---- */
  /* le conteneur en pilule n'a plus de sens avec deux segments pleine largeur */
  nav.onglets { gap: 6px; padding: 12px 0; background: none; box-shadow: none; border-radius: 0; margin-bottom: 0; }
  nav.onglets button { min-height: 52px; border-radius: var(--rayon-petit); background: var(--surface); border: 1px solid var(--bordure); }
  nav.onglets button[aria-selected="true"] { border-color: var(--primaire); }

  /* ---- l'action, juste sous la carte ---- */
  .temoin-action { display: block; height: 1px; }
  .barre-action { display: block; padding: 14px 0 0; }
  .btn-signaler {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; min-height: 52px;
    border-radius: var(--rayon);
    background: var(--primaire); color: #fff;
    font-weight: 700; font-size: 1.02rem; text-decoration: none;
    box-shadow: 0 4px 14px rgba(20,82,58,.22);
  }
  .btn-signaler::before { content: "+"; font-size: 1.3rem; font-weight: 700; }
  .btn-signaler.frelon { background: var(--frelon); box-shadow: 0 4px 14px rgba(180,83,9,.22); }

  /* Le bouton bascule en position fixe dès que sa place naturelle sort de l'écran.
     Mesuré : cela n'arrive que sur les petits téléphones, volets ouverts. */
  body.colle .barre-action {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: linear-gradient(to top, var(--fond) 62%, rgba(244,247,245,0));
  }
  body.colle .reserve-action { display: block; height: 78px; }

  /* ---- compteurs, sortis de la carte ---- */
  .compteurs {
    display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
    padding: 14px 0 0; font-size: .82rem; color: var(--encre-doux);
  }
  .compteurs span {
    background: var(--surface); border: 1px solid var(--bordure);
    border-radius: 999px; padding: 7px 14px; font-weight: 600;
  }
  .compteurs b { color: var(--primaire); }

  /* ---- volets : une carte blanche cliquable ---- */
  .repli {
    background: var(--surface); border: 1px solid var(--bordure);
    border-radius: var(--rayon); box-shadow: var(--ombre);
    overflow: hidden; margin-top: 12px;
  }
  .repli > summary { min-height: 52px; padding: 0 16px; margin: 0; font-size: .94rem; }
  .repli > .legende-carte,
  .repli > .note-cle { margin: 0; padding: 0 16px 16px; border: 0; box-shadow: none; background: none; }

  /* ---- formulaire ---- */
  aside.lateral { margin-top: 16px; }
  .formulaire .btn, .formulaire button[type=submit], .formulaire select, .formulaire input[type=text],
  .formulaire input[type=date] { min-height: 48px; }

  footer.site { font-size: .78rem; }
}
