/* =========================================
   1. VARIABLES
   ========================================= */
:root {
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
    --bg-dark: #050505;
    --bg-surface: #0f1014;
    --primary: #2563eb;
    --primary-glow: rgba(37, 99, 235, 0.5);
    --accent: #60a5fa;
    --text-white: #ffffff;
    --text-muted: #e2e8f0;
    --glass: rgba(10, 10, 10, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --border-radius: 12px;
    --header-height: 80px;
    --container-width: 1200px;
}

/* =========================================
   2. FONTS
   ========================================= */
@font-face {
    font-family: 'Outfit';
    src: url('../fonts/Outfit-VariableFont_wght.woff2') format('woff2');
    font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Space Grotesk';
    src: url('../fonts/SpaceGrotesk-VariableFont_wght.woff2') format('woff2');
    font-weight: 300 700; font-style: normal; font-display: swap;
}
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-style: normal;
    font-weight: 900;
    font-display: swap; 
    src: url('../fonts/fa-solid-900.woff2') format('woff2');
}
@font-face {
    font-family: 'Font Awesome 6 Brands';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/fa-brands-400.woff2') format('woff2');
}

/* =========================================
   3. RESET & GLOBAL
   ========================================= */
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; padding: 0; margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { 
    background-color: var(--bg-dark); 
    color: var(--text-white); 
    font-family: var(--font-body); 
    font-size: 16px; 
    overflow-x: hidden; 
    min-height: 100vh; 
    text-rendering: optimizeSpeed; 
    line-height: 1.5; 
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; border: none; outline: none; }
a { text-decoration: none; color: inherit; cursor: pointer; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 1.5rem; }
h1, h2, h3, h4, h5 { font-family: var(--font-heading); font-weight: 800; line-height: 1.1; color: var(--text-white); }

/* NAV */
nav { position: fixed; top: 0; width: 100%; height: var(--header-height); display: flex; justify-content: space-between; align-items: center; padding: 0 5%; background: transparent; border-bottom: 1px solid transparent; z-index: 1000; transition: all 0.4s ease; }
nav.scrolled { background: var(--glass); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border-bottom: 1px solid var(--glass-border); height: 70px; }
.brand-logo { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 800; letter-spacing: -1px; color: white; }
.dot { color: var(--primary); }
.nav-links { display: flex; gap: 2.5rem; align-items: center; }
.nav-links a { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); transition: color 0.3s ease; }
.nav-links a:not(.nav-cta):hover { color: white; }
.nav-cta { padding: 0.7rem 1.5rem; border: 1px solid var(--glass-border); border-radius: 50px; color: white !important; font-weight: 600; transition: all 0.3s ease; }
.nav-cta:hover { background: white; color: black !important; border-color: white; }

/* BOUTON MOBILE (Caché sur Desktop) */
.mobile-menu-icon {
    display: none;
}

