.main-content {
    padding: 0 !important;
    max-width: none !important;
}

.map-page {
    display: flex;
    height: calc(100vh - var(--header-height));
    overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.map-sidebar {
    width: 340px;
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1;
}

.map-sidebar-header {
    padding: 20px 20px 12px;
    border-bottom: 1px solid #f0f0f0;
}

.map-title {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.map-subtitle {
    font-size: 13px;
    color: #888;
}

/* ── Search ──────────────────────────────────────────────── */
.map-search-wrap {
    position: relative;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.map-search-icon {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #999;
    pointer-events: none;
}

.map-search {
    width: 100%;
    padding: 9px 12px 9px 36px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    outline: none;
    transition: border-color 0.2s;
    background: #fafafa;
}

.map-search:focus {
    border-color: #013369;
    background: #fff;
}

/* ── Filters ─────────────────────────────────────────────── */
.map-filters {
    display: flex;
    gap: 6px;
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.map-filter-btn {
    flex: 1;
    padding: 7px 6px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
}

.map-filter-btn:hover {
    border-color: #013369;
    color: #013369;
}

.map-filter-btn.active {
    background: #013369;
    border-color: #013369;
    color: white;
}

/* ── Club list ───────────────────────────────────────────── */
.map-club-list {
    flex: 1;
    overflow-y: auto;
    list-style: none;
    padding: 6px 0;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}

.map-club-list::-webkit-scrollbar { width: 4px; }
.map-club-list::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

.map-club-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid #f7f7f7;
}

.map-club-item:hover,
.map-club-item.active {
    background: #f0f4ff;
}

.map-club-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.map-club-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.map-club-name {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-club-city {
    font-size: 11px;
    color: #888;
}

.map-club-badge {
    font-size: 10px;
    font-weight: 700;
    color: white;
    padding: 3px 7px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Map ─────────────────────────────────────────────────── */
.map-container {
    flex: 1;
    height: 100%;
}

/* ── Leaflet popup override ──────────────────────────────── */
.map-leaflet-popup .leaflet-popup-content-wrapper {
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.map-leaflet-popup .leaflet-popup-content {
    margin: 0;
    width: 240px !important;
}

.map-popup {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
}

.map-popup-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
}

.map-popup-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.map-popup-division {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    width: fit-content;
    margin-bottom: 2px;
}

.map-popup-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-popup-city {
    font-size: 12px;
    color: #888;
}

.map-popup-link {
    font-size: 12px;
    font-weight: 600;
    color: #013369;
    text-decoration: none;
    margin-top: 4px;
    transition: color 0.2s;
}

.map-popup-link:hover {
    color: #D50A0A;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {

    /* Layout : carte plein écran, sidebar en bottom sheet */
    .map-page {
        flex-direction: column;
        position: relative;
    }

    /* La carte prend tout l'espace */
    .map-container {
        position: absolute;
        inset: 0;
        height: 100%;
        z-index: 0;
    }

    /* Sidebar = bottom sheet */
    .map-sidebar {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        max-height: 70%;
        border-right: none;
        border-top: 1px solid #e5e7eb;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
        z-index: 10;
        overflow: hidden;
        transform: translateY(calc(100% - 130px)); /* collapsed : on voit juste le header + filtres */
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* État ouvert */
    .map-sidebar.sheet-open {
        transform: translateY(0);
    }

    /* Poignée de drag en haut du sheet */
    .map-sidebar-header::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        background: #ddd;
        border-radius: 2px;
        margin: 0 auto 12px;
    }

    /* Header plus compact */
    .map-sidebar-header {
        padding: 12px 16px 10px;
        cursor: pointer;
        user-select: none;
    }

    .map-title {
        font-size: 15px;
    }

    /* La liste est scrollable dans le sheet */
    .map-club-list {
        max-height: calc(70vh - 130px);
    }

    /* Bouton flottant "Voir la liste" sur la carte */
    .map-list-fab {
        display: flex;
    }
}

@media (min-width: 769px) {
    .map-list-fab {
        display: none;
    }
}

/* Bouton flottant (FAB) — caché par défaut sur desktop */
.map-list-fab {
    display: none;
    position: absolute;
    bottom: 145px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 11;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #013369;
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s;
}

.map-list-fab:hover {
    background: #01255a;
}

.map-list-fab svg {
    flex-shrink: 0;
}
