/* youtube-tabs.css */

.youtube-tabs {
    max-width: 100%;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
    grid-template-columns: auto 1fr;
}

/* Navigation des onglets */
.youtube-tabs .tab-nav {
    display: flex;
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
    /*border-bottom: 2px solid #e0e0e0;*/
    flex-wrap: wrap;
    flex-direction: column;
}

.youtube-tabs .tab-nav li {
    padding: 12px 24px;
    cursor: pointer;
    background-color: var(--mks-color-white, #fff);
    margin-right: 2px;
    margin-bottom: 2px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
    font-weight: 500;
}

.youtube-tabs .tab-nav li:hover {
    background-color: var(--mks-color-secondary-50, #f1f2ff);
}

.youtube-tabs .tab-nav li.active {
    background-color: var(--mks-color-secondary-950, #130090);
    color: var(--mks-color-secondary-50, #f1f2ff);
    border: 2px solid var(--mks-color-secondary-950, #130090);
    z-index: 1;
}

/* Contenu des onglets */
.youtube-tabs .tab-content {
    position: relative;
}

.youtube-tabs .tab-panel {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.youtube-tabs .tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Vidéo unique */
.single-video {
    display: flex;
    justify-content: center;
}

/* Slider Swiper */
.video-slider {
    position: relative;
    /*padding: 20px 50px;*/
}

.video-slider .swiper-wrapper {
    display: flex;
    align-items: center;
}

.video-slider .swiper-slide {
    display: flex;
    justify-content: center;
    width: auto;
    /*margin-right: 20px;*/
}

/* Miniatures vidéo */
.video-thumbnail {
    position: relative;
    display: inline-block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    max-width: 320px;
    width: 100%;
}

.video-thumbnail:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    text-decoration: none;
}

.video-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover img {
    transform: scale(1.05);
}

/* Bouton Play */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.video-thumbnail:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button svg {
    width: 100%;
    height: 100%;
}

/* Navigation Swiper */
.video-slider .swiper-button-next,
.video-slider .swiper-button-prev {
    color: #333;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.video-slider .swiper-button-next:after,
.video-slider .swiper-button-prev:after {
    font-size: 18px;
    font-weight: bold;
}

.video-slider .swiper-button-next:hover,
.video-slider .swiper-button-prev:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.video-slider .swiper-button-next {
    right: 10px;
}

.video-slider .swiper-button-prev {
    left: 10px;
}

/* Pagination Swiper */
.video-slider .swiper-pagination {
    position: relative;
    bottom: auto;
    margin-top: 20px;
}

.video-slider .swiper-pagination-bullet {
    background: #ccc;
    opacity: 1;
    transition: all 0.3s ease;
}

.video-slider .swiper-pagination-bullet-active {
    background: #333;
    transform: scale(1.2);
}

/* Responsive - Points de rupture spécifiques */
@media (max-width: 768px) {
    .youtube-tabs {
        grid-template-columns: 1fr;
    }

    .youtube-tabs .tab-nav li {
        padding: 10px 16px;
        font-size: 14px;
    }

    .video-slider {
        /*padding: 20px 10px;*/
    }

  /*  .video-slider .swiper-button-next,
    .video-slider .swiper-button-prev {
        display: none;
    }*/

    .video-thumbnail {
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .youtube-tabs .tab-nav li {
        padding: 8px 12px;
        font-size: 13px;
        min-width: 100px;
    }

    .video-thumbnail {
        max-width: 240px;
    }

    .play-button {
        width: 54px;
        height: 38px;
    }
}

/* Amélioration pour tablettes */
@media (min-width: 769px) and (max-width: 1024px) {
    .youtube-tabs .tab-nav {
        min-width: 180px;
        max-width: 200px;
    }

    .youtube-tabs .tab-nav li {
        padding: 12px 16px;
        font-size: 14px;
    }
}