/* =========================================
   1. RESET & GLOBAL
   ========================================= */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

html {
    scroll-behavior: smooth; 
    /* L'aimant pour bloquer le scroll */
    scroll-snap-type: y mandatory;
}

body { 
    font-family: 'Inter', sans-serif; 
    background-color: #1a1a1a; 
    color: white; 
    overflow-x: hidden;
    margin: 0; 
}

/* =========================================
   2. NAVIGATION
   ========================================= */
nav {
    position: fixed; 
    top: 0; 
    width: 100%; 
    height: 70px;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 0 50px; 
    z-index: 1000;
    background: rgba(0,0,0,0.2); 
    backdrop-filter: blur(5px);
}

.menu a { 
    color: white; 
    text-decoration: none; 
    margin-left: 20px; 
    font-weight: bold; 
}
.linkedin-icon { font-size: 1.5rem; }

/* =========================================
   3. PARALLAXE "STICKY"
   ========================================= */

/* Piste de scroll avec point d'accroche (Snap) */
.parallax-track {
    /* 200vh est un bon équilibre pour laisser le temps à l'animation de se jouer */
    height: 200vh; 
    position: relative;
    background-color: #1a1a1a;
    scroll-snap-align: start; /* Aimant haut */
}

/* Fenêtre Fixe */
.parallax-sticky-container {
    position: sticky; 
    top: 0;
    width: 100%;
    height: 100vh; 
    overflow: hidden; 
}

/* Calque Ciel (Fond) */
.layer-static {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Calques Montagnes (Mobiles) */
.layer-moving {
    position: absolute;
    bottom: 0; left: 0;
    width: 100%;
    height: 100%; 
    object-fit: cover;
    object-position: bottom;
    
    /* État initial : caché en bas */
    transform: translateY(100%) scale(1); 
    transform-origin: bottom center; 
    will-change: transform;
    z-index: 1; 
}

/* Texte (Titre) */
.hero-text {
    position: absolute;
    top: 50%; left: 50%;
    /* Centré + caché initialement */
    transform: translate(-50%, -50%); 
    z-index: 10; 
    text-align: center;
    pointer-events: none; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    opacity: 0; 
}

/* --- NOUVEAU HEADER DU HAUT --- */

.intro-header {
    font-family: 'Rubik', sans-serif;
    position: absolute;
    top: 15%; 
    left: 5%; 
    width: 90%; /* Prend toute la largeur pour pouvoir écarter les éléments */
    z-index: 0; 
    
    display: flex;
    /* C'EST ICI LA CLÉ DU POSITIONNEMENT : */
    justify-content: space-between; /* Pousse le titre à GAUCHE et le sous-titre à DROITE */
    align-items: flex-end; /* Aligne le bas du titre avec le bas du sous-titre */
    
    will-change: opacity, transform;
}

.intro-title {
    font-size: 10rem; /* Très gros comme demandé */
    font-weight: 800;
    margin: 0;
    line-height: 0.9; /* Légèrement resserré pour éviter trop d'espace vide */
    font-family: "Raleway";
    color: white; /* BLANC */
}

.intro-subtitle {
    font-size: 1.6rem;
    font-weight: 400;
    margin: 0;
    max-width: 500px; /* Limite la largeur pour que ça fasse 2 lignes si besoin */
    
    text-align: right; /* Le texte à l'intérieur s'aligne à droite */
    color: white; /* BLANC */
    
    /* Optionnel : Ajoute un petit décalage vers le haut si tu veux qu'il soit moins collé au bas */
    padding-bottom: 15px; 
}

/* RESPONSIVE HEADER */
@media (max-width: 900px) {
    .intro-header {
        flex-direction: column; /* On empile */
        align-items: flex-start; /* On aligne à gauche */
        top: 20%;
    }
    
    .intro-title {
        font-size: 5rem; /* On réduit la taille sur mobile */
    }

    .intro-subtitle {
        text-align: left; /* On remet le texte à gauche */
        max-width: 100%;
        margin-top: 10px;
    }
}

/* =========================================
   4. CONTENU PRINCIPAL
   ========================================= */
main {
    position: relative;
    z-index: 2; 
    background-color: #1a1a1a; 
    padding-bottom: 50px;
    min-height: 100vh;
    
    /* POINT D'ACCROCHE 2 : Le scroll s'arrête ici */
    scroll-snap-align: start;
    scroll-margin-top: 0px; 
}

.container { max-width: 1000px; margin: 0 auto; padding: 80px 20px; }

/* Styles globaux pour les Titres de sections (H2) */
section h2 {
    font-size: 3rem; /* Plus gros */
    text-align: center;
    margin-bottom: 60px; /* Plus d'espace sous le titre */
    font-weight: 800;
    position: relative;
    display: block;
    letter-spacing: -1px;
}

section h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #ff4757; /* Ton rouge accent */
    margin: 20px auto 0;
    border-radius: 2px;
}

