/**
 * Styles pour l'écran de chargement inspiré de GTA 5
 * Avec rotation d'agents et de cartes en arrière-plan
 */

/* Variables */
:root {
    --gta-loading-bg: rgba(0, 0, 0, 0.8);
    --gta-loading-accent: #ff4655;
    --gta-loading-text: #ffffff;
    --gta-loading-bar-bg: rgba(255, 255, 255, 0.2);
    --gta-loading-bar-fill: #ff4655;
    --gta-loading-overlay: rgba(0, 0, 0, 0.6);
    --gta-loading-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    --gta-loading-transition: all 0.5s ease;
}

/* Écran de chargement principal */
.gta-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    overflow: hidden;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

.gta-loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

/* Arrière-plan avec rotation de cartes */
.map-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.map-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.map-slide.active {
    opacity: 1;
}

.map-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.8));
}

/* Contenu principal de l'écran de chargement */
.gta-loading-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    box-sizing: border-box;
}

/* Logo Valorant */
.valorant-logo {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 2;
}

.valorant-logo img {
    width: 120px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.5));
}

/* Agents en rotation */
.agents-showcase {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.agent-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
    transform: scale(0.9);
}

.agent-slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.agent-slide img {
    height: 80%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.7));
}

.agent-info {
    position: absolute;
    bottom: 15%;
    left: 5%;
    color: var(--gta-loading-text);
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
    text-align: left;
}

.agent-info h3 {
    font-size: 4rem;
    margin: 0;
    font-weight: 800;
    letter-spacing: 2px;
    line-height: 1;
    color: var(--gta-loading-text);
    text-transform: uppercase;
}

.agent-info p {
    font-size: 1.5rem;
    margin: 0.5rem 0 0;
    font-weight: 400;
    color: var(--gta-loading-accent);
    text-transform: uppercase;
}

/* Barre de chargement style GTA */
.gta-loading-bar-container {
    position: absolute;
    bottom: 10%;
    left: 5%;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 2;
}

.gta-loading-bar-label {
    font-size: 1.2rem;
    color: var(--gta-loading-text);
    margin-bottom: 0.5rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.gta-loading-bar-wrapper {
    width: 100%;
    height: 6px;
    background-color: var(--gta-loading-bar-bg);
    position: relative;
    overflow: hidden;
}

.gta-loading-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background-color: var(--gta-loading-bar-fill);
    transition: width 0.3s ease-out;
}

.gta-loading-percentage {
    position: absolute;
    right: 0;
    top: 0;
    font-size: 1.2rem;
    color: var(--gta-loading-text);
    font-weight: 600;
}

/* Conseils de jeu */
.loading-tip-container {
    position: absolute;
    bottom: 5%;
    left: 5%;
    width: 90%;
    z-index: 2;
}

.loading-tip {
    font-size: 1rem;
    color: var(--gta-loading-text);
    opacity: 0.8;
    font-style: italic;
    animation: tipFade 0.5s ease-in-out;
}

/* Animations */
@keyframes tipFade {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 0.8;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .agent-info h3 {
        font-size: 3.5rem;
    }
    
    .agent-info p {
        font-size: 1.3rem;
    }
}

@media (max-width: 992px) {
    .agent-info h3 {
        font-size: 3rem;
    }
    
    .agent-info p {
        font-size: 1.2rem;
    }
    
    .valorant-logo img {
        width: 100px;
    }
}

@media (max-width: 768px) {
    .agent-slide img {
        height: 70%;
    }
    
    .agent-info h3 {
        font-size: 2.5rem;
    }
    
    .agent-info p {
        font-size: 1rem;
    }
    
    .gta-loading-bar-label {
        font-size: 1rem;
    }
    
    .gta-loading-percentage {
        font-size: 1rem;
    }
    
    .loading-tip {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .agent-slide img {
        height: 60%;
    }
    
    .agent-info h3 {
        font-size: 2rem;
    }
    
    .agent-info p {
        font-size: 0.9rem;
    }
    
    .valorant-logo img {
        width: 80px;
    }
    
    .gta-loading-bar-container {
        bottom: 15%;
    }
    
    .loading-tip-container {
        bottom: 10%;
    }
}

/* Animation pour l'apparition du contenu principal */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#main-content {
    animation: fadeIn 0.8s ease-out;
}
