/* Variables & Configuration */
:root {
    --bg-color-1: #f8fafc;
    --bg-color-2: #e2e8f0;
    --text-main: #0f172a;
}

.dark {
    --bg-color-1: #0f172a;
    --bg-color-2: #1e293b;
    --text-main: #ffffff;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color-1);
    color: var(--text-main);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Structure & Layout */
section {
    position: relative;
    width: 100%;
    padding: 6rem 1rem;
    background-color: var(--bg-color-1);
    transition: background-color 0.3s ease;
}

section:nth-of-type(even) {
    background-color: var(--bg-color-2);
}

.content-wrapper {
    max-width: 72rem;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4rem;
    color: #0f172a;
}

.dark .section-title {
    color: #ffffff;
}

.title-underline {
    border-bottom: 4px solid #3b82f6;
    padding-bottom: 0.5rem;
}

/* Effet verre */
.card-glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: background 0.3s, border-color 0.3s;
}

.dark .card-glass {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Navigation */
.navbar-full {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.4);
    padding: 1.5rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.dark .navbar-full {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(255, 255, 255, 0.05);
}

.navbar-full.scrolled {
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dark .navbar-full.scrolled {
    background: rgba(15, 23, 42, 0.85);
}

.nav-limit-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.nav-logo {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.05em;
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s;
}

.dark .nav-logo { color: #ffffff; }
.text-highlight { color: #3b82f6; }

.nav-links-desktop {
    display: none;
}

@media (min-width: 768px) {
    .nav-links-desktop {
        display: flex;
        align-items: center;
        gap: 2rem;
    }
}

.nav-link {
    position: relative;
    font-size: 1.05rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: color 0.2s;
    padding: 0.5rem 0;
}

.dark .nav-link { color: #d1d5db; }
.nav-link:hover { color: #3b82f6; }

.nav-link.active {
    color: #3b82f6 !important;
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2.5px;
    background-color: #3b82f6;
    border-radius: 99px;
    transform: scaleX(1);
    transition: transform 0.3s ease;
}

.nav-separator {
    width: 2px;
    height: 28px;
    background-color: #cbd5e1;
    margin: 0 1rem;
}

.dark .nav-separator { background-color: #4b5563; }

/* Bouton theme */
.btn-theme-toggle {
    padding: 0.5rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    cursor: pointer;
    background: transparent;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
}

.btn-theme-toggle:hover { background: #e5e7eb; }
.dark .btn-theme-toggle:hover { background: rgba(55, 65, 81, 0.5); border-color: #4b5563; }

.icon-sun, .icon-moon {
    font-size: 1.4rem;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.icon-sun { color: #eab308; display: none !important; }
.icon-moon { color: #475569; display: block !important; }

.dark .icon-sun { display: block !important; }
.dark .icon-moon { display: none !important; }

/* Compteur de vues */
.view-counter-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    cursor: default;
    opacity: 0; 
    transition: opacity 0.5s ease;
}

.dark .view-counter-wrapper {
    color: #94a3b8;
}

.view-counter-wrapper i {
    font-size: 1rem;
    color: #3b82f6;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    min-height: 600px;
    max-height: 1080px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-color-1);
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    background-color: transparent;
}

.dark #particles-js { background-color: #0f172a; }

/* 1. Le conteneur principal devient transparent aux clics */
.hero-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: left;
    z-index: 10;
    pointer-events: none;
}

/* 2. Le Nom : empêcher la sélection et le clic */
.hero-name {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #0f172a;
    user-select: none;
    -webkit-user-select: none;
    cursor: default;
    pointer-events: none;
}

/* 3. Réactivation des clics pour les boutons et les liens */
.hero-buttons, .social-links {
    pointer-events: auto;
}

.dark .hero-name { color: #e0e0e0; }

@media (min-width: 768px) { .hero-name { font-size: 4.5rem; } }

.hero-subtitle {
    margin-bottom: 3rem;
    font-family: monospace;
    font-size: 1.75rem;
    color: #3b82f6; 
    height: 2rem;
}

#typing-text {
    color: #0f172a;
    font-weight: 700;
}

.dark #typing-text { color: #e0e0e0; }

.hero-buttons {
    display: flex;
    justify-content: left;
    gap: 1.25rem;
    pointer-events: none; 
}

.hero-buttons a {
    pointer-events: auto; 
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    transition: all 0.3s;
    box-shadow: 0 0 20px rgba(59,130,246,0.5);
    text-decoration: none;
}

.btn-primary:hover { background-color: #2563eb; }

.btn-secondary {
    background: rgba(255, 255, 255, 0.7);
    color: #1e293b;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    border: 1px solid #9ca3af;
    backdrop-filter: blur(12px);
    text-decoration: none;
    transition: all 0.3s;
}

.dark .btn-secondary {
    background: rgba(30, 41, 59, 0.6);
    color: white;
    border-color: #6b7280;
}

.btn-secondary:hover { background: white; color: #0f172a; }

.social-links {
    margin-top: 2rem;
    display: flex;
    justify-content: left;
    gap: 2rem;
    pointer-events: none;
}

#home .social-links { justify-content: left;}

.social-icon {
    font-size: 2.2rem;
    color: #94a3b8;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    pointer-events: auto;
    cursor: pointer;
}
.dark .social-icon { color: #9ca3af; }

.social-icon:hover { transform: scale(1.1); }
.social-icon.linkedin:hover { color: #0077b5; }
.social-icon.github:hover { color: #000000; }
.dark .social-icon.github:hover { color: #ffffff; }
.social-icon.mail:hover { color: #ef4444; }


/* Section À Propos */
/* On enlève le style "carte" par défaut ici pour fondre le contenu */
#about .about-split-layout.card-glass {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 1rem 0;
}

/* Layout Flex 2 colonnes (Bio | Parcours) */
.about-split-layout {
    display: flex;
    flex-direction: row;
    gap: 5rem;
    justify-content: center;
    align-items: stretch;
}

/* -- Colonne Gauche : Bio -- */
.about-left-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-container {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.profile-image-wrapper {
    width: 10rem;
    height: 10rem;
    flex-shrink: 0;
    border-radius: 9999px;
    overflow: hidden;
    border: 4px solid #d1d5db;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.dark .profile-image-wrapper { border-color: #4b5563; background: #374151; }
.profile-image { width: 100%; height: 100%; object-fit: cover; }

.about-text {
    flex: 1;
    color: #334155;
    font-size: 1.125rem;
    line-height: 1.75;
}

.dark .about-text { color: #d1d5db; }

.mb-4 {
    text-align: justify;
    font-size: 1rem;
}

.btn-download-cv {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    background: #3b82f6;
    color: white;
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: background 0.3s;
}

.btn-download-cv:hover { background: #2563eb; }

/* -- Séparateur Central -- */
.vertical-separator {
    width: 2px;
    background: linear-gradient(to bottom, transparent, #475569, transparent);
    border-radius: 99px;
    flex-shrink: 0;
    opacity: 0.6;
}

/* -- Colonne Droite : Parcours -- */
.about-right-side {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 1rem;
}

.education-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.education-title i { color: #3b82f6; }
.dark .education-title { color: #fff; }

.mini-timeline {
    position: relative;
    border-left: 2px solid #94a3b8; 
    margin-left: 0.5rem;
    padding-left: 2rem;
}

.dark .mini-timeline { border-left-color: #334155; }

.mini-timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.mini-timeline-item:last-child { margin-bottom: 0; }

.mini-dot {
    position: absolute;
    left: -2.6rem;
    top: 0.2rem;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #e2e8f0; 
}

.dark .mini-dot { border-color: #1e293b; box-shadow: 0 0 0 2px #334155; }
.dot-primary { background: #3b82f6; }
.dot-secondary { background: #94a3b8; }

.mini-date {
    font-size: 0.9rem;
    font-weight: 700;
    color: #3b82f6;
    display: block;
    margin-bottom: 0.3rem;
}

.mini-degree {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.dark .mini-degree { color: #f1f5f9; }

.mini-school {
    font-size: 1rem;
    color: #64748b;
    margin: 0.3rem 0;
    font-weight: 500;
}

.mini-desc {
    font-size: 0.9rem;
    color: #94a3b8;
    font-style: italic;
    margin-top: 0.5rem;
}

/* Adaptation Mobile */
@media (max-width: 900px) {
    .about-split-layout {
        flex-direction: column;
        gap: 3rem;
        background: rgba(255, 255, 255, 0.7);
        border: 1px solid rgba(255, 255, 255, 0.8);
        padding: 1.5rem;
        border-radius: 1rem;
    }
    
    .dark .about-split-layout {
         background: rgba(30, 41, 59, 0.7);
         border: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .vertical-separator {
        width: 100%;
        height: 2px;
        background: linear-gradient(to right, transparent, #cbd5e1, transparent);
        margin: 1rem 0;
    }
    
    .dark .vertical-separator {
        background: linear-gradient(to right, transparent, #475569, transparent);
    }
    
    .about-left-side, .about-right-side {
        flex: auto;
        width: 100%;
        padding-left: 0;
    }
    
    .profile-image-wrapper {
        width: 12rem;
        height: 12rem;
    }
}

/* Séparateur */
.section-separator-line {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent, #cbd5e1, transparent);
    margin: 3rem 0;
    opacity: 0.6;
}
.dark .section-separator-line { background: linear-gradient(to right, transparent, #475569, transparent); }

.vision-stack-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 55rem;
    width: 100%;
    margin: 0 auto;
}

.vision-row {
    display: flex;
    align-items: flex-start;
    padding: 2rem;
    gap: 1.5rem;
    text-align: left;
    transition: transform 0.2s ease;
}

.vision-row:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.85);
}
.dark .vision-row:hover { background: rgba(30, 41, 59, 0.8); }

.vision-row-icon {
    flex-shrink: 0;
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.dark .vision-row-icon { background: rgba(15, 23, 42, 0.5); border: 1px solid rgba(255,255,255,0.05); }

.vision-row-content {
    flex: 1;
}

.vision-row-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #1e293b;
}
.dark .vision-row-title { color: #ffffff; }

.vision-row-content p {
    margin: 0;
    color: #475569;
    line-height: 1.6;
}
.dark .vision-row-content p { color: #cbd5e1; }

.vision-tags {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.v-tag {
    font-size: 0.95rem;
    color: #334155;
    background: transparent;
    padding: 0;
    font-weight: 500;
    position: relative;
    padding-left: 1.5rem;
}

.dark .v-tag { 
    color: #e2e8f0; 
}

.v-tag::before {
    content: "—";
    position: absolute;
    left: 0;
    color: #3b82f6;
    font-weight: 700;
}

/* Mobile : if (écran est petit) : empiler l'icône au-dessus du texte */
@media (max-width: 700px) {
    .vision-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .vision-tags {
        justify-content: center;
    }
}

/* Section Compétences */
.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) { 
    .skills-grid { grid-template-columns: repeat(2, 1fr); } 
}

.skill-category-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1e293b;
}

.dark .skill-category-title { color: #ffffff; }

.skill-badges-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: rgba(59, 130, 246, 0.1);
    color: #334155;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.2s;
}

.dark .skill-badge {
    background-color: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    border-color: rgba(255, 255, 255, 0.1);
}

.skill-badge:hover {
    background-color: #3b82f6;
    color: white;
    transform: translateY(-2px);
}

.skill-badge i { font-size: 1.2rem; }

#skills .content-wrapper {
    max-width: auto;
    width: 100%;
    padding: 0 2rem;
}

.skills-nav-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.skills-nav {
    display: flex;
    background: #e2e8f0;
    padding: 0.3rem;
    border-radius: 9999px;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dark .skills-nav {
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.skill-tab {
    padding: 0.6rem 1.5rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dark .skill-tab {
    color: #94a3b8;
}

.skill-tab:hover {
    color: #3b82f6;
}

.skill-tab.active {
    background-color: #3b82f6;
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.4);
}

.skills-content {
    display: none;
    animation: fadeInScale 0.4s ease-out;
}

.skills-content.active {
    display: block;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Mobile --- */
@media (max-width: 600px) {
    .skill-tab {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    .skill-tab i {
        display: none;
    }
}

/* Section Expérience */
.timeline-wrapper {
    width: 100%;
    max-width: 75rem;
    margin: 0 auto;
}

.timeline-nav {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-end; 
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    min-height: 150px; 
}

.timeline-line {
    position: absolute;
    bottom: 2.5rem; 
    left: 0;
    width: 100%;
    height: 4px;
    background: #334155;
    border-radius: 4px;
    z-index: 0;
}
.dark .timeline-line { background: #334155; }

.timeline-line::after {
    content: '';
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0; 
    height: 0; 
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 12px solid #334155;
}

.timeline-step {
    position: relative;
    z-index: 1;
    width: 30%;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.timeline-step:hover { opacity: 0.8; }
.timeline-step.active { opacity: 1; }

.step-preview {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    transform: translateY(10px);
    transition: transform 0.3s;
}

.timeline-step.active .step-preview {
    transform: translateY(0);
}

.preview-date {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
}
.dark .preview-date { color: #94a3b8; }

.preview-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    color: #1e293b;
    line-height: 1.2;
}
.dark .preview-title { color: white; }

.preview-contract {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.6rem;
    border-radius: 99px;
    text-transform: uppercase;
    margin-top: 0.2rem;
}
.badge-purple { background: #f3e8ff; color: #9333ea; }
.badge-orange { background: #ffedd5; color: #ea580c; }
.badge-gray   { background: #ebe9e5; color: #4b5563; }
.dark .badge-gray { background: #374151; color: #cbd5e1; }

.step-dot {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: #cbd5e1;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #cbd5e1;
    transition: all 0.3s;
}
.dark .step-dot { background: #475569; border-color: #0f172a; box-shadow: 0 0 0 2px #475569; }

.timeline-step.active .step-dot {
    background: #3b82f6;
    transform: scale(1.3);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
}

.timeline-content-area {
    position: relative;
    min-height: 300px;
}

.exp-detail-card {
    display: none; /* Caché par défaut */
    background: rgba(255, 255, 255, 0.7);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.4s ease-out;
}
.dark .exp-detail-card {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

.exp-detail-card.active {
    display: block; /* Affiché si actif */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.exp-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    color: #475569;
}
.dark .exp-list { color: #d1d5db; }

.exp-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}
.check-icon {
    color: #3b82f6;
    margin-top: 0.3rem;
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .timeline-nav {
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 0;
        gap: 1.5rem;
    }
    .timeline-line {
        width: 4px;
        height: 100%;
        left: 0.55rem;
        top: 0;
        bottom: auto;
    }
    .timeline-line::after {
        right: auto;
        left: 50%;
        top: auto;
        bottom: -10px;
        transform: translateX(-50%);
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 12px solid #334155;
        border-bottom: none;
    }
    .timeline-step {
        width: 100%;
        flex-direction: row-reverse;
        justify-content: flex-end;
        gap: 1.5rem;
        text-align: left;
    }
    .step-preview {
        align-items: flex-start;
        margin-bottom: 0;
        transform: none;
    }
    .step-dot {
        flex-shrink: 0;
    }
}

/* Section Projets */
.filters-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.filter-btn {
    padding: 0.6rem 1.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    background: rgba(255, 255, 255, 0.5);
    color: #64748b;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.dark .filter-btn {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
    color: #94a3b8;
}

.filter-btn:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
}
.dark .filter-btn:hover {
    background: #334155;
}

.filter-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.4);
}

.carousel-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.carousel-track {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 2rem 1rem;
    width: 100%;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.project-card {
    min-width: 350px;
    width: 350px;
    flex: 0 0 auto;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dark .project-card {
    background: rgba(30, 41, 59, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
}

.dark .project-card:hover {
    box-shadow: 0 20px 25px -5px rgba(115, 115, 115, 0.15);
}

.project-header {
    height: 9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.gradient-purple { background: linear-gradient(to right, #9333ea, #2563eb); }
.gradient-pink   { background: linear-gradient(to right, #db2777, #ef4444); }
.gradient-green  { background: linear-gradient(to right, #16a34a, #14b8a6); }
.gradient-orange { background: linear-gradient(to right, #ea580c, #eab308); }
.gradient-blue   { background: linear-gradient(to right, #1e3a8a, #3b82f6); }
.gradient-teal   { background: linear-gradient(to right, #0f766e, #2dd4bf); }
.gradient-red    { background: linear-gradient(to right, #dc2626, #f87171); }


.project-icon {
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.95);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.project-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: #1e293b;
    transition: color 0.2s;
}
.dark .project-title { color: #ffffff; }

.project-subtitle {
    font-size: 0.85rem;
    font-weight: 500;
    color: #64748b;
    margin-bottom: 1rem;
    text-transform: uppercase;
}
.dark .project-subtitle { color: #94a3b8; }

.project-desc {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex-grow: 0;
}
.dark .project-desc { color: #cbd5e1; }

.project-tags {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-size: 0.75rem;
    font-weight: 600;
    background: #334155;
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 0.25rem;
}
.dark .tag { background: #475569; }

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(1);
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: white;
    border: 1px solid #e2e8f0;
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.dark .nav-btn {
    background: #1e293b;
    border-color: #475569;
    color: #3b82f6;
}

.nav-btn:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-50%) scale(1.2);
}

.prev-btn { left: -3.3rem; }
.next-btn { right: -3rem; }

/* --- Mobile ---*/
@media (max-width: 768px) {
    .nav-btn { display: none; }
    .project-card { min-width: 280px; width: 280px; height: auto; }
}

/* Gestion des liens */

/* Github, PDF, etc ... */
.project-header {
    position: relative;
    overflow: hidden;
}

.project-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background-color: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    pointer-events: none;

    animation: overlay-blink 9s infinite ease-in-out;
}

.project-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -40%);
    
    background-color: white;
    color: #1e293b;
    
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    
    display: flex;
    align-items: center;
    gap: 0.8rem;
    
    opacity: 0;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    animation: ghost-blink 9s infinite ease-in-out;
}

.project-btn i {
    font-size: 1.1rem;
}

.project-header:hover::before {
    opacity: 1;
}

.project-header:hover .project-btn {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.project-btn:hover {
    background-color: #f8fafc;
    transform: translate(-50%, -50%) scale(1.05) !important;
}

#track:hover .project-btn,
#track:hover .project-header::before {
    animation: none; 
    opacity: 0;      
    transition: none;
}

#track .project-card:hover .project-btn {
    opacity: 1; 
    transform: translate(-50%, -50%); 
    animation: none; 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}

#track .project-card:hover .project-header::before {
    opacity: 1;
    animation: none;
    transform: none;
    transition: opacity 0.3s ease;
}

/* Confidentiel */
.project-btn.confidential {
    cursor: default;
    background-color: #f1f5f9;
    color: #64748b;
}

.project-btn.confidential:hover {
    transform: translate(-50%, -50%) !important;
    background-color: #f1f5f9;
}

.project-btn.confidential i {
    color: #ef4444;
}

/* Bientôt... */
.project-btn.wip {
    cursor: default;
    background-color: #fff7ed;
}

.project-btn.wip:hover {
    transform: translate(-50%, -50%) !important;
    background-color: #fff7ed;
}

.project-btn.wip i {
    color: #ea580c;
}

.carousel-dots {
    width: 100%;
    flex: 0 0 100%;
    order: 99;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.8rem;
    padding-bottom: 0.5rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    transition: width 0.25s ease, opacity 0.25s ease, transform 0.25s ease;
    opacity: 0.8;
}

.carousel-dot.active {
    width: 28px;
    opacity: 1;
    transform: scale(1.02);
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

#track {
    flex: 1 1 auto;
}

.carousel-btn, .carousel-dot {
    background: rgba(0, 0, 0, 0.08);
    color: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.10);
}

.carousel-btn:hover, .carousel-dot:hover {
    background: rgba(0, 0, 0, 0.12);
}

.dark .carousel-btn, .dark .carousel-dot {
    background: rgba(255, 255, 255, 0.45);
    color: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.dark .carousel-dot.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

/* Animation Clignement */
@keyframes ghost-blink {
    0%, 50% { 
        opacity: 0; 
        transform: translate(-50%, -40%); 
    }
    65%, 90% { 
        opacity: 0.8;
        transform: translate(-50%, -50%); 
    }
    100% { 
        opacity: 0; 
        transform: translate(-50%, -40%); 
    }
}

@keyframes overlay-blink {
    0%, 50% { opacity: 0; }
    65%, 90% { opacity: 0.3; }
    100% { opacity: 0; }
}

/* Contact */
#contact {
    display: block;
    padding: 3rem 1rem;
    margin-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.dark #contact {
    border-top-color: #1e293b;
}

.contact-container {
    display: block;
    max-width: 45rem;
    margin: 0 auto;
    text-align: center;
}

.contact-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 2rem;
}
.dark .contact-subtitle { color: #94a3b8; }

#contact .social-links {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

#contact footer {
    margin-top: 1rem;
    color: #94a3b8;
    font-size: 0.85rem;
}

/* Bouton bot to top */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 3rem;
    z-index: 99;
    
    /* Style visuel */
    background-color: #3b82f6;
    color: #ffffff;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    
    /* Centrage de l'icône */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(65, 152, 245, 0.955);
    
    /* État initial : Caché */
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s ease-in-out;
}

/* État au survol */
.scroll-top-btn:hover {
    background-color: #ff8c00;
    transform: translateY(-5px);
    box-shadow: 0 4px 10px #ff8c00;
    color: #ffffff;
}

/* État Actif */
.scroll-top-btn.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}