/* ═══════════════════════════════════════════════════════════════
   HOMEPAGE.CSS — Page d'accueil Carte Interactive
   ═══════════════════════════════════════════════════════════════
   Fichier dédié, cacheable. Remplace TOUT le <style> inline.
   Chargé APRÈS style.css et bite-theme.css.
   ═══════════════════════════════════════════════════════════════ */


/* ═══════════════════════════════════════════════════════════════
   1. LEAFLET ATTRIBUTION — Géré par Section 11 (Map Controls Grid)
   ═══════════════════════════════════════════════════════════════ */
/* (Styles déplacés vers section 11 pour centralisation) */


/* ═══════════════════════════════════════════════════════════════
   2. HEADER USER BUTTON — Bouton icône unifié
   ═══════════════════════════════════════════════════════════════ */

.header-user-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
    text-decoration: none;
    flex-shrink: 0;
}

.header-user-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
    color: #10b981;
}


/* ═══════════════════════════════════════════════════════════════
   3. USER DROPDOWN — Menu contextuel utilisateur
   ═══════════════════════════════════════════════════════════════ */

.user-avatar-container {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    animation: ddSlideUp 0.2s ease-out;
}

.user-dropdown.active {
    display: flex;
}

.user-dropdown a {
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.user-dropdown a:hover {
    background: #f8fafc;
}

.user-dropdown a i {
    width: 18px;
    text-align: center;
    color: #64748b;
}

.user-dropdown .logout-link {
    border-top: 1px solid #e2e8f0;
    color: #ef4444;
}

.user-dropdown .logout-link:hover {
    background: rgba(239, 68, 68, 0.05);
}

.user-dropdown .logout-link i {
    color: #ef4444;
}


/* ═══════════════════════════════════════════════════════════════
   4. AUTH MODAL — Modale connexion / inscription
   ═══════════════════════════════════════════════════════════════ */

.auth-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 10px;
    margin-right: auto;
}

.tab-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    background: #fff;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.tab-btn:hover:not(.active) {
    color: #333;
}

.tab-btn.pro-tab.active {
    color: #f59e0b;
}

.auth-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-tab-content.active {
    display: block;
}

.pro-warning {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    gap: 12px;
}

.pro-warning i {
    color: #f59e0b;
    margin-top: 3px;
}

.pro-warning p {
    font-size: 13px;
    color: #92400e;
    margin: 0;
    line-height: 1.4;
}


/* ═══════════════════════════════════════════════════════════════
   5. MODAL BASE — Structure générique modale
   ═══════════════════════════════════════════════════════════════ */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #fefefe;
    padding: 0;
    border: 1px solid #e2e8f0;
    width: 90%;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideUp 0.3s ease-out;
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #64748b;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #333;
}

.modal-body {
    padding: 24px;
}


/* ═══════════════════════════════════════════════════════════════
   6. ANIMATIONS — Keyframes partagés
   ═══════════════════════════════════════════════════════════════ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ddSlideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ═══════════════════════════════════════════════════════════════
   7. DARK MODE — Overrides Frontend complets
   ═══════════════════════════════════════════════════════════════ */

/* Header Desktop */
[data-theme="dark"] .header {
    background: #1a1d27;
    border-bottom-color: #2a2e42;
}

/* Hover coloré titre — Dark Mode */
[data-theme="dark"] .logo-container:hover .logo-text h1 {
    background: linear-gradient(135deg, #a78bfa, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    [data-theme="dark"] .logo-container {
        background: #1a1d27;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
}

[data-theme="dark"] .logo-text h1 {
    color: #e4e6f0;
}

[data-theme="dark"] .logo-text p {
    color: #6b7094;
}

[data-theme="dark"] .logo-icon i {
    color: #e4e6f0;
}

/* Header User Btn dark */
[data-theme="dark"] .header-user-btn {
    background: #1e2130;
    border-color: #353a52;
    color: #e4e6f0;
}

[data-theme="dark"] .header-user-btn:hover {
    background: #252940;
    border-color: #10b981;
    color: #10b981;
}

/* Auth Button dark */
[data-theme="dark"] .btn-auth {
    background: #252940;
    color: #e4e6f0;
    border: 1px solid #353a52;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .btn-auth:hover {
    background: #353a52;
}

/* User Avatar dark */
[data-theme="dark"] .user-avatar {
    background: #252940;
    color: #e4e6f0;
    border-color: #353a52;
}

[data-theme="dark"] .user-avatar:hover {
    border-color: #10b981;
    background: rgba(43, 196, 138, 0.08);
}

/* User Dropdown dark */
[data-theme="dark"] .user-dropdown {
    background: #1e2130;
    border-color: #2a2e42;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .user-dropdown a {
    color: #e4e6f0;
}

[data-theme="dark"] .user-dropdown a:hover {
    background: #252940;
    color: #e4e6f0;
}

[data-theme="dark"] .user-dropdown .logout-link {
    border-top-color: #2a2e42;
    color: #f56565;
}

/* Auth Modal dark */
[data-theme="dark"] .auth-modal-content {
    background: #1e2130;
    border-color: #2a2e42;
}

[data-theme="dark"] .modal-header {
    border-bottom-color: #2a2e42;
}

[data-theme="dark"] .auth-tabs {
    background: #1a1d27;
}

[data-theme="dark"] .tab-btn {
    color: #6b7094;
}

[data-theme="dark"] .tab-btn.active {
    background: #1e2130;
    color: #e4e6f0;
}

[data-theme="dark"] .tab-btn:hover:not(.active) {
    color: #a0a4b8;
}

[data-theme="dark"] .tab-btn.pro-tab {
    background: rgba(245, 101, 101, 0.08);
    color: #f88b8b;
}

[data-theme="dark"] .tab-btn.pro-tab.active {
    background: #1e2130;
    color: #f88b8b;
}

[data-theme="dark"] .close-modal {
    color: #6b7094;
}

[data-theme="dark"] .close-modal:hover {
    color: #e4e6f0;
}

[data-theme="dark"] .modal-body {
    background: #1e2130;
}

[data-theme="dark"] .modal-content {
    background: #1e2130;
    border-color: #353a52;
}

[data-theme="dark"] .modal-close:hover {
    background: #353a52;
    color: #fff;
}

/* Forms dark */
[data-theme="dark"] .form-group label {
    color: #c8cad6;
}

[data-theme="dark"] .form-group label i {
    color: #6b7094;
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background: #252940;
    border-color: #353a52;
    color: #e4e6f0;
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(43, 196, 138, 0.12);
}

[data-theme="dark"] .form-group input::placeholder,
[data-theme="dark"] .form-group textarea::placeholder {
    color: #6b7094;
}

/* Pro Warning dark */
[data-theme="dark"] .pro-warning {
    background: rgba(245, 101, 101, 0.08);
    border-left-color: #f56565;
}

[data-theme="dark"] .pro-warning i {
    color: #f88b8b;
}

[data-theme="dark"] .pro-warning p {
    color: #f88b8b;
}



/* Popups carte dark */
[data-theme="dark"] .popup-card {
    background: #1e2130;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .popup-body {
    background: #1e2130;
}

[data-theme="dark"] .popup-address {
    background: #252940;
    border-color: #2a2e42;
    color: #a0a4b8;
}

[data-theme="dark"] .popup-address:hover {
    background: #2a2e42;
}

[data-theme="dark"] .popup-sm-btn {
    background: #252940;
    color: #a0a4b8;
}

[data-theme="dark"] .popup-sm-btn:hover {
    background: #2a2e42;
    color: #e4e6f0;
}

[data-theme="dark"] .popup-claim {
    border-top-color: #2a2e42;
}

[data-theme="dark"] .popup-claim button {
    color: #6b7094;
}

[data-theme="dark"] .popup-pill.success {
    background: rgba(43, 196, 138, 0.12);
    color: #5dd9a8;
}

[data-theme="dark"] .popup-pill.info {
    background: rgba(43, 196, 138, 0.08);
    color: #5dd9a8;
}

/* Leaflet Controls dark */
[data-theme="dark"] .leaflet-control-zoom a {
    background: #1e2130 !important;
    color: #a0a4b8 !important;
    border-bottom-color: #2a2e42 !important;
}

[data-theme="dark"] .leaflet-control-zoom a:hover {
    background: #252940 !important;
    color: #10b981 !important;
}

[data-theme="dark"] .leaflet-control-custom,
[data-theme="dark"] .lc-btn {
    background: #1e2130 !important;
    color: #a0a4b8 !important;
}

[data-theme="dark"] .leaflet-control-custom:hover,
[data-theme="dark"] .lc-btn:hover {
    background: #252940 !important;
}

[data-theme="dark"] .leaflet-control-attribution {
    background: rgba(15, 17, 23, 0.85) !important;
    color: #6b7094 !important;
}

[data-theme="dark"] .leaflet-control-attribution a {
    color: #10b981 !important;
}

/* Version Badge dark */
[data-theme="dark"] .logo-container .badge {
    background: rgba(43, 196, 138, 0.12) !important;
    color: #5dd9a8 !important;
    border-color: rgba(43, 196, 138, 0.25) !important;
}


/* ═══════════════════════════════════════════════════════════════
   8. DARK MODE — Mobile overrides
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    [data-theme="dark"] .logo-container {
        background: #1a1d27;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    [data-theme="dark"] .btn-auth {
        background: #1a1d27;
        color: #e4e6f0;
        border-color: #2a2e42;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    }

    [data-theme="dark"] .user-avatar {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    [data-theme="dark"] .modal-content {
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5) !important;
    }

    [data-theme="dark"] .modal-header::before {
        background: #353a52;
    }
}


/* ═══════════════════════════════════════════════════════════════
   9. HEADER FILTER SLOT — Alignement search/filter
   ═══════════════════════════════════════════════════════════════ */

.header-filter-slot {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

@media (max-width: 768px) {
    .header-filter-slot {
        display: none;
    }
}


/* ═══════════════════════════════════════════════════════════════
   10. USER MENU — Alignement iconique parfait
   ═══════════════════════════════════════════════════════════════ */

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.user-menu .header-user-btn {
    width: 38px;
    height: 38px;
    font-size: 15px;
}


/* ═══════════════════════════════════════════════════════════════
   10b. BADGE VÉRIFIÉ — Markers Map
   ═══════════════════════════════════════════════════════════════
   Badge étoile ⭐ affiché sur les markers des distributeurs
   vérifiés (ceux qui ont une photo en BDD).
   Configurable via admin/leaflet : couleur, emoji, toggle on/off.
   ═══════════════════════════════════════════════════════════════ */

/* Animation pulse subtile pour le badge vérifié */
@keyframes verifiedBadgePulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    }

    50% {
        transform: scale(1.15);
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.5);
    }
}

