/* =========================================
   0. RESET & SCROLLBAR HIDE (FIX)
   ========================================= */
* {
    scrollbar-width: none;
    -ms-overflow-style: none;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

*::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
    background: transparent;
}

/* =========================================
   1. VARIABLES & RESET (BASE)
   ========================================= */
:root {
    --bg-main: #0b1120;
    --bg-card: #151d2f;
    --bg-glass: rgba(11, 17, 32, 0.98);
    
    --text-primary: #e2e8f0;
    --text-muted: #94a3b8;
    
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.2);
    --border: rgba(56, 189, 248, 0.2);
    
    --nav-height: 70px;
    --radius: 12px;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    width: 100%;
    scroll-behavior: smooth;
    /* Important: Fond transparent pour laisser voir le canvas */
    background-color: transparent; 
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.6;
}

body {
    padding-top: var(--nav-height);
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
button, .btn { cursor: pointer; border: none; font-family: inherit; }

/* Correction Container pour transparence */
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
    width: 100%;
    background: transparent !important;
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* --- FIX ARRIÈRE-PLAN NEURONAL --- */
#bg-canvas { 
    position: fixed; 
    inset: 0; 
    z-index: -1; 
    pointer-events: none; 
    /* C'est ici que l'on met la couleur sombre de fond */
    background-color: var(--bg-main); 
    display: block !important;
}

/* =========================================
   2. NAVIGATION (HEADER)
   ========================================= */
.nav {
    position: fixed; top: 0; left: 0; width: 100%;
    height: var(--nav-height);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-inner {
    display: flex; justify-content: space-between; align-items: center;
    height: 100%;
}

.brand { font-family: 'JetBrains Mono', monospace; font-weight: 700; font-size: 1.2rem; flex-shrink: 0; z-index: 1001; }
.lname { color: var(--accent); }

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-links a { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.nav-links a:hover { color: var(--accent); }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}
.hamburger .bar {
    width: 25px;
    height: 2px;
    background-color: var(--text-primary);
    transition: 0.3s;
}

/* =========================================
   3. HERO SECTION (ACCUEIL)
   ========================================= */
.hero {
    min-height: calc(100vh - var(--nav-height));
    display: flex; align-items: center;
    padding: 3rem 0;
    background: transparent !important;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #ffffff;
}

.subtitle {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 2rem; }
.badge {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid var(--border);
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
}
.badge.pill { border-color: var(--accent); color: #fff; }

.cta-group { display: flex; gap: 1rem; flex-wrap: wrap; }
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}
.primary-btn { background: #1e293b; color: var(--accent); border: 1px solid var(--border); }
.primary-btn:hover { background: var(--accent); color: #0b1120; box-shadow: 0 0 15px var(--accent-glow); }
.ghost-btn { border: 1px solid var(--text-muted); color: var(--text-primary); background: transparent; }
.ghost-btn:hover { border-color: var(--text-primary); background: rgba(255,255,255,0.05); }

/* =========================================
   4. INFO CARD & UI
   ========================================= */
.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
    animation: glow 4s infinite alternate;
}
@keyframes glow {
    from { box-shadow: 0 0 10px rgba(56, 189, 248, 0.05); border-color: var(--border); }
    to { box-shadow: 0 0 20px rgba(56, 189, 248, 0.3); border-color: var(--accent); }
}

.info-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: none;
    font-size: 0.9rem;
}
.info-list strong { color: var(--accent); }
.info-list a { word-break: break-all; text-align: right; }

/* =========================================
   5. PROJETS (SLIDER)
   ========================================= */
.projects-container { margin-top: 2rem; width: 100%; background: transparent; }

.project-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 5px 30px 5px;
    scroll-snap-type: x mandatory;
}

.uno-card {
    flex: 0 0 280px;
    height: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    transition: transform 0.3s ease;
    overflow: hidden;
}
.uno-card:hover { transform: translateY(-5px); border-color: var(--accent); }

.uno-header { 
    background: rgba(56, 189, 248, 0.05);
    padding: 1.5rem;
    border-bottom: none;
}

