/* --- 1. IMPORTATION DES POLICES --- */
@font-face {
    font-family: 'Doctor Glitch';
    src: url('ressources/fonts/Doctor Glitch.otf') format('opentype');
}
@font-face {
    font-family: 'Quera';
    src: url('ressources/fonts/Quera DEMO.otf') format('opentype');
}

/* --- 2. VARIABLES --- */
:root {
    --neon-cyan: #00BFFF; 
    --neon-dim: rgba(0, 191, 255, 0.3);
    --bg-black: #080808;
    --card-bg: rgba(20, 20, 20, 0.95);
    --off-white: #E6F0FF;
    --font-glitch: 'Doctor Glitch', monospace;
    --font-main: 'Quera', sans-serif;
}

/* --- 3. RESET & BASE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    /* Suppression du overflow-y: scroll qui bloquait tout */
    overflow-x: hidden;
    height: auto;
}

body {
    background-color: var(--bg-black);
    color: var(--off-white);
    font-family: var(--font-main);
    line-height: 1.5;
    overflow-x: hidden;
    height: auto;
}

/* --- 4. LOADING SCREEN --- */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-black);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

#loading-screen.loaded {
    display: none; /* Plus radical pour libérer les ressources */
}

.loader-content { width: 300px; text-align: center; }
.loader-title {
    font-family: var(--font-glitch);
    font-size: 2.5rem;
    color: var(--neon-cyan);
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.loader-bar {
    width: 100%; height: 4px; background: #111; border: 1px solid #333; margin-bottom: 10px; position: relative; overflow: hidden;
}

.loader-progress {
    width: 0%; height: 100%; background: var(--neon-cyan);
    animation: loadProgress 3s ease-in-out forwards;
}

@keyframes loadProgress { 100% { width: 100%; } }

/* --- 5. HERO SECTION --- */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: radial-gradient(circle at center, #111 0%, #000 100%);
}

.glitch-title {
    font-family: var(--font-glitch); 
    font-size: 4rem; 
    color: var(--neon-cyan);
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    margin: 0;
    line-height: 1;
    letter-spacing: 2px;
    z-index: 1;
}

/* Les couches de couleurs qui s'activent pour l'effet glitch */
.glitch-title::before, .glitch-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-black);
    opacity: 0.8;
    clip: rect(0, 0, 0, 0); /* Caché par défaut */
}

.glitch-title::before {
    left: 2px;
    text-shadow: -2px 0 #0037ff;
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch-title::after {
    left: -2px;
    text-shadow: 2px 0 #00fff9;
    animation: glitch-anim 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 30px, 0); transform: skew(0.5deg); }
    20% { clip: rect(40px, 9999px, 50px, 0); transform: skew(-0.5deg); }
    40% { clip: rect(70px, 9999px, 10px, 0); transform: skew(0.2deg); }
    60% { clip: rect(20px, 9999px, 80px, 0); transform: skew(-0.2deg); }
    80% { clip: rect(50px, 9999px, 100px, 0); transform: skew(0.5deg); }
    100% { clip: rect(10px, 9999px, 30px, 0); transform: skew(-0.5deg); }
}

.scroll-indicator {
    position: absolute;
    bottom: 40px; /* Aligné en bas */
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: var(--neon-cyan);
    letter-spacing: 3px;
    text-align: center;
    animation: bounce 2s infinite;
    z-index: 10;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
    40% { transform: translate(-50%, -10px); }
    60% { transform: translate(-50%, -5px); }
}


/* --- 6. TIMELINE --- */
.timeline-container { position: relative; max-width: 1000px; margin: 0 auto; padding: 100px 20px; }
.timeline-line { position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: var(--neon-cyan); transform: translateX(-50%); }
.tl-block { position: relative; margin-bottom: 100px; width: 100%; display: flex; justify-content: center; }
.tl-block:nth-child(odd) { justify-content: flex-start; }
.tl-block:nth-child(even) { justify-content: flex-end; }
.tl-content { background: var(--card-bg); border: 1px solid var(--neon-cyan); padding: 25px; width: 42%; }

/* Assure-toi que le contenu est en position relative pour placer le point */
.tl-content {
    background: var(--card-bg); 
    border: 1px solid var(--neon-cyan); 
    padding: 25px; 
    width: 42%; 
    position: relative; /* CRITIQUE */
    box-shadow: 0 0 15px rgba(0, 191, 255, 0.1);
}

/* Le point sur la ligne */
.tl-dot {
    position: absolute;
    top: 25px;
    width: 16px;
    height: 16px;
    background: var(--bg-black);
    border: 2px solid var(--neon-cyan);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--neon-cyan); /* Effet néon */
    z-index: 10;
}

/* Positionnement précis pour tomber pile sur la ligne centrale */
/* (Calcul : La box fait 42%, la ligne est à 50%, donc on décale de ~8-10%) */
.tl-block:nth-child(odd) .tl-dot {
    right: -11%; 
}

.tl-block:nth-child(even) .tl-dot {
    left: -11%;
}

/* Ajustement pour le mobile */
@media (max-width: 768px) {
    .timeline-line { left: 20px; transform: none; }
    .tl-block { justify-content: flex-end !important; }
    .tl-content { width: 85%; }
    
    .tl-block:nth-child(odd) .tl-dot,
    .tl-block:nth-child(even) .tl-dot {
        left: -33px; /* Aligné avec la ligne à gauche sur mobile */
        right: auto;
    }
}

