/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    --bg-app: #100517;
    --primary: #651FFF;
    --secondary: #220B36;
    --accent: #00E5FF;
    --yellow: #FFD600;
    --red: #FF1744;
    --text-light: #ffffff;
    --glass-border: rgba(101, 31, 255, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-app);
    color: var(--text-light);
    overflow-x: hidden;
}

h1, h2, h3, h4, .btn-font { font-family: 'Fredoka', sans-serif; }

/* ==========================================================================
   2. BACKGROUND & ANIMATIONS GLOBALES
   ========================================================================== */
.background-gradient {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    background: radial-gradient(circle at 50% 30%, #2a0e45, #100517 70%);
    overflow: hidden;
}

.blob {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.4;
    animation: float 12s infinite alternate;
}
.blob-1 { width: 400px; height: 400px; background: var(--primary); top: -10%; left: -10%; }
.blob-2 { width: 500px; height: 500px; background: var(--accent); bottom: -10%; right: -10%; animation-delay: 2s; }

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 40px) scale(1.1); }
}

/* ==========================================================================
   3. NAVIGATION
   ========================================================================== */
nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 5%; position: fixed; width: 100%; z-index: 1000;
    background: rgba(16, 5, 23, 0.85); backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
}

.logo-container img { height: 60px; width: auto; }

