/* ===========================================
   MWL – LOCALISATION SVG (Frontend)
   =========================================== */

.mwl-locsvg-wrapper {
    --mwl-locsvg-map-fr: none;
    --mwl-locsvg-map-ma: none;
    --mwl-locsvg-cards-desk: 5;
    --mwl-locsvg-cards-tabl: 2;
    --mwl-locsvg-cards-mob: 1;

    background: transparent;
    padding: 0;
    color: #fff;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* ======================================
   MAPS SECTION (FRANCE + MAROC)
   ====================================== */

.mwl-locsvg-maps {
    display: flex;
    gap: 32px;
    margin-bottom: 30px;
    align-items: center;
    justify-content: center;
}

.mwl-locsvg-map {
    flex: 1 1 50%;
    max-width: 100%;
}

.mwl-locsvg-map-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 2;           /* hauteur auto, responsive */
    max-width: 100%;
    background-repeat: no-repeat;
    background-size: contain;      /* affiche toute la carte */
    background-position: center;
    margin: 0 auto;
}

.mwl-locsvg-map-inner-fr {
    background-image: var(--mwl-locsvg-map-fr);
}

.mwl-locsvg-map-inner-ma {
    background-image: var(--mwl-locsvg-map-ma);
}

/* MARKERS (POINTS SUR LA MAP) */

.mwl-locsvg-marker {
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #FF442B;
    border: 2px solid #050C16;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.35);
    transform: translate(-50%, -50%);
    cursor: pointer;
}

.mwl-locsvg-marker.is-active {
    background: #ffffff;
}

/* ======================================
   CARDS SLIDER
   ====================================== */

.mwl-locsvg-cards {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mwl-locsvg-nav {
    width: 42px;
    height: 42px;
    border: 2px solid #F5C400;
    color: #F5C400;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    cursor: pointer;
}

.mwl-locsvg-nav.is-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.mwl-locsvg-cards-inner {
    display: flex;
    gap: 28px;
    overflow-x: auto;
    scroll-behavior: smooth;
    flex: 1;
    padding: 4px 4px 20px;
}

.mwl-locsvg-card {
    flex: 0 0 calc(100% / var(--mwl-locsvg-cards-desk));
    min-height: 180px;
    background: #E0201A;
    padding: 20px 18px;
    border-radius: 16px;
    box-sizing: border-box;
}

.mwl-locsvg-card.is-active {
    outline: 4px solid #F5C400;
}

.mwl-locsvg-city {
    margin: 0;
    font-size: 14px;
    letter-spacing: 2px;
    color: #ffffff;
}

.mwl-locsvg-name {
    margin: 10px 0;
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
}

.mwl-locsvg-info {
    font-size: 15px;
    line-height: 1.6;
}

.mwl-locsvg-line {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.mwl-locsvg-line a {
    color: #ffffff !important;
}

.mwl-locsvg-line a:hover {
    color: #F5C400 !important;
}

.mwl-locsvg-icon {
    width: 18px;
}

/* ======================================
            RESPONSIVE
   ====================================== */

/* Tablet & petits laptops */
@media (max-width: 1024px) {
    .mwl-locsvg-maps {
        flex-direction: column;
    }

    .mwl-locsvg-map {
        max-width: 600px;
        width: 100%;
    }

    .mwl-locsvg-card {
        flex: 0 0 calc(100% / var(--mwl-locsvg-cards-tabl));
    }
}

/* Mobile */
@media (max-width: 768px) {

    .mwl-locsvg-wrapper {
        width: 100%;
        padding: 0 12px 20px;
    }

    .mwl-locsvg-maps {
        flex-direction: column;
        gap: 20px;
    }

    .mwl-locsvg-map {
        width: 100%;
        max-width: 100%;
    }

    .mwl-locsvg-map-inner {
        aspect-ratio: 4 / 3;       /* un peu plus vertical sur mobile */
        background-size: contain;
    }

    /* Cards en liste, pas de slider ni flèches */
    .mwl-locsvg-nav {
        display: flex !important;
    }

    .mwl-locsvg-cards-inner {
        display: flex !important;
        overflow-x: auto !important;
        scroll-behavior: smooth;
        padding: 4px 4px 20px;
        gap: 16px;
    }
    
    .mwl-locsvg-card {
        flex: 0 0 calc(100% / var(--mwl-locsvg-cards-tabl));
        max-width: calc(100% / var(--mwl-locsvg-cards-tabl));
        margin-bottom: 0;
    }

    .mwl-locsvg-card.is-active {
        outline: 3px solid #F5C400;
    }
}

/* ======================================
   OVERRIDE MOBILE FINAL (≤ 480px)
   ====================================== */
@media (max-width: 480px) {

    /* sécurité anti-scroll horizontal global */
    html, body {
        overflow-x: hidden;
    }

    /* le wrapper ne doit jamais dépasser la largeur de l'écran */
    .mwl-locsvg-wrapper {
        padding: 0 12px 20px;
        max-width: 100vw;
        margin: 0 auto;
    }

    .mwl-locsvg-maps {
        flex-direction: column;
        gap: 16px;
        margin-left: auto;
        margin-right: auto;
    }

    .mwl-locsvg-map {
        width: 100%;
        max-width: 100%;
    }

    .mwl-locsvg-map-inner {
        width: 100%;
        max-width: 100%;
        background-size: contain;
        background-position: center center;
        margin: 0 auto;
    }

    /* cards en liste pleine largeur (sans slider) */
    .mwl-locsvg-nav {
        display: none !important;
    }

    .mwl-locsvg-cards-inner {
        display: block;
        overflow: visible;
        gap: 12px;
    }
    
    .mwl-locsvg-card {
        flex: 0 0 calc(100% / var(--mwl-locsvg-cards-mob));
        max-width: calc(100% / var(--mwl-locsvg-cards-mob));
    }
    
    .mwl-locsvg-card,
    .mwl-locsvg-card.is-active {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ==========================================================
   ANIMATION – MARKER ACTIF (CLIGNOTEMENT / PULSE)
   ========================================================== */

.mwl-locsvg-marker.is-active {
    animation: mwlPulse 1.4s infinite ease-in-out;
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.25), 
                0 0 10px rgba(255, 255, 255, 0.6);
}

@keyframes mwlPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.25),
                    0 0 10px rgba(255, 255, 255, 0.6);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.25);
        box-shadow: 0 0 0 12px rgba(255, 255, 255, 0.15),
                    0 0 18px rgba(255, 255, 255, 0.9);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.25),
                    0 0 10px rgba(255, 255, 255, 0.6);
    }
}

