/* ==========================================================================
   1. GLOBAL & NAVIGATION
   ========================================================================== */
body { 
    font-family: 'Inter', sans-serif; 
    background-color: #f1f5f9; 
    background-image: 
        radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(124, 58, 237, 0.03) 0px, transparent 50%);
    color: #0f172a; 
    margin: 0; 
    padding: 0; 
    overflow-x: hidden; 
}

#scroll-progress { 
    position: fixed; 
    top: 0; left: 0; width: 0%; height: 4px; 
    background: #2563eb; z-index: 9999; 
}

nav { 
    display: flex; justify-content: space-between; align-items: center; 
    padding: 1rem 10%; background: rgba(255, 255, 255, 0.8); 
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    position: sticky; top: 15px; z-index: 1000; margin: 0 5%; 
    border-radius: 16px; border: 1px solid rgba(255, 255, 255, 0.5); 
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); transition: 0.3s;
}

.logo { font-size: 1.5rem; font-weight: 800; color: #0f172a; text-decoration: none; }
.logo span { color: #2563eb; }
nav ul { display: flex; list-style: none; gap: 2.5rem; margin: 0; }
nav a { text-decoration: none; color: #64748b; font-weight: 600; font-size: 0.95rem; transition: 0.3s; position: relative; padding: 8px 0; }
nav a:hover, nav a.active { color: #2563eb; }
nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: #2563eb; transition: 0.3s; }
nav a:hover::after, nav a.active::after { width: 100%; }

/* ==========================================================================
   2. PAGE ACCUEIL (INDEX)
   ========================================================================== */
.hero-section { background: #fff; padding: 6rem 10% 7rem 10%; border-bottom: 1px solid #f1f5f9; margin-top: 10px; }
.hero-content { display: flex; align-items: center; justify-content: space-between; gap: 60px; max-width: 1200px; margin: 0 auto; }
h1 { font-size: 3.2rem; margin: 0; line-height: 1.1; font-weight: 800; }
.subtitle { font-size: 1.2rem; color: #2563eb; font-weight: 700; margin: 10px 0; }
.intro { font-size: 1.1rem; color: #475569; line-height: 1.6; }
.hero-btns { display: flex; align-items: center; gap: 20px; position: relative; margin-top: 2rem; }
.btn-pdf { background: #2563eb; color: #fff; padding: 16px 32px; border-radius: 12px; text-decoration: none; font-weight: 700; transition: 0.3s; }
.btn-pdf:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2); }
.btn-outline { background: transparent; color: #2563eb; border: 2px solid #2563eb; padding: 14px 28px; border-radius: 12px; cursor: pointer; font-weight: 700; transition: 0.3s; }
#copy-toast { position: absolute; bottom: -45px; left: 245px; background: #0f172a; color: #fff; padding: 6px 12px; border-radius: 6px; font-size: 0.8rem; opacity: 0; transition: 0.3s; z-index: 100; }
#copy-toast.show { opacity: 1; transform: translateY(-5px); }
.target-minimal { display: flex; align-items: center; gap: 12px; margin: 1.5rem 0; padding: 10px 18px; background: rgba(37, 99, 235, 0.05); border-radius: 8px; width: fit-content; border: 1px solid rgba(37, 99, 235, 0.1); }
.status-dot { width: 10px; height: 10px; background-color: #2563eb; border-radius: 50%; animation: pulse 2s infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.1); opacity: 0.5; } 100% { transform: scale(1); opacity: 1; } }
.profile-pic { width: 320px; height: 320px; border-radius: 30px; object-fit: cover; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.1); }

.soft-skills-banner { background: #fff; display: flex; justify-content: space-around; padding: 2.2rem; border-radius: 20px; box-shadow: 0 15px 35px rgba(0,0,0,0.05); border: 1px solid #e2e8f0; margin: 50px 10% 0; }
.soft-content { display: flex; align-items: center; gap: 20px; }
.soft-emoji { font-size: 2.2rem; }
.soft-text h3 { margin: 0; font-size: 1.1rem; }
.soft-text p { margin: 4px 0 0 0; font-size: 0.85rem; color: #64748b; }
.soft-divider { width: 1px; height: 50px; background: #f1f5f9; }

#competences { padding: 5rem 10%; overflow: visible; }
.slider-container { position: relative; max-width: 1100px; margin: 0 auto; display: flex; align-items: center; }
.slider-wrapper { overflow: hidden; width: 100%; padding: 35px 20px; margin: -35px -20px; }
.slider-track { display: flex; transition: 0.6s cubic-bezier(0.23, 1, 0.32, 1); gap: 15px; }
.skill-item { min-width: calc(20% - 12px); background: #fff; height: 150px; border-radius: 20px; display: flex; align-items: center; justify-content: center; border: 1px solid #f1f5f9; transition: 0.4s; }
.skill-item img { max-width: 70%; max-height: 80px; object-fit: contain; }
.skill-item:hover { transform: translateY(-12px); border-color: #2563eb; box-shadow: 0 15px 30px rgba(0,0,0,0.08); }
button.prev, button.next { background: #fff; color: #2563eb; border: 1px solid #e2e8f0; padding: 15px; cursor: pointer; border-radius: 50%; z-index: 100; position: absolute; }
button.prev { left: -70px; } button.next { right: -70px; }

/* ==========================================================================
   3. STYLES PAGE PARCOURS (TIMELINE) - CORRIGÉ
   ========================================================================== */
.pc-container { position: relative; max-width: 900px; margin: 3rem auto; padding: 2rem 0; overflow: visible; }
.pc-line { position: absolute; left: 50%; transform: translateX(-50%); width: 2px; height: 100%; background: #cbd5e1; z-index: 1; }

.pc-block { 
    display: flex; 
    width: 100%; 
    margin-bottom: 2.5rem; 
    position: relative; 
    z-index: 2; /* Niveau de base */
}

/* --- SOLUTION AU PROBLÈME : On force le bloc survolé au premier plan --- */
.pc-block:hover { 
    z-index: 999; 
}

.pc-left { flex-direction: row-reverse; } 
.pc-right { flex-direction: row; }

.pc-content { 
    width: 38%; 
    padding: 1.2rem; 
    background: #fff; 
    border-radius: 12px; 
    border: 1px solid #e2e8f0; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.03); 
    transition: 0.3s ease; 
    position: relative;
}

.pc-left .pc-content { text-align: right; }
.pc-right .pc-content { text-align: left; }

.pc-content:hover { 
    transform: translateY(-5px); 
    border-color: #2563eb; 
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.15); 
}

/* Bulles de détails interactives */
.pc-details {
    display: none; 
    position: absolute;
    background: #1e293b; 
    color: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    font-size: 0.85rem;
    width: 320px;
    z-index: 1000; /* Toujours au-dessus du contenu de la carte */
    border-left: 4px solid #2563eb;
    line-height: 1.6;
    pointer-events: none; /* Évite les bugs de clignotement */
}

.pc-left .pc-details { right: 110%; top: 0; }
.pc-content:hover .pc-details { display: block; animation: pcFadeIn 0.3s ease-out; }

@keyframes pcFadeIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

.pc-details ul { margin: 0; padding-left: 18px; list-style-type: circle; }
.pc-details li { margin-bottom: 8px; color: #cbd5e1; }

.pc-dot { 
    position: absolute; 
    left: 50%; 
    transform: translateX(-50%); 
    top: 15px; 
    width: 14px; 
    height: 14px; 
    border-radius: 50%; 
    background: #fff; 
    border: 3px solid #2563eb; 
    z-index: 3; 
}

/* Effet de pulsation sur l'expérience actuelle */
.pc-block:first-of-type .pc-dot {
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    animation: dot-pulse 2s infinite;
}

@keyframes dot-pulse {
    70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.pc-acad-dot { border-color: #64748b; }
.pc-tag { font-size: 0.6rem; font-weight: 800; text-transform: uppercase; padding: 2px 8px; border-radius: 4px; margin-bottom: 8px; display: inline-block; }
.pc-tag-pro { background: rgba(37, 99, 235, 0.1); color: #2563eb; }
.pc-tag-acad { background: rgba(100, 116, 139, 0.1); color: #64748b; }
.pc-date { display: block; font-size: 0.8rem; font-weight: 700; color: #0f172a; margin-bottom: 5px; }
.pc-content h3 { margin: 0; font-size: 0.95rem; line-height: 1.3; }
.pc-content h4 { margin: 4px 0 8px; font-size: 0.85rem; color: #64748b; font-weight: 600; }
.pc-status-success { background: #dcfce7; color: #166534; padding: 2px 8px; border-radius: 4px; font-size: 0.7rem; font-weight: 700; margin-top: 5px; display: inline-block;}
/* ==========================================================================
   4. PAGE PROJETS
   ========================================================================== */
.projects-container { padding: 2rem 10% 5rem; }
.filter-container { margin-top: 2rem; display: flex; justify-content: center; gap: 15px; margin-bottom: 3rem; }
.filter-btn { padding: 10px 25px; border: 1px solid #e2e8f0; background: #fff; border-radius: 25px; cursor: pointer; font-weight: 700; color: #64748b; transition: 0.3s; }
.filter-btn:hover, .filter-btn.active { background: #2563eb; color: #fff; border-color: #2563eb; box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.project-card { background: #fff; border-radius: 20px; overflow: hidden; border: 1px solid #e2e8f0; transition: 0.4s; position: relative; display: flex; flex-direction: column; height: 380px; }
.project-image { height: 180px; background: #f1f5f9; overflow: hidden; }
.project-image img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.project-content { padding: 1.5rem; flex-grow: 1; }
.status-badge { font-size: 0.65rem; font-weight: 800; text-transform: uppercase; padding: 3px 10px; border-radius: 5px; margin-bottom: 12px; display: inline-block; }
.ongoing-badge { background: #fef9c3; color: #854d0e; } 
.finished-badge { background: #dcfce7; color: #166534; }
.project-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15, 23, 42, 0.97); color: #fff; padding: 2rem; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; opacity: 0; visibility: hidden; transition: 0.3s; z-index: 10; }
.project-card:hover .project-overlay { opacity: 1; visibility: visible; }
.overlay-text strong { color: #2563eb; margin-bottom: 10px; display: block; font-size: 1.1rem; text-transform: uppercase; }
.btn-project { width: 90%; max-width: 200px; padding: 12px; background: #2563eb; color: #fff; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 0.85rem; transition: 0.3s; }
.btn-project.disabled { background: #475569; cursor: not-allowed; }

/* ==========================================================================
   5. FOOTER & COMMUNS
   ========================================================================== */
.pc-footer { background: #fff; border-top: 1px solid #e2e8f0; padding: 3rem 10% 1.5rem; margin-top: 4rem; }
.footer-container { display: flex; justify-content: space-between; align-items: flex-start; max-width: 1200px; margin: 0 auto; }
.footer-left h3 span { color: #2563eb; }
.footer-right { display: flex; flex-direction: column; align-items: flex-end; gap: 15px; }
.footer-nav-links { display: flex; gap: 20px; }
.footer-nav-links a { text-decoration: none; color: #475569; font-weight: 600; transition: 0.3s; }
.linkedin-link { display: flex; align-items: center; gap: 8px; background: #0a66c2; color: white; padding: 8px 16px; border-radius: 8px; text-decoration: none; font-weight: 700; }
.linkedin-link img { width: 16px; filter: brightness(0) invert(1); }
.footer-bottom-bar { text-align: center; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid #f1f5f9; color: #94a3b8; font-size: 0.8rem; }

.reveal { opacity: 0; transform: translateY(30px); transition: 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
    nav { margin: 0; border-radius: 0; top: 0; width: 100%; box-sizing: border-box; }
    .pc-line { left: 30px; }
    .pc-block { justify-content: flex-start; flex-direction: row !important; padding-left: 60px; }
    .pc-content { width: 90% !important; text-align: left !important; }
    .footer-container { flex-direction: column; align-items: center; text-align: center; gap: 30px; }
    .footer-right { align-items: center; }
}
/* Media Query pour les écrans de moins de 768px (Téléphones) */
@media (max-width: 768px) {
    .projects-grid {
        display: block !important; /* Force les projets à s'empiler les uns sous les autres */
    }

    .project-card {
        width: 100% !important;
        margin-bottom: 20px;
    }

    nav ul {
        flex-direction: column; /* Aligne le menu verticalement sur mobile */
        text-align: center;
    }
}
/* --- CORRECTIF RESPONSIVE ACCUEIL --- */
@media (max-width: 900px) {
    .hero-content {
        flex-direction: column-reverse; 
        text-align: center;
        gap: 30px;
        padding: 2rem 5%;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .profile-pic {
        width: 180px; 
        height: 180px;
        margin: 0 auto;
    }

    .hero-btns {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .soft-skills-banner {
        flex-direction: column;
        gap: 20px;
        margin: 20px 5%;
        padding: 1.5rem;
    }

    .soft-divider {
        display: none;
    }

    nav {
        flex-direction: column;
        padding: 1rem;
        gap: 15px;
    }

    nav ul {
        gap: 15px;
        padding: 0;
    }
}
/* ==========================================================================
   DERNIERS CORRECTIFS DE FINITION (AJOUTS)
   ========================================================================== */

/* 1. Centrage du titre compétences */
#competences .title-center {
    text-align: center;
    width: 100%;
    margin-bottom: 3rem;
}

/* 2. Correction superposition Timeline (Parcours) */
.pc-block:hover {
    z-index: 9999 !important; /* Force le bloc entier au premier plan au survol */
}

.pc-details {
    z-index: 10000 !important; /* La bulle passe au-dessus de tout */
}

.pc-dot {
    z-index: 1 !important; /* On force les points à rester en arrière-plan */
}

/* 3. Ajustement pour éviter le scroll horizontal sur mobile */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* 4. Amélioration du rendu des cartes sur mobile */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 5% 3rem;
    }
    
    .profile-pic {
        width: 180px;
        height: 180px;
    }

    .soft-skills-banner {
        margin: 20px 5%;
    }

    /* Empêche les images de projets de déborder */
    .project-image img {
        width: 100%;
        height: auto;
    }
}