/* ══════════════════════════════════════════════════════════════
   LDNR — Composant "Carte du centre" (shortcode [ldnr_footer_map])
   Conteneur + surcharge du thème Leaflet (popup, marqueur) pour
   suivre les tokens du site (colors.css) en clair/sombre.
   ══════════════════════════════════════════════════════════════ */

.ldnr-footer-map-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ldnr-footer-map-frame {
  position: relative;
}

.ldnr-footer-map {
  width: 100%;
  height: 260px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--color-nav-border);
  background: var(--color-surface); /* évite un flash blanc pendant le chargement des tuiles */
  box-shadow:
    0 0 60px -12px color-mix(in srgb, var(--color-accent) 45%, transparent),
    0 0 120px -20px color-mix(in srgb, var(--color-accent) 25%, transparent);
  /* Les panneaux internes de Leaflet (contrôles, attribution) montent
     jusqu'à z-index:1000. Sans isolation, ce z-index se compare
     directement à celui du bouton "Google Maps" (sibling) et gagne
     malgré son z-index plus faible. isolate piège tout l'intérieur
     de Leaflet dans son propre contexte d'empilement. */
  isolation: isolate;
}
.ldnr-footer-map .leaflet-container {
  width: 100%;
  height: 100%;
  font-family: var(--font-ui);
  background: var(--color-surface);
}

.ldnr-footer-map__address {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

/* ── Bouton "Ouvrir dans Google Maps" — en overlay haut-droit ──── */
.ldnr-footer-map-frame .ldnr-footer-map__gmaps-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--color-surface) 82%, transparent);
  backdrop-filter: blur(10px) saturate(160%);
  -webkit-backdrop-filter: blur(10px) saturate(160%);
  border: 1px solid color-mix(in srgb, var(--color-accent) 35%, transparent);
  font-family: var(--font-ui);
  font-size: 0.78125rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 18px -6px rgba(0, 0, 0, 0.45);
  transition: background-color 0.3s ease, transform 0.3s ease;
}
/* Verrouille la couleur du texte : certains styles de liens du thème
   parent (footer/widgets) sont plus spécifiques et l'écrasaient. */
.ldnr-footer-map-frame .ldnr-footer-map__gmaps-btn,
.ldnr-footer-map-frame .ldnr-footer-map__gmaps-btn:link,
.ldnr-footer-map-frame .ldnr-footer-map__gmaps-btn:visited {
  color: var(--color-accent) !important;
}
.ldnr-footer-map-frame .ldnr-footer-map__gmaps-btn:hover,
.ldnr-footer-map-frame .ldnr-footer-map__gmaps-btn:focus {
  color: var(--color-accent) !important;
  background: color-mix(in srgb, var(--color-surface) 95%, transparent);
  transform: translateY(-1px);
}

/* ── Label permanent "LDNR" au-dessus du point ───────────────── */
.ldnr-footer-map .ldnr-map-label {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid color-mix(in srgb, var(--color-accent) 35%, transparent);
  border-radius: 999px;
  padding: 4px 10px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.45);
}
.ldnr-footer-map .ldnr-map-label::before {
  border-top-color: color-mix(in srgb, var(--color-accent) 35%, transparent) !important;
}

/* ── Marqueur — pastille pleine teintée en accent ────────────── */
.ldnr-footer-map .ldnr-map-marker {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid var(--color-bg);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-accent) 25%, transparent),
              0 2px 8px rgba(0, 0, 0, 0.35);
}

/* ── Popup — recolorée aux tokens du site ────────────────────── */
.ldnr-footer-map .leaflet-popup-content-wrapper {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-nav-border);
  border-radius: 12px;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.5);
}
.ldnr-footer-map .leaflet-popup-content {
  font-family: var(--font-ui);
  font-size: 0.8125rem;
  margin: 10px 14px;
}
.ldnr-footer-map .leaflet-popup-tip {
  background: var(--color-surface);
  border: 1px solid var(--color-nav-border);
}
.ldnr-footer-map .leaflet-popup-close-button {
  color: var(--color-text-muted) !important;
}

/* ── Contrôles de zoom — restylés en glass léger ─────────────── */
.ldnr-footer-map .leaflet-control-zoom a {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-nav-border) !important;
}
.ldnr-footer-map .leaflet-control-zoom a:hover {
  background: var(--color-nav-hover);
}

/* ── Attribution — discrète, garde le lien requis par CARTO ── */
.ldnr-footer-map .leaflet-control-attribution {
  background: color-mix(in srgb, var(--color-surface) 85%, transparent);
  color: var(--color-text-muted);
  font-size: 9.5px;
}
.ldnr-footer-map .leaflet-control-attribution a {
  color: var(--color-text-muted);
}
