#mapWrapper {
    position: relative;
    width: 100%;
    height: 450px; /* ou ta hauteur actuelle */
}

#map {
    width: 100%;
    height: 100%;
}

/* Loader qui recouvre UNIQUEMENT la map */
.map-loader {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}

.map-loader.hidden {
    display: none;
}



.loader-text {
    margin-top: 12px;
    font-weight: 600;
    color: var(--primary-color);
}





.page-loader {
    position: fixed;        /* couvre la fenêtre */
    top: 50%;               /* centre verticalement */
    left: 50%;              /* centre horizontalement */
    transform: translate(-50%, -50%); /* correction pour centrer exactement */
    background: rgba(0,0,0,0.3); /* grise tout derrière */
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    pointer-events: all;    /* bloque tous les clics */
    display: block;         /* nécessaire pour que transform fonctionne */
}

/* cacher par défaut */
.page-loader.hidden {
    display: none;
}

/* Contenu du loader */
.loader-content {
    background: #fff;
    color: #222;
    padding: 30px 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    line-height: 1.4;
}

/* Spinner */
.spinner {
    margin-top: 15px;
    width: 40px;
    height: 40px;
    border: 4px solid #ccc;
    border-top-color: #222;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
