#mapContainer {
    height: 600px;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    position: relative;
}

#sidebar {
    height: 100%;
    padding: 15px;
    overflow-y: auto;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.legend {
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 15px;
    border-radius: 5px;
    line-height: 1.4;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-size: 0.85rem;
    backdrop-filter: blur(5px);
}

.legend i {
    width: 14px;
    height: 14px;
    float: left;
    margin-right: 6px;
    opacity: 0.9;
    border-radius: 3px;
}

.leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.popup-card {
    min-width: 300px;
    max-width: 400px;
    font-family: 'Segoe UI', sans-serif;
    color: #333;
}

.popup-card .project-title {
    font-weight: bold;
    margin-bottom: 10px;
    color: #1a73e8;
    font-size: 1rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.popup-card .project-info {
    font-size: 0.9em;
    margin-bottom: 3px;
}

.popup-card .badge {
    font-size: 0.8em;
}

/* Styles pour les marqueurs stables */
.stable-marker {
    background: rgba(247, 174, 23, 0.9);
    border: 3px solid white;
    border-radius: 50%;
    height: 20px;
    width: 20px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.stable-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
}

.stable-marker i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
}

/* Contrôles de carte personnalisés */
.map-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-control-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: white;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.map-control-btn:hover {
    background: #f5f5f5;
    transform: scale(1.05);
}

.map-control-btn.active {
    background: #007bff;
    color: white;
}


/* Contrôles de données */
#nav-controls {
    display: flex;
    flex-direction: column;
    background-color: white;
    border: #42822f solid 1px;
    border-radius: 5px;
}

#mapPanelTab {
    background-color: transparent;
    display: flex;
}

#mapPanelTab li {
    border: #fff solid 1px;
    border-radius: 5px 5px 0 0;
    color: white;
}

#mapPanelTab li .nav-link {
    background-color: #42822f;
    border: #fff solid 1px;
    border-radius: 5px 5px 0 0;
    color: white;
    transition: 0.2s ease-in-out;
}

#mapPanelTab li .nav-link:hover {
    background-color: #14b53a;
    border: #14b53a solid 1px;
}

#mapPanelTab li .nav-link.active {
    background-color: #14b53a;
    color: #fff !important;
    border: #14b53a solid 1px;
    cursor: default;
    border-bottom: none;
}

#mapPanelTab li .nav-link:hover .badge {
    background-color: #42822f !important;
}

#mapPanelTab li .nav-link.active .badge {
    background-color: #42822f !important;
}

#mapPanelTabContent {
    width: 100%;
    height: 300px;
    overflow-y: auto;
    padding: 5px;
}

/* Recherche */
.search-container {
    position: absolute;
    top: 10px;
    left: 55px;
    right: 60px;
    z-index: 1000;
    max-width: 400px;
    border-radius: 5px;
}

.progress-indicator {
    height: 4px;
    background: linear-gradient(90deg, #4CAF50, #8BC34A, #CDDC39);
    width: 0%;
    transition: width 0.5s ease;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1001;
}

/* Styles pour les statistiques */
.stats-panel {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    max-width: 300px;
    z-index: 1000;
}

.stats-panel h6 {
    margin-bottom: 10px;
    color: #1a73e8;
}

.stats-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.85rem;
}

/* Styles pour la recherche */
#searchResults {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1001;
}

.search-result-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Styles pour les barres de progression */
.progress-bar-container {
    height: 6px;
    background-color: #e9ecef;
    border-radius: 3px;
    margin: 5px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

/* Styles pour le sélecteur de carte */
.basemap-selector {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: white;
    border-radius: 5px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* ######################################################### */
/* ######################################################### */
/* Animations pour les marqueurs */
.animated-marker .pulse-ring {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 40px;
    height: 40px;
    border: 2px solid #f7ae17;
    border-radius: 50%;
    animation: pulse 2s infinite;
    opacity: 0;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }

    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Animations pour les boutons */
.button-pulse {
    animation: buttonPulse 0.6s ease-in-out;
}

@keyframes buttonPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Animations pour les éléments de liste */
.highlight-item {
    animation: highlightFlash 2s ease-in-out;
}

@keyframes highlightFlash {

    0%,
    100% {
        background-color: transparent;
    }

    50% {
        background-color: #e3f2fd;
    }
}

.label-highlight {
    animation: labelHighlight 1s ease-in-out;
}

@keyframes labelHighlight {

    0%,
    100% {
        color: inherit;
    }

    50% {
        color: #1976d2;
        font-weight: bold;
    }
}

/* Animations pour les marqueurs de recherche */
.animated-highlight {
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Animation pour les clusters */
.cluster-pulse {
    animation: clusterPulse 2s ease-in-out;
}

@keyframes clusterPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Animation pour le marqueur utilisateur */
.user-marker-bounce {
    animation: userBounce 0.8s ease-in-out;
}

@keyframes userBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Légende animée */
.animated-legend {
    animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    z-index: 1000;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.notification-info {
    background: #2196F3;
}

.notification-error {
    background: #f44336;
}

/* Transition pour la barre de progression */
#progressIndicator {
    transition: width 0.3s ease-out, opacity 0.3s ease-out;
}

/* Styles pour les marqueurs */
.user-location-marker .user-marker {
    background: #4285F4;
    border: 3px solid white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}