/* =========================================
   0. RESET & SCROLLBAR HIDE
   ========================================= */
* {
    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 (THEME CLAIR)
   ========================================= */
:root {
    --bg-main: #f9f8f6; /* Fond crème très léger */
    --bg-card: #ffffff; /* Cartes blanches */
    --bg-glass: rgba(249, 248, 246, 0.95);
    
    --text-primary: #1e293b; /* Gris foncé presque noir */
    --text-muted: #475569; /* Gris moyen pour la lecture */
    
    --accent: #2563eb; /* Bleu dynamique et pro */
    --accent-glow: rgba(37, 99, 235, 0.2);
    --border: #e2e8f0; /* Bordures grises très douces */
    
    --nav-height: 70px;
    --radius: 12px;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    width: 100%;
    scroll-behavior: smooth;
    background-color: var(--bg-main); 
    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; }

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
    width: 100%;
}

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* =========================================
   2. NAVIGATION (HEADER)
   ========================================= */
.nav {
    position: fixed; top: 0; left: 0; width: 100%;
    height: var(--nav-height);
    background: var(--bg-glass);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.nav-inner {
    display: flex; justify-content: space-between; align-items: center;
    height: 100%;
}

.brand { font-family: 'JetBrains Mono', monospace; font-weight: 800; font-size: 1.3rem; 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.95rem; font-weight: 600; }
.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;
}
.hamburger.toggle .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.toggle .bar:nth-child(2) { opacity: 0; }
.hamburger.toggle .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================
   3. HERO SECTION (ACCUEIL)
   ========================================= */
.hero {
    min-height: calc(100vh - var(--nav-height));
    display: flex; align-items: center;
    padding: 3rem 0;
}

.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: var(--text-primary);
    font-weight: 800;
}

.subtitle {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 2rem; }
.badge {
    background: #f1f5f9;
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
}
.badge.pill { background: var(--accent); 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: all 0.3s ease;
    text-align: center;
}
.primary-btn { background: var(--accent); color: #ffffff; border: 1px solid var(--accent); box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2); }
.primary-btn:hover { background: #1d4ed8; border-color: #1d4ed8; transform: translateY(-2px); box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3); }
.ghost-btn { border: 2px solid var(--border); color: var(--text-primary); background: transparent; }
.ghost-btn:hover { border-color: var(--text-primary); background: #f8fafc; }

/* =========================================
   4. INFO CARD & UI
   ========================================= */
.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}

.info-list li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.9rem;
}
.info-list li:last-child { border-bottom: none; }
.info-list strong { color: var(--accent); }
/* CORRECTION: break-word au lieu de break-all */
.info-list a { word-break: break-word; text-align: right; font-weight: 500; }
.info-list a:hover { color: var(--accent); }

/* =========================================
   5. PROJETS (SLIDER)
   ========================================= */
.projects-container { margin-top: 2.5rem; width: 100%; }
.section-title-small { font-size: 1.2rem; color: var(--text-primary); margin-bottom: 1rem; font-weight: 700; }

.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: 380px;
    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, box-shadow 0.3s ease;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.uno-card:hover { transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 12px 20px rgba(37, 99, 235, 0.1); }

.uno-header { 
    background: rgba(37, 99, 235, 0.05);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.uno-number { font-family: 'JetBrains Mono'; color: var(--accent); font-size: 1.5rem; float: right; opacity: 0.3; font-weight: 800; }
.uno-title { font-size: 1.1rem; margin: 0; color: var(--text-primary); font-weight: 700; }
.uno-badge { font-size: 0.75rem; background: var(--accent); color: #fff; padding: 3px 8px; border-radius: 4px; font-weight: bold; margin-top: 5px; display: inline-block;}

.uno-body { flex: 1; padding: 1.5rem; overflow-y: auto; font-size: 0.95rem; color: var(--text-muted); }

.uno-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.github-link { color: var(--accent); font-size: 0.9rem; font-weight: 700; }

/* =========================================
   6. SECTIONS CONTENU
   ========================================= */
.section-padding { padding: 6rem 0; }

.section-title {
    font-size: 2rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
    font-weight: 800;
}

.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: 2.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.card:hover { border-color: rgba(37, 99, 235, 0.3); transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
.card h3 { color: var(--accent); margin-bottom: 1.2rem; font-weight: 700; }

.skill-list li,
.exp-list li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 20px;
    color: var(--text-muted);
    font-weight: 500;
}
.skill-list li::before { content: "▹"; position: absolute; left: 0; color: var(--accent); font-weight: bold;}

.input {
    width: 100%;
    padding: 14px;
    margin-bottom: 1rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
}
.input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-glow); }

/* FOOTER */
footer {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.card h4 { margin-bottom: 0.8rem; font-size: 1.1rem; font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--text-primary); }
.exp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }

