/* ============================================================
   ALLUME UN CIERGE — Surcharges Leaflet (thème sombre)
   ============================================================ */

/* ── Conteneur carte ─────────────────────────────────────── */
#leaflet-map {
  width: 100%;
  height: 55vh;
  background: var(--noir-soft);
  border-radius: 0;
}

/* Carte plein modal */
.modal-map #leaflet-map {
  height: calc(100% - 4px);
  flex: 1;
}

/* ── Tiles — pas de surcharge de couleur (on garde OSM) ─── */
.leaflet-container {
  background: #1a1a2a;
  font-family: var(--font-sans);
}

/* ── Popups ──────────────────────────────────────────────── */
.leaflet-popup-content-wrapper {
  background: var(--noir-card) !important;
  border: 1px solid var(--noir-border) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-md) !important;
  color: var(--blanc) !important;
  padding: 0 !important;
}

.leaflet-popup-content {
  margin: 0 !important;
  padding: var(--space-md) !important;
  min-width: 180px;
}

.leaflet-popup-tip-container { display: none; }

.leaflet-popup-close-button {
  color: var(--gris) !important;
  top: 8px !important;
  right: 8px !important;
  font-size: 16px !important;
  padding: 0 !important;
}

/* Contenu popup custom */
.map-popup__name {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  color: var(--blanc);
  margin-bottom: 4px;
  padding-right: 16px;
}

.map-popup__type {
  font-size: 0.75rem;
  color: var(--gris);
  margin-bottom: var(--space-sm);
}

.map-popup__distance {
  font-size: 0.78rem;
  color: var(--or);
  margin-bottom: var(--space-sm);
}

.map-popup__cierges {
  font-size: 0.75rem;
  color: var(--gris);
  margin-bottom: var(--space-sm);
}

.map-popup__btn {
  display: block;
  width: 100%;
  padding: 8px;
  background: var(--or);
  color: var(--noir);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background var(--transition);
}

.map-popup__btn:hover { background: var(--or-light); }

/* ── Marqueurs custom ────────────────────────────────────── */
.marker-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: var(--shadow-sm);
  border: 2px solid rgba(255,255,255,0.15);
}

.marker-icon span {
  transform: rotate(45deg);
  font-size: 1rem;
  line-height: 1;
}

.marker-icon--eglise     { background: #7a5c20; }
.marker-icon--chapelle   { background: #6a4e18; }
.marker-icon--grotte     { background: #3a3a5a; }
.marker-icon--sanctuaire { background: #7a5c20; }
.marker-icon--oratoire   { background: #5a4a30; }
.marker-icon--default    { background: var(--or-dark); }

/* ── Cluster ─────────────────────────────────────────────── */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background: rgba(201, 168, 76, 0.2) !important;
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  background: rgba(201, 168, 76, 0.7) !important;
  color: var(--noir) !important;
  font-weight: 700;
  font-size: 0.8rem;
}

/* ── Contrôles zoom ──────────────────────────────────────── */
.leaflet-control-zoom {
  border: none !important;
  box-shadow: none !important;
}

.leaflet-control-zoom a {
  background: var(--noir-card) !important;
  border: 1px solid var(--noir-border) !important;
  color: var(--blanc) !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 30px !important;
}

.leaflet-control-zoom a:hover {
  background: var(--noir-soft) !important;
  color: var(--or) !important;
}

.leaflet-control-zoom-in  { border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important; }
.leaflet-control-zoom-out { border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important; }

/* ── Attribution ─────────────────────────────────────────── */
.leaflet-control-attribution {
  background: rgba(13,13,13,0.8) !important;
  color: var(--gris) !important;
  font-size: 10px !important;
}

.leaflet-control-attribution a { color: var(--gris) !important; }

/* ── Filtres carte ───────────────────────────────────────── */
.map-filters {
  display: flex;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--noir-border);
  background: var(--noir-soft);
}

.map-filters::-webkit-scrollbar { display: none; }

.filter-chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--noir-card);
  border: 1px solid var(--noir-border);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  color: var(--gris);
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.filter-chip:hover { border-color: var(--gris-clair); color: var(--blanc); }

.filter-chip.active {
  background: var(--or-glow-soft);
  border-color: var(--or);
  color: var(--or);
}
