/* La carte interactive des sites (bloc « Carte interactive des sites »).
   Deux colonnes : à gauche le choix d'un site et sa fiche, à droite la carte ; l'une
   sous l'autre quand le bloc est étroit. Les sites au vert de l'association, celui que
   l'on regarde en orange. */
.ana-carte-bloc { container-type: inline-size; margin: 1.25rem 0 2rem; }
.ana-carte {
  /* Les couleurs du site, en dur, comme pour « Sites en chiffres ». */
  --vert: #3e9645;
  --vert-fonce: #2f7a36;
  --choisi: #d4621a;
  --encre: #1a2b38;
  --encre-2: #5a6e68;
  --fond: #f4f8f4;
  --filet: #e1e0d9;
  --menacee: #c62828;
  display: grid;
  grid-template-columns: minmax(15rem, 2fr) 3fr;
  height: var(--ana-carte-hauteur, 640px);
  max-height: 85vh;
  min-height: 460px;
  border: 1px solid var(--filet);
  border-radius: 10px;
  overflow: hidden;
  color: var(--encre);
  background: #fff;
}
.ana-carte [hidden] { display: none !important; }

/* La carte, à droite */
.ana-carte-cadre { position: relative; min-height: 0; background: var(--fond); }
.ana-carte-fond { position: absolute; inset: 0; z-index: 0; }
.ana-carte-fond:focus-visible { outline: 3px solid var(--vert-fonce); outline-offset: -3px; }
.ana-carte .leaflet-container { font: inherit; background: var(--fond); }