.uno-number { font-family: 'JetBrains Mono'; color: var(--accent); font-size: 1.5rem; float: right; opacity: 0.5; }
.uno-title { font-size: 1.2rem; margin: 0; color: #fff; }
.uno-badge { font-size: 0.75rem; background: var(--accent); color: #000; padding: 2px 8px; border-radius: 4px; font-weight: bold; }

.uno-body { flex: 1; padding: 1.5rem; overflow-y: auto; font-size: 0.9rem; color: var(--text-muted); }

.uno-footer {
    padding: 1rem 1.5rem;
    border-top: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
}

.github-link { color: var(--accent); font-size: 0.9rem; font-weight: 600; }

/* =========================================
   6. SECTIONS CONTENU (TRANSPARENCE REQUISE)
   ========================================= */
.section-padding {
    padding: 6rem 0;
    border-top: none;
    background: transparent !important;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    color: #fff;
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
}

.grid { display: grid; gap: 2rem; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }

.card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.3s;
}
.card:hover { border-color: var(--border); transform: translateY(-3px); }
.card h3 { color: var(--accent); margin-bottom: 1rem; }

.skill-list li,
.exp-list li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 20px;
    color: var(--text-muted);
}
.skill-list li::before {
    content: "▹";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.input {
    width: 100%;
    padding: 14px;
    margin-bottom: 1rem;
    background: #0f172a;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: #fff;
    font-family: inherit;
}

/* ✅ FOOTER */
footer {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    border-top: none;
    font-size: 0.9rem;
    background: transparent !important;
}

/* =========================================
   📱 7. RESPONSIVE & CONTAINERS (CORRECTIFS)
   ========================================= */
@media (max-width: 968px) {
    .container, main, section {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
        background: transparent !important;
    }

    .nav-inner { 
        flex-direction: row !important; 
        justify-content: space-between;
        padding: 0 20px;
    }

    .hamburger { display: flex; }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--bg-glass);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease-in-out;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }
    
    .nav-links.active { right: 0; }
    .nav-actions { display: none; }

    /* Analyse Hero & Grilles : passage en pile verticale */
    .hero-grid, .grid.cols-3, .grid.cols-2 {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
    }
    
    .hero { padding-top: 120px; text-align: center; }
    .hero-left, .hero-right { width: 100% !important; }
    
    .cta-group, .badges { justify-content: center; }
    
    .project-slider {
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
        flex-direction: row !important;
    }

    .section-padding { padding: 4rem 0; }
}

@media (max-width: 480px) {
    .btn { width: 100%; margin-bottom: 10px; }
    .uno-card { flex: 0 0 85vw !important; min-width: 280px !important; } 
    .title { font-size: 1.8rem !important; }
    
    .info-list li { 
        flex-direction: column; 
        text-align: left; 
        gap: 4px;
        align-items: flex-start;
    }
    .info-list a { text-align: left; width: 100%; }

    .card { padding: 1.5rem; }
}

/* =========================================
   8. MOBILE CUT-OFF & HEIGHT FIX
   ========================================= */
@media (max-width: 968px) {
    .hero, 
    .section-padding,
    .card, 
    .info-card, 
    .uno-card {
        height: auto !important;
        min-height: auto !important;
        max-height: none !important;
        padding-bottom: 30px !important;
    }

    .uno-body {
        flex: none !important;
        height: auto !important;
        overflow: visible !important;
    }

    .info-list a, 
    .info-list strong {
        display: block !important;
        word-break: break-all !important;
        white-space: normal !important;
    }
}

.card h4 {
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
    font-family: 'JetBrains Mono', monospace;
}

.exp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* =========================================
   9. BOUTONS DE NAVIGATION (IMAGE STYLE)
   ========================================= */
.card-nav {
    display: flex !important;
    flex-direction: column !important; 
    gap: 4px !important;
}

.nav-btn-square {
    width: 32px !important;
    height: 28px !important;
    border-radius: 6px !important;
    background: rgba(255,255,255,0.08) !important;
    color: var(--text-primary) !important;
    border: 1px solid rgba(255,255,255,0.05) !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.nav-btn-square:hover {
    background: var(--accent) !important;
    color: var(--bg-main) !important;
    transform: scale(1.05) !important;
}