/* ===== ANIMATION INTRO TV VINTAGE ===== */
.tv-intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tv-intro-overlay.hidden {
    display: none;
}

/* Effet d'allumage de TV */
.tv-screen {
    width: 100%;
    height: 100%;
    background: #000;
    position: relative;
    overflow: hidden;
}

/* Animation de la ligne blanche centrale qui s'étend */
.tv-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: #fff;
    transform: translateY(-50%) scaleX(0);
    animation: tvLineExpand 0.3s ease-out forwards;
    box-shadow: 0 0 20px #fff, 0 0 40px #fff;
}

@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 */
.tv-flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    opacity: 0;
    animation: tvFlash 0.5s ease-out 0.3s forwards;
}

@keyframes tvFlash {
    0% { opacity: 0; }
    10% { opacity: 1; }
    100% { opacity: 0; }
}

/* Effet de bruit/static */
.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.03) 2px,
            rgba(255, 255, 255, 0.03) 4px
        );
    opacity: 0;
    animation: tvStatic 0.3s ease-out 0.8s forwards, staticNoise 0.1s infinite 0.8s;
}

@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(100, 150, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    animation: tvGlow 1s ease-out 1.1s forwards;
}

@keyframes tvGlow {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* 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;
}

@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 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(100, 150, 255, 0.6);
    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.2);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.tv-loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #4a6fa5, #6bccb2, #ff6b8b);
    width: 0%;
    animation: tvLoadingProgress 2s ease-out 1.5s forwards;
    box-shadow: 0 0 10px rgba(107, 204, 178, 0.8);
}

@keyframes tvLoadingProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

.tv-loading-text {
    margin-top: 20px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.2em;
}

/* Effet de scanlines */
.tv-scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    opacity: 0;
    animation: tvScanlines 0.5s ease-out 1.1s forwards;
}

@keyframes tvScanlines {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Effet de vignette */
.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.7) 100%);
    pointer-events: none;
    opacity: 0;
    animation: tvVignette 0.5s ease-out 1.1s forwards;
}

@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; }
}