/* Classe pour les markers vérifiés — optionnel override */
.verified-marker-badge {
    pointer-events: none;
    will-change: transform;
}

/* ── Pro Options — Marker Map Animations v3.0 (Neon Glow) ── */

/* Glow BLEU ÉLECTRIQUE néon pour map_highlight — très visible */
@keyframes proHighlightPulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(59,130,246,0.7), 0 0 18px rgba(59,130,246,0.5), 0 0 35px rgba(59,130,246,0.2);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(59,130,246,0.5), 0 0 28px rgba(59,130,246,0.6), 0 0 50px rgba(59,130,246,0.3);
    }
}

/* Glow INDIGO/VIOLET néon pour priority_results */
@keyframes proPriorityPulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(99,102,241,0.65), 0 0 16px rgba(99,102,241,0.45), 0 0 30px rgba(99,102,241,0.15);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(99,102,241,0.5), 0 0 24px rgba(99,102,241,0.55), 0 0 45px rgba(99,102,241,0.25);
    }
}

/* Glow DORÉ PREMIUM pour exclusive_zone — le plus intense */
@keyframes proExclusivePulse {
    0%, 100% {
        box-shadow: 0 0 0 4px rgba(217,119,6,0.7), 0 0 20px rgba(217,119,6,0.5), 0 0 40px rgba(217,119,6,0.2);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(217,119,6,0.5), 0 0 30px rgba(217,119,6,0.6), 0 0 55px rgba(217,119,6,0.3);
    }
}

/* Glow VERT NÉON pour badge Officiel seul */
@keyframes proOfficielPulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(16,185,129,0.6), 0 0 14px rgba(16,185,129,0.4), 0 0 28px rgba(16,185,129,0.15);
    }
    50% {
        box-shadow: 0 0 0 5px rgba(16,185,129,0.45), 0 0 22px rgba(16,185,129,0.5), 0 0 40px rgba(16,185,129,0.2);
    }
}

/* Badge Officiel Pro shield sur le marker — pulse scale + glow */
@keyframes proOfficielBadgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 8px rgba(16,185,129,0.6), 0 1px 4px rgba(0,0,0,0.3);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 14px rgba(16,185,129,0.8), 0 2px 8px rgba(0,0,0,0.3);
    }
}

/* Classe pour le badge Officiel Pro sur le marker */
.pro-officiel-marker-badge {
    pointer-events: none;
    will-change: transform, box-shadow;
}

/* Pulse pour badge promo dans popup/bottomsheet */
@keyframes promoBadgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Séparateur dans le dropdown type pour l'option "Vérifiés" */
.vtype-verified-option {
    border-left: 3px solid #f59e0b !important;
    padding-left: 10px !important;
}

/* ═══════════════════════════════════════════════════════════════
   11. MAP CONTROLS GRID — Unified Alignment System
   ═══════════════════════════════════════════════════════════════
   Grille d'alignement stricte pour TOUS les contrôles de la carte.
   Tokens (--mc-*) = seule source de vérité pour les dimensions.
   ═══════════════════════════════════════════════════════════════ */

:root {
    /* ── Map Controls Grid Tokens ── */
    --mc-btn-size: 36px;
    /* Taille unifiée de tous les boutons     */
    --mc-edge-gap: 12px;
    /* Marge bord de carte → premier contrôle */
    --mc-item-gap: 8px;
    /* Espace entre éléments dans un stack    */
    --mc-radius: 10px;
    /* Border-radius unifié (carré arrondi)   */
    --mc-radius-sm: 8px;
    /* Radius secondaire                     */
    --mc-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    --mc-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.14);
    --mc-fab-size: 44px;
    /* FAB légèrement plus grand              */
    --mc-z-controls: 1000;
    /* Contrôles standard                    */
    --mc-z-panel: 1001;
    /* Panneau de filtre                     */
    --mc-z-fab: 1002;
    /* FAB au-dessus de tout                 */
}

/* ── Reset Leaflet native margins ── */
.leaflet-control-container .leaflet-control {
    margin: 0 !important;
    float: none !important;
    clear: none !important;
}

/* ── Corner Stacking : tous les coins en flex column/row avec gap uniforme ── */
.leaflet-top.leaflet-left,
.leaflet-top.leaflet-right,
.leaflet-bottom.leaflet-left,
.leaflet-bottom.leaflet-right {
    display: flex;
    flex-direction: column;
    gap: var(--mc-item-gap);
    padding: var(--mc-edge-gap) !important;
    pointer-events: none;
    z-index: var(--mc-z-controls);
}

/* ── Forcer les contrôles TOP en haut de la carte (écrase style.css top: 70px) ── */
.leaflet-top.leaflet-left,
.leaflet-top.leaflet-right {
    top: 0 !important;
}

.leaflet-bottom.leaflet-left,
.leaflet-bottom.leaflet-right {
    flex-direction: column-reverse;
    align-items: flex-end;
}

.leaflet-top.leaflet-left,
.leaflet-bottom.leaflet-left {
    align-items: flex-start;
}

.leaflet-top.leaflet-right,
.leaflet-bottom.leaflet-right {
    align-items: flex-end;
}

.leaflet-top.leaflet-left>*,
.leaflet-top.leaflet-right>*,
.leaflet-bottom.leaflet-left>*,
.leaflet-bottom.leaflet-right>* {
    pointer-events: auto;
}

/* ── Boutons Leaflet Unifiés (Zoom ±, Recenter, Search, Tour) ── */
.leaflet-bar {
    border: none !important;
    box-shadow: var(--mc-shadow) !important;
    border-radius: var(--mc-radius) !important;
    overflow: hidden;
}

.leaflet-bar a,
.leaflet-control-custom,
.leaflet-control-custom.lc-btn,
.lc-btn {
    width: var(--mc-btn-size) !important;
    height: var(--mc-btn-size) !important;
    min-width: var(--mc-btn-size);
    min-height: var(--mc-btn-size);
    background: #ffffff !important;
    color: #475569 !important;
    border: none !important;
    border-bottom: 1px solid #f1f5f9 !important;
    font-size: 14px;
    line-height: var(--mc-btn-size) !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
    text-decoration: none !important;
    box-sizing: border-box;
    cursor: pointer;
}

.leaflet-bar a:last-child,
.leaflet-control-custom:last-child,
.lc-btn:last-child {
    border-bottom: none !important;
}

.leaflet-bar a:hover,
.leaflet-control-custom:hover,
.lc-btn:hover {
    background: #f0fdf4 !important;
    color: #10b981 !important;
}

/* Standalone controls (recenter, search) — square card */
.leaflet-control-custom.lc-btn,
.lc-btn {
    border-radius: var(--mc-radius) !important;
    box-shadow: var(--mc-shadow) !important;
    border-bottom: none !important;
}

.lc-icon,
.lc-icon-search {
    font-size: 14px;
    line-height: 1;
    pointer-events: none;
    /* Le clic doit remonter au container parent (onclick) */
}



/* ── Attribution (coin inférieur droit, ne chevauche rien) ── */
.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.65) !important;
    backdrop-filter: blur(3px);
    border-radius: 4px 0 0 0 !important;
    padding: 2px 8px !important;
    margin: 0 !important;
    font-size: var(--map-copyright-size, 11px) !important;
    position: fixed !important;
    bottom: 0 !important;
    right: 0 !important;
    z-index: 999;
    pointer-events: auto;
}

/* Remove from corner stacking flow */
.leaflet-bottom.leaflet-right .leaflet-control-attribution {
    position: fixed !important;
    bottom: 0 !important;
    right: 0 !important;
    order: -99;
}

/* Mobile : remonter au-dessus de la bottom nav */
@media (max-width: 768px) {

    .leaflet-control-attribution,
    .leaflet-bottom.leaflet-right .leaflet-control-attribution {
        bottom: var(--bottom-nav-h, 56px) !important;
    }
}


/* ═══════════════════════════════════════════════════════════════
   12. VERTICAL PANEL CONTROL (Filtre Rayon + Types)
   ═══════════════════════════════════════════════════════════════ */

/* Positionnement global */
/* ── Conteneurs Leaflet Centre (custom) — Pleine largeur 15px marges ── */
.leaflet-top.leaflet-center,
.leaflet-bottom.leaflet-center {
    position: absolute !important;
    left: 15px !important;
    right: 15px !important;
    transform: none !important;
    display: flex !important;
    pointer-events: none;
    padding-top: var(--mc-edge-gap) !important;
}

.leaflet-top.leaflet-center>*,
.leaflet-bottom.leaflet-center>* {
    pointer-events: auto;
    width: 100%;
}

/* ── Conteneurs MapLibre Centre (custom) — Mêmes règles que Leaflet ── */
.maplibregl-ctrl-top-center {
    position: absolute !important;
    top: 0 !important;
    left: 15px !important;
    right: 15px !important;
    transform: none !important;
    display: flex !important;
    pointer-events: none;
    padding-top: var(--mc-edge-gap, 12px) !important;
    z-index: 2 !important;
}

.maplibregl-ctrl-bottom-center {
    position: absolute !important;
    bottom: 0 !important;
    left: 15px !important;
    right: 15px !important;
    transform: none !important;
    display: flex !important;
    pointer-events: none;
    z-index: 2100 !important;
}

.maplibregl-ctrl-top-center>*,
.maplibregl-ctrl-bottom-center>* {
    pointer-events: auto;
    width: 100%;
}

/* ── Conteneurs Leaflet Middle → Repositionnés en haut sous le header ── */
/* La config admin peut placer les contrôles en "middleleft/middleright"  */
/* mais visuellement ils doivent être en haut, juste sous le header.     */
.leaflet-middle.leaflet-left,
.leaflet-middle.leaflet-right {
    position: absolute;
    top: 70px !important;
    /* Sous le header Desktop (~56px + marge) */
    transform: none !important;
    pointer-events: none;
    z-index: var(--mc-z-controls);
    display: flex;
    flex-direction: column;
    gap: var(--mc-item-gap);
    padding: var(--mc-edge-gap) !important;
}

.leaflet-middle.leaflet-left {
    left: 0;
}

.leaflet-middle.leaflet-right {
    right: 0;
}

.leaflet-middle.leaflet-left>*,
.leaflet-middle.leaflet-right>* {
    pointer-events: auto;
}

