/* ==========================================
   VARIABLES & RESET (même base que les autres pages)
   ========================================== */

:root {
    --purple: #60519b;
    --dark: #31323c;
    --light: #bfc0d1;
    --bg: #1a1a24;
    --surface: #242430;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg);
    color: var(--light);
    position: relative;
}

/* Particules flottantes */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--purple);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 15s infinite ease-in-out;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 12s; }
.particle:nth-child(2) { left: 25%; animation-delay: 2s; animation-duration: 15s; }
.particle:nth-child(3) { left: 40%; animation-delay: 4s; animation-duration: 18s; }
.particle:nth-child(4) { left: 55%; animation-delay: 1s; animation-duration: 14s; }
.particle:nth-child(5) { left: 70%; animation-delay: 3s; animation-duration: 16s; }
.particle:nth-child(6) { left: 85%; animation-delay: 5s; animation-duration: 13s; }
.particle:nth-child(7) { left: 15%; animation-delay: 6s; animation-duration: 17s; }
.particle:nth-child(8) { left: 90%; animation-delay: 2.5s; animation-duration: 19s; }

@keyframes particleFloat {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 0.3; }
    90% { opacity: 0.3; }
    100% { transform: translateY(-100px) scale(1); opacity: 0; }
}

/* Grain texture */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 10;
}

/* Mesh gradient animé */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(96, 81, 155, 0.25) 0%, transparent 40%),
        radial-gradient(ellipse at 80% 80%, rgba(191, 192, 209, 0.15) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(96, 81, 155, 0.2) 0%, transparent 50%);
    animation: meshMove 15s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes meshMove {
    0%, 100% { background-position: 0% 0%, 100% 100%, 50% 50%; opacity: 1; }
    50% { background-position: 20% 30%, 80% 70%, 60% 40%; opacity: 0.8; }
}

/* ==========================================
   LAYOUT
   ========================================== */

.container {
    height: 100vh;
    display: flex;
    position: relative;
    z-index: 1;
}

/* ==========================================
   SIDEBAR
   ========================================== */

.sidebar {
    width: 80px;
    background: rgba(36, 36, 48, 0.7);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(96, 81, 155, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 0;
    gap: 40px;
    position: relative;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, var(--purple) 30%, var(--purple) 70%, transparent 100%);
    opacity: 0.6;
    animation: slideGlow 3s ease-in-out infinite;
}

@keyframes slideGlow {
    0%, 100% { opacity: 0.4; transform: translateY(0); }
    50% { opacity: 0.8; transform: translateY(20px); }
}

.back-link {
    font-size: 1.5rem;
    color: var(--light);
    text-decoration: none;
    transition: all 0.3s;
    opacity: 0.7;
}

.back-link:hover {
    opacity: 1;
    transform: translateX(-5px);
    color: var(--purple);
}

.divider {
    width: 30px;
    height: 1px;
    background: rgba(96, 81, 155, 0.3);
}

.year {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--purple);
    letter-spacing: 0.1em;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    text-transform: uppercase;
}

/* ==========================================
   MAIN
   ========================================== */

.main {
    flex: 1;
    padding: 40px 60px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Scrollbar custom */
.main::-webkit-scrollbar {
    width: 10px;
}

.main::-webkit-scrollbar-track {
    background: rgba(36, 36, 48, 0.5);
    border-radius: 10px;
}

.main::-webkit-scrollbar-thumb {
    background: var(--purple);
    border-radius: 10px;
    transition: background 0.3s;
}

.main::-webkit-scrollbar-thumb:hover {
    background: #7066a8;
}

/* Firefox scrollbar */
.main {
    scrollbar-width: thin;
    scrollbar-color: var(--purple) rgba(36, 36, 48, 0.5);
}

/* ==========================================
   HEADER
   ========================================== */

.header {
    flex-shrink: 0;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    gap: 40px;
}

.header-text {
    flex: 1;
}

.page-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--light) 0%, var(--purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-description {
    font-size: 1.1rem;
    color: var(--light);
    opacity: 0.7;
    line-height: 1.6;
    max-width: 500px;
}

/* Stats */
.stats {
    display: flex;
    align-items: center;
    gap: 25px;
    background: rgba(36, 36, 48, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(96, 81, 155, 0.3);
    border-radius: 16px;
    padding: 20px 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 900;
    color: var(--purple);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--light);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(96, 81, 155, 0.3);
}

/* CTA Button */
.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 15px 30px;
    background: var(--purple);
    border-radius: 12px;
    color: var(--light);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(96, 81, 155, 0.3);
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(96, 81, 155, 0.5);
    background: #7066a8;
}

.cta-btn svg {
    width: 24px;
    height: 24px;
}

/* ==========================================
   VIDÉO HERO
   ========================================== */

.hero-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    background: rgba(36, 36, 48, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(96, 81, 155, 0.3);
    border-radius: 20px;
    padding: 25px;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
    align-items: center;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-video {
    width: 100%;
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.8);
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    font-size: 1rem;
    opacity: 0.6;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 0;
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px 6px 24px;
    background: rgba(96, 81, 155, 0.3);
    border: 1px solid rgba(96, 81, 155, 0.5);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--purple);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    width: fit-content;
    position: relative;
}

.hero-badge::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10px;
    width: 6px;
    height: 6px;
    background: var(--purple);
    border-radius: 50%;
    transform: translateY(-50%);
    animation: badgeDot 2s ease-in-out infinite;
}

@keyframes badgeDot {
    0%, 100% { opacity: 0.4; transform: translateY(-50%) scale(1); }
    50% { opacity: 1; transform: translateY(-50%) scale(1.2); }
}

.hero-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--light);
    line-height: 1.3;
    word-wrap: break-word;
}

.hero-description {
    font-size: 0.95rem;
    color: var(--light);
    opacity: 0.7;
    line-height: 1.6;
    word-wrap: break-word;
}

/* ==========================================
   GRILLE VIDÉOS
   ========================================== */

.videos-grid {
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--light);
    margin-bottom: 25px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.video-card {
    background: rgba(36, 36, 48, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(96, 81, 155, 0.3);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: var(--light);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    display: block;
}

.video-card:hover {
    transform: translateY(-8px);
    border-color: var(--purple);
    box-shadow: 0 20px 50px rgba(96, 81, 155, 0.4);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

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

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(96, 81, 155, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light);
    transition: all 0.3s;
    opacity: 0.9;
}

.video-card:hover .play-button {
    transform: translate(-50%, -50%) scale(1.2);
    background: var(--purple);
    opacity: 1;
}

.duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.video-info {
    padding: 20px;
}

.video-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--light);
    margin-bottom: 8px;
    line-height: 1.4;
}

.video-stats {
    font-size: 0.9rem;
    color: var(--light);
    opacity: 0.6;
}

/* Loading placeholder */
.loading-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--light);
    opacity: 0.6;
}

.loading-placeholder p {
    font-size: 1.1rem;
}

/* Animation fadeInUp pour les cartes générées */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 1024px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .main {
        padding: 30px 40px;
    }
    
    .sidebar {
        width: 60px;
        padding: 30px 0;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .stats {
        width: 100%;
        justify-content: center;
    }
    
    .hero-section {
        padding: 20px;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
}