/* =========================================
   SECTION À PROPOS (Style Carte / Bulle)
   ========================================= */

/* 1. La "Bulle" (Le conteneur principal) */
.about-card {
    background-color: #222; /* Fond gris foncé (plus clair que le fond noir du site) */
    border-radius: 20px;    /* Coins arrondis */
    padding: 50px;          /* Espace à l'intérieur de la bulle */
    
    display: flex;          /* Met l'image et le texte côte à côte */
    align-items: center;    /* Centre verticalement */
    gap: 50px;              /* Espace entre l'image et le texte */
    
    box-shadow: 0 10px 40px rgba(0,0,0,0.5); /* Ombre pour l'effet de profondeur */
    border: 1px solid #333; /* Fine bordure subtile */
    margin-top: 20px;
}

/* 2. L'image de profil */
.profile-pic {
    width: 250px;
    height: 250px;
    object-fit: cover;      /* Recadre l'image sans la déformer */
    border-radius: 20px;    /* Coins arrondis pour l'image aussi */
    box-shadow: 5px 5px 20px rgba(0,0,0,0.3);
}

/* 3. La colonne de texte */
.about-content {
    flex: 1; /* Prend tout l'espace restant */
}

/* 4. Les "Tags" (2ème année, Multimédia) */
.about-tags {
    display: flex;
    gap: 15px; /* Espace entre les tags */
    margin-bottom: 20px;
}

.tag-badge {
    color: #ff4757; /* Couleur du texte (Rose/Rouge) */
    border: 1px solid #ff4757; /* Bordure fine de la même couleur */
    padding: 6px 16px;
    border-radius: 50px; /* Forme de pilule complètement arrondie */
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: rgba(255, 71, 87, 0.1); /* Fond très légèrement teinté */
}

/* 5. Le Titre et Paragraphe */
/* On reset le H2 spécifique de about car on a un style global maintenant */
.about-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: white;
    text-align: left; /* Aligné à gauche dans la carte */
}
.about-content h2::after {
    display: none; /* Pas de ligne rouge dans la carte, ou alignée à gauche si tu préfères */
}

.about-content p {
    color: #cccccc; /* Gris clair pour le texte, plus lisible */
    line-height: 1.6; /* Espacement des lignes */
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* 6. Le Bouton "En savoir plus" */
.btn-secondary {
    display: inline-block;
    padding: 12px 30px;
    background-color: transparent;
    border: 2px solid white; /* Bordure blanche */
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    transition: all 0.3s ease; /* Animation douce au survol */
}

.btn-secondary:hover {
    background-color: white; /* Le fond devient blanc */
    color: #1a1a1a;          /* Le texte devient noir */
    transform: translateY(-3px); /* Le bouton monte un petit peu */
}

/* RESPONSIVE ABOUT */
@media (max-width: 900px) {
    .about-card {
        flex-direction: column; /* Image au dessus, texte en dessous */
        text-align: center;     /* Tout centrer */
        padding: 30px;
        gap: 30px;
    }

    .about-tags {
        justify-content: center; /* Centre les tags */
    }
    
    .about-content h2 {
        text-align: center;
    }

    .profile-pic {
        width: 180px;
        height: 180px;
    }
}

/* =========================================
   SECTION "MES OUTILS" (SKILLS)
   ========================================= */

.skills-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px; 
    max-width: 800px;
    margin: 0 auto; 
}

.skill {
    background-color: rgba(255, 255, 255, 0.05); 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    padding: 12px 25px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: #e0e0e0;
    cursor: default;
    transition: all 0.3s ease;
}

.skill:hover {
    background-color: rgba(255, 71, 87, 0.1); 
    border-color: #ff4757; 
    color: white;
    transform: translateY(-5px); 
    box-shadow: 0 5px 15px rgba(255, 71, 87, 0.2); 
}

/* =========================================
   SECTION "PROJETS RÉCENTS"
   ========================================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.project-card {
    background-color: #222;
    border-radius: 20px;
    overflow: hidden; 
    border: 1px solid #333;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    transform: translateY(-10px); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.6); 
    border-color: #444;
}

.project-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-bottom: 1px solid #333;
    transition: transform 0.5s ease; 
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-card h3 {
    padding: 20px 20px 5px 20px; 
    font-size: 1.4rem;
    margin: 0;
    color: white;
}

.project-card .tag {
    margin: 0 20px 20px 20px; 
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-card .tag::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background-color: #ff4757;
    border-radius: 50%;
}

.center-btn {
    margin-top: 60px;
    text-align: center;
}

.btn-primary {
    background: #ff4757; 
    color: white; 
    padding: 12px 30px; 
    text-decoration: none; 
    border-radius: 30px; 
    font-weight: bold;
    display: inline-block;
}

footer { 
    text-align: center; 
    padding: 40px; 
    color: #888; 
    border-top: 1px solid #333; 
    scroll-snap-align: end; 
}