/* HERO */
.hero { 
    height: 100vh; width: 100%; position: relative; 
    display: flex; align-items: center; justify-content: center; text-align: center; 
    padding-top: var(--header-height); overflow: hidden; 
    background-color: var(--bg-dark);
    background-image: url('../img/hero-poster.webp');
    background-size: cover; background-position: center; z-index: 1;
}
.hero-video-container { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }
.hero-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(180deg, rgba(5,5,5,0.6) 0%, rgba(5,5,5,0.95) 100%); z-index: 1; }
.hero-content { position: relative; z-index: 2; max-width: 900px; padding: 0 20px; }
.tagline { display: inline-block; color: var(--accent); font-weight: 700; letter-spacing: 3px; text-transform: uppercase; font-size: 0.8rem; margin-bottom: 1.5rem; border: 1px solid rgba(96, 165, 250, 0.2); padding: 0.4rem 1rem; border-radius: 4px; }
.hero h1 { font-size: clamp(3rem, 6vw, 6rem); margin-bottom: 1.5rem; line-height: 1.05; background: linear-gradient(180deg, #FFFFFF 0%, #94A3B8 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero p { font-size: 1.25rem; color: var(--text-muted); max-width: 650px; margin: 0 auto 3rem; font-weight: 300; }
.hero-btns { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }
.btn { padding: 1rem 2.5rem; border-radius: 6px; font-weight: 700; transition: all 0.3s ease; display: inline-block; }
.btn-primary { background: var(--primary); color: white; box-shadow: 0 0 20px rgba(37, 99, 235, 0.3); }
.btn-primary:hover { background: #1d4ed8; transform: translateY(-3px); box-shadow: 0 0 40px var(--primary-glow); }
.btn-outline { border: 1px solid rgba(255,255,255,0.2); color: white; }
.btn-outline:hover { border-color: white; background: rgba(255,255,255,0.05); }

/* SECTIONS */
.tech-ticker { background: var(--primary); color: white; padding: 1.2rem 0; overflow: hidden; white-space: nowrap; position: relative; z-index: 5; display: flex; }
.ticker-track { display: flex; }
.ticker-track span { font-family: var(--font-body); font-weight: 700; font-size: 0.9rem; letter-spacing: 2px; margin-right: 4rem; flex-shrink: 0; }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; margin-top: 4rem; }
.service-card { background: rgba(255, 255, 255, 0.02); border: 1px solid var(--glass-border); padding: 3rem 2.5rem; border-radius: var(--border-radius); transition: all 0.4s ease; position: relative; display: block; }
.service-card:hover { transform: translateY(-10px); border-color: var(--primary); background: rgba(255, 255, 255, 0.04); }
.card-icon { font-size: 2.5rem; color: var(--primary); margin-bottom: 2rem; }
.service-card h3 { font-size: 1.6rem; margin-bottom: 1rem; }
.service-card p { color: var(--text-muted); margin-bottom: 2rem; }
.card-link { font-weight: 700; color: white; display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.service-card:hover .card-link i { transform: translateX(5px); transition: 0.3s; }

/* FOOTER */
footer { background: #020202; border-top: 1px solid var(--glass-border); padding: 6rem 0 2rem; margin-top: 4rem; }
.footer-container { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 4rem; margin-bottom: 4rem; }
.footer-col h4, .footer-col h3 { font-size: 1rem; margin-bottom: 1.5rem; letter-spacing: 1px; color: white; }
.footer-col a { display: block; color: var(--text-muted); margin-bottom: 0.8rem; transition: 0.3s; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid #111; padding-top: 2rem; color: var(--text-muted); font-size: 0.9rem; text-align: center; }

/* HELPERS */
.preloader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: var(--bg-dark); z-index: 9999; display: flex; justify-content: center; align-items: center; transition: opacity 0.5s ease; }
.preloader.loaded { opacity: 0; pointer-events: none; }
.section { padding: 8rem 0; }
.section-title { font-size: 3rem; margin-bottom: 1.5rem; }
.subtitle { color: var(--primary); font-weight: 700; letter-spacing: 2px; text-transform: uppercase; font-size: 0.9rem; display: block; margin-bottom: 1rem; }
.reveal { opacity: 0; }

/* SÉLECTEUR DE LANGUE */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 20px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
}
.lang-switch a {
    color: var(--text-muted);
    text-decoration: none;
    opacity: 0.5;
    transition: opacity 0.3s ease, color 0.3s ease;
}
.lang-switch a:hover { opacity: 1; color: white; }
.lang-switch a.active { opacity: 1; color: var(--primary); position: relative; }
.lang-sep { opacity: 0.2; color: white; font-weight: 300; }


/* =========================================
   RESPONSIVE MOBILE (CORRECTIF ULTIME)
   ========================================= */
@media screen and (max-width: 968px) {
    
    /* 1. NAV LINKS (Panneau latéral) */
    .nav-links { 
        position: fixed; 
        top: 0; right: 0; 
        height: 100vh; width: 100%; 
        background: rgba(5, 5, 5, 0.98); 
        backdrop-filter: blur(15px); 
        flex-direction: column; 
        justify-content: center; align-items: center; 
        gap: 2.5rem; 
        transform: translateX(100%); 
        transition: transform 0.5s cubic-bezier(0.7, 0, 0.2, 1); 
        z-index: 998; 
    }
    .nav-links.nav-active { transform: translateX(0%); }
    .nav-links a { font-size: 1.8rem; font-weight: 300; letter-spacing: -1px; opacity: 0; transform: translateY(20px); }
    .nav-links.nav-active a { opacity: 1; transform: translateY(0); transition: all 0.5s ease 0.2s; }

    /* 2. BOUTON MOBILE (CORRECTIF FOND GRIS & SUPPORT SVG) */
    .mobile-menu-icon { 
        display: flex !important;
        align-items: center; justify-content: center;
        
        /* Supprime le fond de toutes les manières possibles */
        background: transparent !important; 
        background-color: transparent !important;
        background-image: none !important;
        
        /* Supprime les bordures et ombres */
        border: none !important;
        outline: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;

        /* CRUCIAL : Supprime le flash gris au clic sur Mobile */
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none;
        user-select: none;

        /* Reset du style navigateur */
        -webkit-appearance: none;
        appearance: none;

        z-index: 999; 
        position: relative; 
        cursor: pointer;
        padding: 5px;
        margin-right: -5px;
        color: white; /* Pour le SVG "Command Prompt" */
    }

    /* Force la transparence même au clic/focus */
    .mobile-menu-icon:focus, 
    .mobile-menu-icon:active, 
    .mobile-menu-icon:visited, 
    .mobile-menu-icon:hover {
        background: transparent !important;
        outline: none !important;
        box-shadow: none !important;
    }

    /* Taille SVG Ajustée */
    .mobile-menu-icon svg {
        width: 32px; 
        height: 32px;
        transition: transform 0.3s ease;
    }

    .mobile-menu-icon:active svg {
        transform: scale(0.9);
        opacity: 0.8;
    }
    
    /* Autres ajustements Mobile */
    .hero-video { display: none !important; }
    .hero { background-image: url('../img/hero-poster.webp'); }
    h1 { font-size: 3rem !important; }
    .section { padding: 4rem 0; }
    .services-grid, .intro-grid, .footer-container, .portfolio-grid { grid-template-columns: 1fr !important; gap: 3rem; }
    .hero-content { padding-top: 60px; }
    .footer-container { gap: 2rem; text-align: center; }
    .footer-col { align-items: center; }
    .lang-switch { margin-right: 0; margin-bottom: 2rem; justify-content: center; font-size: 1.1rem; gap: 20px; }
}

@media screen and (min-width: 969px) {
    .hero-video { display: block !important; }
}