:root {
    --bg: #050505;
    --card-bg: #0f0f0f;
    --nav-bg: rgba(5, 5, 5, 0.65); 
    --border: rgba(255, 255, 255, 0.08);
    --accent: #6366f1; /* Indigo */
    --accent-glow: rgba(99, 102, 241, 0.5);
    --text-main: #ffffff;
    --text-muted: #9ca3af;
    --nav-height: 70px;
    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-height); }
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: var(--nav-height);
}

/* --- 1. BACKGROUND & TEXTURE --- */
.blob {
    position: fixed; border-radius: 50%; filter: blur(80px); opacity: 0.4; z-index: -1;
    animation: blobFloat 10s infinite alternate;
}
.blob-1 { top: -10%; left: -10%; width: 500px; height: 500px; background: var(--accent); }
.blob-2 { bottom: -10%; right: -10%; width: 400px; height: 400px; background: #4c1d95; animation-delay: -5s; }
@keyframes blobFloat { 0% { transform: translate(0, 0); } 100% { transform: translate(30px, 50px); } }

/* --- 2. NAVBAR --- */
nav {
    position: fixed; top: 0; left: 0; width: 100%; height: var(--nav-height);
    background: var(--nav-bg);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 5%; z-index: 1000;
}

.nav-logo { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.5rem; color: white; text-decoration: none; letter-spacing: -1px; }
.nav-actions { display: flex; align-items: center; gap: 2rem; }
.nav-links { display: flex; gap: 30px; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.3s; }
.nav-links a:hover { color: white; }

.btn-cv {
    display: flex; align-items: center; gap: 8px; padding: 8px 18px;
    background: rgba(255,255,255,0.05); border: 1px solid var(--border);
    border-radius: 50px; color: white; text-decoration: none; font-size: 0.85rem; font-weight: 600; transition: all 0.3s;
}
.btn-cv:hover { background: var(--accent); border-color: var(--accent); box-shadow: 0 4px 15px var(--accent-glow); }
.menu-btn { display: none; font-size: 1.5rem; color: white; cursor: pointer; }

/* --- LAYOUT & TYPO --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
section { padding: 100px 0; }
h2 { font-family: 'Space Grotesk'; font-size: 2.5rem; margin-bottom: 40px; line-height: 1.1; }
.subtitle { color: var(--accent); font-weight: 600; letter-spacing: 2px; text-transform: uppercase; font-size: 0.8rem; margin-bottom: 10px; display: block; }

/* --- 3. HERO SECTION --- */
#home {
    min-height: 60vh;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.home-text { flex: 1; max-width: 700px; }
.home-image-container { flex-shrink: 0; position: relative; }

h1 { font-family: 'Space Grotesk', sans-serif; font-size: clamp(2.5rem, 6vw, 4.5rem); line-height: 1.05; letter-spacing: -2px; margin-bottom: 25px; }
.gradient-text { background: linear-gradient(120deg, #fff 30%, var(--text-muted)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* Animations Hero */
.animate-text { opacity: 0; transform: translateY(30px); animation: fadeUp 0.8s var(--ease-out) forwards; }
.delay-1 { animation-delay: 0.1s; } 
.delay-2 { animation-delay: 0.2s; } 
.delay-3 { animation-delay: 0.3s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* Photo de profil */
.profile-img {
    width: 280px; height: 280px;
    border-radius: 50%; object-fit: cover;
    border: 3px solid var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
    transition: all 0.3s ease;
}
.profile-img:hover {
    border-color: white;
    box-shadow: 0 0 40px var(--accent), 0 0 80px var(--accent-glow);
    transform: scale(1.02); 
}

/* --- 4. STACK GRID (NOUVEAU) --- */
.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.stack-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.stack-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.stack-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stack-header h3 { font-size: 1.4rem; margin: 0; font-weight: 600; font-family: 'Space Grotesk'; }

.icon-box {
    width: 50px; height: 50px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
}
.icon-box.purple { background: rgba(167, 139, 250, 0.1); color: #a78bfa; }
.icon-box.blue { background: rgba(99, 102, 241, 0.1); color: #6366f1; }
.icon-box.green { background: rgba(34, 197, 94, 0.1); color: #22c55e; }

.stack-desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 20px; line-height: 1.5; }

/* Tags de compétences */
.tags-group { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }

.skill-tag {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 14px;
    border-radius: 50px;
    font-family: 'Space Grotesk'; font-weight: 500; font-size: 0.85rem;
    border: 1px solid transparent; transition: 0.3s; cursor: default;
}

/* Couleurs spécifiques tags */
.backend { background: rgba(167, 139, 250, 0.1); color: #a78bfa; border-color: rgba(167, 139, 250, 0.2); }
.frontend { background: rgba(99, 102, 241, 0.1); color: #6366f1; border-color: rgba(99, 102, 241, 0.2); }
.lead { background: rgba(34, 197, 94, 0.1); color: #22c55e; border-color: rgba(34, 197, 94, 0.2); }

.skill-tag:hover { transform: scale(1.05); filter: brightness(1.2); }


/* --- 5. TIMELINE (EXPÉRIENCES) --- */
.timeline { position: relative; border-left: 2px solid rgba(255, 255, 255, 0.1); margin-left: 5px; padding-left: 40px; }
.timeline-item { position: relative; margin-bottom: 60px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot { position: absolute; left: -48px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); box-shadow: 0 0 10px var(--accent-glow); transition: transform 0.3s; }
.timeline-item:hover .timeline-dot { transform: scale(1.3); background: var(--accent); }
.timeline-date { font-size: 0.9rem; color: var(--accent); font-weight: 600; margin-bottom: 5px; display: inline-block; }
.timeline-title { font-size: 1.5rem; font-family: 'Space Grotesk'; margin-bottom: 5px; }
.timeline-company { color: white; font-weight: 500; margin-bottom: 10px; font-size: 1.1rem; }
.timeline-desc { color: var(--text-muted); font-size: 0.95rem; max-width: 800px; }

/* --- 6. GRID EDUCATION --- */
.edu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.edu-card { background: var(--card-bg); border: 1px solid var(--border); padding: 25px; border-radius: 16px; transition: transform 0.3s, border-color 0.3s; }
.edu-card:hover { border-color: var(--accent); transform: translateY(-5px); }
.edu-year { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 10px; display: block; }

/* --- 7. BENTO GRID PROJECTS --- */
.bento-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 25px; }
.card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 20px; padding: 35px; position: relative; overflow: hidden; transition: transform 0.3s; display: flex; flex-direction: column; justify-content: space-between; min-height: 280px; }
.card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.15); }
.card::after { content: ""; position: absolute; inset: 0; border-radius: 20px; padding: 1px; background: radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), rgba(255, 255, 255, 0.4), transparent 40%); -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }

.tech-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tag { font-size: 0.75rem; padding: 4px 12px; border-radius: 100px; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: #ccc; }

/* --- 8. CONTACT (REFONDU) --- */
.contact-wrapper { align-items: center; background: linear-gradient(145deg, #0a0a0a, #050505); border: 1px solid var(--border); border-radius: 24px; padding: 50px; }

.contact-desc {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Highlight mots-clés contact */
.highlight { color: white; font-weight: 600; }

/* Badge Diplôme */
.diploma-badge {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 12px; padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid var(--accent);
    border-radius: 4px; font-size: 0.95rem; color: #e6f1ff;
}
.diploma-badge i { color: var(--accent); }

/* Liens Contact */
.contact-links { display: flex; flex-direction: column; gap: 15px; margin-top: 20px;}
.contact-item {
    color: white; text-decoration: none;
    display: flex; align-items: center; gap: 12px;
    font-size: 1.1rem; transition: transform 0.2s ease, color 0.3s ease;
}
.contact-item:hover { color: var(--accent); transform: translateX(5px); }

/* --- RESPONSIVE GLOBAL --- */
@media (max-width: 968px) {
    /* Navbar Mobile */
    .menu-btn { display: block; z-index: 1001; }
    .nav-links { position: fixed; top: 0; right: -100%; width: 100%; height: 100vh; background: black; flex-direction: column; justify-content: center; align-items: center; transition: 0.4s var(--ease-out); font-size: 1.5rem; }
    .nav-links.active { right: 0; }
    
    /* Layout Hero Mobile */
    #home { flex-direction: column-reverse; text-align: center; justify-content: center; padding-top: 40px; gap: 30px; }
    .home-text { display: flex; flex-direction: column; align-items: center; }
    .profile-img { width: 180px; height: 180px; margin-bottom: 10px; }

    /* Stack sur mobile */
    .stack-grid { grid-template-columns: 1fr; }
    
    /* Autres */
    .contact-wrapper { padding: 30px; }
    .timeline { margin-left: 0; padding-left: 30px; }
    .timeline-dot { left: -37px; }
    #home .tech-tags { display: flex; justify-content: center; }
}



/* Effet au survol */
.contact-item:hover {
    color: var(--primary-color, #64ffda); /* Couleur d'accentuation */
    transform: translateX(5px);
}

.social-links {
    display: flex;
    gap: 20px;
}

.social-links a {
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.2s ease;
}

.social-links a:hover {
    color: white;
    transform: translateY(-3px);
}

/* --- SOFT SKILLS SECTION --- */
.soft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.soft-card {
    background: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center; /* On centre tout pour changer du style "Stack" */
    transition: transform 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Effet au survol */
.soft-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    background: linear-gradient(145deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
}

/* L'icône du haut */
.soft-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 25px auto; /* Centré horizontalement */
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: 0.3s;
}

.soft-card:hover .soft-icon {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 20px var(--accent-glow);
    transform: scale(1.1) rotate(5deg);
}

/* Typographie */
.soft-card h3 {
    font-family: 'Space Grotesk';
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: white;
}

.soft-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
}

/* --- GESTION DES CURSEURS --- */

/* 1. Sur les titres et sous-titres : Curseur "Flèche" (plus propre visuellement) */
h1, h2, h3, h4, .subtitle, .nav-logo, .tag {
    cursor: default; 
}

/* 2. Sur les paragraphes et listes : Curseur "Texte" (Barre verticale pour sélectionner) */
p, li, .contact-desc {
    cursor: default;
}

/* 3. Sur les liens et boutons : Curseur "Main" (Déjà par défaut, mais on force) */
a, button, .btn-submit, .menu-btn {
    cursor: pointer;
}

/* --- BONUS : COULEUR DE SÉLECTION --- */
/* Quand l'utilisateur sélectionne du texte avec la souris, on met vos couleurs */
::selection {
    background: var(--accent); /* Votre violet */
    color: white;
}



/* Par défaut (Ordinateur) : La carte "featured" prend 2 colonnes */
.featured-card {
    grid-column: span 2;
}

/* Règle Mobile (Tablettes et Téléphones) */
@media (max-width: 968px) {
    /* On force la grille à n'avoir qu'une seule colonne */
    .bento-grid {
        grid-template-columns: 1fr;
    }

    /* On annule l'effet "span 2" pour que la carte redevienne normale */
    .featured-card {
        grid-column: span 1;
    }
    
    /* Optionnel : Ajuster la hauteur pour que ça prenne moins de place sur mobile */
    .card {
        min-height: auto; 
    }
}