/* ============================================ */
/* CARTE DU MONDE - STYLES PREMIUM             */
/* ============================================ */

.world-map-section {
    padding: 100px 0 60px;
    background: var(--bg-primary);
    min-height: 100vh;
    transition: background 0.3s ease;
}

.map-container {
    width: 100%;
    height: 550px;
    max-height: 70vh;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    background: var(--bg-secondary);
    transition: background 0.3s ease, border-color 0.3s ease;
    position: relative;
}

#worldMap {
    width: 100%;
    height: 100%;
}

/* ============================================ */
/* POPUPS PERSONNALISÉS                       */
/* ============================================ */
.leaflet-popup-content-wrapper {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    border: 1px solid var(--border-light) !important;
    box-shadow: var(--shadow-md) !important;
}

.leaflet-popup-tip {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-light) !important;
}

.leaflet-popup-content {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 12px 16px !important;
}

.country-popup .country-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.country-popup .country-detail {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.country-popup .country-detail strong {
    color: var(--text-primary);
}

/* ============================================ */
/* MARQUEURS PERSONNALISÉS                    */
/* ============================================ */
.custom-div-icon {
    background: transparent !important;
    border: none !important;
}

.custom-div-icon div {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.custom-div-icon div:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2) !important;
}

/* ============================================ */
/* FILTRES                                    */
/* ============================================ */
.filter-section {
    margin-bottom: 16px;
}

.filter-btn {
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 2px solid var(--border-light);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: var(--primary-blue);
    color: var(--text-primary);
}

.filter-btn.active {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
    color: #fff;
}

.filter-btn.active[data-type="project"] {
    border-color: #3b82f6;
    background: #3b82f6;
}

.filter-btn.active[data-type="partner"] {
    border-color: #22c55e;
    background: #22c55e;
}

.filter-btn.active[data-type="investment"] {
    border-color: #f59e0b;
    background: #f59e0b;
}

.filter-btn.active[data-type="all"] {
    border-color: var(--primary-blue);
    background: var(--primary-blue);
}

/* ============================================ */
/* LÉGENDE                                    */
/* ============================================ */
.map-legend {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.map-legend .badge {
    width: 14px;
    height: 14px;
    display: inline-block;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

/* ============================================ */
/* ÉTIQUETTES DE CONNEXION                    */
/* ============================================ */
.connection-label {
    background: transparent !important;
    border: none !important;
    pointer-events: none;
}

/* ============================================ */
/* MODE CLAIR                                 */
/* ============================================ */
body[data-theme="light"] .map-container {
    background: #f8fafc;
    border-color: #e2e8f0;
}

body[data-theme="light"] .leaflet-popup-content-wrapper {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

body[data-theme="light"] .leaflet-popup-tip {
    background: #ffffff !important;
    border-color: #e2e8f0 !important;
}

body[data-theme="light"] .filter-btn {
    background: #ffffff;
    border-color: #e2e8f0;
}

body[data-theme="light"] .filter-btn:hover {
    border-color: #3b82f6;
}

/* ============================================ */
/* RESPONSIVE                                 */
/* ============================================ */
@media (max-width: 768px) {
    .world-map-section {
        padding: 80px 0 40px;
    }
    .map-container {
        height: 400px;
        max-height: 60vh;
    }
    .filter-btn {
        padding: 4px 12px;
        font-size: 0.7rem;
    }
}