/* ── Mobile : espacement uniforme 10px sur tous les bords ──
   Les conteneurs Leaflet sont à left/right: 0 car chaque
   .leaflet-control a un margin: 10px par défaut (Leaflet).
   Résultat : 0 + 10px margin = 10px du bord de l'écran. ── */
@media (max-width: 768px) {

    /* Contrôles TOP-RIGHT : alignés avec le logo */
    .leaflet-top.leaflet-right {
        top: 0 !important;
        right: 0 !important;
    }

    /* Contrôles TOP-LEFT : sous le logo/header */
    .leaflet-top.leaflet-left {
        top: 45px !important;
        left: 0 !important;
    }

    /* Contrôles MIDDLE : juste sous le header */
    .leaflet-middle.leaflet-left,
    .leaflet-middle.leaflet-right {
        top: 55px !important;
    }

    .leaflet-middle.leaflet-left {
        left: 0 !important;
    }

    .leaflet-middle.leaflet-right {
        right: 0 !important;
    }

    /* Bottom controls : juste au-dessus du copyright (copyright = bottom-nav + 18px) */
    .leaflet-bottom.leaflet-left,
    .leaflet-bottom.leaflet-right {
        bottom: calc(var(--bottom-nav-h, 56px) + 20px) !important;
    }

    /* Zoom : rapproché du copyright en mobile */
    .leaflet-control-zoom,
    .leaflet-touch .leaflet-control-zoom,
    .leaflet-bottom .leaflet-control-zoom {
        margin-bottom: 10px !important;
    }

    .leaflet-bottom.leaflet-left {
        left: 0 !important;
    }

    .leaflet-bottom.leaflet-right {
        right: 0 !important;
    }
}

/* ── Desktop : Panneau vertical (barre mince sur le côté) ── */
.vertical-panel-control {
    z-index: var(--mc-z-panel);
    margin: 0 !important;
    clear: both;
    /* !important requis : écrase la règle héritée Leaflet
       .leaflet-top.leaflet-right > * { pointer-events: auto }
       qui bloquerait les boutons recenter/search en dessous */
    pointer-events: none !important;
}

/* Rétablir les clics sur le contenu réel du panneau (boutons, slider, filtres) */
.vertical-panel-control .vpanel-wrap {
    pointer-events: auto !important;
}

/* Containers custom (middle) n'ont pas de padding → ajouter la marge */
.leaflet-middle .vertical-panel-control {
    margin: var(--mc-edge-gap) !important;
}

/* ── Mode Vertical (défaut) ── */
.vpanel-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--mc-item-gap);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 10px 5px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--mc-shadow-lg);
    width: 44px;
    margin-top: 15px;
    transition: background 0.2s, box-shadow 0.2s;
    overflow: visible;
}

/* ── Mode Horizontal Desktop (.is-horizontal) ── */
.vertical-panel-control.is-horizontal {
    width: 100%;
}

.vertical-panel-control.is-horizontal .vpanel-wrap {
    flex-direction: row;
    width: 100% !important;
    max-width: 1024px;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 8px 16px;
    gap: 14px;
}

.vertical-panel-control.is-horizontal .vslider-group {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex: 1 !important;
    min-width: 0;
    width: auto;
}

.vertical-panel-control.is-horizontal .vslider-track {
    height: auto;
    width: auto !important;
    flex: 1 !important;
    min-width: 200px;
    padding: 0;
}

.vertical-panel-control.is-horizontal .vslider-input {
    width: 100%;
    height: 6px;
    writing-mode: horizontal-tb;
    direction: ltr;
    /* Reset du direction:rtl hérité du slider vertical */
    appearance: none;
    -webkit-appearance: none;
}

.vertical-panel-control.is-horizontal .vslider-label {
    min-width: 40px;
    text-align: left;
    flex-shrink: 0;
}

.vertical-panel-control.is-horizontal .vpanel-actions {
    flex-direction: row;
    width: auto;
    flex-shrink: 0;
}

.vertical-panel-control.is-horizontal .vpanel-divider {
    width: 1px;
    height: 24px;
    flex-shrink: 0;
}

/* Bouton Pro : taille fixe, ne se comprime pas */
.vertical-panel-control.is-horizontal .vpanel-pro-btn {
    flex-shrink: 0;
}

/* Type Selector : taille fixe, ne se comprime pas */
.vertical-panel-control.is-horizontal .vpanel-type-selector {
    flex-shrink: 0;
    width: auto;
}

/* Slider Section (défaut — mode vertical) */
.vslider-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.vslider-label {
    font-size: 9px;
    font-weight: 800;
    color: #10b981;
    white-space: nowrap;
    text-align: center;
    line-height: 1;
}

.vslider-track {
    height: 200px;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 6px 0;
}

/* ═══════════════════════════════════════════
   MOBILE — Filtre + contrôles carte
   Espacement uniforme 8px, header transparent,
   filtre en bas pleine largeur.
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {

    /* 0. HEADER FIXED TRANSPARENT — la carte s'étend derrière */
    body.map-page .header {
        position: fixed !important;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: transparent !important;
        border-bottom: none !important;
        box-shadow: none !important;
    }

    /* 0a. LOGO — décalé à gauche, minimum de marge */
    body.map-page .header-content {
        padding-left: 0 !important;
        padding-right: 6px !important;
    }

    /* 0b. CARTE — s'arrête au-dessus de la bottom nav (56px) */
    body.map-page #map {
        height: calc(100dvh - var(--bottom-nav-h, 56px)) !important;
        max-height: calc(100dvh - var(--bottom-nav-h, 56px)) !important;
        flex: none !important;
    }

    /* 1. CONTAINER FIXED BOTTOM — Collé au copyright Leaflet/MapLibre, pleine largeur */
    .leaflet-bottom.leaflet-center,
    .maplibregl-ctrl-bottom-center {
        position: fixed !important;
        bottom: 18px !important;
        left: 8px !important;
        right: 8px !important;
        transform: none !important;
        width: auto !important;
        max-width: none !important;
        display: flex !important;
        justify-content: center;
        align-items: flex-end;
        z-index: 2000 !important;
        pointer-events: none;
        padding: 0 !important;
        margin: 0 !important;
    }

    .leaflet-bottom.leaflet-center>*,
    .maplibregl-ctrl-bottom-center>* {
        pointer-events: auto;
        width: 100%;
    }

    /* 2. FORCER LE STYLE DESKTOP HORIZONTAL sur .vertical-panel-control */
    .vertical-panel-control,
    .vertical-panel-control.is-horizontal {
        position: relative !important;
        margin: 0 !important;
        padding: 0 !important;
        left: auto !important;
        top: auto !important;
        bottom: auto !important;
        right: auto !important;
        width: 100% !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    /* 3. STYLE DU WRAP — Même style rectangle que desktop, collé en bas */
    .vpanel-wrap {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 10px !important;

        background: rgba(255, 255, 255, 0.96) !important;
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        padding: 6px 16px !important;
        padding-bottom: max(6px, env(safe-area-inset-bottom, 0px)) !important;
        border-radius: 8px !important;
        border: 1px solid rgba(0, 0, 0, 0.06) !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.10) !important;

        width: 100% !important;
        min-width: unset !important;
        max-width: none !important;
        height: auto !important;
        min-height: 44px !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }

    /* 4. ÉLÉMENTS INTERNES - RÉPLIQUE EXACTE DESKTOP */

    /* Bouton Pro */
    .vpanel-pro-btn {
        height: 32px !important;
        padding: 0 10px !important;
        font-size: 11px !important;
        display: flex !important;
        align-items: center !important;
        gap: 6px !important;
        background: rgba(59, 130, 246, 0.1) !important;
        color: #3b82f6 !important;
        border-radius: 6px !important;
        border: none !important;
    }

    /* Slider Group — compacté pour éviter superposition */
    .vslider-group {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        flex: 1 !important;
        min-width: 0 !important;
        padding: 0 !important;
        background: none !important;
        border: none !important;
        margin: 0 !important;
    }

    /* Label KM — compact, flex-shrink autorisé */
    .vslider-label {
        font-size: 11px !important;
        font-weight: 800 !important;
        color: #0f172a !important;
        min-width: 30px !important;
        white-space: nowrap !important;
        text-align: left;
        margin: 0 !important;
        order: 2;
        flex-shrink: 0 !important;
    }

    /* Icon Bullseye */
    .vslider-icon {
        display: flex !important;
        font-size: 14px !important;
        color: #64748b !important;
        margin: 0 !important;
        order: 0;
        width: 18px;
        flex-shrink: 0 !important;
        justify-content: center;
    }

    /* Slider Track — flex dynamique au lieu de largeur fixe */
    .vslider-track {
        flex: 1 !important;
        min-width: 60px !important;
        max-width: 160px !important;
        height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        background: none !important;
        order: 1;
        display: flex !important;
        align-items: center !important;
    }

    /* Input Slider */
    .vslider-input {
        -webkit-appearance: none !important;
        appearance: none !important;
        width: 100% !important;
        height: 4px !important;
        background: #e2e8f0 !important;
        border-radius: 2px !important;
        writing-mode: horizontal-tb !important;
        direction: ltr !important;
        /* Force horizontal : petit (10km) à gauche → grand (50km) à droite */
    }

    .vslider-input::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 16px;
        height: 16px;
        background: #10b981;
        border-radius: 50%;
        box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
        margin-top: -6px;
        /* Centrer sur la track */
        cursor: pointer;
    }

    .vslider-input::-moz-range-thumb {
        width: 16px;
        height: 16px;
        background: #10b981;
        border-radius: 50%;
        box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
        border: none;
        cursor: pointer;
    }

    /* Divider */
    .vpanel-divider {
        width: 1px !important;
        height: 24px !important;
        background: #e2e8f0 !important;
        margin: 0 4px !important;
        border: none !important;
    }

    /* Actions Group (Count + Reset) */
    .vpanel-actions {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 8px !important;
        width: auto !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
    }

    /* Count Badge */
    .vpanel-count {
        display: flex !important;
        font-size: 11px !important;
        font-weight: 700 !important;
        padding: 4px 8px !important;
        height: auto !important;
        border-radius: 6px !important;
        color: #64748b !important;
        background: #f1f5f9 !important;
    }

    /* Count actif */
    .vpanel-actions.has-results .vpanel-count {
        color: #3b82f6 !important;
        background: #eff6ff !important;
    }

    /* Reset Button (Toggle) — flex-shrink empêche l'écrasement */
    .vpanel-btn.reset-btn {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        flex-shrink: 0 !important;
        font-size: 11px !important;
        border-radius: 50% !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center;
        margin: 0 !important;

        /* État OFF par défaut */
        background: #fee2e2;
        color: #ef4444;
    }

    .vpanel-btn.reset-btn.filter-on {
        background: #d1fae5 !important;
        color: #059669 !important;
    }

    /* Type Selector Button */
    .type-trigger-btn {
        width: 28px !important;
        height: 28px !important;
        flex-shrink: 0 !important;
        font-size: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        color: #64748b !important;
    }

    /* Sur très petits écrans, on réduit le slider */
    @media (max-width: 380px) {
        .vslider-track {
            min-width: 40px !important;
            max-width: 80px !important;
        }

        .vpanel-wrap {
            gap: 6px !important;
            padding: 8px 10px !important;
        }

        .vslider-label {
            min-width: 24px !important;
            font-size: 10px !important;
        }
    }

    /* Divider — masqué en mobile */
    .vpanel-divider {
        display: none !important;
    }

    .vpanel-type-selector {
        margin-left: 6px !important;
    }


}

