/* ===== VARIABLES SECTION VIDÉO ===== */
.video-gallery-section {
    --video-spacing: clamp(2rem, 4vw, 3rem);
    --card-radius: 16px;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-elevated: 0 8px 40px rgba(0, 0, 0, 0.12);
}

/* ===== EN-TÊTE SECTION ===== */
.section-header-main {
    text-align: center;
    margin-bottom: var(--video-spacing);
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.section-main-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 1rem 0;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 500;
}

/* ===== LAYOUT PRINCIPAL ===== */
.video-gallery-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--video-spacing);
}

@media (min-width: 992px) {
    .video-gallery-layout {
        grid-template-columns: 2fr 1fr;
        gap: 3rem;
    }
}

/* ===== VIDÉO PRINCIPALE ===== */
.main-video-container {
    position: relative;
}

.featured-video-card {
    background: var(--bg-primary);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
    transition: var(--transition-smooth);
}

.featured-video-card:hover {
    box-shadow: var(--shadow-elevated);
    transform: translateY(-2px);
}

.video-player-wrapper {
    position: relative;
}

.video-thumbnail-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}

.video-thumbnail-link {
    display: block;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.video-featured-image {
    width: 100%;
    height: min(500px, 50vh);
    object-fit: cover;
    transition: var(--transition-smooth);
}

.video-thumbnail-link:hover .video-featured-image {
    transform: scale(1.05);
}

.video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: var(--transition-smooth);
}

.video-thumbnail-link:hover .video-play-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.play-button-circle {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: var(--transition-smooth);
    position: relative;
}

.play-button-circle::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    opacity: 0.5;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
    100% { transform: scale(1); opacity: 0.5; }
}

.play-button-circle i {
    color: white;
    font-size: 1.5rem;
    margin-left: 4px;
}

.video-thumbnail-link:hover .play-button-circle {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.play-button-text {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.video-duration-badge {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.video-content-wrapper {
    padding: 2rem;
}

.video-category-tag {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 2rem;
    text-decoration: none;
    transition: var(--transition-smooth);
    margin-bottom: 1.5rem;
}

.video-category-tag:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    color: white;
}

.video-main-title {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
}

.video-main-title a {
    color: inherit;
    text-decoration: none;
    background: linear-gradient(135deg, currentColor 0%, currentColor 100%);
    background-size: 0% 2px;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.4s ease;
    padding-bottom: 0.25rem;
}

.video-main-title a:hover {
    background-size: 100% 2px;
    color: var(--primary);
}

.video-meta-info {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.video-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.video-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-by {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.video-publish-date,
.video-views {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.video-views i {
    color: var(--primary);
}

.video-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
}

/* ===== SIDEBAR VIDÉOS ===== */
.video-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-videos-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-video-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border);
    transition: var(--transition-smooth);
}

.sidebar-video-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--primary);
}

.sidebar-video-media {
    position: relative;
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.sidebar-video-link {
    display: block;
    height: 100%;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.sidebar-video-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.sidebar-video-link:hover .sidebar-video-image {
    transform: scale(1.1);
}

.sidebar-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-smooth);
}

.sidebar-video-link:hover .sidebar-play-overlay {
    opacity: 1;
}

.sidebar-play-overlay i {
    color: white;
    font-size: 1rem;
    background: var(--primary);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-duration {
    position: absolute;
    bottom: 0.25rem;
    right: 0.25rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 600;
}

.sidebar-video-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-video-category {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
    padding: 0.2rem 0.6rem;
    border-radius: 2rem;
    margin-bottom: 0.5rem;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.sidebar-video-category:hover {
    background: var(--primary);
    color: white;
}

.sidebar-video-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 0.75rem 0;
}

.sidebar-video-title a {
    color: var(--text-primary);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.sidebar-video-title a:hover {
    color: var(--primary);
}

.sidebar-video-meta {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ===== BOUTON VOIR PLUS ===== */
.view-more-videos-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 2rem;
    transition: var(--transition-smooth);
    border: 2px solid var(--primary);
    justify-content: center;
}

.view-more-videos-button:hover {
    background: transparent;
    color: var(--primary);
    transform: translateX(4px);
}

/* ===== MODAL VIDEO ===== */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.video-modal.show {
    display: flex;
}

.video-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.video-modal-container {
    position: relative;
    background: var(--bg-primary);
    border-radius: var(--card-radius);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    z-index: 1001;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.video-modal-close {
    position: absolute;
    top: -2.5rem;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 1002;
}

.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.video-modal-content {
    padding: 0;
    border-radius: var(--card-radius);
    overflow: hidden;
}

.video-player-embed {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    position: relative;
}

.video-player-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--card-radius) var(--card-radius) 0 0;
}

/* ===== DARK MODE ===== */
.back-dark .video-gallery-section {
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --bg-primary: #1e293b;
    --bg-secondary: #0f172a;
    --border: #475569;
}

.back-dark .featured-video-card,
.back-dark .sidebar-video-item {
    background: var(--bg-primary);
    border-color: var(--border);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .video-meta-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .sidebar-video-item {
        flex-direction: column;
        text-align: center;
    }
    
    .sidebar-video-media {
        width: 100%;
        height: 200px;
    }
    
    .play-button-circle {
        width: 60px;
        height: 60px;
    }
    
    .play-button-circle i {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .video-content-wrapper {
        padding: 1.5rem;
    }
    
    .sidebar-video-item {
        padding: 1rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.video-modal.show .video-modal-container {
    animation: fadeInScale 0.3s ease-out;
}

.featured-video-card {
    animation: fadeInScale 0.6s ease-out;
}

.sidebar-video-item:nth-child(1) { animation: fadeInScale 0.6s ease-out 0.1s both; }
.sidebar-video-item:nth-child(2) { animation: fadeInScale 0.6s ease-out 0.2s both; }
.sidebar-video-item:nth-child(3) { animation: fadeInScale 0.6s ease-out 0.3s both; }
.sidebar-video-item:nth-child(4) { animation: fadeInScale 0.6s ease-out 0.4s both; }
.sidebar-video-item:nth-child(5) { animation: fadeInScale 0.6s ease-out 0.5s both; }
.sidebar-video-item:nth-child(6) { animation: fadeInScale 0.6s ease-out 0.6s both; }