:root {
    --bg-main: #09090b;
    --bg-card: rgba(24, 24, 27, 0.6);
    --primary: #0ea5e9;
    --primary-glow: rgba(14, 165, 233, 0.4);
    --secondary: #8b5cf6;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-glass: rgba(255, 255, 255, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Outfit', sans-serif; }
body { background-color: var(--bg-main); color: var(--text-main); overflow-x: hidden; font-size: 1.1rem; line-height: 1.6; }

/* Background */
.bg-animation { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; overflow: hidden; }
.blob { position: absolute; filter: blur(120px); border-radius: 50%; opacity: 0.4; animation: float 20s infinite alternate; }
.blob-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: var(--primary); }
.blob-2 { bottom: -20%; right: -10%; width: 60vw; height: 60vw; background: var(--secondary); }
@keyframes float { 100% { transform: translate(10%, 10%) scale(1.1); } }

/* Header */
header { position: fixed; top: 0; width: 100%; z-index: 100; display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 5%; background: rgba(9, 9, 11, 0.8); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-glass); }
.logo { font-size: 1.8rem; font-weight: 800; }
.logo::after { content: '.'; color: var(--primary); }
.nav-links { display: flex; list-style: none; gap: 2rem; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-weight: 600; transition: 0.3s; }
.nav-links a:hover, .nav-links a.active { color: var(--primary); }

/* Nav Toggle (Hamburger) */
.nav-toggle {
    display: none; /* Caché sur PC */
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.8rem;
    cursor: pointer;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-outline { padding: 12px 25px; border-radius: 8px; font-weight: 600; text-decoration: none; cursor: pointer; transition: 0.3s; border: none; display: inline-flex; align-items: center; gap: 10px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 15px var(--primary-glow); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 25px var(--primary-glow); }
.btn-secondary { background: var(--bg-card); color: #fff; border: 1px solid var(--border-glass); }
.btn-outline { background: transparent; color: var(--primary); border: 1px solid var(--primary); }

/* Image Style */
.image-wrapper { background: rgba(255,255,255,0.03); border: 1px solid var(--border-glass); display: flex; align-items: center; justify-content: center; color: var(--text-muted); overflow: hidden; }
.profile-placeholder { width: 320px; height: 320px; border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; animation: morph 8s infinite; border: 3px solid var(--primary); }
.profile-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
@keyframes morph { 0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; } 50% { border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%; } }

/* Section Logic */
.section { min-height: 100vh; padding: 6rem 5%; display: none; }
.section.active { display: block; animation: fadeIn 0.5s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.hero-container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-top: 5vh; }
.glitch-text { font-size: 4.5rem; line-height: 1; margin-bottom: 10px; }
.highlight { color: var(--primary); }
.hero-stats { display: flex; gap: 2rem; margin: 3rem 0; flex-wrap: wrap; }
.stat-item { background: var(--bg-card); border: 1px solid var(--border-glass); padding: 15px 25px; border-radius: 12px; border-left: 4px solid var(--primary); backdrop-filter: blur(10px); box-shadow: 0 4px 15px rgba(0,0,0,0.2); transition: 0.3s; }
.stat-item:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: 0 8px 25px rgba(14, 165, 233, 0.2); }
.stat-number { display: block; font-size: 1.5rem; font-weight: 800; color: var(--text-main); }
.stat-label { display: block; font-size: 0.9rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }

/* Grid & Cards */
.intro-header-container { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-bottom: 3rem; flex-wrap: wrap; }
.intro-callout { background: linear-gradient(90deg, rgba(14, 165, 233, 0.1) 0%, transparent 100%); border-left: 4px solid var(--primary); padding: 1.5rem 2rem; border-radius: 0 12px 12px 0; margin-bottom: 3rem; max-width: 900px; }
.intro-header-container .intro-callout { margin-bottom: 0; flex: 1; min-width: 300px; }
.intro-callout p { font-size: 1.15rem; color: var(--text-main); font-style: italic; }

.section-header { margin-bottom: 3rem; position: relative; }
.section-header h2 { font-size: 2.5rem; font-weight: 800; margin-bottom: 10px; line-height: 1.2; }
.section-header .line { width: 60px; height: 4px; background: var(--primary); border-radius: 2px; }

