/* ===== ANIMATION INTRO TV VINTAGE ===== */
.tv-intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000000; /* NOIR COMPLET - beaucoup plus sombre */
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tv-intro-overlay.hidden {
    display: none;
}

/* Effet d'allumage de TV - FOND EXTRÊMEMENT SOMBRE */
.tv-screen {
    width: 100%;
    height: 100%;
    background: 
        /* Texture de grille TV très subtile */
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.03) 1px, /* Légèrement augmenté pour visibilité */
            transparent 1px
        ),
        linear-gradient(
            0deg,
            rgba(255, 255, 255, 0.03) 1px, /* Légèrement augmenté pour visibilité */
            transparent 1px
        ),
        /* Fond NOIR profond avec très peu de dégradé */
        radial-gradient(
            ellipse at center,
            #0a0a0a 0%,    /* Très sombre */
            #050505 50%,   /* Presque noir */
            #000000 100%   /* Noir pur */
        ),
        /* Moiré TV très subtil */
        repeating-radial-gradient(
            circle at 50% 50%,
            transparent 0,
            rgba(20, 20, 30, 0.15) 1px, /* Légèrement augmenté */
            transparent 2px
        );
    background-size: 
        20px 20px,
        20px 20px,
        100% 100%,
        100px 100px;
    position: relative;
    overflow: hidden;
}

/* Effet de rayonnement cathodique - TRÈS SUBTIL */
.tv-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        /* Rayures de balayage très subtiles */
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 3px,
            rgba(255, 255, 255, 0.02) 3px, /* Réduit pour fond sombre */
            rgba(255, 255, 255, 0.02) 4px
        );
    pointer-events: none;
    z-index: 2;
    animation: crtFlicker 8s infinite alternate;
}

@keyframes crtFlicker {
    0%, 100% { opacity: 0.98; } /* Réduit */
    25% { opacity: 0.96; }
    50% { opacity: 0.99; }
    75% { opacity: 0.95; }
}

/* Animation de la ligne blanche centrale qui s'étend */
.tv-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: #fff; /* Blanc pur */
    transform: translateY(-50%) scaleX(0);
    animation: tvLineExpand 0.3s ease-out forwards;
    box-shadow: 
        0 0 25px #fff, 0 0 50px #fff; /* Augmenté pour plus de visibilité sur fond noir */
    z-index: 5;
}

@keyframes tvLineExpand {
    0% {
        transform: translateY(-50%) scaleX(0);
        height: 2px;
    }
    50% {
        transform: translateY(-50%) scaleX(1);
        height: 2px;
    }
    100% {
        transform: translateY(-50%) scaleX(1);
        height: 100vh;
    }
}

/* Effet de flash blanc - PLUS FORT POUR CONTRASTE */
.tv-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff; /* Blanc pur */
    opacity: 0;
    animation: tvFlash 0.5s ease-out 0.3s forwards;
    z-index: 3;
}

@keyframes tvFlash {
    0% { opacity: 0; }
    15% { opacity: 1; } /* Augmenté pour plus d'impact */
    100% { opacity: 0; }
}

/* Effet de bruit/static - PLUS FORT POUR CONTRASTE */
.tv-static {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(255, 255, 255, 0.08) 2px, /* Augmenté pour fond sombre */
            rgba(255, 255, 255, 0.08) 4px
        );
    opacity: 0;
    animation: tvStatic 0.3s ease-out 0.8s forwards, staticNoise 0.1s infinite 0.8s;
    z-index: 4;
}

@keyframes tvStatic {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes staticNoise {
    0% { transform: translate(0, 0); }
    10% { transform: translate(-2px, 2px); }
    20% { transform: translate(2px, -2px); }
    30% { transform: translate(-2px, -2px); }
    40% { transform: translate(2px, 2px); }
    50% { transform: translate(-2px, 2px); }
    60% { transform: translate(2px, -2px); }
    70% { transform: translate(-2px, -2px); }
    80% { transform: translate(2px, 2px); }
    90% { transform: translate(-2px, 2px); }
    100% { transform: translate(0, 0); }
}

/* Écran qui s'allume progressivement */
.tv-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(120, 170, 255, 0.45) 0%, transparent 70%); /* Augmenté */
    opacity: 0;
    animation: tvGlow 1s ease-out 1.1s forwards;
    z-index: 2;
}

@keyframes tvGlow {
    0% { opacity: 0; }
    60% { opacity: 1; } /* Augmenté */
    100% { opacity: 0.7; } /* Augmenté */
}

/* Logo de chargement */
.tv-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    opacity: 0;
    animation: tvLoadingFade 0.5s ease-out 1.5s forwards;
    width: 80%;
    max-width: 900px;
    z-index: 20;
}

@keyframes tvLoadingFade {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.tv-loading-title {
    font-size: 3rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 25px rgba(255, 255, 255, 1), 0 0 50px rgba(120, 170, 255, 0.9); /* Augmenté */
    margin-bottom: 30px;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.1em;
}

.tv-loading-bar {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.35); /* Augmenté */
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
}

.tv-loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #5a7fb5, #7bdcb2, #ff7b9b); /* Légèrement éclairci */
    width: 0%;
    animation: tvLoadingProgress 2s ease-out 1.5s forwards;
    box-shadow: 0 0 20px rgba(123, 220, 178, 0.95); /* Augmenté */
    border-radius: 2px;
    position: relative;
}

@keyframes tvLoadingProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

.tv-loading-text {
    margin-top: 20px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95); /* Augmenté */
    font-family: 'Courier New', monospace;
    letter-spacing: 0.2em;
    display: block;
}

