/* ============================================================================
   🎮 MODAL GAME-STYLE ANIMATIONS
   ============================================================================ */

/* États initiaux - tout caché */
.artist-details .loading-element {
    opacity: 0;
    visibility: hidden;
}

/* ============================================================================
   SCANLINES & GLITCH EFFECT
   ============================================================================ */

@keyframes scanlines {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

.artist-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 255, 0, 0.03) 0px,
        rgba(0, 255, 0, 0.03) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 1;
    animation: scanlines 8s linear infinite;
    opacity: 0;
}

.artist-details.show-scanlines::before {
    opacity: 1;
    transition: opacity 0.5s;
}

/* ============================================================================
   TYPING EFFECT (Nom de l'artiste)
   ============================================================================ */

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #00ff00; }
}

.artist-name-typing {
    overflow: hidden;
    border-right: 3px solid #00ff00;
    white-space: nowrap;
    margin: 0;
    animation:
        typing 1.05s steps(40, end),
        blink-caret 0.525s step-end 3;
    animation-fill-mode: forwards;
}

.artist-name-typing.done {
    border-right: none;
    overflow: visible;
}

/* ============================================================================
   ASCII LOADER
   ============================================================================ */

@keyframes rotate-loader {
    0% { content: '|'; }
    25% { content: '/'; }
    50% { content: '─'; }
    75% { content: '\\'; }
}

.ascii-loader {
    font-family: 'Courier New', monospace;
    color: #00ff00;
    font-size: 2rem;
    text-align: center;
    margin: 2rem 0;
}

.ascii-loader::before {
    content: '|';
    animation: rotate-loader 0.5s steps(4) infinite;
    display: inline-block;
}

/* ============================================================================
   PROGRESS BAR PIXELISÉE
   ============================================================================ */

.pixel-progress {
    width: 100%;
    height: 30px;
    background: #1a1a1a;
    border: 2px solid #00ff00;
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 0 0 10px rgba(0, 255, 0, 0.2),
        0 0 10px rgba(0, 255, 0, 0.3);
}

.pixel-progress-bar {
    height: 100%;
    background: linear-gradient(
        90deg,
        #00ff00 0%,
        #00cc00 50%,
        #00ff00 100%
    );
    width: 0%;
    transition: width 0.3s ease-out;
    position: relative;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.pixel-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: rgba(255, 255, 255, 0.3);
}

.pixel-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-shadow:
        0 0 5px #000,
        1px 1px 0 #000,
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000;
    z-index: 1;
}

/* ============================================================================
   SLIDE-IN EFFECTS
   ============================================================================ */

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInBottom {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeInScale {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================================================
   PIXEL SHIMMER
   ============================================================================ */

@keyframes pixelShimmer {
    0%, 100% {
        box-shadow:
            0 0 5px rgba(0, 255, 0, 0.3),
            inset 0 0 5px rgba(0, 255, 0, 0.1);
    }
    50% {
        box-shadow:
            0 0 20px rgba(0, 255, 0, 0.6),
            inset 0 0 10px rgba(0, 255, 0, 0.3);
    }
}

/* ============================================================================
   CLASSES D'ANIMATION APPLIQUÉES PAR JS
   ============================================================================ */

.slide-in-left {
    animation: slideInLeft 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.slide-in-right {
    animation: slideInRight 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.slide-in-bottom {
    animation: slideInBottom 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.fade-in-scale {
    animation: fadeInScale 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.pixel-shimmer {
    animation: pixelShimmer 2s ease-in-out infinite;
}

/* ============================================================================
   LOADING TEXT DOTS
   ============================================================================ */

@keyframes loadingDots {
    0%, 20% { content: 'LOADING'; }
    40% { content: 'LOADING.'; }
    60% { content: 'LOADING..'; }
    80%, 100% { content: 'LOADING...'; }
}

.loading-text::after {
    content: 'LOADING';
    animation: loadingDots 1.5s infinite;
}

/* ============================================================================
   GLITCH TEXT
   ============================================================================ */

@keyframes glitchText {
    0% {
        text-shadow:
            2px 0 #ff0000,
            -2px 0 #00ffff;
    }
    25% {
        text-shadow:
            -2px 0 #ff0000,
            2px 0 #00ffff;
    }
    50% {
        text-shadow:
            2px 2px #ff0000,
            -2px -2px #00ffff;
    }
    75% {
        text-shadow:
            -2px 2px #ff0000,
            2px -2px #00ffff;
    }
    100% {
        text-shadow:
            0 0 #ff0000,
            0 0 #00ffff;
    }
}

.glitch-text {
    animation: glitchText 0.3s ease-in-out;
}
