/* ============================================= */
/* --- 1. VARIABLES ET STYLES GÉNÉRAUX --- */
/* ============================================= */
:root {
    --primary-color: #007BFF;
    --background-color: #121212;
    --surface-color: #1E1E1E;
    --text-color: #EAEAEA;
    --secondary-text-color: #A0A0A0;
    --font-family: 'Montserrat', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.7;
    color: var(--text-color);
    background: var(--background-color);
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: auto;
    overflow: hidden;
    padding: 0 2rem;
}

/* ============================================= */
/* --- 2. STRUCTURE PRINCIPALE (HEADER, SECTIONS, FOOTER) --- */
/* ============================================= */
.section {
    padding: 5rem 0;
    border-bottom: 1px solid #282828;
}

.section h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 3rem;
    color: #fff;
}

.section .container > p {
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 8vh;
    background: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid #282828;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    text-decoration: none;
}

.navbar .nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.navbar .nav-links li {
    margin-left: 2rem;
}

.navbar .nav-links a {
    text-decoration: none;
    color: var(--secondary-text-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

.navbar .nav-links a:hover {
    color: var(--primary-color);
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: all 0.3s ease;
}

.hero {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
}

.hero h1 {
    font-size: 4.5rem;
}

.hero .subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--secondary-text-color);
    margin: 1rem 0 2.5rem 0;
}

/* ============================================= */
/* --- 3. COMPOSANTS (BOUTONS, CARTES, TIMELINE) --- */
/* ============================================= */

/* --- Boutons --- */
.btn {
    display: inline-block;
    padding: 0.9rem 2.2rem;
    background: var(--primary-color);
    color: #fff;
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn:hover {
    background: transparent;
    color: var(--primary-color);
    transform: translateY(-3px);
}

.btn-secondary {
    display: inline-block;
    margin-top: 1rem;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    position: relative;
}

.btn-secondary::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

.btn-secondary:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.contact-button {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    background: var(--surface-color); 
    border: 1px solid var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-button:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 123, 255, 0.3);
}

/* --- Cartes (Glassmorphism & 3D Effect) --- */
.skill-item, 
.project-card, 
.timeline-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    will-change: transform;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.320, 1), 
                box-shadow 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

.skill-item:hover, 
.project-card:hover, 
.timeline-item:hover .timeline-content {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* --- Timeline --- */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background: var(--primary-color);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 3px solid var(--primary-color);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(odd)::after { right: -10px; }
.timeline-item:nth-child(even)::after { left: -10px; }

/* ============================================= */
/* --- 4. SECTIONS SPÉCIFIQUES --- */
/* ============================================= */

/* --- Section À Propos --- */
.about-container {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.profile-photo-frame {
    width: 250px;
    height: 350px;
    background-color: #fff;
    padding: 5px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.profile-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.about-text h2 {
    text-align: left;
}

/* --- Section Compétences --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}

.skill-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* --- Section Parcours --- */
.parcours-subtitle {
    text-align: center;
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

/* --- Section Contact --- */
.contact-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

/* --- Sélecteur de langue --- */
.lang-switcher {
    display: flex;
    gap: 0.5rem;
    color: var(--secondary-text-color);
    font-weight: 600;
}

.lang-switcher span {
    cursor: pointer;
    transition: color 0.3s ease;
}

.lang-switcher span:not(.active):hover {
    color: var(--text-color);
}

.lang-switcher span.active {
    color: var(--primary-color);
    font-weight: 700;
}

/* Version PC */
.desktop-lang {
    margin-left: 1rem;
}

/* Version Mobile (sera dans la liste) */
.mobile-lang {
    margin-top: 1.5rem;
    opacity: 0; /* Géré par l'animation du menu burger */
    display: none; /* Caché par défaut sur PC */
}

/* ============================================= */
/* --- 5. ANIMATIONS & EFFETS SPÉCIAUX --- */
/* ============================================= */

/* --- Animation au défilement --- */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.show {
    opacity: 1;
    transform: translateY(0);
}

/* --- Effet Typewriter --- */
.animated-gradient {
    background: linear-gradient(90deg, #007BFF, #00C6FF, #ee7752, #e73c7e);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-animation 8s ease infinite;
    position: relative;
}

.animated-gradient::after {
    content: '|';
    position: absolute;
    right: -10px;
    font-weight: 300;
    color: var(--primary-color);
    animation: blink 1s infinite;
}

@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- Animation Menu Burger --- */
.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

@keyframes navLinkFade {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0px); }
}

/* --- Carrousel de Projets --- */
.carousel {
    width: 100%;
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.carousel-track {
    display: flex;
    width: calc(340px * 8); 
    animation: scroll 50s linear infinite;
}

.carousel:hover .carousel-track {
    animation-play-state: paused;
}

.carousel .project-card {
    width: 300px;
    margin: 0 20px;
    flex-shrink: 0;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-340px * 4)); }
}

/* --- Barre de Progression --- */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--primary-color);
    width: 0%;
    z-index: 10001;
    transition: width 0.1s linear;
}

/* ============================================= */
/* --- 6. VUE MOBILE (RESPONSIVE) --- */
/* ============================================= */
@media screen and (max-width: 768px) {

    /* --- Ajustements Généraux --- */
    body { 
        line-height: 1.6; 
    }
    .section { 
        padding: 3.5rem 0; 
    }
    .container { 
        padding: 0 1.5rem; 
    }

    /* --- Section d'Accueil --- */
    .hero h1 { 
        font-size: 2.8rem; 
    }
    .hero .subtitle { 
        font-size: 1.2rem; 
    }

    /* --- Menu Burger --- */
    .burger { 
        display: block; 
    }
    .nav-links {
        position: fixed;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background-color: var(--surface-color);
        flex-direction: column;
        align-items: center;
        width: 60%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        border-left: 1px solid #282828;
        list-style: none;
        display: flex;
    }
    .nav-links li { 
        opacity: 0; 
        margin: 2rem 0; 
    }
    .nav-active { 
        transform: translateX(0%); 
    }

    /* --- Section À Propos --- */
    .about-container { 
        flex-direction: column; 
        text-align: center; 
    }
    .about-text h2 { 
        text-align: center; 
    }
    .profile-photo-frame { 
        width: 200px; 
        height: 280px; 
    }

    /* --- Grilles --- */
    .skills-grid { 
        grid-template-columns: 1fr; 
    }

    /* --- Timeline --- */
    .timeline::after { 
        left: 20px; 
    }
    .timeline-item { 
        width: 100%; 
        padding-left: 60px; 
        padding-right: 15px; 
    }
    .timeline-item:nth-child(even) { 
        left: 0; 
    }
    .timeline-item::after { 
        left: 10px; 
    }

    /* --- Sélecteur de langue --- */
    .desktop-lang {
        display: none;
    }
    .mobile-lang {
        display: flex;
        justify-content: center;
    }
}