.about-container { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hobby-placeholder { width: 100%; max-width: 1200px; aspect-ratio: 4 / 2; height: auto; border-radius: 24px; box-shadow: 0 15px 40px rgba(0,0,0,0.5); transition: 0.4s ease; border: 1px solid var(--border-glass); position: relative; }
.about-container > .hobby-placeholder:nth-child(1) { justify-self: flex-start; }
.about-container > .hobby-placeholder:nth-child(4) { justify-self: flex-end; }
.hobby-placeholder:hover { transform: translateY(-10px) scale(1.02); box-shadow: 0 25px 50px var(--primary-glow); border-color: var(--primary); }
.glass-card { background: var(--bg-card); padding: 2rem; border-radius: 20px; border: 1px solid var(--border-glass); backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0,0,0,0.5); transition: 0.4s ease; }
.glass-card:hover { transform: translateY(-5px); border-color: rgba(14, 165, 233, 0.3); box-shadow: 0 15px 40px rgba(0,0,0,0.7); }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }

/* Clean List pour Compétences */
.clean-list { list-style: none; margin-top: 1.5rem; }
.clean-list li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05); color: var(--text-main); transition: 0.3s; }
.clean-list li:last-child { border-bottom: none; }
.clean-list li i { color: var(--primary); font-size: 1.2rem; }
.clean-list li:hover { transform: translateX(8px); color: var(--primary); }

/* Tableau Compétences */
.table-placeholder:hover img { transform: scale(1.03); }

/* Timelines séparées */
.timelines-wrapper { display: flex; flex-direction: column; gap: 1.5rem; }
.timeline-title { color: var(--primary); display: flex; align-items: center; gap: 10px; font-size: 1.2rem; }

.timeline { border-left: 2px solid var(--primary); padding-left: 25px; margin-top: 1.5rem; margin-left: 10px; }
.timeline-item { background: rgba(255,255,255,0.02); padding: 20px; border-radius: 12px; border: 1px solid var(--border-glass); margin-bottom: 1.5rem; position: relative; transition: 0.3s; }
.timeline-item:hover { transform: translateX(10px); background: rgba(255,255,255,0.04); border-color: rgba(14, 165, 233, 0.3); }
.timeline-dot { position: absolute; left: -33px; top: 25px; width: 14px; height: 14px; background: var(--bg-main); border: 3px solid var(--primary); border-radius: 50%; box-shadow: 0 0 15px var(--primary-glow); }
.timeline-date { color: var(--primary); font-size: 0.9rem; font-weight: 600; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px; }
.timeline-item h4 { font-size: 1.1rem; margin-bottom: 5px; color: #fff; }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; }
.project-card { background: var(--bg-card); border-radius: 20px; overflow: hidden; border: 1px solid var(--border-glass); transition: 0.3s; }
.project-card:hover { transform: translateY(-10px); border-color: var(--primary); }
.project-placeholder { height: 180px; }
.project-info { padding: 1.5rem; }
.btn-text { color: var(--primary); text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: 0.3s; display: inline-flex; align-items: center; gap: 8px; }
.btn-text:hover { color: #fff; gap: 12px; }

.project-subsection {
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-glass);
}
.project-subsection h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
}
.project-subsection h3 i { color: var(--primary); }
.project-sub-subsection { margin-top: 2.5rem; margin-bottom: 1.5rem; }
.project-sub-subsection h4 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-muted);
    padding-left: 1rem;
    border-left: 3px solid var(--secondary);
}

/* Grille pour page de détail de projet */
.project-content-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 2rem; }

/* Table for project details */
.styled-table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; font-size: 1rem; }
.styled-table th, .styled-table td { padding: 15px; text-align: left; border-bottom: 1px solid var(--border-glass); }
.styled-table th { color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem; }
.styled-table tr:last-child td { border-bottom: none; }
.styled-table td:first-child { font-weight: 600; color: var(--text-main); min-width: 200px; }