.vslider-input {
    -webkit-appearance: none;
    appearance: none;
    writing-mode: vertical-lr;
    direction: rtl;
    width: 6px;
    height: 100%;
    border-radius: 99px;
    outline: none;
    cursor: pointer;
    background: #e2e8f0;
    accent-color: #10b981;
}

.vslider-icon {
    font-size: 12px;
    color: #94a3b8;
}

/* Infos & Reset — Toujours visible */
.vpanel-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* État par défaut : discret */
.vpanel-count {
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 5px;
    border-radius: 6px;
    min-width: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

/* État actif : filtre en cours → badge bleu */
.vpanel-actions.has-results .vpanel-count {
    color: #3b82f6;
    background: #eff6ff;
    animation: fadeIn 0.3s ease;
}

/* ── Toggle Filter ON/OFF States ── */
.vpanel-btn.reset-btn {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 2px solid transparent;
}

/* État ON — filtre actif, bouton vert */
.vpanel-btn.reset-btn.filter-on {
    background: #d1fae5;
    color: #059669;
    border-color: #6ee7b7;
    opacity: 1;
}

.vpanel-btn.reset-btn.filter-on:hover {
    background: #a7f3d0;
    border-color: #34d399;
    transform: scale(1.1);
}

/* État OFF — filtre désactivé, bouton rouge pulsant */
.vpanel-btn.reset-btn.filter-off {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fca5a5;
    opacity: 1;
    animation: filterOffPulse 2s ease-in-out infinite;
}

.vpanel-btn.reset-btn.filter-off:hover {
    background: #fecaca;
    border-color: #f87171;
    transform: scale(1.1);
    animation: none;
}

@keyframes filterOffPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

/* Panel wrap disabled state — seul le slider est atténué, les types restent actifs */
.vpanel-wrap.filter-disabled .vslider-group,
.vpanel-wrap.filter-disabled .vpanel-divider {
    opacity: 0.35;
    pointer-events: none;
    filter: grayscale(0.6);
    transition: all 0.3s ease;
}

.vpanel-actions.has-results .vpanel-btn.reset-btn.filter-on {
    background: #d1fae5;
    color: #059669;
}

.vpanel-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    font-size: 11px;
}

.reset-btn {
    background: #fee2e2;
    color: #ef4444;
}

.reset-btn:hover {
    transform: scale(1.1);
    background: #ef4444;
    color: white;
}

/* =====================================================
   BOUTON PRO — Premium, mis en avant
   ===================================================== */
.vpanel-pro-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #b45309;
    border: 1.5px solid #f59e0b;
    position: relative;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
    animation: vpanelProPulse 2.5s ease-in-out infinite;
    transition: all 0.25s ease;
    cursor: pointer;
}

/* Enfants non-interactifs pour que le tooltip se déclenche sur tout le bouton */
.vpanel-pro-btn>* {
    pointer-events: none;
}

.vpanel-pro-btn:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, #fde68a, #fbbf24);
}

.vpanel-pro-btn.active {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: #059669;
    color: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
    animation: none;
}

/* Label PRO (visible uniquement desktop) */
.vpanel-pro-label {
    display: none;
    font-size: 7px;
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    background: #f59e0b;
    color: white;
    padding: 0 4px;
    border-radius: 3px;
    line-height: 1.4;
}

.vpanel-pro-btn.active .vpanel-pro-label {
    background: #059669;
}

/* Badge compteur Pro */
.vpanel-badge-pro {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 8px;
    font-weight: 700;
    height: 14px;
    min-width: 14px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid white;
    padding: 0 2px;
}

/* Pulse dorée pour attirer l'attention */
@keyframes vpanelProPulse {

    0%,
    100% {
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
    }

    50% {
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25), 0 0 0 4px rgba(245, 158, 11, 0.12);
    }
}

/* Dark Mode — Bouton Pro */
[data-theme="dark"] .vpanel-pro-btn {
    background: linear-gradient(135deg, #78350f, #92400e);
    color: #fbbf24;
    border-color: #b45309;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

[data-theme="dark"] .vpanel-pro-btn:hover {
    background: linear-gradient(135deg, #92400e, #b45309);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .vpanel-pro-btn.active {
    background: linear-gradient(135deg, #065f46, #047857);
    border-color: #10b981;
    color: #a7f3d0;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .vpanel-badge-pro {
    border-color: #1e2130;
}

[data-theme="dark"] .vpanel-pro-label {
    background: #b45309;
}


/* Ancien tooltip custom Pro supprimé — remplacé par le système Tooltip Card Premium (tooltips.css) */


/* Type Selector */
.vpanel-divider {
    width: 20px;
    height: 1px;
    background: #e2e8f0;
    margin: 2px 0;
}

.vpanel-type-selector {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.type-trigger-btn {
    background: rgba(16, 163, 127, 0.1);
    color: #10b981;
    position: relative;
}

/* Masquer le label texte — garder uniquement l'icône */
.type-trigger-btn .type-trigger-label {
    display: none;
}

.type-trigger-btn:hover {
    background: #10b981;
    color: white;
    transform: scale(1.1);
}

.type-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #3b82f6;
    color: white;
    font-size: 7px;
    font-weight: 800;
    min-width: 14px;
    height: 14px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid white;
    padding: 0 2px;
}

.type-badge.partial {
    background: #f59e0b;
}

/* Dropdown Types — SaaS Premium 2026 */
.vtype-dropdown {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 50%;
    right: calc(100% + 14px);
    transform: translateY(-50%) translateX(10px) scale(0.97);
    width: clamp(480px, 50vw, 650px);
    min-width: 480px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 18px;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.12),
        0 8px 24px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(255, 255, 255, 0.7) inset;
    z-index: 3000;
    overflow: visible;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.vtype-dropdown.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(-50%) translateX(0) scale(1);
}

/* ── Header Premium ── */
.vtype-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px 12px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.9), rgba(241, 245, 249, 0.9));
}

.vtype-dropdown-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.vtype-header-icon {
    font-size: 11px;
    color: #10b981;
    opacity: 0.8;
}

.vtype-dropdown-title {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.vtype-dropdown-header-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

/* Boutons Tout / Rien */
.vtype-action-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #64748b;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.vtype-action-btn i {
    font-size: 9px;
}

.vtype-select-all:hover {
    border-color: #10b981;
    color: #10b981;
    background: rgba(16, 185, 129, 0.06);
    transform: translateY(-1px);
}

.vtype-select-none:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.06);
    transform: translateY(-1px);
}

/* Bouton Fermer */
.vtype-close-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: rgba(248, 250, 252, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: #94a3b8;
    transition: all 0.25s ease;
    margin-left: 2px;
}

.vtype-close-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #ef4444;
    transform: rotate(90deg) scale(1.1);
}

/* ── Section Vérifiés Premium ── */
.vtype-verified-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(217, 119, 6, 0.05));
    border-bottom: 1px solid rgba(251, 191, 36, 0.15);
    position: relative;
    overflow: hidden;
}

.vtype-verified-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #f59e0b, #d97706, #f59e0b);
    background-size: 200% 100%;
    animation: verifiedShimmer 3s linear infinite;
}

@keyframes verifiedShimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.vtype-verified-inner {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.vtype-verified-icon {
    font-size: 16px;
    filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.3));
    animation: verifiedPulse 2s ease-in-out infinite;
}

@keyframes verifiedPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.vtype-verified-text {
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
    letter-spacing: 0.3px;
}

.vtype-verified-desc {
    font-size: 10px;
    color: #b45309;
    opacity: 0.7;
    font-weight: 500;
}

.vtype-verified-count {
    font-size: 12px;
    font-weight: 800;
    color: #d97706;
    min-width: 24px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    background: rgba(245, 158, 11, 0.15);
    border-radius: 11px;
    padding: 0 8px;
}

/* Toggle Switch Premium */
.vtype-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
}

.vtype-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.vtype-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    border-radius: 22px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vtype-switch-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.vtype-switch input:checked+.vtype-switch-slider {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.3);
}

.vtype-switch input:checked+.vtype-switch-slider::before {
    transform: translateX(18px);
}

/* ── Body : affiche tout sur desktop, scroll sur mobile ── */
.vtype-dropdown-body {
    overflow: visible;
}

/* Desktop: grille responsive auto */
.vtype-dropdown-list {
    padding: 10px 12px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3px;
}

/* Options de type */
.vtype-dropdown-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 36px;
    position: relative;
    user-select: none;
}

