/* --- Structure du Conteneur Principal --- */
#wrapper-situation { 
    width: 100%; 
    height: 80vh; 
    min-height: 450px; 
    position: relative; 
    background: #f0f0f0; 
    border-radius: 12px;
    overflow: hidden; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

#map-situation { 
    width: 100%; 
    height: 100%; 
    z-index: 1;
}

/* --- Positionnement des Blocs de Contrôles --- */
.map-controls-right { 
    position: absolute; 
    top: 20px; 
    right: 20px; 
    z-index: 1000; 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}

.map-controls-left { 
    position: absolute; 
    top: 20px; 
    left: 20px; 
    z-index: 1000; 
    display: flex; 
    flex-direction: column; 
    gap: 12px; /* Espace entre Actualiser et Voir tout */
}

/* --- Design des Boutons (Embellis) --- */
.ctrl-btn { 
    padding: 12px 18px; 
    background: rgba(26, 42, 64, 0.85); /* Bleu nuit semi-transparent */
    color: white !important; 
    border-radius: 8px; 
    cursor: pointer; 
    border: 1px solid rgba(255,255,255,0.15);
    font-weight: 600; 
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    backdrop-filter: blur(5px); /* Effet de flou derrière le bouton */
    outline: none;
}

.ctrl-btn:hover {
    background: rgba(26, 42, 64, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.ctrl-btn:active {
    transform: translateY(0px);
}

.ctrl-btn.active { 
    background: #8ca927; /* Vert Mas de la Baou */
    border-color: #a7c439;
    box-shadow: 0 4px 12px rgba(140, 169, 39, 0.4);
}

/* Style spécifique pour différencier les boutons de gauche */
#btn-refresh, #btn-show-all {
    background: rgba(45, 62, 80, 0.9);
    text-transform: none; /* Plus lisible pour des textes longs */
}

/* --- Stabilisation complète des popups Leaflet (Correction Chrome) --- */
.leaflet-popup-content-wrapper,
.leaflet-popup-content {
    display: block !important;
    overflow: visible !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 10px !important;
}

.popup-premium {
    font-family: Arial, sans-serif;
    background: white;
    border-radius: 10px;
    padding: 12px;
    width: 220px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    line-height: 1.4 !important;
}

.popup-premium img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
}

.popup-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1a2a40;
}

.popup-btn {
    display: inline-block;
    padding: 8px 14px;
    background: #1a2a40;
    color: white !important;
    border-radius: 6px;
    text-decoration: none !important;
    margin-top: 10px;
    font-size: 13px;
    transition: background 0.2s;
}

.popup-btn:hover {
    background: #8ca927;
}

/* Masquer les instructions de routage par défaut */
.leaflet-routing-container {
    display: none !important;
}

/* --- Mobile Optimisation --- */
@media (max-width: 768px) {
    #wrapper-situation { height: 60vh; }
    .ctrl-btn { padding: 10px 12px; font-size: 11px; }
}