/* ============================================================
   ProductStories — Front-office CSS
   ============================================================ */

.stories-container {
    overflow-x: auto;
    padding: 10px 0;
    -webkit-overflow-scrolling: touch;
}

.stories-slider {
    display: flex;
    gap: 12px;
    padding: 0 10px;
}

/* ---- Story item ---- */

.story-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.15s ease;
}


.story-title {
    font-size: 11px;
    font-family: 'Poppins', Arial, Helvetica, sans-serif;
    margin-top: 5px;
    text-align: center;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
}

/* ---- Média ---- */

.story-media {
    position: relative;
    overflow: hidden;
}

.story-thumbnail,
.story-video-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-video-preview {
    display: none;
    z-index: 2;
}

/* ---- Formes ---- */

/* Rond (défaut, style Instagram) */
.story-shape-round .story-media {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px #c5c5c5;
}
.story-shape-round .story-thumbnail,
.story-shape-round .story-video-preview {
    border-radius: 50%;
}

/* Portrait 9:16 */
.story-shape-portrait .story-media {
    width: 80px;
    height: 110px; /* ratio 9:16 */
    border-radius: 8px;
    /* border: 2px solid #ffffff; */
    /* box-shadow: 0 0 0 2px #c5c5c5; */
}
.story-shape-portrait .story-title {
    max-width: 60px;
}

/* Rectangle coins arrondis */
.story-shape-rounded .story-media {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 2px #c5c5c5;
}


.story-item .story-media img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}
/* ---- Icône Play ---- */

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #ffffffde;
    border: 1px solid rgba(255, 255, 255, .8);
    border: 0;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .3s ease;
    z-index: 1;
    opacity: .8;
    visibility: visible;
}

.video-play-button .play-icon {
    display: flex;
    margin-left: .2rem;
    width: 0.7rem;
    height: 0.7rem;
    color: #000000;
}

/* .video-play-button {
    background: #000000b8;
}

.video-play-button .play-icon {
    color: #ffffff;
} */


.story-item:hover .video-play-button {
    opacity: 0;
}

.story-item:hover {
    /* transform: scale(1.04); */
}
.story-item:hover .story-media {
    box-shadow: 0 0 0 2px #000000;
}


/* ---- Modal ---- */

.story-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 9999999999;
}

.story-modal.is-open {
    display: flex;
}

.story-modal .modal-content {
    position: relative;
    height: min(76vh, 840px);
    aspect-ratio: 9 / 16;
    margin: auto;
    border-radius: 12px;
    /* overflow: hidden; */
    background: #000;
}

.story-modal .modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.story-modal .close {
    position: absolute;
    top: -36px;
    right: 10px;
    font-weight: 200;
    color: #ffffff;
    line-height: 1;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.15s;
    z-index: 10;
}

.story-modal .close:hover {
    opacity: 1;
}

/* Fermeture au clic sur l'overlay */
.story-modal-overlay {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* ---- Responsive ---- */

/* @media (max-width: 480px) {
    .story-shape-round .story-media,
    .story-shape-rounded .story-media {
        width: 80px;
        height: 80px;
    }
    .story-shape-portrait .story-media {
        width: 70px;
        height: 89px;
    }
    .story-title {
        font-size: 10px;
        max-width: 66px;
    }
} */