.vtype-dropdown-option:hover {
    background: rgba(241, 245, 249, 0.9);
    transform: translateX(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.vtype-dropdown-option:active {
    transform: scale(0.98);
}

.vtype-dropdown-option input {
    accent-color: #10b981;
    width: 15px;
    height: 15px;
    cursor: pointer;
    border-radius: 4px;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.vtype-dropdown-option input:checked {
    transform: scale(1.05);
}

.vtype-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), 0 0 0 2px rgba(255, 255, 255, 0.8);
    transition: transform 0.2s ease;
}

.vtype-dropdown-option:hover .vtype-color {
    transform: scale(1.2);
}

.vtype-label {
    font-size: 12px;
    font-weight: 500;
    color: #334155;
    flex: 1;
    line-height: 1.2;
}

.vtype-count {
    font-size: 11px;
    color: #3b82f6;
    font-weight: 700;
    min-width: 22px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 10px;
    padding: 0 6px;
    flex-shrink: 0;
}

.vtype-count:empty {
    display: none;
}

/* ── Footer ── */
.vtype-dropdown-footer {
    padding: 8px 18px;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    background: rgba(248, 250, 252, 0.6);
    text-align: center;
}

.vtype-footer-count {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    letter-spacing: 0.3px;
}

/* ── Mobile — Bottom Sheet Compact ── */
@media (max-width: 768px) {
    .vtype-dropdown {
        min-width: unset;
        width: calc(100% - 20px);
        left: 10px;
        right: 10px;
        bottom: 70px !important;
        top: auto !important;
        transform: none !important;
        border-radius: 16px 16px 12px 12px;
        max-height: 50vh;
    }

    .vtype-dropdown.open {
        transform: none !important;
    }

    .vtype-dropdown-body {
        max-height: 35vh;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #cbd5e1 transparent;
    }

    .vtype-dropdown-body::-webkit-scrollbar {
        width: 4px;
    }

    .vtype-dropdown-body::-webkit-scrollbar-track {
        background: transparent;
    }

    .vtype-dropdown-body::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 10px;
    }

    .vtype-dropdown-list {
        grid-template-columns: repeat(2, 1fr);
        padding: 8px 10px;
        gap: 2px;
    }

    .vtype-dropdown-option {
        padding: 6px 8px;
        min-height: 32px;
        gap: 6px;
    }

    .vtype-label {
        font-size: 11px;
    }

    .vtype-action-btn span {
        display: none;
    }

    .vtype-action-btn {
        padding: 5px 8px;
    }

    .vtype-verified-section {
        padding: 10px 14px;
    }

    .vtype-verified-desc {
        display: none;
    }
}

/* ── Grand écran — 3 colonnes ── */
@media (min-width: 1200px) {
    .vtype-dropdown {
        width: clamp(580px, 42vw, 720px);
        min-width: 580px;
    }

    .vtype-dropdown-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Markers Rings */
.dm-ring {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Dark Mode Overrides for New Controls */
[data-theme="dark"] .vertical-panel-control .vpanel-wrap {
    background: rgba(30, 33, 48, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .vslider-input {
    background: #353a52;
}

[data-theme="dark"] .vtype-dropdown {
    background: rgba(30, 33, 48, 0.96);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

[data-theme="dark"] .vtype-dropdown-header {
    background: rgba(26, 29, 39, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .vtype-dropdown-title {
    color: #94a3b8;
}

[data-theme="dark"] .vtype-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

[data-theme="dark"] .vtype-close-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #64748b;
}

[data-theme="dark"] .vtype-verified-section {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.06));
    border-bottom-color: rgba(245, 158, 11, 0.1);
}

[data-theme="dark"] .vtype-verified-text {
    color: #fbbf24;
}

[data-theme="dark"] .vtype-verified-desc {
    color: #f59e0b;
}

[data-theme="dark"] .vtype-switch-slider {
    background: #475569;
}

[data-theme="dark"] .vtype-label {
    color: #e4e6f0;
}

[data-theme="dark"] .vtype-dropdown-option:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .vtype-dropdown-body::-webkit-scrollbar-thumb {
    background: #475569;
}

[data-theme="dark"] .vtype-dropdown-footer {
    background: rgba(26, 29, 39, 0.6);
    border-top-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .dm-ring {
    background: #1e2130;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .leaflet-bar {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

/* =======================================================
   V5.4 FILTRE DE PROXIMITÉ (MODE HORIZONTAL)
   ======================================================= */
.vertical-panel-control.is-horizontal .vpanel-wrap {
    flex-direction: row;
    align-items: center;
    width: 100% !important;
    max-width: 1024px;
    margin: 0 auto;
    box-sizing: border-box;
    height: var(--mc-fab-size);
    padding: 0 16px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-radius: 8px;
    box-shadow: var(--mc-shadow-lg);
    gap: 14px;
}

.vertical-panel-control.is-horizontal .vslider-group {
    flex-direction: row;
    gap: 8px;
    flex: 1 !important;
    min-width: 0;
    width: auto;
    border: none;
    padding: 0;
    align-items: center;
    background: none;
}

.vertical-panel-control.is-horizontal .vslider-icon {
    font-size: 14px;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    box-shadow: none;
    color: #64748b;
    margin: 0;
    order: -1;
}

.vertical-panel-control.is-horizontal .vslider-track {
    flex: 1 !important;
    min-width: 200px;
    width: auto !important;
    height: auto;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    align-items: center;
}

.vertical-panel-control.is-horizontal input.vslider-input.horizontal {
    width: 100%;
    height: auto;
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    background: transparent;
    cursor: pointer;
}

/* Thumb (Chrome/Edge/Safari) */
.vertical-panel-control.is-horizontal input.vslider-input.horizontal::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    margin-top: -5px;
}

/* Track (Chrome/Edge/Safari) */
.vertical-panel-control.is-horizontal input.vslider-input.horizontal::-webkit-slider-runnable-track {
    height: 4px;
    background: #e2e8f0;
    border-radius: 4px;
}

/* Thumb (Firefox) */
.vertical-panel-control.is-horizontal input.vslider-input.horizontal::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

/* Track (Firefox) */
.vertical-panel-control.is-horizontal input.vslider-input.horizontal::-moz-range-track {
    height: 4px;
    background: #e2e8f0;
    border-radius: 4px;
}

.vertical-panel-control.is-horizontal .vslider-label {
    min-width: 44px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    margin-left: 8px;
    order: 2;
}

/* Actions */
.vertical-panel-control.is-horizontal .vpanel-actions {
    display: flex;
    /* Override display:none si activé */
    flex-direction: row;
    border-top: none;
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0 0 0 12px;
    margin-left: 12px;
    gap: 8px;
    height: 24px;
    align-items: center;
}

.vertical-panel-control.is-horizontal .vpanel-count {
    width: 24px;
    height: 24px;
    font-size: 11px;
    margin: 0;
}

.vertical-panel-control.is-horizontal .vpanel-btn.reset-btn {
    width: 24px;
    height: 24px;
    font-size: 11px;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    margin: 0;
}

.vertical-panel-control.is-horizontal .vpanel-btn.vpanel-pro-btn {
    margin: 0;
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
    flex-shrink: 0;
}

/* Dividers & Selectors */
.vertical-panel-control.is-horizontal .vpanel-divider {
    width: 1px;
    height: 24px;
    background: rgba(0, 0, 0, 0.08);
    margin: 0 12px;
    border: none;
}

.vertical-panel-control.is-horizontal .vtype-dropdown {
    top: 55px;
    /* Décaler sous la barre */
    right: -10px;
    left: auto;
    transform: none;
    border-radius: 12px;
    width: 200px;
}

.vertical-panel-control.is-horizontal.is-bottom .vtype-dropdown {
    top: auto;
    bottom: 55px;
    /* Mode bas */
    transform-origin: bottom right;
}

/* Dark Mode */
[data-theme='dark'] .vertical-panel-control.is-horizontal .vpanel-wrap {
    background: rgba(30, 41, 59, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme='dark'] .vertical-panel-control.is-horizontal .vslider-label {
    color: #e2e8f0;
}

[data-theme='dark'] .vertical-panel-control.is-horizontal .vslider-icon {
    color: #94a3b8;
}

[data-theme='dark'] .vertical-panel-control.is-horizontal input.vslider-input.horizontal::-webkit-slider-runnable-track {
    background: #475569;
}

[data-theme='dark'] .vertical-panel-control.is-horizontal input.vslider-input.horizontal::-moz-range-track {
    background: #475569;
}

[data-theme='dark'] .vertical-panel-control.is-horizontal input.vslider-input.horizontal::-webkit-slider-thumb {
    background: #10b981;
    border-color: #1e293b;
}

[data-theme='dark'] .vertical-panel-control.is-horizontal input.vslider-input.horizontal::-moz-range-thumb {
    background: #10b981;
    border-color: #1e293b;
}

/* ═══════════════════════════════════════════════════════════
   VERIFICATION BADGES — Neon Animated Status
   À vérifier (red) / Vérifié (green) / Officiel (gold)
   ═══════════════════════════════════════════════════════════ */

/* ── À vérifier — Red neon blink ── */
.vbadge-unverified {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #ef4444 !important;
    border: 1px solid rgba(239, 68, 68, 0.4);
    text-shadow: 0 0 6px rgba(239, 68, 68, 0.6);
    animation: neonBlinkRed 1.5s ease-in-out infinite !important;
}

@keyframes neonBlinkRed {

    0%,
    100% {
        box-shadow: 0 0 4px rgba(239, 68, 68, 0.3),
            0 0 8px rgba(239, 68, 68, 0.2),
            inset 0 0 3px rgba(239, 68, 68, 0.1);
        opacity: 1;
    }

    50% {
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.7),
            0 0 20px rgba(239, 68, 68, 0.4),
            0 0 30px rgba(239, 68, 68, 0.2),
            inset 0 0 6px rgba(239, 68, 68, 0.2);
        opacity: 0.85;
    }
}

/* ── Vérifié — Green neon pulse ── */
.vbadge-verified {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.4);
    text-shadow: 0 0 6px rgba(16, 185, 129, 0.5);
    animation: neonPulseGreen 2s ease-in-out infinite !important;
}

@keyframes neonPulseGreen {

    0%,
    100% {
        box-shadow: 0 0 4px rgba(16, 185, 129, 0.3),
            0 0 8px rgba(16, 185, 129, 0.2),
            inset 0 0 3px rgba(16, 185, 129, 0.1);
    }

    50% {
        box-shadow: 0 0 10px rgba(16, 185, 129, 0.6),
            0 0 20px rgba(16, 185, 129, 0.35),
            0 0 30px rgba(16, 185, 129, 0.15),
            inset 0 0 6px rgba(16, 185, 129, 0.15);
    }
}

/* ── Officiel — Gold neon shimmer ── */
.vbadge-official {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #f59e0b !important;
    border: 1px solid rgba(245, 158, 11, 0.45);
    text-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
    animation: neonShimmerGold 1.8s ease-in-out infinite !important;
}

@keyframes neonShimmerGold {

    0%,
    100% {
        box-shadow: 0 0 4px rgba(245, 158, 11, 0.3),
            0 0 10px rgba(245, 158, 11, 0.2),
            inset 0 0 3px rgba(245, 158, 11, 0.1);
    }

    35% {
        box-shadow: 0 0 12px rgba(245, 158, 11, 0.7),
            0 0 24px rgba(245, 158, 11, 0.4),
            0 0 36px rgba(245, 158, 11, 0.2),
            inset 0 0 8px rgba(245, 158, 11, 0.15);
    }

    65% {
        box-shadow: 0 0 8px rgba(245, 158, 11, 0.5),
            0 0 16px rgba(245, 158, 11, 0.3),
            inset 0 0 4px rgba(245, 158, 11, 0.1);
    }
}

/* ── Verify CTA pulse animation ── */
@keyframes verifyCTAPulse {

    0%,
    100% {
        border-color: rgba(239, 68, 68, 0.2);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }

    50% {
        border-color: rgba(239, 68, 68, 0.45);
        box-shadow: 0 0 12px rgba(239, 68, 68, 0.08);
    }
}

.verify-cta a:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4) !important;
}

/* ── Dark mode overrides ── */
[data-theme='dark'] .vbadge-unverified {
    background: rgba(239, 68, 68, 0.2) !important;
    border-color: rgba(239, 68, 68, 0.5);
}

[data-theme='dark'] .vbadge-verified {
    background: rgba(16, 185, 129, 0.2) !important;
    border-color: rgba(16, 185, 129, 0.5);
}

[data-theme='dark'] .vbadge-official {
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: rgba(245, 158, 11, 0.5);
}

[data-theme='dark'] .verify-cta {
    background: rgba(239, 68, 68, 0.1) !important;
}

/* (Section 9 — MOBILE MAP LAYOUT supprimée : doublon de la Section 12 mobile ~ligne 1100) */

/* =====================================================
   MODE CHIPS — Filtre par type (pastilles inline)
   ===================================================== */

/* Conteneur principal chips — positionné à côté du panneau */
.vpanel-type-chips {
    position: absolute;
    top: 0;
    right: calc(100% + 12px);
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.7) inset;
    z-index: 2000;
    pointer-events: auto;
    min-width: 140px;
    max-width: 280px;
}

/* Actions rapides (Tout/Rien) */
.vtype-chips-actions {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.vtype-chips-action-btn {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: white;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    transition: all 0.2s ease;
}

.vtype-chips-action-btn:hover {
    background: #f1f5f9;
    color: #10b981;
    border-color: #10b981;
    transform: scale(1.15);
}

/* Grille des chips */
.vtype-chips-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    padding: 2px;
}

/* Chip individuelle */
.vtype-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.95);
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    user-select: none;
    font-size: 10px;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    white-space: nowrap;
}

