/* Sporalo — design system « sous-bois éditorial » */

@font-face { font-family: "Fraunces"; src: url("/static/fonts/fraunces-latin-wght-normal.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/static/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --papier: #FFFFFF;
  --surface: #FFFFFF;
  --surface-2: #F2F3EE;
  --fond-doux: #F7F6F1;
  --encre: #17201A;
  --encre-2: #4B554D;
  --encre-3: #7C857E;
  --trait: #E7E7E0;
  --trait-fort: #D3D4CB;
  --foret: #2E6B46;
  --foret-fonce: #1F4F33;
  --mousse: #6E8F4E;
  --ocre: #C98A2B;
  --terre: #8A5A3C;
  --alerte: #A63D2C;
  --accent: #2E6B46;
  --sur-accent: #FFFFFF;

  /* Rampe de pousse : rouge → orange → jaune → vert → vert foncé */
  --s0: #A63D2C; --s1: #CF7F1E; --s2: #D9B62B; --s3: #5EA96D; --s4: #1F5130;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r1: 8px; --r2: 16px; --r3: 24px;
  --ombre: 0 1px 2px rgb(23 32 26 / .04), 0 4px 16px rgb(23 32 26 / .06);
  --ombre-forte: 0 4px 12px rgb(23 32 26 / .08), 0 24px 60px rgb(23 32 26 / .14);
  --entete: 64px;
  --largeur: 1180px;
  color-scheme: light;
}


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--papier); color: var(--encre);
  font: 400 16px/1.6 var(--sans); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--foret); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--foret-fonce); }
:focus-visible { outline: 3px solid var(--ocre); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; font-variation-settings: "SOFT" 50, "opsz" 72; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.2rem); }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.saut { position: absolute; left: -999px; top: 0; background: var(--encre); color: var(--papier); padding: 8px 14px; z-index: 100; }
.saut:focus { left: 8px; top: 8px; }
.visuellement-cache { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- En-tête ---------- */
.entete {
  position: sticky; top: 0; z-index: 30; height: var(--entete);
  display: flex; align-items: center; gap: 16px; padding: 0 16px;
  background: rgb(255 255 255 / .92);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--trait);
}
.marque { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--encre); font-family: var(--serif); font-weight: 650; font-size: 1.2rem; letter-spacing: -.01em; white-space: nowrap; }
.marque svg { width: 30px; height: 30px; flex: none; }
.nav { margin-left: auto; }
.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav a { display: block; padding: 8px 12px; border-radius: 999px; color: var(--encre-2); text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav a:hover { background: var(--surface-2); color: var(--encre); }
.nav a[aria-current="page"] { color: var(--encre); background: var(--surface-2); }
.menu-bouton { display: none; }
@media (max-width: 760px) {
  .menu-bouton { display: inline-flex; margin-left: auto; align-items: center; gap: 6px; background: none; border: 1px solid var(--trait-fort); border-radius: 999px; padding: 7px 14px; color: var(--encre); font: inherit; font-weight: 500; cursor: pointer; }
  .nav { position: absolute; top: var(--entete); left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--trait); box-shadow: var(--ombre); display: none; }
  .nav.ouvert { display: block; }
  .nav ul { flex-direction: column; padding: 8px; }
  .nav a { padding: 12px 14px; border-radius: var(--r1); }
}

