/* --- RESET & VARIABLES --- */
:root {
    --primary-red: #E60023;
    --red-hover: #b3001b;
    --bg-dark: #0a0a0a;
    --bg-panel: #141414;
    --text-white: #ffffff;
    --text-grey: #a0a0a0;
    
    --font-head: 'Rajdhani', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, .logo-text, .tag, .step-number {
    font-family: var(--font-head);
    text-transform: uppercase;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* --- UTILITIES --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.text-red { color: var(--primary-red); }

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 12px 25px;
    font-family: var(--font-head);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-red);
    color: white;
    border: 2px solid var(--primary-red);
}
.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-red);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid white;
    color: white;
}
.btn-outline:hover {
    background-color: white;
    color: var(--bg-dark);
}

.glow-effect { box-shadow: 0 0 15px rgba(230, 0, 35, 0.4); }
.glow-effect:hover { box-shadow: 0 0 25px rgba(230, 0, 35, 0.7); transform: scale(1.02); }

/* --- NAVBAR --- */
.navbar {
    position: fixed; top: 0; width: 100%;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo-text { font-size: 1.5rem; font-weight: 700; letter-spacing: 2px; }
.nav-links { display: flex; gap: 20px; }
.nav-links a { font-family: var(--font-head); font-weight: 600; font-size: 1.1rem; }
.nav-links a:hover { color: var(--primary-red); }
.nav-cta { color: var(--primary-red) !important; }

/* --- HERO --- */
.hero {
    position: relative; height: 100vh;
    display: flex; align-items: center; justify-content: center;
    text-align: center; overflow: hidden;
}
.hero-video {
    position: absolute; top: 50%; left: 50%;
    min-width: 100%; min-height: 100%;
    width: auto; height: auto;
    z-index: 0;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
}
.video-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(10,10,10,0.7), rgba(10,10,10,0.9));
    z-index: 1;
}
.hero-content { position: relative; z-index: 2; padding-top: 60px; }
.logo-wrapper {
    width: 100px; height: 100px; margin: 0 auto 20px;
    border-radius: 15px; overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border: 2px solid rgba(255,255,255,0.1);
}
.main-logo { width: 100%; height: 100%; object-fit: cover; }
.hero h1 { font-size: 2.5rem; line-height: 1.1; margin-bottom: 1rem; }
.subtitle { font-size: 1.1rem; color: var(--text-grey); margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
.scroll-indicator {
    position: absolute; bottom: 30px; left: 50%;
    transform: translateX(-50%); z-index: 2;
    display: flex; flex-direction: column; align-items: center;
    font-family: var(--font-head); font-size: 0.8rem; opacity: 0.7;
    animation: bounce 2s infinite;
}
.arrow {
    width: 10px; height: 10px;
    border-right: 2px solid white; border-bottom: 2px solid white;
    transform: rotate(45deg); margin-top: 5px;
}

/* --- GAME SECTION --- */
.section-game { padding: var(--spacing-lg) 0; }
.section-header { text-align: center; margin-bottom: var(--spacing-lg); }
.section-header h2 { font-size: 2.5rem; margin: 10px 0; }
.tag {
    background: rgba(255,255,255,0.1); padding: 5px 10px;
    border-radius: 4px; font-size: 0.8rem; letter-spacing: 1px;
    color: var(--primary-red);
}

/* GRID */
.gallery-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
.gallery-item {
    position: relative; border-radius: 8px; overflow: hidden;
    aspect-ratio: 9/16; background: #222; border: 1px solid #333;
    transition: transform 0.3s ease;
}
.gallery-item:hover { transform: translateY(-5px); border-color: var(--primary-red); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.05); }
.overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    font-family: var(--font-head); font-weight: 700;
    transform: translateY(100%); transition: transform 0.3s ease;
}
.gallery-item:hover .overlay { transform: translateY(0); }