.vtype-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

/* Checkbox masquée */
.vtype-chip input[type="checkbox"] {
    display: none;
}

/* Dot coloré */
.vtype-chip-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.vtype-chip-label {
    color: #334155;
    line-height: 1;
}

.vtype-chip-count {
    font-size: 9px;
    font-weight: 700;
    color: #3b82f6;
    min-width: 16px;
    height: 16px;
    text-align: center;
    line-height: 16px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    padding: 0 4px;
}

.vtype-chip-count:empty {
    display: none;
}

/* État décoché */
.vtype-chip.unchecked {
    opacity: 0.45;
    background: rgba(241, 245, 249, 0.8);
    border-color: rgba(0, 0, 0, 0.04);
    box-shadow: none;
    filter: grayscale(0.5);
}

.vtype-chip.unchecked:hover {
    opacity: 0.7;
    filter: grayscale(0.2);
}

.vtype-chip.unchecked .vtype-chip-dot {
    transform: scale(0.75);
    opacity: 0.5;
}

/* Footer chips */
.vtype-chips-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 2px 0 0;
}

.vtype-chips-badge {
    position: static;
    display: inline-flex;
    font-size: 8px;
    min-width: 16px;
    height: 16px;
    border: none;
}

/* Dark mode chips */
[data-theme="dark"] .vpanel-type-chips {
    background: rgba(30, 33, 48, 0.96);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

[data-theme="dark"] .vtype-chip {
    background: rgba(30, 33, 48, 0.9);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .vtype-chip-label {
    color: #cbd5e1;
}

[data-theme="dark"] .vtype-chip.unchecked {
    background: rgba(30, 33, 48, 0.5);
}

[data-theme="dark"] .vtype-chips-action-btn {
    background: rgba(30, 33, 48, 0.8);
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

/* Mobile chips — bottom sheet flottant */
@media (max-width: 768px) {
    .vpanel-type-chips {
        position: fixed;
        top: auto;
        bottom: 70px;
        right: 12px;
        left: 12px;
        max-width: none;
        border-radius: 14px;
        z-index: 9999;
    }

    .vtype-chips-grid {
        gap: 3px;
    }

    .vtype-chip {
        padding: 3px 6px;
        font-size: 9px;
    }

    .vtype-chip-dot {
        width: 6px;
        height: 6px;
    }
}


/* =====================================================
   MODE SIDEBAR — Filtre par type (panneau latéral permanent)
   ===================================================== */

.vpanel-type-sidebar {
    position: absolute;
    top: 0;
    right: calc(100% + 12px);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.7) inset;
    width: 220px;
    overflow: hidden;
    z-index: 2000;
    pointer-events: auto;
}

/* Header sidebar */
.vtype-sidebar-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.9), rgba(241, 245, 249, 0.9));
}

.vtype-sidebar-header-left {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.vtype-sidebar-title {
    font-size: 10px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.vtype-sidebar-actions {
    display: flex;
    gap: 3px;
}

.vtype-sidebar-actions .vtype-action-btn {
    padding: 3px 6px;
    font-size: 9px;
}

.vtype-sidebar-actions .vtype-action-btn span {
    display: none;
}

/* Body sidebar — scroll si beaucoup de types */
.vtype-sidebar-body {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.vtype-sidebar-body::-webkit-scrollbar {
    width: 3px;
}

.vtype-sidebar-body::-webkit-scrollbar-track {
    background: transparent;
}

.vtype-sidebar-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* Sidebar : liste en colonne unique compacte */
.vpanel-type-sidebar .vtype-dropdown-list {
    grid-template-columns: 1fr;
    padding: 6px 8px;
    gap: 1px;
}

.vpanel-type-sidebar .vtype-dropdown-option {
    padding: 5px 8px;
    min-height: 28px;
    gap: 6px;
    border-radius: 8px;
}

.vpanel-type-sidebar .vtype-dropdown-option .vtype-label {
    font-size: 11px;
}

.vpanel-type-sidebar .vtype-dropdown-option input {
    width: 13px;
    height: 13px;
}

.vpanel-type-sidebar .vtype-color {
    width: 10px;
    height: 10px;
}

.vpanel-type-sidebar .vtype-count {
    font-size: 9px;
    min-width: 18px;
    height: 16px;
    line-height: 16px;
    padding: 0 4px;
}

.vpanel-type-sidebar .vtype-dropdown-footer {
    padding: 5px 10px;
}

.vpanel-type-sidebar .vtype-footer-count {
    font-size: 9px;
}

/* Badge dans le header sidebar */
.vpanel-type-sidebar .type-badge {
    position: static;
    font-size: 8px;
    min-width: 16px;
    height: 16px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Dark mode sidebar */
[data-theme="dark"] .vpanel-type-sidebar {
    background: rgba(30, 33, 48, 0.96);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

[data-theme="dark"] .vtype-sidebar-header {
    background: rgba(26, 29, 39, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .vtype-sidebar-title {
    color: #94a3b8;
}

/* Mobile sidebar — bottom sheet */
@media (max-width: 768px) {
    .vpanel-type-sidebar {
        position: fixed;
        top: auto;
        bottom: 70px;
        right: 12px;
        left: 12px;
        width: auto;
        border-radius: 14px;
        z-index: 9999;
    }

    .vtype-sidebar-body {
        max-height: 40vh;
    }

    .vpanel-type-sidebar .vtype-dropdown-list {
        padding: 4px 6px;
    }

    .vpanel-type-sidebar .vtype-dropdown-option {
        padding: 4px 6px;
        min-height: 24px;
    }

    .vpanel-type-sidebar .vtype-label {
        font-size: 10px;
    }
}


/* ═══════════════════════════════════════════════════════════════
   FILTER BOTTOM SHEET — Style app native
   ═══════════════════════════════════════════════════════════════
   Barre réduite en bas avec rayon & compteur.
   Swipe up (mobile) ou clic (desktop) pour ouvrir les réglages.
   ═══════════════════════════════════════════════════════════════ */

/* ── Conteneur principal ── */
.filter-bottomsheet {
    width: 100% !important;
    z-index: 2100 !important;
    pointer-events: auto !important;
    margin: 0 !important;
}

/* ── Barre réduite (collapsed) ── */
.bs-collapsed-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    padding: 6px 16px calc(8px + env(safe-area-inset-bottom, 0px));
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
}

.bs-collapsed-bar:hover {
    background: rgba(248, 250, 252, 0.98);
    box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.12);
}

.bs-collapsed-bar:active {
    background: rgba(241, 245, 249, 0.98);
}

/* Handle de swipe */
.bs-handle {
    width: 36px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 2px;
    margin-bottom: 6px;
    transition: background 0.2s ease;
}

.bs-collapsed-bar:hover .bs-handle {
    background: #94a3b8;
}

/* Contenu de la barre */
.bs-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
}

/* Badge rayon */
.bs-radius-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    background: #f0fdf4;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.bs-radius-badge i {
    font-size: 12px;
}

.bs-radius-text {
    white-space: nowrap;
}

/* Badge compteur */
.bs-count-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.bs-count-badge #bsCountText {
    font-weight: 800;
    color: #3b82f6;
}

/* Bouton expand */
.bs-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.bs-expand-btn:hover {
    background: #e2e8f0;
    color: #334155;
    transform: translateY(-1px);
}

/* ── Panneau étendu (expanded) ── */
.bs-expanded-panel {
    display: none;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
    max-height: 70dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
    will-change: transform;
}

/* Header du panneau étendu */
.bs-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 8px;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(24px);
    z-index: 1;
}

.bs-panel-header .bs-handle {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0;
}

.bs-panel-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bs-panel-title i {
    color: #10b981;
    font-size: 13px;
}

/* ── Infos live dans le header (rayon + compteur) ── */
.bs-header-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    margin-right: 8px;
}

.bs-header-radius {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    background: #f0fdf4;
    padding: 3px 9px;
    border-radius: 6px;
    border: 1px solid rgba(16, 185, 129, 0.15);
    white-space: nowrap;
}

.bs-header-radius i {
    font-size: 10px;
}

