/* Styles pour le front-end */
.video-slider-wrapper {
    width: 100%;
    margin: 30px 0;
}

.video-slider-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #888 #f1f1f1;
}

.video-slider-container::-webkit-scrollbar {
    height: 8px;
}

.video-slider-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0; /* Suppression du border-radius */
}

.video-slider-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 0; /* Suppression du border-radius */
}

.video-slider-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.video-slider-track {
    display: flex;
    gap: 20px;
    padding: 10px 0;
}

.video-slide {
    flex: 0 0 300px;
    min-width: 300px;
}

.video-thumb-wrapper {
    position: relative;
    width: 100%;
    height: 450px;
    background: #000;
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-thumb-wrapper:hover {
    transform: scale(1.02);
}

/* Vidéo */
.slide-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Assure que la vidéo couvre bien la zone */
    z-index: 2;
    display: none;
}

.slide-video.playing {
    display: block;
}

/* Poster/Thumbnail */
.video-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-poster.hidden {
    display: none;
}

.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Assure que l'image couvre bien la zone */
}

.loading-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #222;
    color: #fff;
    font-size: 14px;
}

/* Boutons */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 3;
}

.play-button.hidden {
    display: none;
}

.video-thumb-wrapper:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
    opacity: 0.9;
}

/* Contrôles vidéo */
.video-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
}

.pause-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease;
}

.pause-btn:hover {
    transform: scale(1.1);
}

/* Titre */
.video-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    font-size: 14px;
    font-weight: 500;
    z-index: 3;
}

/* États de lecture */
.video-thumb-wrapper.is-playing .play-button {
    display: none;
}

.video-thumb-wrapper.is-playing .video-controls {
    display: block !important;
}

button.pause-btn {
    background-color: transparent !important;
}

/* Responsive */
@media (max-width: 768px) {
    .video-slide {
        flex: 0 0 250px;
        min-width: 250px;
    }

    .video-thumb-wrapper {
        height: 350px !important;
    }

    .video-slider-track {
        gap: 20px;
    }

    .play-button {
        width: 50px;
        height: 50px;
    }

    .pause-btn svg {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .video-slide {
        flex: 0 0 215px;
        min-width: 215px;
    }

    .video-thumb-wrapper {
        height: 120px; /* Hauteur encore plus réduite pour mobiles */
    }

    .video-slider-track {
        gap: 10px;
    }

    .play-button {
        width: 45px;
        height: 45px;
    }

    .pause-btn svg {
        width: 30px;
        height: 30px;
    }
}
