/* Cartes reliées (lot 5) — sélecteur commun et habillage partagé. Jetons --lc-* / --ll-* uniquement. */
.lc-switch { display: flex; gap: 8px; margin: 0 auto 12px; max-width: 520px; padding: 0 8px; box-sizing: border-box; }
.lc-switch__tab {
  flex: 1 1 0; min-width: 0; min-height: 44px; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 8px; border-radius: var(--ll-radius, 12px); text-decoration: none; text-align: center; line-height: 1.2;
  background: var(--lc-ardoise-bg); color: var(--lc-ardoise-ink); border: 2px solid transparent; font-weight: 500;
  overflow-wrap: anywhere; hyphens: auto;
}
.lc-switch__tab--lieux.is-active { background: var(--lc-foret); color: var(--lc-foret-on); }
.lc-switch__tab--cueillette.is-active { background: var(--lc-feuille); color: var(--lc-feuille-on); }
/* L'onglet actif n'est pas marqué par la seule couleur : graisse + contour */
.lc-switch__tab.is-active { font-weight: 700; border-color: currentColor; }
.lc-switch__tab:focus-visible { outline: 3px solid var(--lc-or); outline-offset: 2px; }
.lc-switch__icon { flex: 0 0 auto; }
@media (max-width: 380px) { .lc-switch__icon { display: none; } }

/* Sous 900 px la carte occupe tout l'écran et la colonne devient une feuille du bas : le sélecteur flotte alors au-dessus de la carte, en haut. */
@media (max-width: 899px) {
  .lbted > .lc-switch { position: absolute; top: 8px; left: 0; right: 0; z-index: 1001; margin: 0 auto; max-width: 420px; }
  .lbted > .lc-switch .lc-switch__tab { box-shadow: var(--ll-shadow-2); }
}
.lbted-wrap .lc-switch .lc-switch__tab, .lbted-wrap .lc-switch .lc-switch__tab:hover, .lbted-wrap .lc-switch .lc-switch__tab:visited, .lc-switch .lc-switch__tab { text-decoration: none; }
.lbted-wrap .lbted .lc-switch__tab .lc-switch__label { text-decoration: none; }

/* Carte plein écran du mobile : la recherche, le compteur et les filtres actifs flottent aussi en haut ; ils descendent sous le sélecteur au lieu d'être recouverts. */
@media (max-width: 899px) {
  html.lbted-fs .lbted:has(> .lc-switch) .lbted-actions { top: 72px; }
  html.lbted-fs .lbted:has(> .lc-switch) .lbted-pill,
  html.lbted-fs .lbted:has(> .lc-switch) .lbted-active { top: 124px; }
}

/* ───────────────────────── Habillage commun `.lc-*` (tâche 2) ─────────────────────────
   Réécrit à neuf d'après la colonne de la Cueillette (refaite le 15/11), mêmes valeurs visuelles.
   Utilisé par /carte/ (tâche 3). La Cueillette garde ses propres règles `lbted-*` : doublon assumé jusqu'au lot 11.
   Ordinateur (≥ 900 px) : colonne de 360 px + carte. En dessous : carte pleine largeur, panneau en feuille du bas. */
.lc-shell { position: relative; display: block; width: 100%; box-sizing: border-box; background: var(--ll-cream); color: var(--ll-text); }
.lc-col { box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; padding: 12px 14px 20px; background: var(--ll-cream); }
.lc-mapbox { position: relative; min-height: 320px; z-index: 0; }

.lc-search { width: 100%; box-sizing: border-box; min-height: 46px; padding: .7rem 1rem; font: inherit; color: var(--ll-text); background: var(--ll-cream); border: 1px solid var(--ll-border); border-radius: var(--ll-r-md); }
.lc-search:focus-visible { outline: 3px solid var(--lc-or); outline-offset: 2px; }

.lc-bar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.lc-filterbtn, .lc-more, .lc-back { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .3rem; padding: 0 .9rem; font: 600 .95rem var(--ll-font-title); color: var(--ll-green); background: var(--ll-white); border: 1.5px solid var(--ll-green); border-radius: var(--ll-r-md); cursor: pointer; }
.lc-filterbtn { flex: 1 1 auto; }
.lc-filterbtn[aria-expanded="true"] { background: var(--ll-green); color: var(--ll-white); }
.lc-filterbtn__n { display: inline-grid; place-items: center; min-width: 1.4em; height: 1.4em; padding: 0 .35em; border-radius: var(--ll-r-pill); background: var(--ll-earth); color: var(--ll-white); font-size: .8rem; }
.lc-filterbtn__n:empty { display: none; }
.lc-more { flex: 0 0 auto; }
.lc-filterbtn:focus-visible, .lc-more:focus-visible, .lc-back:focus-visible, .lc-item:focus-visible { outline: 3px solid var(--lc-or); outline-offset: 2px; }

