/* === VARIABLES & STYLES DE BASE === */
:root {
    --bg-color: #110f1a;
    --primary-text: #f0f0f5;
    --secondary-text: #a0a0b5;
    --accent-blue: #00aaff;
    --accent-purple: #9d5dff;
    --accent-magenta: #ff2d75;
    --card-bg: rgba(25, 22, 40, 0.7);
    --border-color: rgba(157, 93, 255, 0.2);
    --glow-color: rgba(157, 93, 255, 0.5);
    --heading-font: 'Playfair Display', serif;
    --body-font: 'Poppins', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background-color: var(--bg-color); font-family: var(--body-font); color: var(--secondary-text); line-height: 1.7; overflow-x: hidden; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }

/* === ANIMATION DE FOND (STARFIELD) === */
#starfield { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }

/* === NOUVELLE BARRE DE NAVIGATION CENTRÉE === */
header {
    position: fixed;
    top: 20px; /* Distance depuis le haut de la page */
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
}
nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(17, 15, 26, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 0.8rem 2rem;
    border-radius: 50px; /* Coins très arrondis */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}
.logo { font-family: var(--heading-font); font-size: 1.5rem; font-weight: 700; text-decoration: none; background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
nav ul { list-style: none; display: flex; gap: 2rem; }
nav a { color: var(--primary-text); text-decoration: none; font-weight: 500; font-size: 0.9rem; position: relative; padding: 5px 0; transition: color 0.3s; }
nav a:hover { color: var(--accent-purple); }

/* ... (Styles pour Hero, Sections, Cards, etc.) ... */
#hero { min-height: 100vh; display: flex; align-items: center; padding-top: 80px; }
.hero-content { display: flex; align-items: center; justify-content: space-between; gap: 4rem; }
.hero-text .subtitle { color: var(--accent-blue); font-weight: 600; letter-spacing: 1px; margin-bottom: 1rem; }
.hero-text h1 { font-family: var(--heading-font); font-size: clamp(3rem, 6vw, 5.5rem); color: var(--primary-text); margin: 0; }
.hero-text .description { font-size: 1.1rem; max-width: 500px; margin: 1.5rem 0 2.5rem; }
.cta-button { display: inline-block; padding: 14px 32px; border-radius: 50px; text-decoration: none; font-weight: 600; color: var(--primary-text); background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple), var(--accent-magenta)); background-size: 200% 100%; border: none; transition: background-position 0.4s ease, transform 0.3s ease; }
.cta-button:hover { background-position: 100% 0; transform: translateY(-5px); }
.hero-image-container { position: relative; }
.hero-image { width: 300px; height: 300px; border-radius: 50%; background-size: cover; background-position: center 20%; border: 5px solid var(--accent-purple); box-shadow: 0 0 30px var(--glow-color), 0 0 50px var(--accent-blue); animation: float 4s ease-in-out infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
section { padding: 120px 0; }
.section-title { font-family: var(--heading-font); font-size: 3rem; text-align: center; color: var(--primary-text); margin-bottom: 4rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 2rem; max-width: 900px; margin: 0 auto; }
.experience-card { background: var(--card-bg); padding: 2rem; border-radius: 12px; border: 1px solid var(--border-color); backdrop-filter: blur(8px); transition: transform 0.3s, border-color 0.3s; }
.experience-card:hover { transform: translateY(-10px); border-color: var(--accent-purple); }
.experience-card h3 { color: var(--primary-text); }
.experience-card .company { color: var(--accent-blue); font-weight: 600; }
.experience-card .date { font-size: 0.9rem; margin-bottom: 1rem; }
.experience-card .initiative { margin-top: 1rem; color: var(--accent-purple); border-left: 3px solid var(--accent-purple); padding-left: 1rem; }
.details-list { list-style-position: inside; text-align: left; margin-top: 1rem; padding-left: 5px; }
.details-list li { margin-bottom: 0.5rem; }
.skills-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 1.5rem; max-width: 800px; margin: 0 auto; }
.skill-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; transition: transform 0.3s, color 0.3s; }
.skill-card:hover { transform: translateY(-10px); color: var(--accent-purple); }
.skill-card i { font-size: 3rem; transition: color 0.3s; }
.skill-card:hover i { color: inherit; }
.skill-card span { font-size: 0.9rem; color: var(--primary-text); }
#contact p { text-align: center; margin-bottom: 2rem; }
.contact-links { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; }
.contact-button { background: transparent; border: 2px solid var(--accent-purple); color: var(--accent-purple); padding: 12px 28px; border-radius: 50px; text-decoration: none; font-weight: 600; transition: all 0.3s; }
.contact-button:hover { background: var(--accent-purple); color: #fff; }
footer { padding: 2.5rem 0; text-align: center; border-top: 1px solid var(--border-color); }
.fade-in { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
#chess-trigger { margin-right: 10px; font-size: 1.2rem; animation: shake 1.5s cubic-bezier(.36,.07,.19,.97) both infinite; transform: translate3d(0, 0, 0); cursor: pointer; transition: color 0.3s; }
#chess-trigger:hover { color: var(--accent-magenta); }
@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0) rotate(-1deg); } 20%, 80% { transform: translate3d(2px, 0, 0) rotate(2deg); }
  30%, 50%, 70% { transform: translate3d(-2px, 0, 0) rotate(-2deg); } 40%, 60% { transform: translate3d(2px, 0, 0) rotate(2deg); }
}
.initiative-hint { font-size: 0.8rem; font-style: italic; text-align: right; opacity: 0.7; margin-top: 0.75rem; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: center; z-index: 2000; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.modal-overlay.visible { opacity: 1; pointer-events: auto; }
.modal-content { background: var(--card-bg); border: 1px solid var(--border-color); padding: 2.5rem 3rem; border-radius: 15px; text-align: center; max-width: 450px; position: relative; transform: scale(0.8); transition: transform 0.3s ease; }
.modal-overlay.visible .modal-content { transform: scale(1); }
.modal-content h2 { font-family: var(--heading-font); color: var(--accent-purple); margin-bottom: 1rem; }
.modal-content p { color: var(--primary-text); margin-bottom: 2rem; }
.close-button { position: absolute; top: 15px; right: 20px; font-size: 2rem; color: var(--secondary-text); cursor: pointer; transition: color 0.3s; }
.close-button:hover { color: var(--primary-text); }
.modal-button { background: var(--accent-purple); border: none; color: var(--primary-text); padding: 12px 28px; border-radius: 50px; font-weight: 600; cursor: pointer; transition: transform 0.3s; }
.modal-button:hover { transform: scale(1.05); }

/* === RESPONSIVE POUR LA NAV BAR === */
@media (max-width: 768px) {
    nav { flex-direction: column; gap: 0.5rem; padding: 0.8rem 1rem; }
    nav ul { display: none; } /* On cache les liens sur mobile pour garder une nav bar compacte */
    .hero-content { flex-direction: column-reverse; text-align: center; }
    .card-grid { grid-template-columns: 1fr; }
}