.nav-btn {
    background: var(--primary);
    padding: 10px 25px; border-radius: 50px; text-decoration: none;
    color: white; font-weight: 700; box-shadow: 0 4px 15px rgba(101, 31, 255, 0.4);
    transition: 0.3s;
}
.nav-btn:hover { transform: scale(1.05); background: #7c4dff; }

/* ==========================================================================
   4. HERO & HEADER
   ========================================================================== */
header {
    min-height: 100vh; display: flex;  align-items: center; justify-content: center;
    padding: 120px 5% 50px; text-align: center; position: relative;
    overflow: hidden;
}

.hero-content { max-width: 800px; z-index: 2; }

h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 25px; color: white; }
.highlight { color: var(--accent); }
p.subtitle { font-size: 1.2rem; margin-bottom: 40px; color: #d1c4e9; max-width: 700px; margin-left: auto; margin-right: auto; }

.cta-container { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
.store-btn {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255,255,255,0.2);
    padding: 12px 25px; border-radius: 12px; color: white; text-decoration: none;
    font-weight: 600; transition: 0.3s;
}
.store-btn:hover { background: var(--primary); border-color: var(--primary); transform: translateY(-5px); }

/* ==========================================================================
   5. COMPOSANTS : COUNTDOWN
   ========================================================================== */
.countdown-container {
    margin-bottom: 40px; padding: 20px;
    background: rgba(34, 11, 54, 0.6); border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px); max-width: 450px; margin-left: auto; margin-right: auto;
}
.countdown-title { color: var(--accent); font-family: 'Fredoka', sans-serif; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; }
.countdown-timer { display: flex;  gap: 15px; }
.time-box {
    background: rgba(255, 255, 255, 0.05); border: 1px solid var(--primary);
    padding: 5px 15px; border-radius: 10px; min-width: 80px; text-align: center;
    display: flex; flex-direction: column; box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.time-box span { font-size: 1.8rem; font-weight: 700; font-family: 'Fredoka', sans-serif; color: white; }
.time-box small { font-size: 0.7rem; color: #b39ddb; text-transform: uppercase; }

/* ==========================================================================
   6. COMPOSANTS : PHONE MOCKUP
   ========================================================================== */
/* Animation du téléphone */
@keyframes floatPhone { 0%, 100% { transform: translateY(0) rotate(2deg); } 50% { transform: translateY(-20px) rotate(5deg); } }

/* Base du mockup (Desktop par défaut, ajusté ensuite par Media Queries) */
.phone-mockup {
    position: static; 
    margin: 40px auto 0;
    right: 5%; top: 20%; 
    width: 320px; height: 650px;
    display: block; 
    
    /* Positionnement Mobile de base */
    position: relative; 
    margin: 40px auto 0; 
    right: auto; top: auto; 
    
    /* Taille Mobile de base */
    width: 300px; 
    height: 500px;
    overflow: hidden; animation: floatPhone 6s ease-in-out infinite;
}

/* Version insérée dans le texte (cachée par défaut) */
.phone-mockup--mobile {
  display: none;
}

/* Conteneur de l'écran */
.phone-screen {
    width: 100%; height: 100%;
    background: transparent;
    padding: 0;
    display: block;
}

/* Image de l'écran */
.phone-screen-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    box-shadow: 0 20px 80px rgba(101, 31, 255, 0.3);
}

/* Styles additionnels (SEO Card / Mockup Content) */
.card-img { width: 100%; height: 100px; object-fit: cover; display: block; }
.card-content { padding: 10px; }
.card-content h4 { font-size: 1rem; margin-bottom: 5px; }
.card-content small { color: #b39ddb; font-size: 0.7rem; }
.btn-reserve-mockup { width: 100%; background: var(--primary); color: white; text-align: center; padding: 8px; border-radius: 8px; margin-top: 5px; font-weight: bold; font-size: 0.8rem; }

/* ==========================================================================
   7. SECTIONS & MARQUEE
   ========================================================================== */
/* Scroll Infini (Marquee) */
.category-marquee { 
    padding: 35px 0; background: var(--secondary); overflow: hidden; position: relative; width: 100%;
    mask-image: linear-gradient(90deg, transparent 0%, black 15%, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 15%, black 85%, transparent 100%);
    border-top: 1px solid rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.05);
}
.marquee-track { display: flex; width: max-content; animation: scroll 20s linear infinite; will-change: transform; }
.category-marquee:hover .marquee-track { animation-play-state: paused; }
.cat-item { 
    display: inline-flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.05); 
    padding: 10px 25px; border-radius: 50px; margin: 0 15px; font-weight: 600; font-size: 1rem; 
    border: 1px solid rgba(255,255,255,0.1); white-space: nowrap; transition: 0.3s;
}
.cat-item:hover { background: rgba(255,255,255,0.15); border-color: var(--accent); transform: scale(1.1); cursor: default; }
.fa-brain { color: var(--yellow); } .fa-vr-cardboard { color: #E040FB; } .fa-fist-raised { color: var(--red); } .fa-running { color: var(--accent); }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Features Section */
.section { padding: 80px 5%; }
.section-title { font-size: 2.5rem; text-align: center; margin-bottom: 50px; }
.cards-container 
{ 
    display: flex;             
    flex-wrap: wrap;          
    justify-content: center;   
    gap: 30px; 
}
.feature-card {
    background: var(--secondary); border: 1px solid rgba(255,255,255,0.05);
    padding: 30px; border-radius: 20px; text-align: center; transition: 0.4s;
    flex: 1 1 300px;    
    max-width: 400px;   
    width: 100%;
}
.feature-card:hover { transform: translateY(-15px) scale(1.03); border-color: var(--primary); box-shadow: 0 10px 40px rgba(101, 31, 255, 0.2); }
.icon-box { font-size: 2.5rem; margin-bottom: 20px; color: var(--primary); }

/* Formulaire Contact */
.contact-section { padding: 80px 5%; }
.form-container {
    max-width: 600px; margin: 0 auto; background: var(--secondary); 
    padding: 40px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.05);
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-light); font-size: 0.9rem; }
.form-group input, .form-group textarea {
    width: 100%; padding: 15px; border-radius: 10px; border: none;
    background: var(--bg-app); color: white; font-family: 'Poppins', sans-serif;
}
.form-group textarea { resize: none; }
.submit-btn {
    font-size: 20px;
    width: 50%; padding: 15px; background: var(--primary);
    display: block; margin: 0 auto;
    border: none; border-radius: 50px; color: white; font-weight: bold;
    cursor: pointer; transition: 0.3s;
}
.submit-btn:hover { background: #7c4dff; transform: scale(1.02); }

/* ==========================================================================
   8. FOOTER & MODALS
   ========================================================================== */
footer { width: 100%; padding: 50px 5%; text-align: center; background: var(--secondary); border-top: 1px solid rgba(255,255,255,0.05); color: #aaa; }

.socials { display:flex; justify-content: space-evenly; justify-self: center; width: 50%; }
.socials a { color: #aaa;  font-size: 1.2rem; transition: 0.3s; }

.legal-links { margin-top: 20px; display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; }
.legal-links a { color: #aaa; text-decoration: none; font-size: 0.9rem; cursor: pointer; transition: 0.3s; }
.legal-links a:hover { color: var(--primary); }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 2000; display: none; justify-content: center; align-items: center; padding: 20px; backdrop-filter: blur(5px); }
.modal-content { background: var(--bg-app); width: 100%; max-width: 700px; max-height: 80vh; overflow-y: auto; padding: 40px; border-radius: 20px; border: 1px solid var(--primary); position: relative; }
.close-modal { position: absolute; top: 20px; right: 20px; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }
.modal-body h2 { color: var(--primary); margin-bottom: 20px; font-family: 'Fredoka', sans-serif;}
.modal-body p { margin-bottom: 15px; line-height: 1.6; color: #ccc; }

/* ==========================================================================
   9. UTILITAIRES D'ANIMATION (SCROLL REVEAL)
   ========================================================================== */
[data-animate] { opacity: 0; transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
[data-animate="pop"] { transform: scale(0.8) translateY(30px); }
[data-animate="pop"].animate-active { opacity: 1; transform: scale(1) translateY(0); transition-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55); }
[data-animate="slide-left"] { transform: translateX(-100px); }
[data-animate="slide-left"].animate-active { opacity: 1; transform: translateX(0); }
[data-animate="slide-right"] { transform: translateX(100px); }
[data-animate="slide-right"].animate-active { opacity: 1; transform: translateX(0); }
[data-animate="fade-up"] { transform: translateY(50px); }
[data-animate="fade-up"].animate-active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; } .delay-2 { transition-delay: 0.2s; } .delay-3 { transition-delay: 0.3s; }

/* ==========================================================================
   10. MEDIA QUERIES
   ========================================================================== */

/* --- TABLETTE (769px -> 1024px) --- */
@media (max-width: 1024px) {
    /* Gestion Mockup */
    .phone-mockup:not(.phone-mockup--mobile) { display: none; }
    .phone-mockup--mobile {
        display: block;
        margin: 50px auto 0;
        width: 340px; height: 620px;
        animation: floatPhone 6s ease-in-out infinite;
    }

    /* Layout Tablette */
    header { text-align: center; }
    .cta-container { justify-content: center; }
    p.subtitle { margin-left: auto; margin-right: auto; }
    .countdown-container { margin-left: auto; margin-right: auto; }
    .countdown-timer { justify-content: center;  }
    .socials { width: 30%; }
}

/* --- iPad Pro & TABLETTES LARGES (1025px -> 1366px) --- */
@media (min-width: 1025px) and (max-width: 1366px) {
    /* Gestion Mockup */
    .phone-mockup:not(.phone-mockup--mobile) { display: none; }
    .phone-mockup--mobile {
        display: block;
        margin: 50px auto 0;
        width: 360px; height: 680px;
        animation: floatPhone 6s ease-in-out infinite;
    }

    /* Layout iPad Pro / Tablette Large */
    header { text-align: center; justify-content: center; }
    .cta-container { justify-content: center; }
    p.subtitle { margin-left: auto; margin-right: auto; }
    h1 { font-size: 3.8rem; line-height: 1.15; }
    .countdown-container { margin-left: auto; margin-right: auto; }
    .countdown-timer { justify-content: center;  }
    .socials { width: 20%; }
    
    /* Sections */
    .section-title { font-size: 2.3rem; }
    .cards-container { grid-template-columns: repeat(2, 1fr); gap: 25px; }
}

/* --- DESKTOP (> 1366px) --- */
@media (min-width: 1367px) {
    /* Gestion Mockup */
    .phone-mockup {
        position: absolute; 
        right: 5%; top: 11%;
        width: 400px; height: 730px;
    }
    
    /* Layout Desktop */
    header { justify-content: flex-start; text-align: left; }
    .cta-container { justify-content: flex-start; }
    p.subtitle { margin-left: 0; }
    h1 { font-size: 4.5rem; }
    .countdown-container { margin-left: 0; }
    .socials { width: 10%; }
}

/* --- MOBILE (< 768px) --- */
@media (max-width: 768px) {
    
    /* --- 1. Gestion Mockup & Layout Global Mobile --- */
    .phone-mockup:not(.phone-mockup--mobile) { display: none; }
    .phone-mockup--mobile {
        display: block;
        margin: 30px auto 0;
        width: 260px; height: 480px;
        animation: floatPhone 6s ease-in-out infinite;
    }
    .socials { width: 100%; }
    
    /* --- 2. UX Tuning (Font sizes & Paddings) --- */
    body { font-size: 15px; }
    
    /* Nav */
    nav { padding: 14px 6%; }
    .logo-container img { height: 42px; }
    .nav-btn { padding: 8px 18px; font-size: 0.85rem; }

    /* Hero */
    header { padding: 100px 6% 40px; }
    h1 { font-size: 2.4rem; line-height: 1.15; margin-bottom: 20px; }
    p.subtitle { font-size: 1rem; margin-bottom: 30px; }

    /* CTA */
    .cta-container { gap: 12px; }
    .store-btn { padding: 10px 18px; font-size: 0.9rem; border-radius: 10px; }

    /* Countdown */
    .countdown-container { padding: 16px; margin-bottom: 30px; }
    .countdown-timer { gap: 10px; justify-content: center; }
    .countdown-title { font-size: 0.75rem; }
    .time-box { min-width: 65px; padding: 6px 10px; }
    .time-box span { font-size: 1.4rem; }

    /* Sections / Cards / Forms */
    .category-marquee { padding: 22px 0; }
    .cat-item { padding: 8px 18px; font-size: 0.85rem; margin: 0 10px; }
    .section { padding: 60px 6%; }
    .section-title { font-size: 2rem; margin-bottom: 35px; }
    .feature-card { padding: 22px; }
    .icon-box { font-size: 2rem; margin-bottom: 15px; }
    .contact-section { padding: 60px 6%; }
    .form-container { padding: 25px; }
    .submit-btn { width: 100%; font-size: 1rem; padding: 14px; }
    footer { padding: 40px 6%; }
}