/* ===========================================
   MWL – SAVOIR FAIRE (Frontend)
   =========================================== */

.mwl-sf-wrapper {
    --mwl-sf-thumbs-desktop: 5;
    --mwl-sf-thumbs-tablet: 3;
    --mwl-sf-thumbs-mobile: 2;

    background: transparent;
    padding: 40px 20px;
    box-sizing: border-box;
    color: #fff;
    max-width: 100%;
    margin: 0 auto;
}

/* -----------------------
   TOP THUMBNAIL SLIDER
   ----------------------- */
.mwl-sf-thumbs-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.mwl-sf-nav {
    background: #F5C400;
    margin-top: -21px;
    border: 2px solid #F5C400;
    color: #ffffff;
    border-radius: 40px;
    width: 42px;
    height: 42px;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateX(-50%);
    z-index: 99;
}

.mwl-sf-next {
    right: -42px;
}

.mwl-sf-nav.is-disabled {
    background: #fbfbfb;
    border-color: #fbfbfb;
    color: #000000;
    cursor: not-allowed;
}

.mwl-sf-thumbs-inner {
    overflow-x: auto;
    flex: 1;
    display: flex;
    gap: 18px;
    scroll-behavior: smooth;
    padding: 4px 4px 20px;
}

.mwl-sf-thumbs {
    position: relative;
    margin: 0 0 40px;
}

.mwl-sf-thumb {
    flex: 0 0 calc(100% / var(--mwl-sf-thumbs-desktop));
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    transition: opacity .2s ease, transform .2s ease;
    opacity: 0.7;
    position: relative;
}

.mwl-sf-thumb.is-active {
    opacity: 1;
    outline: 3px solid #F5C400;
}

.mwl-sf-thumb img {
    width: 100%;
    height: auto;
    object-fit: none;
}

.mwl-sf-thumb-title {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.5);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* -----------------------
   MAIN SLIDER CONTENT
   ----------------------- */
.mwl-sf-slide {
    display: none;
}

.mwl-sf-slide.is-active {
    display: flex;
    gap: 32px;
}

.mwl-sf-video {
    flex: 1;
}

.mwl-sf-video iframe {
    width: 100%;
    height: 380px;
    border-radius: 12px;
}

.mwl-sf-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mwl-sf-title {
    margin: 0 0 20px !important;
    font-size: 28px;
    font-weight: 700;
    color: #ffffff !important;
}

.mwl-sf-text {
    font-size: 16px;
    line-height: 1.6;
}

/* --------------------------------
          RESPONSIVE
   -------------------------------- */

@media (max-width: 1024px) {
    .mwl-sf-slide.is-active {
        flex-direction: column;
    }

    .mwl-sf-video iframe {
        height: 260px;
    }

    .mwl-sf-thumb {
        flex: 0 0 calc(100% / var(--mwl-sf-thumbs-tablet));
    }
}

@media (max-width: 600px) {

    /* Toujours voir 2 thumbnails */
    .mwl-sf-thumb {
        flex: 0 0 48%; /* 2 vignettes visibles */
        max-width: 48%;
    }

    /* Empêcher le débordement horizontal */
    .mwl-sf-wrapper,
    .mwl-sf-slide,
    .mwl-sf-content,
    .mwl-sf-video {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Iframe responsive clean */
    .mwl-sf-video iframe {
        width: 100%;
        height: 200px;
        max-width: 100%;
        display: block;
    }

    /* Fix du scroll horizontal */
    body, html {
        overflow-x: hidden;
    }
    
    .mwl-sf-thumb-title {
        font-size: 12px;
        font-weight: 400;
    }
    
    .mwl-sf-nav {
        margin-top: 0;
        bottom: -40px;
        top: auto;
        transform: none;
    }
    
    .mwl-sf-next {
        right: 0;
    }
    
    .mwl-sf-thumbs {
        margin: 0 0 60px;
    }
}