/* ---------- Mise en page éditoriale ---------- */
.page { max-width: var(--largeur); margin: 0 auto; padding: 32px 16px 64px; }
.etroit { max-width: 760px; }
.fil { font-size: .875rem; color: var(--encre-3); margin-bottom: 18px; }
.fil a { color: var(--encre-2); text-decoration: none; }
.fil a:hover { text-decoration: underline; }
.fil span[aria-hidden] { margin: 0 6px; }
.chapo { font-size: 1.15rem; color: var(--encre-2); max-width: 62ch; }
.surtitre { font: 600 .75rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--mousse); margin-bottom: 12px; display: block; }
.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose blockquote { margin: 1.5em 0; padding: 14px 18px; border-left: 3px solid var(--ocre); background: var(--surface); border-radius: 0 var(--r1) var(--r1) 0; }
.prose blockquote p:last-child { margin: 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: .95rem; margin: 1em 0 1.5em; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.prose th { font-weight: 600; color: var(--encre-2); font-size: .85rem; }
.doux { color: var(--encre-3); }
.petit { font-size: .875rem; }
.grille { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .grille-2 { grid-template-columns: repeat(2, 1fr); } .grille-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1180px) { .grille-5 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 820px) and (max-width: 1179px) { .grille-5 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 520px) and (max-width: 819px) { .grille-5 { grid-template-columns: repeat(2, 1fr); } }
.section { margin-top: 48px; }
.section > h2 { margin-bottom: 16px; }

/* ---------- Cartes / panneaux ---------- */
.carte-bloc { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r2); padding: 20px; box-shadow: var(--ombre); }
.carte-bloc h3 { margin-bottom: .3em; }
a.carte-bloc { display: block; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
a.carte-bloc:hover { box-shadow: var(--ombre-forte); transform: translateY(-2px); }
.bouton { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; background: var(--accent); color: var(--sur-accent); text-decoration: none; font-weight: 600; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.bouton:hover { filter: brightness(1.1); color: var(--sur-accent); }
.bouton.secondaire { background: transparent; color: var(--encre); border: 1px solid var(--trait-fort); }
.bouton.secondaire:hover { background: var(--surface-2); color: var(--encre); }

/* Score */
.pastille { display: inline-flex; align-items: center; justify-content: center; min-width: 2.6em; padding: 2px 8px; border-radius: 999px; font-weight: 700; font-variant-numeric: tabular-nums; font-size: .9rem; }
.n0 { background: var(--s0); color: #fff; } .n1 { background: var(--s1); color: #2b1803; } .n2 { background: var(--s2); color: #2b2205; } .n3 { background: var(--s3); color: #0c2414; } .n4 { background: var(--s4); color: #fff; }
.verdict { font-family: var(--serif); font-weight: 600; }
.jauge { --v: 0; --c: var(--s2); width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: radial-gradient(closest-side, var(--surface) 76%, transparent 77% 100%), conic-gradient(var(--c) calc(var(--v) * 1%), var(--surface-2) 0); }
.jauge b { font: 700 1.6rem/1 var(--serif); font-variant-numeric: tabular-nums; }
.jauge small { display: block; font-size: .7rem; color: var(--encre-3); text-align: center; margin-top: 2px; }

/* Barres */
.barres { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; align-items: end; height: 120px; margin: 8px 0 4px; }
.barres .b { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.barres .b i { display: block; width: 100%; border-radius: 4px 4px 2px 2px; min-height: 3px; }
.barres .b span { font-size: .7rem; color: var(--encre-3); white-space: nowrap; }
.barres .b em { font-style: normal; font-size: .75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.facteur { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; margin-bottom: 12px; font-size: .9rem; }
.facteur .piste { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.facteur .piste i { display: block; height: 100%; background: var(--mousse); border-radius: 99px; }
.facteur .val { font-variant-numeric: tabular-nums; color: var(--encre-2); }
.facteur .note { grid-column: 1 / -1; color: var(--encre-3); font-size: .8rem; }

/* Tableaux */
.tableau { width: 100%; border-collapse: collapse; font-size: .95rem; }
.tableau th, .tableau td { padding: 10px 8px; border-bottom: 1px solid var(--trait); text-align: left; }
.tableau th { font-size: .8rem; font-weight: 600; color: var(--encre-3); text-transform: uppercase; letter-spacing: .05em; }
.tableau td.num, .tableau th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tableau tr:hover td { background: color-mix(in srgb, var(--surface-2) 50%, transparent); }
.defile { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.barre-h { display: block; height: 6px; border-radius: 99px; background: var(--surface-2); min-width: 60px; }
.barre-h i { display: block; height: 100%; border-radius: 99px; }

/* Onglets (liens) */
.onglets { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; padding: 0; list-style: none; }
.onglets a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--trait); background: var(--surface); color: var(--encre-2); text-decoration: none; font-weight: 500; font-size: .92rem; }
.onglets a[aria-current="page"], .onglets a[aria-pressed="true"] { background: var(--encre); color: var(--papier); border-color: var(--encre); }
.puce-espece { width: 10px; height: 10px; border-radius: 50%; flex: none; }

/* Figures / photos */
.galerie { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin: 24px 0; }
.galerie figure { margin: 0; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r2); overflow: hidden; }
.galerie img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.galerie figcaption { padding: 10px 12px; font-size: .82rem; color: var(--encre-2); }
.galerie figcaption small { display: block; color: var(--encre-3); margin-top: 3px; font-size: .74rem; }
.heros-espece { display: grid; gap: 24px; align-items: center; }
@media (min-width: 820px) { .heros-espece { grid-template-columns: 1.1fr 1fr; } }
.heros-espece figure { margin: 0; border-radius: var(--r3); overflow: hidden; box-shadow: var(--ombre); }
.heros-espece img { aspect-ratio: 5 / 4; object-fit: cover; width: 100%; }
.heros-espece figcaption { font-size: .75rem; color: var(--encre-3); padding: 6px 2px; }
.regle { background: color-mix(in srgb, var(--mousse) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--mousse) 35%, transparent); border-radius: var(--r2); padding: 14px 16px; }
.attention { background: color-mix(in srgb, var(--alerte) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--alerte) 35%, transparent); border-radius: var(--r2); padding: 14px 16px; }

/* Bibliographie */
.biblio, .prose #sources ~ ol { counter-reset: ref; list-style: none; padding: 0; }
.biblio li, .prose #sources ~ ol li { counter-increment: ref; position: relative; padding: 10px 0 10px 44px; border-bottom: 1px solid var(--trait); font-size: .95rem; }
.biblio li::before, .prose #sources ~ ol li::before { content: counter(ref); position: absolute; left: 0; top: 10px; width: 30px; text-align: right; color: var(--encre-3); font-variant-numeric: tabular-nums; font-size: .85rem; }
.biblio .apport { display: block; color: var(--encre-3); font-size: .85rem; margin-top: 2px; }

/* ---------- Pied de page ---------- */
.pied { border-top: 1px solid var(--trait); background: var(--fond-doux); margin-top: 64px; }
.pied .page { padding-top: 32px; padding-bottom: 32px; display: grid; gap: 24px; }
@media (min-width: 720px) { .pied .page { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.pied h2 { font-size: 1rem; font-family: var(--sans); font-weight: 600; margin-bottom: 8px; }
.pied ul { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.pied li { margin: 4px 0; }
.pied a { color: var(--encre-2); text-decoration: none; }
.pied a:hover { color: var(--encre); text-decoration: underline; }
.pied p { font-size: .9rem; color: var(--encre-2); }

/* ---------- Page carte ---------- */
.accueil-carte { position: relative; overflow: hidden; height: calc(100svh - var(--entete) - 56px); min-height: 460px; }
#carte { position: absolute; inset: 0; background: var(--surface-2); }
.controles {
  position: absolute; z-index: 5; top: 12px; left: 12px; right: 12px;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.controles > * { pointer-events: auto; }
.carte-flottante { background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid var(--trait); border-radius: var(--r2); box-shadow: var(--ombre); }
.choix-espece { display: flex; gap: 4px; padding: 4px; overflow-x: auto; scrollbar-width: none; }
.choix-espece::-webkit-scrollbar { display: none; }
.choix-espece button { flex: none; display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; color: var(--encre-2); padding: 8px 12px; border-radius: 9px; font: 500 .9rem var(--sans); cursor: pointer; }
.choix-espece button[aria-pressed="true"] { background: var(--encre); color: var(--papier); }
.choix-espece button:hover:not([aria-pressed="true"]) { background: var(--surface-2); }
.ligne-outils { display: flex; gap: 8px; align-items: stretch; }
.recherche { position: relative; flex: 1; min-width: 0; }
.recherche input { width: 100%; height: 44px; border: 1px solid var(--trait); border-radius: var(--r2); background: color-mix(in srgb, var(--surface) 96%, transparent); color: var(--encre); font: 400 1rem var(--sans); padding: 0 14px 0 40px; box-shadow: var(--ombre); }
.recherche svg { position: absolute; left: 13px; top: 13px; width: 18px; height: 18px; color: var(--encre-3); }
.suggestions { position: absolute; top: 48px; left: 0; right: 0; list-style: none; margin: 0; padding: 4px; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r2); box-shadow: var(--ombre-forte); max-height: 320px; overflow: auto; }
.suggestions li { padding: 10px 12px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; }
.suggestions li[aria-selected="true"], .suggestions li:hover { background: var(--surface-2); }
.suggestions li small { color: var(--encre-3); }
.icone-bouton { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 1px solid var(--trait); border-radius: var(--r2); background: color-mix(in srgb, var(--surface) 96%, transparent); color: var(--encre); cursor: pointer; box-shadow: var(--ombre); }
.icone-bouton svg { width: 20px; height: 20px; }
.choix-date { display: flex; gap: 2px; padding: 4px; overflow-x: auto; scrollbar-width: none; align-self: flex-start; max-width: 100%; }
.choix-date button { flex: none; border: 0; background: transparent; color: var(--encre-2); padding: 6px 10px; border-radius: 8px; font: 500 .82rem var(--sans); cursor: pointer; line-height: 1.2; text-align: center; }
.choix-date button b { display: block; font-weight: 650; font-size: .9rem; color: var(--encre); }
.choix-date button[aria-pressed="true"] { background: var(--accent); color: var(--sur-accent); }
.choix-date button[aria-pressed="true"] b { color: inherit; }
.legende { position: absolute; z-index: 5; left: 12px; bottom: 28px; padding: 10px 12px; font-size: .78rem; color: var(--encre-2); }
.legende .rampe { display: flex; height: 8px; width: 180px; border-radius: 99px; overflow: hidden; margin: 6px 0 4px; }
.legende .rampe i { flex: 1; }
.legende .bornes { display: flex; justify-content: space-between; }
.statut-carte { position: absolute; z-index: 5; left: 50%; transform: translateX(-50%); bottom: 28px; padding: 8px 14px; font-size: .85rem; display: none; }
.statut-carte.visible { display: block; }
.indice-defiler { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; display: grid; place-items: center; background: var(--papier); border-top: 1px solid var(--trait); font-size: .9rem; color: var(--encre-2); z-index: 4; }
.indice-defiler a { color: inherit; }
@media (min-width: 900px) {
  .controles { right: auto; width: 600px; }
  .legende { bottom: 32px; }
}

/* Panneau latéral / tiroir mobile */
.panneau {
  position: absolute; z-index: 10; background: var(--surface); box-shadow: var(--ombre-forte);
  display: flex; flex-direction: column; overflow: hidden;
  left: 0; right: 0; bottom: 0; max-height: 72%; border-radius: var(--r3) var(--r3) 0 0;
  transform: translateY(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1);
}
.panneau.ouvert { transform: none; }
.panneau-tete { display: flex; align-items: flex-start; gap: 12px; padding: 16px 16px 10px; border-bottom: 1px solid var(--trait); }
.panneau-tete h2 { font-size: 1.35rem; margin: 0; }
.panneau-tete p { margin: 2px 0 0; font-size: .85rem; color: var(--encre-3); }
.panneau-tete button { margin-left: auto; }
.panneau-corps { overflow-y: auto; padding: 16px; overscroll-behavior: contain; }
.panneau-corps h3 { font: 600 .78rem/1.2 var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--encre-3); margin: 22px 0 10px; }
.panneau-corps h3:first-child { margin-top: 0; }
.poignee { width: 40px; height: 4px; border-radius: 99px; background: var(--trait-fort); margin: 8px auto 0; }
.resume-score { display: flex; gap: 16px; align-items: center; }
.resume-score p { margin: 0; }
.liste-cles { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .9rem; margin: 0; }
.liste-cles dt { color: var(--encre-3); }
.liste-cles dd { margin: 0; }
@media (min-width: 900px) {
  .panneau { left: auto; top: 12px; right: 12px; bottom: 12px; width: 400px; max-height: none; border-radius: var(--r3); transform: translateX(calc(100% + 24px)); }
  .poignee { display: none; }
}

.maplibregl-ctrl-attrib { font-size: 11px; }
.maplibregl-ctrl-group { border-radius: var(--r1) !important; }
.maplibregl-popup-content { background: var(--surface); color: var(--encre); border-radius: var(--r1); padding: 6px 10px; font: 500 .82rem var(--sans); box-shadow: var(--ombre); }
.maplibregl-popup-tip { display: none; }

.chargement { color: var(--encre-3); font-size: .9rem; }
.erreur { color: var(--alerte); }

@media print { .entete, .pied, .controles, .legende { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Accueil lumineux ---------- */
.heros { position: relative; min-height: min(62svh, 560px); display: grid; align-items: end; color: #fff; overflow: hidden; }
.heros > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.heros::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(10 25 15 / .05) 0%, rgb(10 25 15 / .25) 45%, rgb(10 25 15 / .72) 100%); }
.heros-contenu { position: relative; z-index: 1; width: 100%; max-width: var(--largeur); margin: 0 auto; padding: 48px 16px 40px; }
.heros h1 { color: #fff; max-width: 15ch; margin-bottom: 12px; text-shadow: 0 2px 24px rgb(0 0 0 / .25); }
.heros .surtitre { color: #E9F1D8; }
.heros p.chapo { color: rgb(255 255 255 / .92); margin-bottom: 22px; }
.heros .ligne-outils { max-width: 560px; }
.heros .recherche input { height: 54px; border: 0; border-radius: 999px; padding-left: 48px; font-size: 1.05rem; box-shadow: 0 10px 30px rgb(0 0 0 / .25); background: #fff; }
.heros .recherche svg { left: 18px; top: 18px; }
.heros .suggestions { top: 60px; color: var(--encre); }
.heros .icone-bouton { width: 54px; height: 54px; border-radius: 50%; border: 0; background: #fff; box-shadow: 0 10px 30px rgb(0 0 0 / .25); }
.credit-photo { position: absolute; z-index: 1; right: 12px; bottom: 8px; font-size: .7rem; color: rgb(255 255 255 / .75); }
.credit-photo a { color: inherit; }

.zone-carte { max-width: var(--largeur); margin: -24px auto 0; padding: 0 16px; position: relative; z-index: 2; }
.barre-carte { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; background: #fff; border-radius: var(--r2) var(--r2) 0 0; padding: 12px; border: 1px solid var(--trait); border-bottom: 0; }
.barre-carte .choix-espece, .barre-carte .choix-date { background: var(--surface-2); border-radius: 12px; }
.choix-espece button[aria-pressed="true"] { background: var(--foret); color: #fff; }
.cadre-carte { position: relative; height: min(72svh, 680px); min-height: 440px; overflow: hidden; border: 1px solid var(--trait); border-radius: 0 0 var(--r2) var(--r2); box-shadow: var(--ombre-forte); }
.cadre-carte #carte { position: absolute; inset: 0; }
.cadre-carte .legende { bottom: 16px; left: 12px; }
@media (max-width: 760px) {
  .zone-carte { padding: 0; margin-top: 0; }
  .barre-carte { border-radius: 0; border-left: 0; border-right: 0; }
  .cadre-carte { border-radius: 0; border-left: 0; border-right: 0; height: 70svh; }
  .heros { min-height: 440px; }
}
.section-doux { background: var(--fond-doux); padding: 8px 0 48px; margin-top: 56px; }
.carte-espece-photo { padding: 0; overflow: hidden; }
.carte-espece-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.carte-espece-photo div { padding: 14px 16px 16px; }
.carte-espece-photo h3 { margin: 0 0 2px; }
#zone-carte { scroll-margin-top: calc(var(--entete) + 8px); }
@media (max-width: 760px) {
  .heros h1 { font-size: 1.9rem; max-width: none; }
  .heros p.chapo { font-size: 1rem; }
  .heros-contenu { padding: 32px 16px 28px; }
  .grille-especes { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .grille-especes .carte-espece-photo div { padding: 10px 12px; }
  .grille-especes h3 { font-size: 1rem; }
}
.hors-saison { color: var(--encre-3); font-size: .9rem; margin: 8px 0 0; }

.interrupteur { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; font-size: .92rem; cursor: pointer; user-select: none; padding: 6px 10px; border-radius: 12px; background: var(--surface-2); }
.interrupteur input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.glissiere { width: 38px; height: 22px; border-radius: 99px; background: var(--trait-fort); position: relative; transition: background .2s; flex: none; }
.glissiere::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / .25); transition: transform .2s; }
.interrupteur input:checked + .glissiere { background: var(--foret); }
.interrupteur input:checked + .glissiere::after { transform: translateX(16px); }
.interrupteur input:focus-visible + .glissiere { outline: 3px solid var(--ocre); outline-offset: 2px; }

.coords { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 8px 0 0; font-size: .78rem; color: var(--encre-3); }
.coords span { font-variant-numeric: tabular-nums; font-family: ui-monospace, Menlo, monospace; }
.coords a, .coords .lien { font: inherit; color: var(--foret); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.bouton.petit { padding: 6px 12px; font-size: .85rem; }
.alerte-securite { border: 1px solid var(--alerte); border-left-width: 5px; background: var(--surface); border-radius: var(--r2); padding: 14px 18px; margin: 20px 0; }
.alerte-securite ul { margin: 8px 0 0; padding-left: 1.2em; }
.alerte-securite li { margin: 4px 0; }
.courbes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 16px 0 8px; }
.courbe { margin: 0; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r2); padding: 10px 12px; }
.courbe svg { width: 100%; height: auto; display: block; }
.courbe text { font-size: 10px; fill: var(--encre-3); font-family: var(--sans); }
.courbe .grille-svg { stroke: var(--trait); stroke-width: 1; }
.courbe figcaption { font-size: .85rem; margin-top: 4px; }
.alerte { margin-top: 8px; }
.alerte-form { margin-top: 10px; padding: 12px; background: var(--surface-2); border: 1px solid var(--trait); border-radius: var(--r2); display: grid; gap: 6px; }
.alerte-form label { font-size: .85rem; font-weight: 600; }
.alerte-form input[type=email], .alerte-form select { font: inherit; padding: 8px 10px; border: 1px solid var(--trait); border-radius: 8px; background: var(--surface); color: var(--encre); width: 100%; box-sizing: border-box; }
.alerte-form p { margin: 4px 0; }
.alerte-form button { justify-self: start; }
.alerte-form[hidden] { display: none; }
.signaler { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 12px; }
.faux-amis { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 14px 0 18px; }
.faux-ami { margin: 0; background: var(--surface); border: 2px solid var(--trait); border-radius: var(--r2); overflow: hidden; display: flex; flex-direction: column; }
.faux-ami img { width: 100%; height: auto; display: block; aspect-ratio: 4 / 3; object-fit: cover; }
.faux-ami figcaption { padding: 10px 12px 12px; font-size: .9rem; }
.faux-ami figcaption p { margin: 6px 0; }

.etiquette-danger { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; padding: 2px 8px; border-radius: 999px; margin-bottom: 6px; }
.danger-rouge { border-color: var(--s0); }
.danger-rouge .etiquette-danger { background: var(--s0); }
.danger-orange { border-color: var(--s1); }
.danger-orange .etiquette-danger { background: var(--s1); }
.danger-rouge strong { color: var(--s0); }
.danger-orange strong { color: #9a5a10; }
.credit { display: block; font-size: .62rem; line-height: 1.3; color: var(--encre-3); margin-top: 4px; }
.credit a { color: inherit; text-decoration: none; }
.credit a:hover { text-decoration: underline; }
.credit-photo { font-size: .62rem !important; }

/* ---------- page Méthode ---------- */
.m-entete { margin-bottom: 20px; }
.m-entete h1 { margin-top: 4px; }
.encart-info { display: flex; gap: 14px; align-items: flex-start; background: #EAF2FB; border: 1px solid #BFD6EE; border-left: 5px solid #2F6DB5; color: #1C3A5E; border-radius: var(--r2); padding: 16px 20px; margin: 0 0 32px; }
.encart-info svg { flex: 0 0 26px; width: 26px; height: 26px; color: #2F6DB5; margin-top: 2px; }
.encart-info strong { display: block; font-size: 1.02rem; margin-bottom: 4px; }
.encart-info p { margin: 0; line-height: 1.6; }
.encart-info a { color: #1F5A9E; }
.m-corps { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 48px; align-items: start; }
.m-sommaire { position: sticky; top: calc(var(--entete) + 20px); font-size: .9rem; border-left: 2px solid var(--trait); padding-left: 16px; }
.m-sommaire strong { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--encre-3); margin-bottom: 10px; }
.m-sommaire ol { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.m-sommaire li { counter-increment: s; margin: 0 0 8px; }
.m-sommaire li::before { content: counter(s); display: inline-block; width: 1.4em; color: var(--encre-3); font-variant-numeric: tabular-nums; }
.m-sommaire a { color: var(--encre-2); text-decoration: none; }
.m-sommaire a:hover { color: var(--foret); }
.m-contenu { max-width: 860px; min-width: 0; }
.m-contenu p { line-height: 1.7; }
.m-etapes { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; gap: 10px; margin-bottom: 8px; }
.m-etape { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r2); padding: 14px 16px; box-shadow: var(--ombre); color: inherit; text-decoration: none; transition: transform .15s; }
.m-etape:hover { transform: translateY(-2px); }
.m-etape span { width: 26px; height: 26px; border-radius: 50%; background: var(--foret); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.m-etape small { color: var(--encre-3); line-height: 1.4; }
.m-etape-finale { background: var(--foret); border-color: var(--foret); color: #fff; }
.m-etape-finale span { background: #fff; color: var(--foret); }
.m-etape-finale small { color: rgba(255,255,255,.8); }
.m-op { align-self: center; font-size: 1.6rem; color: var(--encre-3); font-family: var(--serif); }
.m-section { padding-top: 44px; scroll-margin-top: calc(var(--entete) + 12px); }
.m-section h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.m-num { flex: 0 0 34px; height: 34px; border-radius: 10px; background: var(--fond-doux); color: var(--foret); display: grid; place-items: center; font-size: 1rem; font-family: var(--sans); font-weight: 700; }
.m-sous-titre { margin: 30px 0 6px; font-size: 1.1rem; }
.m-formule { font-family: ui-monospace, Menlo, monospace; font-size: 1rem; background: var(--fond-doux); border-radius: var(--r2); padding: 16px 20px; margin: 16px 0; text-align: center; overflow-x: auto; white-space: nowrap; }
.m-formule b { color: var(--foret); }
.m-facteurs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; }
.m-facteur { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r2); padding: 16px 18px; }
.m-facteur h3 { margin: 0 0 6px; font-size: 1.05rem; }
.m-facteur p { margin: 0; font-size: .92rem; line-height: 1.6; color: var(--encre-2); }
.courbe figcaption { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.m-barres-habitat { display: grid; gap: 10px; margin-top: 16px; }
.m-barres-habitat > div { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: start; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r2); padding: 12px 16px; position: relative; overflow: hidden; }
.m-barres-habitat > div::before { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: calc(var(--part) * 2.5%); background: var(--terre); }
.m-barres-habitat b { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--terre); background: var(--fond-2, #F3EEE4); border-radius: 999px; padding: 3px 8px; text-align: center; margin-top: 2px; }
@media (max-width: 560px) { .m-barres-habitat > div { grid-template-columns: 1fr; gap: 6px; } .m-barres-habitat b { justify-self: start; } }
.m-barres-habitat span { font-size: .92rem; line-height: 1.5; color: var(--encre-2); }
.m-barres-habitat strong { display: block; color: var(--encre); }
.m-paliers { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 6px; }
.m-paliers li { display: flex; align-items: center; gap: 12px; font-size: .95rem; }
.m-paliers i { width: 28px; height: 16px; border-radius: 4px; flex: 0 0 28px; }
.m-paliers b { width: 76px; font-variant-numeric: tabular-nums; }
.m-chiffres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 6px 0 16px; }
.m-chiffres div { background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r2); padding: 14px; }
.m-chiffres b { display: block; font-family: var(--serif); font-size: 1.5rem; color: var(--foret); }
.m-chiffres span { font-size: .82rem; color: var(--encre-3); line-height: 1.4; }
.m-avertissement { background: #FFF6E5; border: 1px solid #F0D49A; border-left: 5px solid var(--s1); border-radius: var(--r2); padding: 16px 20px; margin-bottom: 16px; }
.m-avertissement strong { display: block; margin-bottom: 4px; color: #7A4A0C; }
.m-avertissement p { margin: 0; }
.m-liste { padding-left: 1.2em; }
.m-liste li { margin-bottom: .6em; line-height: 1.6; }
.m-table { width: 100%; }
.m-attrib { display: block; margin-top: 4px; color: var(--encre-3); font-size: .78rem; line-height: 1.4; font-style: italic; }
.m-schema { margin: 16px 0; background: var(--surface); border: 1px solid var(--trait); border-radius: var(--r2); padding: 10px 14px; }
.m-schema svg { width: 100%; max-width: 420px; height: auto; display: block; margin: 0 auto; }
.m-schema text { font-size: 10px; fill: var(--encre-3); font-family: var(--sans); }
.m-schema .m-liens line { stroke: var(--trait); stroke-width: 2; stroke-dasharray: 4 3; }
.m-schema .m-pts circle { fill: var(--s2); }
.m-schema .m-commune { fill: var(--foret); }
@media (max-width: 900px) {
  .m-corps { grid-template-columns: 1fr; gap: 0; }
  .m-sommaire { display: none; }
  .m-chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .m-etapes { grid-template-columns: 1fr; }
  .m-op { justify-self: center; }
  .m-facteurs { grid-template-columns: 1fr; }
  .encart-info { padding: 14px 16px; }
}
.biblio a, .m-table a { overflow-wrap: anywhere; }
.m-table th { text-align: left; }
.m-table td, .m-table th { border-bottom: 1px solid var(--trait); padding: 10px 12px 10px 0; vertical-align: top; }
@media (max-width: 640px) { .m-formule { font-size: .8rem; white-space: normal; } }

/* ---------- page À propos ---------- */
.ap-atouts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 28px 0 8px; }
.ap-atouts div { background: var(--surface); border: 1px solid var(--trait); border-top: 4px solid var(--foret); border-radius: var(--r2); padding: 14px; box-shadow: var(--ombre); }
.ap-atouts b { display: block; font-family: var(--serif); font-size: 1.15rem; color: var(--foret); margin-bottom: 4px; }
.ap-atouts span { font-size: .85rem; color: var(--encre-3); line-height: 1.45; }
.ap-financement { background: var(--foret); color: #fff; border-radius: var(--r2); padding: 20px 24px; margin: 32px 0; }
.ap-financement strong { display: block; font-family: var(--serif); font-size: 1.25rem; margin-bottom: 6px; }
.ap-financement p { margin: 0; line-height: 1.65; color: rgba(255,255,255,.92); }
@media (max-width: 700px) { .ap-atouts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* La liste de suggestions passe au-dessus de la carte pendant la saisie. */
.heros.suggestions-ouvertes { overflow: visible; z-index: 3; }
.heros .suggestions { z-index: 5; }

.facteur.retire { opacity: .55; }
.limite { margin: 12px 0 0; padding: 8px 12px; border-radius: 10px; background: #FBF3E4; border-left: 3px solid var(--s1); font-size: .9rem; }

/* Pages espèces */
.alerte-mortel { border: 2px solid var(--s0); background: color-mix(in srgb, var(--s0) 8%, var(--surface)); border-radius: var(--r2); padding: 12px 16px; margin: 16px 0; }
.alerte-mortel strong { color: var(--s0); }
.aside-espece { align-content: start; }
@media (min-width: 720px) { .aside-espece { position: sticky; top: calc(var(--entete) + 16px); } }
.autres-especes ul { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 8px; }
.autres-especes li a { display: inline-block; padding: 6px 14px; border: 1px solid var(--trait); border-radius: 999px; background: var(--surface); color: var(--encre); text-decoration: none; }
.autres-especes li a:hover { background: var(--surface-2); }

/* Info-bulles « ? » : crédits photo et sources, discrets */
.info { position: relative; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; font: 700 .62rem/1 var(--sans, system-ui); color: var(--encre-3); border: 1px solid currentColor; cursor: help; vertical-align: middle; margin-left: 4px; opacity: .8; }
.info .bulle { display: none; position: absolute; z-index: 20; bottom: calc(100% + 6px); right: -6px; width: max-content; max-width: 240px; padding: 6px 9px; border-radius: 8px; background: #1F2A1F; color: #fff; font-size: .7rem; font-weight: 400; line-height: 1.35; text-align: left; box-shadow: 0 6px 18px rgb(0 0 0 / .2); }
.info .bulle::after { content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 8px; }
.info .bulle a { color: #fff; text-decoration: underline; }
.info:hover .bulle, .info:focus .bulle, .info:focus-within .bulle { display: block; }
figure { position: relative; }
.credit-photo .info { color: rgb(255 255 255 / .85); }
details.sources { margin-top: 28px; font-size: .78rem; color: var(--encre-3); }
details.sources summary { cursor: pointer; font-weight: 600; list-style: none; display: inline-flex; align-items: center; }
details.sources summary::-webkit-details-marker { display: none; }
details.sources[open] summary { margin-bottom: 6px; }
details.sources p, details.sources li { font-size: .78rem; line-height: 1.45; }
.m-table td, .m-table th { font-size: .85rem; }
.m-table .info .bulle { right: auto; left: -6px; max-width: 300px; }
.lien-bouton { background: none; border: 0; padding: 0; color: var(--foret, #2F5D3D); text-decoration: underline; cursor: pointer; font: inherit; }
[hidden] { display: none !important; }

.contact-form { display: grid; gap: 8px; margin-top: 20px; }
.contact-form label { font-weight: 600; font-size: .92rem; margin-top: 6px; }
.contact-form textarea, .contact-form input, .contact-form select { font: inherit; padding: 10px 12px; border: 1px solid var(--trait); border-radius: 10px; background: #fff; width: 100%; box-sizing: border-box; }
.erreur-form { background: #F8E9E5; border: 1px solid #E3B8AE; color: #7A2A1C; border-radius: 10px; padding: 10px 14px; }

/* Zones tactiles ≥ 32 px sur écran tactile (listes, tableaux, zoom de la carte). */
@media (pointer: coarse) {
  main li a, .tableau td a { display: inline-block; padding-block: 7px; }
  .maplibregl-ctrl-group button { width: 36px; height: 36px; }
}