.tv-loading-main {
    font-size: 4rem;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 
        0 0 25px rgba(255, 255, 255, 1), /* Augmenté */
        0 0 50px rgba(0, 168, 255, 1), /* Augmenté */
        0 0 75px rgba(0, 168, 255, 0.9),
        0 0 100px rgba(0, 168, 255, 0.7),
        0 0 125px rgba(0, 168, 255, 0.5); /* Ajouté */
    margin-bottom: 20px;
    font-family: 'VT323', monospace, 'Courier New';
    letter-spacing: 0.2em;
    text-transform: uppercase;
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    0% {
        text-shadow: 
            0 0 20px rgba(255, 255, 255, 1),
            0 0 40px rgba(0, 168, 255, 1),
            0 0 60px rgba(0, 168, 255, 0.9);
    }
    100% {
        text-shadow: 
            0 0 30px rgba(255, 255, 255, 1), /* Augmenté */
            0 0 60px rgba(0, 168, 255, 1), /* Augmenté */
            0 0 90px rgba(0, 168, 255, 1), /* Augmenté */
            0 0 120px rgba(0, 168, 255, 0.9);
    }
}

.tv-loading-subtitle {
    font-size: 1.8rem;
    font-weight: 700;
    color: #00a8ff;
    text-shadow: 
        0 0 20px rgba(0, 168, 255, 1), /* Augmenté */
        0 0 40px rgba(0, 168, 255, 0.9), /* Augmenté */
        0 0 60px rgba(0, 168, 255, 0.7); /* Ajouté */
    margin-bottom: 8px;
    font-family: 'Segoe UI', sans-serif;
    letter-spacing: 0.1em;
    line-height: 1.3;
    opacity: 1;
}

.tv-loading-subtitle:nth-child(3) {
    color: #00ff88;
    text-shadow: 
        0 0 20px rgba(0, 255, 136, 1), /* Augmenté */
        0 0 40px rgba(0, 255, 136, 0.9); /* Augmenté */
    animation: subtitleColorShift 3s infinite alternate;
}

@keyframes subtitleColorShift {
    0%, 100% { 
        color: #00ff88;
        text-shadow: 
            0 0 20px rgba(0, 255, 136, 1),
            0 0 40px rgba(0, 255, 136, 0.9);
    }
    50% { 
        color: #ff7ba7; /* Légèrement éclairci */
        text-shadow: 
            0 0 20px rgba(255, 123, 167, 1),
            0 0 40px rgba(255, 123, 167, 0.9);
    }
}

.tv-loading-pulse {
    font-size: 1.8rem;
    color: #ffffff;
    font-family: 'VT323', monospace;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    animation: pulseText 1.5s infinite alternate;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 1), /* Augmenté */
        0 0 40px rgba(0, 168, 255, 0.9); /* Augmenté */
}

@keyframes pulseText {
    0% {
        opacity: 1;
        text-shadow: 
            0 0 15px rgba(255, 255, 255, 1),
            0 0 30px rgba(0, 168, 255, 0.9);
    }
    100% {
        opacity: 1;
        text-shadow: 
            0 0 25px rgba(255, 255, 255, 1),
            0 0 50px rgba(0, 168, 255, 1),
            0 0 75px rgba(0, 168, 255, 0.9);
    }
}

.tv-loading-dots {
    font-size: 2rem;
    color: #00ff88;
    font-family: 'VT323', monospace;
    animation: dotsBlink 1.5s infinite;
}

@keyframes dotsBlink {
    0% { opacity: 0.4; } /* Augmenté */
    20% { opacity: 1; }
    40% { opacity: 0.4; } /* Augmenté */
    60% { opacity: 0.4; } /* Augmenté */
    80% { opacity: 0.4; } /* Augmenté */
    100% { opacity: 0.4; } /* Augmenté */
}

.tv-loading-dots::before {
    content: '.';
    animation: dot1 1.5s infinite;
}

.tv-loading-dots::after {
    content: '..';
    animation: dot2 1.5s infinite;
}

@keyframes dot1 {
    0%, 20% { content: '.'; }
    40%, 100% { content: '..'; }
}

@keyframes dot2 {
    0%, 40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Effet de scanlines - PLUS FORT POUR CONTRASTE */
.tv-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.3), /* Augmenté */
        rgba(0, 0, 0, 0.3) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    opacity: 0;
    animation: tvScanlines 0.5s ease-out 1.1s forwards;
    z-index: 6;
}

@keyframes tvScanlines {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Effet de vignette - PLUS FORT POUR CONTRASTE */
.tv-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.9) 100%); /* Augmenté */
    pointer-events: none;
    opacity: 0;
    animation: tvVignette 0.5s ease-out 1.1s forwards;
    z-index: 7;
}

@keyframes tvVignette {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Animation de sortie */
.tv-intro-overlay.fade-out {
    animation: tvFadeOut 0.8s ease-out forwards;
}

@keyframes tvFadeOut {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

/* Ajustement pour les petits écrans */
@media (max-width: 768px) {
    .tv-loading-main {
        font-size: 2.5rem;
        letter-spacing: 0.1em;
    }
    
    .tv-loading-subtitle {
        font-size: 1.2rem;
    }
    
    .tv-loading-bar {
        width: 300px;
        height: 4px;
    }
    
    .tv-loading-pulse {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .tv-loading-main {
        font-size: 1.8rem;
    }
    
    .tv-loading-subtitle {
        font-size: 0.9rem;
    }
    
    .tv-loading {
        width: 95%;
    }
}

/* Suppression des animations non utilisées */
@keyframes loadingGlow {}
@keyframes crtLabel {}
@keyframes borderPulse {}
@keyframes progressShine {}
@keyframes blink {}