/* VIDEOS.CSS - Styles pour la galerie YouTube */

/* Container principal */
.youtube-gallery-container {
    margin: 50px 0 80px 0;
    padding: 0 15px;
}

/* Grille responsive */
.youtube-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Carte vidéo */
.youtube-card-wrapper {
    perspective: 1000px;
}

.youtube-video-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.youtube-video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(255, 0, 0, 0.15);
}

/* Container miniature */
.youtube-thumbnail-container {
    position: relative;
    overflow: hidden;
    background: #000;
}

.youtube-thumbnail-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: all 0.5s ease;
    display: block;
}

.youtube-video-card:hover .youtube-thumbnail-image {
    transform: scale(1.05);
}

/* Overlay miniature - TOUJOURS VISIBLE */
.youtube-thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 1;
    /* Toujours visible */
    transition: all 0.3s ease;
}

.youtube-video-card:hover .youtube-thumbnail-overlay {
    background: linear-gradient(135deg,
            rgba(255, 0, 0, 0.85) 0%,
            rgba(200, 0, 0, 0.7) 100%);
}

/* Bouton play - TOUJOURS VISIBLE */
.youtube-play-button {
    background: rgba(255, 255, 255, 0.95);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.youtube-video-card:hover .youtube-play-button {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.youtube-play-icon {
    font-size: 32px;
    color: #ff0000;
    margin-left: 4px;
    transition: all 0.3s ease;
}

.youtube-video-card:hover .youtube-play-icon {
    color: #cc0000;
}

/* Lien anchor - couvre toute la carte */
.youtube-thumbnail-container a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 2;
}

/* État vide */
.youtube-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
}

.youtube-empty-icon {
    font-size: 80px;
    color: #ff0000;
    margin-bottom: 25px;
    opacity: 0.7;
}

.youtube-empty-title {
    font-size: 28px;
    color: #2d3748;
    margin-bottom: 15px;
    font-weight: 700;
}

.youtube-empty-description {
    font-size: 18px;
    color: #718096;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .youtube-gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .youtube-gallery-container {
        margin: 30px 0 50px 0;
        padding: 0 10px;
    }

    .youtube-thumbnail-image {
        height: 200px;
    }

    .youtube-play-button {
        width: 60px;
        height: 60px;
    }

    .youtube-play-icon {
        font-size: 28px;
    }

    .youtube-empty-icon {
        font-size: 60px;
    }

    .youtube-empty-title {
        font-size: 24px;
    }

    .youtube-empty-description {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .youtube-gallery-grid {
        grid-template-columns: 1fr;
    }

    .youtube-thumbnail-image {
        height: 180px;
    }

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

    .youtube-play-icon {
        font-size: 24px;
    }
}

/* Animation d'entrée */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.youtube-card-wrapper {
    animation: fadeInUp 0.6s ease forwards;
}

.youtube-card-wrapper:nth-child(1) {
    animation-delay: 0.1s;
}

.youtube-card-wrapper:nth-child(2) {
    animation-delay: 0.2s;
}

.youtube-card-wrapper:nth-child(3) {
    animation-delay: 0.3s;
}

.youtube-card-wrapper:nth-child(4) {
    animation-delay: 0.4s;
}

.youtube-card-wrapper:nth-child(5) {
    animation-delay: 0.5s;
}

.youtube-card-wrapper:nth-child(6) {
    animation-delay: 0.6s;
}

/* Effet de focus pour l'accessibilité */
.youtube-thumbnail-container a:focus {
    outline: 3px solid #ff0000;
    outline-offset: 3px;
}

.youtube-thumbnail-container a:focus .youtube-play-button {
    transform: scale(1.15);
    background: #ffffff;
}