.bs-header-count {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

.bs-header-count span:first-child {
    font-weight: 800;
    color: #3b82f6;
}

.bs-header-count-label {
    font-weight: 500 !important;
    color: #94a3b8 !important;
}

/* ── Dark mode — header info ── */
[data-theme="dark"] .bs-header-radius {
    background: rgba(16, 185, 129, 0.1);
    color: #e2e8f0;
    border-color: rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .bs-header-count {
    color: #94a3b8;
}

[data-theme="dark"] .bs-header-count span:first-child {
    color: #60a5fa;
}

.bs-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bs-close-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

/* Corps du panneau étendu */
.bs-panel-body {
    padding: 8px 16px 16px;
}

/* ── Override: bottom sheet force horizontal layout dans le panneau ── */
.bs-panel-body.vpanel-wrap {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    pointer-events: auto !important;
}

/* Slider group en horizontal dans le BS */
.bs-panel-body .vslider-group {
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
}

.bs-panel-body .vslider-track {
    flex: 1 !important;
    height: auto !important;
    min-width: 120px !important;
    width: auto !important;
    padding: 0 !important;
}

.bs-panel-body .vslider-label {
    font-size: 13px !important;
    font-weight: 800 !important;
    color: #10b981 !important;
    min-width: 50px;
    text-align: center;
    flex-shrink: 0;
}

.bs-panel-body .vslider-input {
    width: 100% !important;
    height: 6px !important;
    writing-mode: horizontal-tb !important;
    direction: ltr !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

.bs-panel-body .vslider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    cursor: pointer;
    margin-top: -8px;
}

.bs-panel-body .vslider-input::-webkit-slider-runnable-track {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
}

.bs-panel-body .vslider-input::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    border: none;
    cursor: pointer;
}

.bs-panel-body .vpanel-actions {
    flex-direction: row !important;
    justify-content: center;
    gap: 12px !important;
    width: 100% !important;
}

.bs-panel-body .vpanel-divider {
    width: 100% !important;
    height: 1px !important;
    background: #f1f5f9 !important;
    margin: 4px 0 !important;
}

.bs-panel-body .vpanel-count {
    font-size: 13px !important;
}

.bs-panel-body .vpanel-btn.reset-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
}

/* ── Dark mode support ── */
[data-theme="dark"] .bs-collapsed-bar {
    background: rgba(15, 23, 42, 0.97);
    border-top-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .bs-handle {
    background: #475569;
}

[data-theme="dark"] .bs-radius-badge {
    background: rgba(16, 185, 129, 0.1);
    color: #e2e8f0;
    border-color: rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .bs-count-badge {
    color: #94a3b8;
}

[data-theme="dark"] .bs-expand-btn,
[data-theme="dark"] .bs-close-btn {
    background: #1e293b;
    color: #94a3b8;
}

[data-theme="dark"] .bs-expanded-panel {
    background: rgba(15, 23, 42, 0.98);
    border-top-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .bs-panel-header {
    background: rgba(15, 23, 42, 0.98);
}

[data-theme="dark"] .bs-panel-title {
    color: #e2e8f0;
}

/* ── Desktop Bottom Sheet — version plus compacte ── */
@media (min-width: 769px) {
    .filter-bottomsheet {
        left: auto !important;
        right: auto !important;
        bottom: 12px !important;
        left: 50% !important;
        transform: translateX(-50%);
        max-width: 520px;
        width: calc(100% - 60px);
        border-radius: 14px;
        overflow: hidden;
    }

    .bs-collapsed-bar {
        border-radius: 14px;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
        border: 1px solid rgba(0, 0, 0, 0.06);
        padding: 8px 20px;
    }

    .bs-expanded-panel {
        border-radius: 14px;
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
        border: 1px solid rgba(0, 0, 0, 0.06);
        max-height: none;
        overflow: hidden;
    }

    .bs-handle {
        display: none;
    }

}

@media (max-width: 768px) {

    /* ── Hauteur de la bottom nav ── */
    :root {
        --bottom-nav-h: 56px;
    }



    /* Déjà géré dans la section Map Controls Grid — ne pas dupliquer */

    /* Le container Leaflet/MapLibre du bottom sheet — se cale AU-DESSUS de la bottom nav */
    .leaflet-bottom.leaflet-center,
    .maplibregl-ctrl-bottom-center {
        position: fixed !important;
        bottom: var(--bottom-nav-h, 56px) !important;
        left: 0 !important;
        right: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        z-index: 2100 !important;
        pointer-events: none;
        transform: none !important;
        width: auto !important;
        max-width: none !important;
        display: block !important;
    }

    /* Le bottom sheet lui-même — pleine largeur flush */
    .filter-bottomsheet {
        pointer-events: auto !important;
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
        position: relative !important;
        left: auto !important;
        right: auto !important;
    }

    /* ═══════════════════════════════════════════════════
       BOTTOM SHEET EXPANDED — Layout compact 1-2 lignes
       ═══════════════════════════════════════════════════ */

    /* Panneau étendu mobile — plein écran, pas de scroll */
    .bs-expanded-panel {
        width: 100% !important;
        box-sizing: border-box !important;
        max-height: none !important;
        overflow: visible !important;
        border-radius: 14px 14px 0 0 !important;
    }

    /* ── Header mobile : 1 ligne — titre | pastilles centrées | fermer ── */
    .bs-panel-header {
        flex-wrap: nowrap !important;
        padding: 18px 12px 8px !important;
        gap: 6px !important;
    }

    /* Titre à gauche — taille fixe, pas de croissance */
    .bs-panel-header .bs-panel-title {
        flex: 0 0 auto !important;
        font-size: 13px !important;
    }

    /* P2-1 FIX: taille cible tactile ≥ 44px */
    .bs-panel-header .bs-close-btn {
        flex: 0 0 auto !important;
        width: 44px !important;
        height: 44px !important;
        font-size: 14px !important;
    }

    /* Pastilles centrées — prennent tout l'espace restant */
    .bs-panel-header .bs-header-info {
        display: flex !important;
        flex: 1 1 auto !important;
        justify-content: center !important;
        align-items: center !important;
        margin: 0 !important;
        gap: 8px !important;
        padding: 0 !important;
        border: none !important;
    }

    .bs-panel-header .bs-header-radius {
        font-size: 11px !important;
        padding: 0 8px !important;
        height: 28px !important;
        line-height: 28px !important;
    }

    .bs-panel-header .bs-header-count {
        font-size: 11px !important;
        height: 28px !important;
        line-height: 28px !important;
    }

    .bs-panel-header .bs-header-count span:first-child {
        font-size: 12px !important;
    }

    /* Dark mode */
    [data-theme="dark"] .bs-panel-header .bs-header-info {
        border: none !important;
    }

    /* Corps du panneau étendu — layout row wrap pour slider + actions sur 1 ligne */
    .bs-panel-body.vpanel-wrap {
        display: flex !important;
        flex-flow: row wrap !important;
        align-items: center !important;
        gap: 6px !important;
        padding: 10px 14px 10px !important;
        width: 100% !important;
        min-height: auto !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        box-sizing: border-box !important;
    }

    /* ── LIGNE 1 : Slider rayon + compteur ── */

    /* Slider groupe — prend l'espace restant, même ligne que les actions */
    .bs-panel-body.vpanel-wrap .vslider-group {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 6px !important;
        flex: 1 1 0% !important;
        min-width: 0 !important;
        padding: 0 !important;
        background: none !important;
        border: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
    }

    .bs-panel-body.vpanel-wrap .vslider-icon {
        order: 0 !important;
        font-size: 13px !important;
        width: 16px !important;
        flex-shrink: 0 !important;
        display: flex !important;
        justify-content: center !important;
    }

    .bs-panel-body.vpanel-wrap .vslider-track {
        order: 1 !important;
        flex: 1 !important;
        min-width: 60px !important;
        max-width: none !important;
        height: auto !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
    }

    .bs-panel-body.vpanel-wrap .vslider-label {
        order: 2 !important;
        font-size: 11px !important;
        font-weight: 800 !important;
        color: #10b981 !important;
        min-width: 32px !important;
        text-align: right !important;
        flex-shrink: 0 !important;
        margin: 0 !important;
    }

    .bs-panel-body.vpanel-wrap .vslider-input {
        width: 100% !important;
        height: 4px !important;
        writing-mode: horizontal-tb !important;
        direction: ltr !important;
    }

    /* Actions (compteur + toggle) — compact, inline avec le slider */
    .bs-panel-body.vpanel-wrap .vpanel-actions {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 4px !important;
        width: auto !important;
        flex-shrink: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        height: auto !important;
        border: none !important;
    }

    .bs-panel-body.vpanel-wrap .vpanel-count {
        font-size: 10px !important;
        font-weight: 700 !important;
        padding: 3px 6px !important;
        border-radius: 5px !important;
        background: #f1f5f9 !important;
        color: #64748b !important;
        display: flex !important;
        height: auto !important;
        white-space: nowrap !important;
    }

    /* P2-1 FIX: taille cible tactile ≥ 44px */
    .bs-panel-body.vpanel-wrap .vpanel-btn.reset-btn {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        min-height: 44px !important;
        font-size: 14px !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Divider — masqué en bottom sheet mobile (inutile en row wrap) */
    .bs-panel-body.vpanel-wrap .vpanel-divider {
        display: none !important;
    }

    /* Bouton Pro — pleine largeur, sa propre ligne */
    .bs-panel-body.vpanel-wrap .vpanel-pro-btn {
        flex: 0 0 100% !important;
        height: 28px !important;
        width: 100% !important;
        padding: 0 10px !important;
        font-size: 11px !important;
        border-radius: 6px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
    }

    /* ── LIGNE 3 : Filtre type distributeur ── */
    .bs-panel-body.vpanel-wrap .vpanel-type-selector {
        width: 100% !important;
        flex: 0 0 100% !important;
        margin: 0 !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }

    /* Bouton trigger masqué — le dropdown s'ouvre directement */
    .bs-panel-body.vpanel-wrap .type-trigger-btn {
        display: none !important;
    }

    /* Badge compteur positionné en absolute pour ne pas décaler le texte centré */
    .bs-panel-body.vpanel-wrap .type-trigger-btn .type-badge {
        position: absolute !important;
        right: 8px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        font-size: 9px !important;
        padding: 2px 5px !important;
        border-radius: 4px !important;
    }

    /* Type chips — pleine largeur */
    .bs-panel-body.vpanel-wrap .vpanel-type-chips,
    .bs-panel-body.vpanel-wrap .vpanel-type-sidebar {
        width: 100% !important;
        flex: 0 0 100% !important;
    }

    .bs-panel-body.vpanel-wrap .vtype-chips-grid {
        max-height: 100px !important;
    }

    /* ═══════════════════════════════════════════════════
       ACCORDÉON INLINE — Dropdown type dans le bottom sheet
       Le dropdown s'ouvre sous le bouton trigger, directement
       dans le panneau, avec animation slide-down.
       ═══════════════════════════════════════════════════ */

    /* Dropdown en mode accordéon : caché par défaut, inline */
    .vtype-dropdown.bs-inline-accordion {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100% !important;
        min-width: unset !important;
        transform: none !important;
        border-radius: 10px !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        box-shadow: none !important;
        border: 1px solid #e2e8f0 !important;
        background: #fafbfc !important;
        z-index: auto !important;
        /* FIX C1: reset visibility héritée de .vtype-dropdown desktop */
        visibility: visible !important;
        /* Fermé par défaut : masqué */
        display: block !important;
        max-height: 0 !important;
        opacity: 0 !important;
        overflow: hidden !important;
    }

    /* Accordéon ouvert — affichage instantané */
    .vtype-dropdown.bs-inline-accordion.open {
        display: flex !important;
        flex-flow: row wrap !important;
        max-height: 2000px !important;
        opacity: 1 !important;
        visibility: visible !important;
        overflow: visible !important;
        margin-top: 6px !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    }

    /* Header + Vérifiés sur 1 ligne (hérité de .open qui est flex row wrap) */

    .vtype-dropdown.bs-inline-accordion .vtype-dropdown-header {
        flex: 1 1 auto !important;
        padding: 6px 10px !important;
        background: #f1f5f9;
        border-bottom: none !important;
        position: sticky;
        top: 0;
        z-index: 1;
        display: flex !important;
        align-items: center !important;
    }

    .vtype-dropdown.bs-inline-accordion .vtype-dropdown-title {
        font-size: 10px !important;
    }

    /* Section Vérifiés — compacte, même ligne que le header */
    .vtype-dropdown.bs-inline-accordion .vtype-verified-section {
        flex: 0 0 auto !important;
        padding: 4px 10px !important;
        background: rgba(251, 191, 36, 0.06) !important;
        border-bottom: none !important;
        gap: 4px !important;
        font-size: 10px !important;
    }

    .vtype-dropdown.bs-inline-accordion .vtype-verified-text {
        font-size: 10px !important;
    }

    .vtype-dropdown.bs-inline-accordion .vtype-verified-section::before {
        height: 0 !important;
        display: none !important;
    }

    .vtype-dropdown.bs-inline-accordion .vtype-verified-desc {
        display: none !important;
    }

    .vtype-dropdown.bs-inline-accordion .vtype-verified-icon {
        font-size: 14px !important;
    }

    /* Body + Footer — pleine largeur, nouvelle ligne */
    .vtype-dropdown.bs-inline-accordion .vtype-dropdown-body {
        flex: 0 0 100% !important;
        border-top: 1px solid #e2e8f0;
    }

    /* Bouton fermer — masqué (le trigger fait toggle) */
    .vtype-dropdown.bs-inline-accordion .vtype-close-btn {
        display: none !important;
    }

    /* Liste des types — compacte */
    .vtype-dropdown.bs-inline-accordion .vtype-dropdown-body {
        padding: 4px 0 !important;
    }

    .vtype-dropdown.bs-inline-accordion .vtype-dropdown-option {
        padding: 6px 12px !important;
        min-height: 28px !important;
        font-size: 12px !important;
    }

    .vtype-dropdown.bs-inline-accordion .vtype-dropdown-footer {
        padding: 6px 12px !important;
        font-size: 10px !important;
        border-top: 1px solid #e2e8f0;
    }

    /* Le vpanel-type-selector doit englober le dropdown accordéon */
    .bs-panel-body.vpanel-wrap .vpanel-type-selector {
        width: 100% !important;
        flex: 0 0 100% !important;
        display: flex !important;
        flex-direction: column !important;
        margin: 0 !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }

    /* ── v6.8.5 : Dark Mode — Bottom Sheet Accordion ── */
    [data-theme="dark"] .vtype-dropdown.bs-inline-accordion {
        background: rgba(30, 33, 48, 0.96) !important;
        border-color: rgba(255, 255, 255, 0.08) !important;
    }

    [data-theme="dark"] .vtype-dropdown.bs-inline-accordion.open {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    }

    [data-theme="dark"] .vtype-dropdown.bs-inline-accordion .vtype-dropdown-header {
        background: rgba(26, 29, 39, 0.9);
    }

    [data-theme="dark"] .vtype-dropdown.bs-inline-accordion .vtype-dropdown-title {
        color: #94a3b8;
    }

    [data-theme="dark"] .vtype-dropdown.bs-inline-accordion .vtype-dropdown-body {
        border-top-color: rgba(255, 255, 255, 0.06);
    }

    [data-theme="dark"] .vtype-dropdown.bs-inline-accordion .vtype-dropdown-option:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    [data-theme="dark"] .vtype-dropdown.bs-inline-accordion .vtype-label {
        color: #e4e6f0;
    }

    [data-theme="dark"] .vtype-dropdown.bs-inline-accordion .vtype-dropdown-footer {
        background: rgba(26, 29, 39, 0.6);
        border-top-color: rgba(255, 255, 255, 0.06);
    }

    [data-theme="dark"] .vtype-dropdown.bs-inline-accordion .vtype-footer-count {
        color: #64748b;
    }

    [data-theme="dark"] .vtype-dropdown.bs-inline-accordion .vtype-verified-section {
        background: rgba(245, 158, 11, 0.1) !important;
    }

    [data-theme="dark"] .vtype-dropdown.bs-inline-accordion .vtype-verified-text {
        color: #fbbf24 !important;
    }
}



/* ═══════════════════════════════════════════════════════════════
   CARTE — Ordre des contrôles (v9.5)
   Ordre visuel (haut → bas) dans top-right : Couches > Recherche > Recentrage
   Ordre visuel dans bottom-right : Recentrage > Zoom +/-
   MapLibre utilise display:block par défaut — on force flex pour order
   ═══════════════════════════════════════════════════════════════ */
.maplibregl-ctrl-top-right,
.maplibregl-ctrl-bottom-right {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
}
/* top-right : Couches(1) > Recherche(2) > Recentrage(3) */
.tile-selector-control   { order: 1 !important; }
.search-control-btn      { order: 2 !important; }
.recenter-control-btn    { order: 3 !important; }
/* bottom-right : Recentrage(1) > Zoom(10) > Copyright(20) */
.maplibregl-ctrl-bottom-right .recenter-control-btn { order: 1 !important; margin-bottom: 8px !important; }
.maplibregl-ctrl-bottom-right .maplibregl-ctrl-group:has(.maplibregl-ctrl-zoom-in) { order: 10 !important; }
.maplibregl-ctrl-bottom-right .maplibregl-ctrl-attrib { order: 20 !important; }

/* ═══════════════════════════════════════════════════════════════
   TILE SELECTOR — Sélecteur de fonds de carte (v6.0.0)
   ═══════════════════════════════════════════════════════════════ */

/* ── Conteneur principal ── */
.tile-selector-control {
    position: relative;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
    /* Override leaflet-bar overflow:hidden for dropdown */
}

/* ── Bouton principal ── */
.tile-selector-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 8px !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.06) !important;
    color: #475569 !important;
    font-size: 15px !important;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.tile-selector-btn:hover {
    background: rgba(255, 255, 255, 1) !important;
    color: #0ea5e9 !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2),
        0 2px 6px rgba(0, 0, 0, 0.08) !important;
    transform: translateY(-1px);
}

.tile-selector-control.open .tile-selector-btn {
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35) !important;
}

/* ── Panel déroulant ── */
.tile-selector-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    flex-direction: column;
    gap: 3px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
        0 4px 16px rgba(0, 0, 0, 0.06);
    min-width: 140px;
    z-index: 1000;
    animation: tilePanelIn 0.2s ease;
}

@keyframes tilePanelIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ── Options individuelles ── */
.tile-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    width: 100%;
    text-align: left;
}

