/* Écran de chargement moderne */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease-out;
}

.loading-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 255, 67, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 124, 204, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(0, 255, 67, 0.05) 0%, transparent 50%);
    animation: backgroundPulse 3s ease-in-out infinite;
}

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

.loading-content {
    text-align: center;
    position: relative;
    z-index: 1;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    position: relative;
}

.loading-spinner::before,
.loading-spinner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #00FF43;
    animation: spin 1.5s linear infinite;
}

.loading-spinner::after {
    border-top-color: #007ACC;
    animation-delay: 0.2s;
    animation-direction: reverse;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    color: #f8f9fa;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    animation: textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(0, 255, 67, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(0, 255, 67, 0.8);
    }
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
}

.loading-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #00FF43, #007ACC);
    animation: loadingBar 2s ease-in-out infinite;
}

@keyframes loadingBar {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

.loading-percentage {
    font-family: 'Press Start 2P', cursive;
    font-size: 12px;
    color: #00FF43;
    margin-top: 15px;
    animation: percentageCount 2s ease-out;
}

@keyframes percentageCount {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Variantes d'animation */
.loading-screen.variant-2 .loading-spinner {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.loading-screen.variant-3 .loading-text {
    background: linear-gradient(45deg, #00FF43, #007ACC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% {
        filter: hue-rotate(0deg);
    }
    50% {
        filter: hue-rotate(30deg);
    }
}

/* Responsive pour mobile */
@media (max-width: 480px) {
    .loading-spinner {
        width: 60px;
        height: 60px;
    }
    
    .loading-text {
        font-size: 12px;
    }
    
    .loading-bar {
        width: 150px;
    }
    
    .loading-percentage {
        font-size: 10px;
    }
}

/* Accessibilité */
@media (prefers-reduced-motion: reduce) {
    .loading-screen::before,
    .loading-spinner::before,
    .loading-spinner::after,
    .loading-text,
    .loading-bar::before {
        animation: none !important;
    }
}
