/* ==========================================================================
   BULLE DE LÉGENDE INTERACTIVE SUR L'ÉCRAN
   ========================================================================== */

.legend-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
    max-width: 280px;
    max-height: 250px; /* Ajoute une barre de défilement si la liste est trop longue */
    overflow-y: auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #2c3e50;
    margin-bottom: 30px !important; 
    margin-right: 12px !important;
}

.legend-title {
    margin: 0 0 8px 0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 4px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 6px 0;
    font-size: 12px;
    animation: fadeIn 0.2s ease-in-out;
}

.legend-item-text {
    line-height: 14px;
}

.legend-empty {
    margin: 0;
    font-size: 11px;
    color: #7f8c8d;
    font-style: italic;
}

/* --- STRUCTURE DES MINI SYMBOLES GRAPHIQUES --- */
.leg-symbole {
    display: inline-block;
    margin-right: 10px;
    flex-shrink: 0; /* Évite que le symbole se déforme si le texte prend de la place */
}

/* Modèle Rond (Caméras, Poteaux, Armoires) */
.leg-circle {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid #ffffff;
    box-shadow: 0 0 2px rgba(0,0,0,0.4);
}

/* Modèle Ligne (Câbles de réseaux, Électricité) */
.leg-line {
    width: 22px;
    height: 0;
    border-top-width: 3px;
}

/* Modèle Losange (Points d'Apport Volontaire) */
.leg-diamond {
    width: 7px;
    height: 7px;
    border: 1.5px solid #222222;
    transform: rotate(45deg);
    margin-left: 4px;
    margin-right: 13px;
}

/* Modèle Surface / Polygone (Parcelles, Cône d'angle, Zones d'intérêt) */
.leg-poly {
    width: 16px;
    height: 10px;
    border: 1.5px solid;
    border-radius: 2px;
    box-sizing: border-box;
}

/* Effet d'apparition doux lors du cochage */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: translateY(0); }
}