/* --- BETA SECTION --- */
.section-beta { padding: var(--spacing-lg) 0; background: linear-gradient(45deg, var(--bg-panel), #1a0505); }
.beta-card {
    background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--primary-red); padding: 3rem 1.5rem;
    border-radius: 12px; text-align: center;
}
.beta-content h3 { font-size: 2rem; margin-bottom: 1rem; }
.beta-desc { font-size: 1.1rem; max-width: 600px; margin: 0 auto 2rem; color: var(--text-grey); }
.beta-benefits { text-align: left; max-width: 350px; margin: 0 auto 2rem; font-weight: 600; }
.beta-benefits li { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.small-text { font-size: 0.8rem; margin-top: 1rem; opacity: 0.6; }

/* --- ABOUT SECTION --- */
.section-about { padding: var(--spacing-lg) 0; }
.about-layout { display: flex; flex-direction: column; gap: 2rem; align-items: center; }
.about-image { width: 100%; max-width: 500px; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.about-text h2 { font-size: 2rem; margin-bottom: 1.5rem; border-bottom: 2px solid var(--primary-red); display: inline-block; padding-bottom: 5px; }
.about-text p { margin-bottom: 1rem; color: var(--text-grey); }

/* --- MODAL BASE --- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0; top: 0; 
    width: 100%; height: 100%; 
    overflow: hidden; /* Empêche le scroll background */
    background-color: rgba(0,0,0,0.95); 
    backdrop-filter: blur(5px);
    justify-content: center; 
    align-items: center; /* Centrage FLEX important */
    animation: fadeIn 0.3s;
}
@keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }

.modal-content { 
    position: relative; 
    width: 90%; 
    max-width: 500px; 
    background: var(--bg-panel); 
    border-radius: 12px; 
}

/* Close Buttons */
.close-modal, .close-beta {
    position: absolute; top: -40px; right: 0;
    color: #f1f1f1; font-size: 40px; font-weight: bold;
    cursor: pointer; line-height: 1; transition: 0.3s;
    z-index: 2005;
}
.close-modal:hover, .close-beta:hover { color: var(--primary-red); }

/* --- VIDEO SPECIFICS (CORRECTIF HAUTEUR) --- */
#video-modal .modal-content {
    width: auto;
    height: auto;
    max-width: none;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}

#video-modal video {
    height: 90vh; /* 90% de la hauteur écran */
    width: auto;  /* Largeur auto pour ratio */
    max-width: 95vw; /* Sécurité largeur */
    border-radius: 8px;
    box-shadow: 0 0 50px rgba(230, 0, 35, 0.3);
    object-fit: contain;
}

#video-modal .close-modal {
    top: 20px;
    right: 20px;
    font-size: 50px;
}

/* --- BETA STEPS MODAL --- */
.beta-content-box {
    border: 1px solid #333;
    border-top: 4px solid var(--primary-red);
    padding: 2.5rem 2rem;
    box-shadow: 0 15px 50px rgba(0,0,0,0.9);
}

.beta-header { text-align: center; margin-bottom: 2rem; }
.beta-header h3 { font-size: 1.8rem; margin-bottom: 0.5rem; }

.step-box {
    background: rgba(255,255,255,0.03);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.step-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: #444;
    line-height: 1;
}
.step-number.active { color: var(--primary-red); }

.step-info { flex: 1; }
.step-info h4 { font-size: 1.1rem; margin-bottom: 5px; color: white; }
.step-info p { font-size: 0.9rem; color: var(--text-grey); margin-bottom: 15px; line-height: 1.4; }

.full-width { width: 100%; }

.step-connector {
    height: 30px;
    width: 2px;
    background: #333;
    margin: 5px 0 5px 35px; /* Aligné avec le numéro */
}

.download-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.download-buttons .btn {
    flex: 1;
    font-size: 0.9rem;
    padding: 10px;
    white-space: nowrap;
}

/* --- FOOTER --- */
footer { background: black; padding: 3rem 0; text-align: center; border-top: 1px solid #222; }
.footer-logo { font-family: var(--font-head); font-weight: 700; font-size: 1.5rem; margin-bottom: 1.5rem; }
.social-links { display: flex; justify-content: center; gap: 2rem; margin-bottom: 2rem; }
.social-links a { color: var(--text-grey); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }
.social-links a:hover { color: white; }
.copyright { font-size: 0.8rem; color: #444; }

/* --- RESPONSIVE --- */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

@media (min-width: 768px) {
    .hero h1 { font-size: 3.5rem; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .main-item { grid-column: span 2; aspect-ratio: 16/9; }
    .about-layout { flex-direction: row; }
    .about-text { flex: 1; }
    .about-image { flex: 1; }
}

@media (min-width: 1024px) {
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .main-item { grid-column: span 1; grid-row: span 2; aspect-ratio: 9/16; }
}