/* ── Carte Leaflet — Nature & Bois v2.0 ─────────────────────────────────────
   Template page-carte.php — fond CartoDB Positron, marqueurs SVG verts custom
──────────────────────────────────────────────────────────────────────────── */

/* ── 1. Hero ────────────────────────────────────────────────────────────── */

.nb-carte-hero::before {
    opacity: 0.32;
}

/* ── 2. Section carte ───────────────────────────────────────────────────── */

.nb-carte-wrap {
    background: #f4f6f1;
    padding: 0 0 4rem;
}

/* Compteur installations */
.nb-carte-compteur {
    text-align: center;
    padding: 2.5rem 1rem 1.5rem;
    font-size: .9rem;
    color: #5a6e5a;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.nb-carte-compteur strong {
    font-size: 2.2rem;
    font-weight: 800;
    color: #2d6a2d;
    display: block;
    line-height: 1;
    margin-bottom: .2rem;
    letter-spacing: -.02em;
}

/* Carte elle-même */
.nb-carte-frame-outer {
    position: relative;
    max-width: 1380px;
    margin: 0 auto;
    box-shadow:
        0 2px 4px rgba(0,0,0,.06),
        0 8px 32px rgba(0,0,0,.10);
}

#nb-carte {
    width: 100%;
    height: 600px;
    display: block;
    background: #e8ede8;
}

.nb-carte-legende {
    display: flex;
    align-items: center;
    gap: .55rem;
    justify-content: center;
    font-size: .82rem;
    color: #6b7a6b;
    margin-top: 1.25rem;
    padding: 0 1.5rem;
    text-align: center;
}

/* ── 3. Popup Leaflet ───────────────────────────────────────────────────── */

/* Override Leaflet popup styles */
.nb-leaflet-popup .leaflet-popup-content-wrapper {
    border-radius: 10px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,.14);
    overflow: hidden;
}

.nb-leaflet-popup .leaflet-popup-content {
    margin: 0;
    min-width: 180px;
}

.nb-leaflet-popup .leaflet-popup-tip {
    background: #fff;
}

.nb-popup {
    font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.nb-popup-body {
    padding: 14px 16px 16px;
}

.nb-popup-badge-wrap {
    margin-bottom: 6px;
}

.nb-popup-badge {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: #e8f0e8;
    color: #2d6a2d;
    border-radius: 3px;
    padding: 2px 7px;
}

.nb-popup-badge--visite {
    background: #e8f5e9;
    color: #1b5e20;
}

.nb-popup-titre {
    display: block;
    font-size: .92rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.35;
}

/* ── 4. Légende contrôle Leaflet ────────────────────────────────────────── */

.nb-carte-legend-ctrl {
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(6px);
    border-radius: 8px;
    padding: 10px 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,.10);
    font-family: system-ui, -apple-system, sans-serif;
    font-size: .8rem;
    color: #333;
}

.nb-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

.nb-legend-item + .nb-legend-item {
    margin-top: 8px;
}

.nb-legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.nb-legend-dot--real   { background: #2d6a2d; }
.nb-legend-dot--visite { background: #4a9e4a; }

/* ── 5. Responsive ──────────────────────────────────────────────────────── */

@media (min-width: 900px) {
    .nb-carte-frame-outer {
        border-radius: 12px;
        margin-left: 2rem;
        margin-right: 2rem;
        overflow: hidden;
    }
}

@media (max-width: 640px) {
    #nb-carte { height: 460px; }
}