/* Protocol List */
.protocol-list { list-style: none; margin-top: 1.5rem; }
.protocol-list li {
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid transparent;
    border-left: 3px solid var(--primary);
    margin-bottom: 1rem;
    background: rgba(0,0,0,0.1);
    transition: 0.3s;
}
.protocol-list li:hover { background: rgba(0,0,0,0.2); border-color: var(--primary); transform: translateX(5px); }
.protocol-list li:last-child { margin-bottom: 0; }
.protocol-list h4 { font-size: 1.1rem; color: var(--primary); margin-bottom: 5px; }
.protocol-list p { font-size: 1rem; color: var(--text-muted); }

.contact-container { display: grid; grid-template-columns: 1fr 1.5fr; gap: 3rem; }
.contact-list { list-style: none; }
.contact-list li { display: flex; align-items: center; gap: 15px; margin-bottom: 1rem; }
.contact-icon { width: 40px; height: 40px; background: rgba(14,165,233,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--primary); }
.input-group { margin-bottom: 1rem; }
.input-group label { display: block; margin-bottom: 5px; color: var(--text-muted); }
.input-group input, .input-group textarea { width: 100%; padding: 12px; background: rgba(0,0,0,0.2); border: 1px solid var(--border-glass); border-radius: 8px; color: #fff; transition: border-color 0.3s; }
.input-group input:focus, .input-group textarea:focus { border-color: var(--primary); outline: none; }

/* Tags & Helpers */
.mb-3 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 3rem; }
.objective-tag { background: rgba(14, 165, 233, 0.1); border-left: 4px solid var(--primary); padding: 15px; border-radius: 0 8px 8px 0; font-size: 1.1rem; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.tag { background: rgba(255,255,255,0.05); padding: 5px 15px; border-radius: 20px; border: 1px solid var(--border-glass); font-size: 1rem; color: var(--text-muted); transition: 0.3s; cursor: default; }
.tag:hover { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 5px 15px var(--primary-glow); transform: translateY(-2px); }

/* Reveal Animation */
.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* Animation de scroll */
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-20px); } 60% { transform: translateY(-10px); } }

@media (max-width: 900px) {
    /* --- HEADER & NAV MOBILE --- */
    header {
        padding: 1rem 5%;
    }
    .nav-toggle {
        display: block;
        position: relative;
        z-index: 1001;
    }
    header .btn-outline {
        display: none; /* On cache le bouton CV qui est trop large */
    }
    .nav-links {
        position: fixed;
        inset: 0 0 0 100%; /* Commence hors de l'écran à droite */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        background: rgba(9, 9, 11, 0.95);
        backdrop-filter: blur(15px);
        transition: transform 0.4s ease-in-out;
    }
    .nav-links.nav-open {
        transform: translateX(-100%); /* Revient dans l'écran */
    }
    .nav-links a {
        font-size: 1.5rem;
    }

    /* --- TYPOGRAPHIE & ESPACEMENTS --- */
    .section { padding: 8rem 5% 5rem 5%; }
    .glitch-text { font-size: 2.8rem; }
    .section-header h2 { font-size: 2.2rem; }
    .hero-desc { font-size: 1rem; }

    /* --- LAYOUTS MOBILES --- */
    .hero-container, .skills-grid, .projects-grid, .contact-container { grid-template-columns: 1fr; text-align: center; }
    .about-container { grid-template-columns: 1fr; gap: 2rem; }
    
    .hero-image { order: -1; margin-bottom: 2rem; }
    .profile-placeholder { width: 250px; height: 250px; }
    .hero-stats, .hero-buttons { justify-content: center; }
    .intro-header-container { flex-direction: column; align-items: stretch; text-align: center; gap: 3rem; }
    .intro-callout { max-width: 100%; text-align: left; }
    .about-container > .hobby-placeholder { justify-self: center !important; aspect-ratio: 16 / 9; }
    .project-content-grid { grid-template-columns: 1fr; }
    .styled-table, .styled-table tbody, .styled-table tr, .styled-table td { display: block; width: 100%; }
    .styled-table thead { display: none; }
    .styled-table td { border-bottom: none; padding-left: 0; }
    .styled-table tr { padding: 1rem 0; border-bottom: 1px solid var(--border-glass); }
    .contact-info { text-align: left; }
}