/* BOUTONS NAV SLIDER */
.card-nav { display: flex; flex-direction: row; gap: 6px; }
.nav-btn-square {
    width: 32px; height: 32px; border-radius: 6px;
    background: #f1f5f9; color: var(--text-muted);
    border: 1px solid var(--border); transition: all 0.2s ease;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
}
.nav-btn-square:hover { background: var(--accent); color: #fff; transform: scale(1.05); border-color: var(--accent); }

/* =========================================
   7. RESPONSIVE
   ========================================= */
@media (max-width: 968px) {
    .container { width: 100%; padding: 0 20px; }
    .nav-inner { padding: 0 20px; }
    .hamburger { display: flex; }
    
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 80%; height: 100vh;
        background: var(--bg-card);
        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.1);
        border-left: 1px solid var(--border);
    }
    
    .nav-links.active { right: 0; }
    .nav-actions { display: none; }

    .hero-grid, .grid.cols-3, .grid.cols-2 { display: flex; flex-direction: column; gap: 2rem; }
    
    .hero { padding-top: 40px; text-align: center; }
    .cta-group, .badges { justify-content: center; }
    
    .section-padding { padding: 4rem 0; }
}

/* NOUVEAU : On empile les projets sur mobile pour éviter qu'ils soient coupés */
@media (max-width: 768px) {
    .project-slider {
        flex-direction: column; /* Passe en mode liste verticale */
        overflow: visible; /* Supprime le scroll horizontal */
        padding: 0;
        gap: 1.5rem;
    }
    .uno-card {
        width: 100%;
        max-width: 100%;
        flex: auto;
        min-height: 320px;
    }
}

@media (max-width: 480px) {
    .btn { width: 100%; margin-bottom: 10px; }
    .title { font-size: 2rem; }
    
    .info-list li { flex-direction: column; text-align: left; gap: 4px; align-items: flex-start; word-break: break-word; }
    .info-list a { text-align: left; width: 100%; }
    
    /* On réduit légèrement le padding pour laisser respirer l'écran du tel */
    .card, .info-card { padding: 1.2rem; }
}

/* =========================================
   8. CLASSES MANQUANTES — AJOUT
   ========================================= */

/* Navigation : prénom / nom dans le logo */
.fname { color: var(--text-primary); }
/* .lname déjà défini plus haut */

/* Hero : colonnes gauche/droite (aucun style spécifique requis,
   la grille parente gère la disposition — on les déclare pour
   éviter toute régression future si on ajoute un style) */
.hero-left  { }
.hero-right { }

/* Wrapper des blocs badges dans le hero */
.badges-wrapper { display: flex; flex-direction: column; gap: 0; }

/* Point animé dans l'info-card (indicateur "disponible") */
.dot {
    display: inline-block;
    width: 9px; height: 9px;
    background: #22c55e;
    border-radius: 50%;
    margin-right: 6px;
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.85); }
}

/* Texte secondaire (dates, école dans formation) */
.meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 4px;
    line-height: 1.5;
}

/* Badge date dans les cartes expérience */
.meta-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.2);
    padding: 3px 10px;
    border-radius: 50px;
    white-space: nowrap;
}

/* Nom de l'entreprise dans l'expérience */
.company {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
    margin-top: 2px;
}

/* En-tête de la section projets */
.projects-header { margin-bottom: 0.5rem; }

/* Corps des cartes projets — contrôle de l'overflow */
.uno-details {
    overflow-y: auto;
    max-height: 160px;
    padding-right: 4px;
    word-break: break-word;
}

/* Bouton CV visible uniquement dans le menu mobile (burger) */
.mobile-cv-btn {
    display: none; /* masqué par défaut, affiché via .nav-links.active sur mobile */
    margin-top: 1rem;
    background: var(--accent);
    color: #ffffff !important;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    font-size: 0.95rem;
}

@media (max-width: 968px) {
    .mobile-cv-btn { display: block; }
}

/* Boutons prev/next du slider (style déjà sur .nav-btn-square,
   ces classes permettent de les cibler individuellement si besoin) */
.next-btn { }
.prev-btn { }

/* =========================================
   9. ACCESSIBILITÉ
   ========================================= */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