/* --- 7. SCROLL HORIZONTAL (LA CLÉ) --- */
.horizontal-section {
    display: flex;
    flex-wrap: nowrap;
    padding: 0 50px;
    height: 100vh; /* On prend toute la hauteur pour l'effet de blocage */
    align-items: center;
    overflow: visible; 
}

.h-card {
    min-width: 400px;
    margin-right: 100px;
    flex-shrink: 0;
    background: var(--card-bg);
    border: 1px solid var(--neon-cyan);
    padding: 20px;
}

/* --- 8. VIDEO & CTA --- */
.video-wrapper { max-width: 800px; margin: 100px auto; text-align: center; }
.video-container { width: 100%; height: 400px; background: #000; border: 2px solid var(--neon-cyan); display: flex; align-items: center; justify-content: center; }
/* --- SECTION TERMINAL (ACCÈS) --- */
.terminal-access {
    padding: 120px 20px;
    background: #050505;
    border-top: 1px solid var(--neon-dim);
    display: flex;
    justify-content: center;
}

.terminal-container {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.terminal-container h2 {
    font-size: 1.8rem;
    margin-bottom: 40px;
    letter-spacing: 4px;
    line-height: 1.4;
}

.terminal-box {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--neon-cyan);
    padding: 40px;
    box-shadow: 0 0 20px var(--neon-dim);
    text-align: left;
}

.terminal-status {
    font-family: monospace;
    color: var(--neon-cyan);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.terminal-form {
    display: flex;
    gap: 15px;
}

.terminal-form .input-neon {
    flex: 1;
    background: transparent;
    border: 1px solid var(--neon-dim);
    padding: 15px;
    color: var(--off-white);
    outline: none;
}

.terminal-form .input-neon:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-dim);
}

/* --- FOOTER --- */
.main-footer {
    background: #000;
    padding: 60px 20px;
    border-top: 2px solid var(--neon-cyan);
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
}

.social-link {
    color: var(--off-white);
    text-decoration: none;
    font-size: 0.8rem;
    letter-spacing: 2px;
    transition: 0.3s;
}

.social-link:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 8px var(--neon-cyan);
}

.footer-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-dim), transparent);
    margin: 30px 0;
}

.footer-info p {
    font-size: 0.7rem;
    color: #555;
    margin: 5px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* =========================================
   AJOUTS POUR MOBILE (RESPONSIVE)
   À ajouter tout à la fin du fichier index.css
========================================= */

/* On cible les écrans d'une largeur max de 768px (Tablettes et Téléphones) */
@media screen and (max-width: 768px) {

    /* --- 1. AJUSTEMENTS GLOBAUX & HERO --- */
    body {
        font-size: 14px; /* Réduit légèrement la taille de base du texte */
    }

    .hero .glitch-title {
        font-size: 2.5rem; /* Réduit drastiquement le gros titre */
        padding: 0 10px;
    }

    .hero .subtitle {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }

    .hero .slogan {
        font-size: 1rem;
        padding: 0 20px;
    }

    /* --- 2. RESTRUCTURATION DE LA TIMELINE (Verticalisation) --- */
    .timeline-container {
        padding: 30px 15px;
    }

    /* Déplace la ligne centrale vers la gauche */
    .timeline-line {
        left: 30px;
        transform: none;
    }

    /* Force tous les blocs à prendre toute la largeur et s'aligner à gauche */
    .tl-block,
    .tl-block:nth-child(even),
    .tl-block:nth-child(odd) {
        width: 100%;
        justify-content: flex-start;
        margin-bottom: 40px;
    }

    /* Ajuste le contenu des blocs pour laisser de la place à la ligne à gauche */
    .tl-content {
        width: 100%;
        padding: 20px;
        margin-left: 40px; /* Décale le contenu à droite de la ligne */
    }

    /* Repositionne les points (dots) sur la nouvelle ligne à gauche */
    .tl-block:nth-child(odd) .tl-dot,
    .tl-block:nth-child(even) .tl-dot {
        left: -48px; /* Position par rapport au contenu décalé */
        right: auto; /* Annule la position 'right' des blocs pairs */
        top: 20px;
    }

    /* Réduit la taille des images dans la timeline */
    .photo-frame .tl-image {
        height: 150px !important;
    }


    /* --- 3. SECTION SCROLL HORIZONTAL --- */
    .horizontal-section {
        padding: 20px 0; /* Moins de hauteur */
        gap: 15px;
    }

    .h-card {
        min-width: 260px; /* Cartes légèrement moins larges */
    }


    /* --- 4. VIDEO SECTION --- */
    .video-container {
        /* Remplace la hauteur fixe de 400px par une hauteur auto adaptée au format 16/9 */
        height: auto;
        aspect-ratio: 16 / 9;
    }
    .video-wrapper h3.blink-text {
        font-size: 0.9rem;
        padding: 0 10px;
    }


    /* --- 5. FOOTER (CTA) --- */
    .cta-section {
        padding: 30px 15px;
    }

    /* Empile le formulaire verticalement */
    .cta-section form {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .input-neon {
        margin-right: 0;
        width: 100%;
        text-align: center;
    }

    .btn-neon {
        width: 100%;
    }
}