/* =============================================================
   Collectif des Payeurs — Annuaire Carte  |  carte.css
   ============================================================= */

.cdpa-carte-wrap {
  width: 100%;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid #e5ddd0;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
}

/* ── En-tête ─────────────────────────────────────────────── */
.cdpa-carte-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.cdpa-carte-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a2035;
}

.cdpa-carte-count {
  font-size: 13px;
  font-weight: 500;
  color: #6b7a94;
  background: #f7f2eb;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #e5ddd0;
}

/* ── Carte Leaflet ───────────────────────────────────────── */
.cdpa-carte-map {
  width: 100%;
  height: 460px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e5ddd0;
  background: #f7f2eb;
  z-index:2 !important
}

/* Tuiles légèrement réchauffées pour matcher la palette */
.cdpa-carte-map .leaflet-tile {
  filter: sepia(15%) saturate(0.9) brightness(1.02);
}

/* Contrôles zoom */
.cdpa-carte-map .leaflet-control-zoom {
  border: 1px solid #e5ddd0 !important;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.08) !important;
}

.cdpa-carte-map .leaflet-control-zoom a {
  background: #ffffff !important;
  color: #1a2035 !important;
  border-bottom: 1px solid #e5ddd0 !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  width: 32px !important;
  height: 32px !important;
  line-height: 32px !important;
  transition: background .15s !important;
}

.cdpa-carte-map .leaflet-control-zoom a:hover {
  background: #f7f2eb !important;
  color: #C9A566 !important;
}

.cdpa-carte-map .leaflet-control-zoom-out {
  border-bottom: none !important;
}

/* Attribution */
.cdpa-carte-map .leaflet-control-attribution {
  background: rgba(255,255,255,.75) !important;
  font-size: 10px !important;
  backdrop-filter: blur(4px);
}

/* Points membres */
.cdpa-leaflet-dot {
  transition: opacity .2s;
}

/* ── Popup ───────────────────────────────────────────────── */
.cdpa-carte-popup .leaflet-popup-content-wrapper {
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.14) !important;
  border: 1px solid #e5ddd0 !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  padding: 0 !important;
  overflow: hidden;
}

.cdpa-carte-popup .leaflet-popup-content {
  margin: 0 !important;
  font-size: 13px !important;
  color: #4a5568 !important;
  line-height: 1.5 !important;
  min-width: 180px;
}

/* Contenu texte de la popup */
.cdpa-carte-popup .leaflet-popup-content {
  white-space: pre-line !important;
  font-weight: 600 !important;
  color: #1a1a2e !important;
  padding: 10px 14px !important;
  line-height: 1.6 !important;
}

.cdpa-carte-popup .leaflet-popup-tip-container {
  margin-top: -1px;
}

.cdpa-carte-popup .leaflet-popup-tip {
  background: #ffffff !important;
  box-shadow: none !important;
}

.cdpa-carte-popup .leaflet-popup-close-button {
  color: rgba(255,255,255,.8) !important;
  font-size: 16px !important;
  top: 7px !important;
  right: 8px !important;
}

/* ── Légende ─────────────────────────────────────────────── */
.cdpa-carte-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
  font-size: 12px;
  color: #9aa5bb;
}

.cdpa-carte-dot-demo {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #C9A566;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1.5px #C9A566;
  flex-shrink: 0;
}

/* ── Badge filtre carte actif ────────────────────────────── */
.cdpa-map-filter-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff8ed;
  border: 1.5px solid #C9A566;
  color: #92670a;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.cdpa-map-filter-reset {
  background: none;
  border: none;
  cursor: pointer;
  color: #C9A566;
  font-size: 13px;
  padding: 0;
  line-height: 1;
}

.cdpa-map-filter-reset:hover {
  color: #92670a;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
  .cdpa-carte-wrap {
    padding: 16px 12px;
  }

  .cdpa-carte-map {
    height: 300px;
  }
}
