/**
 * WS Booster - Carrousel Stories (style Instagram)
 */

.ws-stories {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: hidden;
    border-radius: 16px;
    background: #000;
    isolation: isolate;
}

.ws-stories__progress {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    gap: 4px;
    z-index: 10;
}

.ws-stories__progress-track {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.ws-stories__progress-fill {
    width: 0%;
    height: 100%;
    background: #fff;
    transition: none;
    border-radius: 2px;
}

.ws-stories__progress-track.is-done .ws-stories__progress-fill {
    width: 100%;
}

.ws-stories__progress-track.is-active .ws-stories__progress-fill {
    width: 0%;
    animation: ws-stories-progress linear forwards;
    animation-duration: var(--ws-story-duration, 5s);
}

.ws-stories__progress-track.is-paused .ws-stories__progress-fill {
    animation-play-state: paused;
}

@keyframes ws-stories-progress {
    from { width: 0%; }
    to { width: 100%; }
}

.ws-stories__slides {
    position: absolute;
    inset: 0;
}

.ws-stories__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.ws-stories__slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.ws-stories__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ws-stories__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

.ws-stories__caption {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 30px;
    color: #fff;
    z-index: 2;
}

.ws-stories__title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.ws-stories__text {
    margin: 0 0 14px;
    font-size: 15px;
    line-height: 1.4;
    opacity: 0.95;
}

.ws-stories__link {
    display: inline-block;
    padding: 8px 16px;
    background: #fff;
    color: #000;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: transform 0.15s ease;
}

.ws-stories__link:hover {
    transform: translateY(-2px);
}

.ws-stories__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease;
}

.ws-stories:hover .ws-stories__nav {
    opacity: 1;
}

.ws-stories__nav:hover {
    background: rgba(0, 0, 0, 0.75);
}

.ws-stories__nav--prev { left: 12px; }
.ws-stories__nav--next { right: 12px; }

@media (prefers-reduced-motion: reduce) {
    .ws-stories__slide {
        transition: none;
    }
}

/* === VIDEO + boutons (compresse) === */
.ws-stories__video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:#000;display:block}
.ws-stories__sound,.ws-stories__playpause{position:absolute;top:16px;z-index:20;width:36px;height:36px;border-radius:50%;border:0;background:rgba(0,0,0,.55);color:#fff;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:background .2s}
.ws-stories__sound:hover,.ws-stories__playpause:hover{background:rgba(0,0,0,.8)}
.ws-stories__sound{right:16px}
.ws-stories__playpause{right:58px}
.ws-stories__progress{z-index:25}
.ws-stories__progress-track.is-paused .ws-stories__progress-fill{animation-play-state:paused}
@media (max-width:640px){.ws-stories__sound{right:12px;top:12px}.ws-stories__playpause{right:52px;top:12px}}