.ana-carte-visuellement-cache {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Le panneau, à gauche : il défile seul quand la fiche est longue */
.ana-carte-panneau {
  position: relative; min-height: 0; overflow-y: auto; padding: 1rem 1rem 1.25rem;
  border-right: 1px solid var(--filet);
}
.ana-carte-choix { display: flex; align-items: center; gap: .4rem; }
.ana-carte-choix select {
  flex: 1 1 auto; min-width: 0;
  padding: .45rem .6rem; border: 1px solid #c9cfc9; border-radius: 6px;
  background: #fff; color: var(--encre); font: inherit; font-size: .9rem;
}
.ana-carte button {
  background: none; border: 0; box-shadow: none; color: inherit; font: inherit;
  letter-spacing: normal; text-transform: none; min-height: 0; padding: 0; cursor: pointer;
}
.ana-carte button:focus-visible, .ana-carte select:focus-visible { outline: 2px solid var(--vert-fonce); outline-offset: 2px; }
.ana-carte .ana-carte-fermer {
  flex: none; width: 2rem; height: 2rem; border-radius: 50%;
  font-size: 1rem; line-height: 2rem; text-align: center; color: var(--encre-2);
}
.ana-carte .ana-carte-fermer:hover { background: var(--fond); color: var(--encre); }
.ana-carte .ana-carte-invite { margin: .6rem 0 0; font-size: .85rem; color: var(--encre-2); }

/* Tous les sites, sous l'invite, tant qu'aucun n'est choisi : un nom par ligne, ses communes dessous. */
.ana-carte ul.ana-carte-sites { margin: .6rem 0 0; padding: 0; list-style: none; border-top: 1px solid var(--filet); }
.ana-carte ul.ana-carte-sites li { margin: 0; border-bottom: 1px solid var(--filet); }
.ana-carte .ana-carte-sites button {
  display: block; width: 100%; padding: .45rem .35rem; text-align: left;
  font-size: .88rem; font-weight: 600; line-height: 1.3; color: var(--vert-fonce);
}
.ana-carte .ana-carte-sites button:hover { background: var(--fond); }
.ana-carte .ana-carte-sites button:focus-visible { background: var(--fond); outline-offset: -2px; }
.ana-carte .ana-carte-sites small { display: block; font-size: .75rem; font-weight: 400; color: var(--encre-2); }

/* La fiche d'un site, sous le choix */
.ana-carte .ana-carte-fiche { margin-top: 1rem; }
.ana-carte .ana-carte-milieu {
  display: inline-block; margin: 0 0 .35rem; padding: .1rem .55rem; border-radius: 999px;
  background: var(--fond); color: var(--vert-fonce); font-size: .78rem; font-weight: 600;
}
.ana-carte .ana-carte-nom { margin: 0; font-size: 1.15rem; line-height: 1.25; }
.ana-carte .ana-carte-communes { margin: .25rem 0 0; font-size: .85rem; color: var(--encre-2); }
/* L'accessibilité : une pastille par accès ; le signe dit l'état, le texte le dit aussi. */
.ana-carte ul.ana-carte-acces { display: flex; flex-wrap: wrap; gap: .35rem; margin: .6rem 0 0; padding: 0; list-style: none; }
.ana-carte ul.ana-carte-acces li {
  margin: 0; padding: .15rem .6rem .15rem .5rem; border-radius: 999px;
  background: var(--fond); color: var(--encre); font-size: .78rem; font-weight: 500; line-height: 1.4;
}
.ana-carte-acces li::before { content: "✓" / ""; margin-right: .3rem; font-weight: 700; color: var(--vert-fonce); }
.ana-carte-acces li.ana-carte-acces--partiel::before { content: "◐" / ""; color: #a8460d; }
.ana-carte-acces li.ana-carte-acces--non::before { content: "✕" / ""; color: #9b2c1f; }
/* « ul. » : plus précis que les marges des listes du contenu. */
.ana-carte ul.ana-carte-indicateurs {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .4rem;
  margin: .8rem 0 0; padding: 0; list-style: none;
}
.ana-carte ul.ana-carte-indicateurs li {
  display: flex; flex-direction: column; margin: 0; padding: .5rem .55rem .55rem;
  background: var(--fond); border-radius: 8px;
}
.ana-carte-valeur { font-size: 1.25rem; font-weight: 600; line-height: 1.15; }
.ana-carte-libelle { font-size: .75rem; font-weight: 500; line-height: 1.25; color: var(--encre-2); }
.ana-carte .ana-carte-description {
  margin: .8rem 0 0; font-size: .88rem; line-height: 1.5; white-space: pre-line;
  display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}
.ana-carte .ana-carte-description.ana-carte-entiere { display: block; -webkit-line-clamp: unset; }
.ana-carte .ana-carte-suite,
.ana-carte .ana-carte-voir {
  display: block; margin-top: .3rem; font-size: .85rem; font-weight: 600; color: var(--vert-fonce); text-decoration: underline;
}
.ana-carte .ana-carte-voir { margin-top: .9rem; }

/* Les pages et les actualités sur le site : deux listes dépliables. */
.ana-carte .ana-carte-liens { margin-top: .7rem; border-top: 1px solid var(--filet); padding-top: .55rem; }
.ana-carte .ana-carte-liens + .ana-carte-liens { margin-top: .4rem; }
.ana-carte .ana-carte-liens summary {
  cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--vert-fonce);
}
.ana-carte .ana-carte-liens-nombre { font-weight: 500; color: var(--encre-2); }
.ana-carte .ana-carte-liens ul { margin: .45rem 0 0; padding: 0; list-style: none; font-size: .85rem; }
.ana-carte .ana-carte-liens li { margin: 0 0 .35rem; line-height: 1.35; }
.ana-carte .ana-carte-liens a {
  color: var(--vert-fonce); text-decoration: underline; text-decoration-color: rgba(47, 122, 54, .35);
  text-underline-offset: 2px;
}
.ana-carte .ana-carte-liens small { display: block; font-size: .72rem; color: var(--encre-2); }

/* Les espèces du site : une recherche, les groupes, la liste du groupe choisi */
.ana-carte .ana-carte-especes { margin-top: .6rem; }
.ana-carte .ana-carte-cherche {
  width: 100%; padding: .4rem .6rem; border: 1px solid #c9cfc9; border-radius: 6px;
  background: #fff; color: var(--encre); font: inherit; font-size: .85rem;
}
.ana-carte .ana-carte-cherche:focus-visible { outline: 2px solid var(--vert-fonce); outline-offset: 2px; }
.ana-carte-groupes { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .55rem; }
.ana-carte .ana-carte-groupe {
  padding: .2rem .65rem; border: 1px solid var(--filet); border-radius: 999px;
  background: #fff; font-size: .8rem; line-height: 1.4;
}
.ana-carte .ana-carte-groupe:hover { border-color: var(--vert); }
.ana-carte .ana-carte-groupe[aria-pressed="true"] { background: var(--vert-fonce); border-color: var(--vert-fonce); color: #fff; }
.ana-carte .ana-carte-groupe span { color: var(--encre-2); }
.ana-carte .ana-carte-groupe[aria-pressed="true"] span { color: inherit; opacity: .85; }
.ana-carte ul.ana-carte-liste { margin: .7rem 0 0; padding: 0; list-style: none; font-size: .85rem; }
.ana-carte ul.ana-carte-liste li { margin: 0 0 .3rem; line-height: 1.35; }
.ana-carte .ana-carte-liste i { color: var(--encre-2); }
.ana-carte .ana-carte-liste small { display: block; font-size: .72rem; color: var(--encre-2); }
.ana-carte .ana-carte-aucune { margin: .6rem 0 0; font-size: .85rem; color: var(--encre-2); }

/* Le nom d'un site au survol */
.ana-carte .leaflet-tooltip.ana-carte-bulle {
  padding: .2rem .5rem; border: 0; border-radius: 6px; box-shadow: 0 1px 6px rgba(26, 43, 56, .25);
  font-size: .82rem; font-weight: 600; color: var(--encre);
}

/* Bloc étroit (téléphone) : le choix, la carte, puis la fiche, l'un sous l'autre. */
@container (max-width: 560px) {
  .ana-carte { display: flex; flex-direction: column; height: auto; max-height: none; min-height: 0; }
  .ana-carte-panneau { display: contents; }
  .ana-carte-choix, .ana-carte .ana-carte-invite { order: 1; margin-left: .75rem; margin-right: .75rem; }
  .ana-carte-choix { margin-top: .75rem; margin-bottom: .75rem; }
  .ana-carte .ana-carte-invite { margin-top: -.25rem; margin-bottom: .75rem; }
  .ana-carte-cadre { order: 2; height: 62vh; border-top: 1px solid var(--filet); }
  .ana-carte .ana-carte-fiche { order: 3; margin: 0; padding: 1rem .75rem 1.25rem; border-top: 1px solid var(--filet); }
  /* La liste des sites sous la carte, comme la fiche qui la remplace. */
  .ana-carte ul.ana-carte-sites { order: 3; margin: 0; padding: .25rem .75rem 1rem; border-top: 1px solid var(--filet); }
}

/* Dans « Sites en chiffres » (option carte), sous son intertitre. */
.ana-sites-sur-la-carte .ana-carte-bloc { margin: .75rem 0 0; }

/* Chaque espèce de la liste : un lien vers sa fiche (Biodiv'Occitanie). */
.ana-carte .ana-carte-source-especes { margin: .4rem 0 0; font-size: .75rem; color: var(--encre-2); }
/* Une espèce menacée : un astérisque rouge ; son sens, en toutes lettres, pour les lecteurs d'écran. */
.ana-carte .ana-menacee { color: var(--menacee); font-weight: 700; margin-left: .15em; cursor: help; }
.ana-carte .ana-menacee-texte { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ana-carte .ana-carte-legende { margin: .6rem 0 0; font-size: .75rem; color: var(--encre-2); }
.ana-carte .ana-carte-legende .ana-menacee { margin: 0; }
.ana-carte .ana-carte-source-especes a { color: inherit; }
/* Des liens qui se voient, au doigt comme à la souris : vert du site, soulignés. */
.ana-carte .ana-carte-liste a {
  color: var(--vert-fonce); text-decoration: underline; text-decoration-color: rgba(47, 122, 54, .35);
  text-underline-offset: 2px;
}
.ana-carte .ana-carte-liste a:hover, .ana-carte .ana-carte-liste a:focus-visible { text-decoration-color: currentColor; }
