/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

/* Carte plein écran */
#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

/* Interface utilisateur - en haut à droite */
#ui-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Sélecteur de langue */
#languageSelector {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #007cad;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    min-width: 120px;
}

#languageSelector:hover {
    background: white;
    border-color: #0056b3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#languageSelector:focus {
    outline: none;
    border-color: #004085;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

#languageSelector option {
    background: white;
    color: #333;
    padding: 5px;
}

/* Contrôles de zoom personnalisés */
#zoom-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#zoom-controls button {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #007cad;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
    color: #007cad;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

#zoom-controls button:hover {
    background: #007cad;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#zoom-controls button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

#zoom-controls button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

/* Affichage du niveau de zoom - position absolue en bas à gauche */
#zoom-level {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    border: 2px solid #007cad;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    min-width: 80px;
    text-align: center;
}

#zoom-value {
    color: #007cad;
    font-weight: bold;
}

/* Personnalisation du géocodeur Leaflet */
.leaflet-control-geocoder {
    margin-top: 70px !important;
    margin-right: 0px !important;
}

.leaflet-control-geocoder.leaflet-control {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #007cad;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.leaflet-control-geocoder-form input {
    border: none;
    padding: 10px;
    font-size: 14px;
    border-radius: 4px;
    width: 200px;
}

.leaflet-control-geocoder-form button {
    background: #007cad;
    border: none;
    color: white;
    padding: 10px;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.leaflet-control-geocoder-form button:hover {
    background: #0056b3;
}

.leaflet-control-geocoder-alternatives {
    background: white;
    border: 2px solid #007cad;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
}

.leaflet-control-geocoder-alternatives a {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    color: #333;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
}

.leaflet-control-geocoder-alternatives a:hover {
    background: #f8f9fa;
    color: #007cad;
}

/* Responsivité pour mobiles */
@media (max-width: 768px) {
    #ui-controls {
        top: 10px;
        right: 10px;
    }
    
    #zoom-controls {
        top: 10px;
        left: 10px;
    }
    
    #zoom-controls button {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .leaflet-control-geocoder {
        margin-top: 60px !important;
    }
    
    .leaflet-control-geocoder-form input {
        width: 150px;
        padding: 8px;
        font-size: 12px;
    }
    
    #zoom-level {
        bottom: 10px;
        left: 10px;
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* Animation de chargement */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Styles pour les tooltips */
.tooltip {
    position: relative;
}

.tooltip:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1001;
}