/* ============================
   MAP CONTAINER
============================ */
#map-marches {
    width: 100%;
    max-width: 100%;
    height: 480px;
}

/* ============================
   BUTTON "GO"
============================ */
.btn-go {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 10px;
    background: #2b6cb0;
    color: #fff !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
}
.btn-go:hover {
    background: #2c5282;
}

/* ============================
   POPUP LEAFLET – FIX
============================ */
.leaflet-popup-content-wrapper {
    padding: 0 !important;
    border-radius: 10px !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

/* ============================
   POPUP PREMIUM
============================ */
.popup-premium {
    padding: 10px;
    max-width: 260px;
    font-size: 0.85rem;
    line-height: 1.3;
}

.popup-premium img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 6px;
    display: block;
    max-width: 200px;
    margin: 0 auto 10px;
}

.popup-premium h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
}

.popup-premium a {
    color: #2b6cb0;
    text-decoration: none;
}
.popup-premium a:hover {
    text-decoration: underline;
}

/* ============================
   MAP CONTROLS (PC)
============================ */
.map-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    z-index: 1000;
}

.btn-map {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(6px);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-map:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
}

/* ============================
   MARKER HOVER EFFECT
============================ */
.leaflet-marker-icon {
    transition: transform 0.25s ease, filter 0.25s ease;
}
.leaflet-marker-icon:hover {
    transform: translateY(-3px);
    filter: drop-shadow(0 0 6px rgba(30, 100, 200, 0.6));
}

/* ============================
   DESIGN IOS (TOGGLE)
============================ */
.ios-toggle {
    z-index: 9999;
}

.toggle-container {
    position: relative;
    display: inline-flex;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(6px);
    border-radius: 20px;
    padding: 4px;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.toggle-option {
    position: relative;
    z-index: 2;
    padding: 6px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.toggle-pill {
    position: absolute;
    top: 3px;
    height: calc(100% - 6px);
    background: #2b6cb0;
    border-radius: 16px;
    transition: all 0.25s ease;
    z-index: 1;
}

.toggle-option.active {
    color: white;
    font-weight: 600;
    text-shadow: 0 0 4px rgba(0,0,0,0.4);
}

/* ============================
   PANNEAU LIEUX
============================ */
.side-panel {
    position: absolute;
    bottom: 80px; 
    left: 10px;
    max-width: 260px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.5);
    font-size: 0.9rem;
    z-index: 9999;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.side-panel.hidden {
    transform: translateX(-20px);
    opacity: 0;
    pointer-events: none;
}

.side-panel h3 { margin: 0 0 10px 0; font-size: 1rem; color: #1a4f8b; }
.side-panel ul { list-style: none; padding: 0; margin: 0; }
.side-panel li { padding: 6px 0; border-bottom: 1px solid rgba(0,0,0,0.08); cursor: pointer; }
.side-panel li:hover { color: #2b6cb0; font-weight: 600; }

/* ===========================================
   ADAPTATION MOBILE (Écrans < 768px)
   Centrage de la barre et des boutons
============================================== */
@media (max-width: 767px) {
    .map-controls {
        flex-direction: row;      /* Ligne horizontale */
        flex-wrap: wrap;          /* Retour à la ligne si besoin */
        justify-content: center;  /* Centrage horizontal des boutons */
        align-items: center;
        width: auto;              /* Largeur auto pour le centrage */
        left: 0 !important;       /* Aligné sur les bords pour pouvoir centrer */
        right: 0 !important;
        bottom: 10px !important;  /* Position basse */
        padding: 5px;
    }

    .btn-map {
        padding: 8px 12px;
        font-size: 0.75rem;
        flex: 0 1 auto;           /* Ne s'étire pas trop */
        justify-content: center;
    }

    .side-panel {
        bottom: 130px;            /* Monte au-dessus de la barre centrée */
        left: 5%;
        width: 90%;
        max-width: none;
    }
}