.tile-option i {
    width: 18px;
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
    transition: all 0.15s ease;
}

.tile-option:hover {
    background: rgba(14, 165, 233, 0.08);
    color: #0ea5e9;
}

.tile-option:hover i {
    opacity: 1;
    color: #0ea5e9;
}

/* ── Option active ── */
.tile-option.active {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(2, 132, 199, 0.08));
    color: #0284c7;
    font-weight: 600;
}

.tile-option.active i {
    opacity: 1;
    color: #0ea5e9;
}

.tile-option.active::before {
    content: '';
    position: absolute;
    left: 6px;
    width: 3px;
    height: 18px;
    background: linear-gradient(180deg, #0ea5e9, #0284c7);
    border-radius: 2px;
}

.tile-option {
    position: relative;
    padding-left: 18px;
}

/* ── Mobile : contrôle compact ── */
@media (max-width: 768px) {
    .tile-selector-btn {
        width: 32px;
        height: 32px;
        font-size: 14px !important;
        border-radius: 6px !important;
    }

    /* Bottom sheet au lieu de popup dropdown */
    .tile-selector-panel {
        position: fixed !important;
        top: auto !important;
        bottom: calc(var(--bottom-nav-h, 56px) + env(safe-area-inset-bottom, 0px)) !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        border-radius: 16px 16px 0 0 !important;
        padding: 16px 16px 12px !important;
        gap: 6px;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.12) !important;
        border: none !important;
        border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
        z-index: 3000 !important;
        animation: tileSheetUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    }

    /* Poignée de drag */
    .tile-selector-panel::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        background: #d1d5db;
        border-radius: 2px;
        margin: 0 auto 12px;
    }

    @keyframes tileSheetUp {
        from {
            opacity: 0;
            transform: translateY(100%);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .tile-option {
        padding: 12px 16px !important;
        padding-left: 20px !important;
        font-size: 15px !important;
        gap: 12px;
        border-radius: 10px;
    }

    .tile-option i {
        font-size: 16px !important;
        width: 20px;
    }

    /* Dark mode bottom sheet */
    [data-theme="dark"] .tile-selector-panel {
        background: rgba(15, 23, 42, 0.98) !important;
        border-top-color: rgba(255, 255, 255, 0.08) !important;
    }

    [data-theme="dark"] .tile-selector-panel::before {
        background: rgba(255, 255, 255, 0.2);
    }
}


/* -----------------------------------------------------------------
   MARKER CLUSTER ANIMATION -- Fade only, no slide v6.8.2
   -----------------------------------------------------------------
   Supprime le slide (transform) natif de leaflet.markercluster.
   Les markers apparaissent a leur position finale avec un fade.
   ----------------------------------------------------------------- */

/* Fade uniquement — PAS de transform transition (supprime le slide) */
.leaflet-cluster-anim .leaflet-marker-icon,
.leaflet-cluster-anim .leaflet-marker-shadow {
    transition: opacity 0.35s ease !important;
}

/* Clusters : fade doux */
.marker-cluster {
    transition: opacity 0.3s ease !important;
}