/* ===== VARIABLES & RESET ===== */
:root {
    --dark-bg: #10121a;
    --light-bg: #191d28;
    --text-primary: #e6e6e6;
    --text-secondary: #a8a8a8;
    --accent-color: #4f86f7;
    --accent-color-light: rgba(79, 134, 247, 0.1);
    --border-color: #333;
    --font-sans: 'Poppins', sans-serif;
    --font-mono: 'Fira Code', monospace;
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
    cursor: none; /* Cache le curseur par défaut */
}

body {
    background-color: var(--dark-bg);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.7;
    background-image: radial-gradient(circle at var(--mouse-x) var(--mouse-y), rgba(79, 134, 247, 0.15), transparent 25vw);
    transition: background-color 0.3s ease;
}

@media (hover: none) {
    body { background-image: none; }
    html { cursor: auto; }
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== CURSEUR PERSONNALISÉ ===== */
.cursor-dot, .cursor-outline { display: none; }
@media (hover: hover) {
    .cursor-dot, .cursor-outline {
        display: block;
        position: fixed;
        top: 0; left: 0;
        transform: translate(-50%, -50%);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
    }
    .cursor-dot {
        width: 8px; height: 8px;
        background-color: var(--accent-color);
    }
    .cursor-outline {
        width: 40px; height: 40px;
        border: 2px solid var(--accent-color);
        transition: transform 0.2s ease-out, opacity 0.2s;
    }
}

/* ===== HEADER & NAVIGATION ===== */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 100;
    background-color: rgba(16, 18, 26, 0.8);
    backdrop-filter: blur(10px);
    transition: top 0.3s ease-in-out;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--accent-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-link span {
    color: var(--accent-color);
    font-family: var(--font-mono);
    margin-right: 0.5rem;
}

.nav-link:hover {
    color: var(--accent-color);
}

.hamburger { display: none; cursor: pointer; z-index: 1001; }
.bar {
    display: block;
    width: 25px;
    height: 2px;
    margin: 6px auto;
    background-color: var(--text-primary);
    transition: all 0.3s ease-in-out;
}

/* ===== STRUCTURE & TITRES ===== */
.section {
    padding: 100px 0;
    min-height: 70vh;
}

.section-title {
    display: flex;
    align-items: center;
    font-family: var(--font-mono);
    font-size: clamp(1.5rem, 5vw, 1.8rem);
    margin-bottom: 2.5rem;
    white-space: nowrap;
}

.section-title .section-number {
    color: var(--accent-color);
    margin-right: 1rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 100%;
    max-width: 300px;
    height: 1px;
    background-color: var(--border-color);
    margin-left: 1.5rem;
}

/* ===== SECTIONS SPÉCIFIQUES ===== */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding-top: var(--header-height);
}
.hero-intro { color: var(--accent-color); font-family: var(--font-mono); margin-bottom: 1rem; }
.hero-name { font-size: clamp(40px, 8vw, 80px); font-weight: 600; color: var(--text-primary); line-height: 1.1; }
.hero-tagline { font-size: clamp(40px, 8vw, 70px); font-weight: 600; color: var(--text-secondary); line-height: 1.1; margin-bottom: 2rem; min-height: 70px; }
.hero-description { max-width: 550px; color: var(--text-secondary); margin-bottom: 3rem; }
.cta-button { display: inline-block; padding: 0.75rem 1.5rem; border: 1px solid var(--accent-color); border-radius: 4px; color: var(--accent-color); text-decoration: none; font-family: var(--font-mono); background-color: transparent; transition: background-color 0.3s ease; }
.cta-button:hover { background-color: var(--accent-color-light); }

/* --- STYLES PROJETS (CORRIGÉS) --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background-color: var(--light-bg);
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Important pour les coins arrondis de l'image */
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(79, 134, 247, 0.1);
}

.project-image-container {
    overflow: hidden; /* Garde les coins arrondis */
}

.project-image {
    width: 100%;
    aspect-ratio: 16 / 9; /* Ratio standard pour les images de projet */
    object-fit: cover; /* S'assure que l'image couvre l'espace sans se déformer */
    display: block;
    transition: transform 0.4s ease;
}

.project-card:hover .project-image {
    transform: scale(1.05); /* Zoom léger au survol */
}

.project-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.project-title {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-right: 1rem;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-links .feather {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.project-links a:hover .feather {
    color: var(--accent-color);
}

.project-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-grow: 1;
}

.project-tech-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid var(--border-color);
}
/* --- FIN STYLES PROJETS --- */

.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.skills-grid h4 { color: var(--accent-color); margin-bottom: 1rem; font-family: var(--font-mono); }
.skills-grid ul { list-style: none; color: var(--text-secondary); }
.skills-grid ul li::before { content: "▹"; color: var(--accent-color); margin-right: 0.75rem; }

.contact-content { text-align: center; max-width: 600px; margin: 0 auto; }
.contact-content h3 { font-family: var(--font-mono); font-size: clamp(1.5rem, 5vw, 2rem); margin-bottom: 1rem; color: var(--text-primary); }
.contact-content p { color: var(--text-secondary); margin-bottom: 2rem; }

/* Section À propos */
.about-flex-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
}

.about-text-content {
    flex: 2;
    max-width: 600px;
}

.about-text-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.about-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 1rem;
}

.profile-picture {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
    box-shadow: 0 0 15px rgba(79, 134, 247, 0.2);
    transition: transform 0.3s ease;
}

.profile-picture:hover {
    transform: scale(1.05);
}

/* ===== FOOTER ===== */
.footer { padding: 2rem; text-align: center; }
.social-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; }
.social-links .feather { width: 24px; height: 24px; color: var(--text-secondary); transition: color 0.3s, transform 0.3s; }
.social-links a:hover .feather { color: var(--accent-color); transform: translateY(-3px); }
.footer p { font-family: var(--font-mono); color: var(--text-secondary); font-size: 0.8rem; }

/* ===== ANIMATIONS ===== */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== RESPONSIVE (MOBILE-FIRST APPROACH) ===== */
@media (max-width: 768px) {
    .container { padding: 0 1rem; }
    .section { padding: 80px 0; }
    .section-title::after { display: none; }
    .hero-tagline { min-height: 105px; } /* Ajustement pour mobile */

    .hamburger { display: block; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .nav-menu {
        position: fixed;
        top: 0; right: -100%;
        width: min(75vw, 400px);
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem;
        gap: 2.5rem;
        background-color: var(--light-bg);
        transition: right 0.4s cubic-bezier(0.23, 1, 0.32, 1);
        box-shadow: -10px 0 30px -15px rgba(2, 12, 27, 0.7);
    }
    .nav-menu.active { right: 0; }
    .nav-item { width: 100%; text-align: center; }
    .nav-link { font-size: 1.2rem; }
    
    body.blur-effect { overflow: hidden; }
    body.blur-effect > main, body.blur-effect > footer {
        filter: blur(5px);
        transition: filter 0.3s;
    }
    /* Section À propos pour mobile */
    .about-flex-container {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .about-text-content {
        order: 2;
        text-align: center;
    }

    .about-image-wrapper {
        order: 1;
        padding-top: 0;
    }

    .profile-picture {
        width: 150px;
        height: 150px;
    }
}