/* Conteneur principal de la carte */
#carte-inscriptions-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* En-tête de la carte */
.carte-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #007bff;
}

.carte-header h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.5rem;
}

/* Légende */
.carte-legende {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.legende-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 0.9rem;
}

.legende-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.legende-cm1 {
    background-color: #FFD700;
}

.legende-cm2 {
    background-color: #28a745;
}

.legende-6e {
    background-color: #9B59B6;
}

/* Statistiques */
.carte-stats {
    font-size: 0.95rem;
    color: #495057;
}

.carte-stats strong {
    color: #007bff;
    font-weight: 600;
}

/* Conteneur de la carte */
#carte-inscriptions {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    z-index: 1;
}

/* Indicateur de chargement */
.carte-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-align: center;
    z-index: 1000;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.carte-loading p {
    margin: 0;
    color: #495057;
    font-weight: 500;
}

/* Personnalisation des icônes de marqueurs */
.custom-marker-icon {
    background: none;
    border: none;
}

/* Style des popups */
.marker-popup {
    font-family: -apple-system, system-ui, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
    min-width: 250px;
}

.marker-popup h4 {
    margin: 0 0 10px 0;
    color: #007bff;
    font-size: 1.1rem;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

.marker-popup p {
    margin: 5px 0;
    font-size: 0.9rem;
    color: #495057;
}

.marker-popup strong {
    color: #333;
    font-weight: 600;
}

/* Style des clusters - Personnalisation */
.marker-cluster-small {
    background-color: rgba(181, 226, 140, 0.6);
}

.marker-cluster-small div {
    background-color: rgba(110, 204, 57, 0.6);
}

.marker-cluster-medium {
    background-color: rgba(241, 211, 87, 0.6);
}

.marker-cluster-medium div {
    background-color: rgba(240, 194, 12, 0.6);
}

.marker-cluster-large {
    background-color: rgba(253, 156, 115, 0.6);
}

.marker-cluster-large div {
    background-color: rgba(241, 128, 23, 0.6);
}

/* Clusters - Taille et forme */
.marker-cluster {
    background-clip: padding-box;
    border-radius: 20px;
}

.marker-cluster div {
    width: 30px;
    height: 30px;
    margin-left: 5px;
    margin-top: 5px;
    text-align: center;
    border-radius: 15px;
    font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
    font-weight: bold;
}

.marker-cluster span {
    line-height: 30px;
    color: #fff;
}

/* Contrôles de zoom Leaflet */
.leaflet-control-zoom a {
    background-color: #fff;
    color: #007bff;
}

.leaflet-control-zoom a:hover {
    background-color: #007bff;
    color: #fff;
}

/* Attribution Leaflet */
.leaflet-control-attribution {
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.8);
}

/* Responsive */
@media (max-width: 768px) {
    #carte-inscriptions-wrapper {
        padding: 15px;
        margin: 10px;
    }

    .carte-header h3 {
        font-size: 1.2rem;
    }

    .carte-legende {
        gap: 10px;
    }

    .legende-item {
        font-size: 0.85rem;
        padding: 4px 8px;
    }

    .carte-stats {
        font-size: 0.85rem;
    }

    #carte-inscriptions {
        height: 400px !important;
    }

    .marker-popup {
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .carte-legende {
        flex-direction: column;
        gap: 8px;
    }

    .carte-stats {
        font-size: 0.8rem;
    }

    #carte-inscriptions {
        height: 350px !important;
    }
}