.lc-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0 0 8px; padding: 0; list-style: none; }
.lc-chips:empty { display: none; }
.lc-chip { min-height: 44px; display: inline-flex; align-items: center; gap: .4rem; padding: 0 .8rem; font: 600 .9rem var(--ll-font-title); color: var(--ll-green); background: var(--ll-white); border: 1px solid var(--ll-border); border-radius: var(--ll-r-pill); cursor: pointer; }
.lc-chip:focus-visible { outline: 3px solid var(--lc-or); outline-offset: 2px; }

.lc-list { margin: 0; padding: 0; list-style: none; overflow: auto; }
.lc-item { display: block; width: 100%; box-sizing: border-box; padding: .7rem .9rem; margin: 0 0 .5rem; text-align: start; font: inherit; color: var(--ll-text); background: var(--ll-white); border: 1px solid var(--ll-border); border-radius: var(--ll-r-md); box-shadow: var(--ll-shadow-1); cursor: pointer; }
.lc-item:hover { background: var(--ll-light); }
.lc-item[aria-current="true"] { border-color: var(--ll-green); }

.lc-drawer { box-sizing: border-box; padding: 1rem; background: var(--ll-white); border: 1px solid var(--ll-border); border-radius: var(--ll-r-md); box-shadow: var(--ll-shadow-1); }
.lc-drawer[hidden] { display: none; }
.lc-back { margin: 0 0 .6rem; border-color: var(--ll-border); border-radius: var(--ll-r-pill); }
.lc-back:hover { background: var(--ll-light); }

@media (min-width: 900px) {
  .lc-shell { display: grid; grid-template-columns: 360px minmax(0, 1fr); height: 100%; }
  .lc-col { height: 100%; overflow-y: auto; border-inline-end: 1px solid var(--ll-border); scrollbar-gutter: stable; }
  .lc-mapbox { height: 100%; min-height: 0; }
}
@media (max-width: 899px) {
  .lc-shell { height: 100%; }
  .lc-mapbox { position: absolute; inset: 0; }
  /* Panneau (liste ou fiche) en feuille du bas */
  .lc-col { position: absolute; left: 0; right: 0; bottom: 0; z-index: 700; max-height: 62%; overflow-y: auto; border-radius: var(--ll-r-md) var(--ll-r-md) 0 0; box-shadow: var(--ll-shadow-2); }
}

/* Aperçu du visiteur par mailles (tâche 4) : cercles proportionnels au nombre, par palier ; le chiffre reste lisible (contraste ≥ 4,5:1). */
.lc-cell { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; box-sizing: border-box; background: var(--lc-feuille-bg); color: var(--lc-feuille-ink); border: 3px solid var(--lc-feuille); font: 700 .85rem/1 var(--ll-font-title); cursor: pointer; }
.lc-cell--2 { background: var(--lc-or-bg); color: var(--lc-or-ink); border-color: var(--lc-or); }
.lc-cell--3 { background: var(--lc-ambre-bg); color: var(--lc-ambre-ink); border-color: var(--lc-ambre); }
.lc-cell--4 { background: var(--lc-brique-bg); color: var(--lc-brique-ink); border-color: var(--lc-brique); font-size: .95rem; }
.leaflet-marker-icon:focus-visible .lc-cell { outline: 3px solid var(--lc-ardoise-ink); outline-offset: 2px; }

/* /carte/ (tâche 3) : sélecteur en tête du panneau gauche sur ordinateur ; flottant sur mobile, la recherche descend dessous. */
#lm-side > .lc-switch { margin: 0 0 8px; max-width: none; padding: 0; }
@media (max-width: 768px) {
  #liberta-map-wrap > .lc-switch { position: absolute; top: 8px; left: 0; right: 0; z-index: 1001; margin: 0 auto; max-width: 420px; }
  #liberta-map-wrap > .lc-switch .lc-switch__tab { box-shadow: var(--ll-shadow-2); }
  #liberta-map-wrap:has(> .lc-switch) .lm-map-search { top: 72px; }
}
#liberta-map-wrap .lc-switch .lc-switch__tab, #lm-side .lc-switch .lc-switch__tab, #liberta-map-wrap .lc-switch .lc-switch__tab:hover, #lm-side .lc-switch .lc-switch__tab:hover { text-decoration: none; }
