/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #0E141B;
    --secondary: #141C24;
    --accent: #2DFFB9;
    --accent-light: #7DFFD6;
    --accent-dark: #14C989;
    --accent-rgb: 45, 255, 185;
    --accent-2: #3BE4FF;
    --accent-2-rgb: 59, 228, 255;
    --text-primary: #F0F5F9;
    --text-secondary: #B6C3CF;
    --text-muted: #7C8B98;
    --bg-dark: #070B0F;
    --bg-card: #0E141B;
    --bg-hover: #141F28;
    --border: #1D2A34;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: var(--text-secondary);
    background-color: var(--bg-dark);
    overflow-x: hidden;
    position: relative;
}

/* Fond global avec effet subtil */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(var(--accent-rgb), 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(var(--accent-2-rgb), 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
    animation: subtleMove 30s ease-in-out infinite;
}

@keyframes subtleMove {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, -20px);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-fluid {
    max-width: 100%;
    padding: 0 2rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

.logo-text {
    color: var(--text-primary);
}

.logo-dot {
    color: var(--accent);
    font-size: 2.5rem;
    line-height: 0;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent-light);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.admin-link {
    background: var(--accent);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: white !important;
}

.admin-link:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

.admin-link::after {
    display: none;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(135deg,
            var(--bg-dark) 0%,
            var(--primary) 30%,
            #101821 50%,
            var(--primary) 70%,
            var(--bg-dark) 100%);
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: floatAndPulse 20s infinite ease-in-out;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: var(--accent);
    top: -250px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-2);
    bottom: -200px;
    left: -150px;
    animation-delay: 7s;
}

.shape-3 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    animation-delay: 14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(50px, -50px) rotate(120deg);
    }

    66% {
        transform: translate(-30px, 30px) rotate(240deg);
    }
}

/* Animation améliorée avec pulsation */
@keyframes floatAndPulse {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg) scale(1);
        opacity: 0.3;
    }

    25% {
        transform: translate(50px, -50px) rotate(90deg) scale(1.1);
        opacity: 0.4;
    }

    50% {
        transform: translate(30px, 20px) rotate(180deg) scale(0.9);
        opacity: 0.25;
    }

    75% {
        transform: translate(-30px, 30px) rotate(270deg) scale(1.05);
        opacity: 0.35;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    animation: fadeInUp 1s ease;
}

.hero-tag {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: rgba(var(--accent-rgb), 0.1);
    border: 1px solid var(--accent);
    border-radius: 50px;
    color: var(--accent-light);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.accent-gradient {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 20px 50px rgba(var(--accent-rgb), 0.4),
        0 0 30px rgba(var(--accent-rgb), 0.2);
}

.btn-primary:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 10px 25px rgba(var(--accent-rgb), 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.1), transparent);
    transition: left 0.5s ease;
}

.btn-secondary:hover::before {
    left: 100%;
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.15);
}

.btn-ghost {
    background: transparent;
    color: var(--accent);
    border: 1px solid rgba(var(--accent-rgb), 0.4);
}

.btn-ghost:hover {
    background: rgba(var(--accent-rgb), 0.08);
    border-color: var(--accent);
    color: var(--accent-light);
    transform: translateY(-3px);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.social-links a {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 1.3rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.social-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent);
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    z-index: -1;
}

.social-links a:hover::before {
    transform: scale(1);
}

.social-links a:hover {
    color: white;
    border-color: var(--accent);
    transform: translateY(-5px) rotate(5deg);
    box-shadow: 0 10px 25px rgba(var(--accent-rgb), 0.3);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--accent);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        top: 8px;
    }

    100% {
        opacity: 0;
        top: 25px;
    }
}

/* Section Styles */
section {
    padding: 7rem 0;
    position: relative;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.title-number {
    font-size: 2rem;
    color: var(--accent);
    font-family: 'Work Sans', sans-serif;
    font-weight: 600;
}

/* About Section */
.about {
    background: var(--primary);
}

.about-content {
    display: grid;
    gap: 3rem;
}

.about-text p {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(var(--accent-rgb), 0.1) 0%,
            transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.stat-item:hover {
    transform: translateY(-5px) scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 15px 35px rgba(var(--accent-rgb), 0.25);
}

.stat-item:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--accent-rgb), 0.1);
    border-radius: 12px;
    color: var(--accent);
    font-size: 1.8rem;
}

.stat-info h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.stat-info p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Education Section */
.education {
    background: var(--bg-dark);
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
}

.timeline-item {
    position: relative;
    padding-left: 80px;
    margin-bottom: 4rem;
}

.timeline-dot {
    position: absolute;
    left: 21px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    border: 4px solid var(--bg-dark);
    box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.2);
}

.timeline-content {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateX(10px);
    border-color: var(--accent);
    box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.15);
}

.timeline-date {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(var(--accent-rgb), 0.1);
    border-radius: 8px;
    color: var(--accent-light);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.timeline-content h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.timeline-content h4 {
    color: var(--accent-light);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.institution {
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.timeline-list {
    list-style: none;
    padding: 0;
}

.timeline-list li {
    padding-left: 2rem;
    margin-bottom: 0.8rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.6;
}

.timeline-list li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-size: 1.2rem;
}

/* Experience Section */
.experience {
    background: var(--primary);
}

.experience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.experience-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
    position: relative;
}

.experience-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(var(--accent-rgb), 0.15) 0%,
            transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.experience-card:hover {
    transform: translateY(-12px);
    border-color: var(--accent);
    box-shadow:
        0 25px 50px rgba(var(--accent-rgb), 0.25),
        0 0 40px rgba(var(--accent-rgb), 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.experience-card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.card-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--accent-rgb), 0.1);
    border-radius: 12px;
    color: var(--accent);
    font-size: 1.8rem;
}

.date-badge {
    background: rgba(var(--accent-2-rgb), 0.12);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--accent-2);
    font-weight: 600;
    white-space: nowrap;
}

.experience-card h3 {
    color: var(--text-primary);
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.experience-card h4 {
    color: var(--accent-light);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.location {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.project-highlight {
    background: rgba(16, 185, 129, 0.1);
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--success);
    color: var(--text-secondary);
}

.project-highlight strong {
    color: var(--success);
}

.experience-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.experience-card ul li {
    padding-left: 2rem;
    margin-bottom: 1rem;
    position: relative;
    color: var(--text-secondary);
    line-height: 1.7;
}

.experience-card ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
    font-size: 1.2rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-tags span {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-light);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(var(--accent-rgb), 0.3);
}

/* Collaborations Section */
.collaborations {
    background: var(--bg-dark);
}

.collab-intro {
    max-width: 760px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.collab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.collab-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    transition: all 0.3s ease;
}

.collab-card h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.collab-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.collab-card:hover {
    border-color: var(--accent);
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(var(--accent-rgb), 0.2);
}

/* Projects Section */
.projects {
    background: var(--bg-dark);
    padding: 7rem 0 0 0;
}

.projects-layout {
    display: flex;
    gap: 0;
    position: relative;
    min-height: 600px;
}

.projects-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    height: 100vh;
    width: 400px;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    z-index: 999;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding-top: 80px;
}

.projects-sidebar.active {
    right: 0;
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5);
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 80px;
    background: var(--bg-card);
    z-index: 10;
}

.sidebar-header h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
}

.close-sidebar {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.close-sidebar:hover {
    background: var(--bg-hover);
    color: var(--accent);
}

.projects-list {
    padding: 1rem;
}

.project-list-item {
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: var(--primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.project-list-item:hover {
    border-color: var(--accent);
    transform: translateX(-5px);
    background: rgba(15, 23, 42, 0.8);
}

.project-list-item.active {
    background: rgba(var(--accent-rgb), 0.15);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.2);
}

.project-list-item h4 {
    color: var(--text-primary);
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
}

.project-list-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.6;
    opacity: 0.9;
}

.projects-content {
    flex: 1;
    padding: 0 2rem 7rem 2rem;
}

.open-sidebar-btn {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--accent);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 998;
    box-shadow: 0 10px 30px rgba(var(--accent-rgb), 0.3);
    transition: all 0.3s ease;
}

.open-sidebar-btn:hover {
    background: var(--accent-dark);
    transform: translateY(-50%) translateX(-5px);
    box-shadow: 0 15px 40px rgba(var(--accent-rgb), 0.4);
}

.project-display {
    max-width: 900px;
    margin: 0 auto;
}

.empty-state {
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
}

.empty-state p {
    font-size: 1.2rem;
}

.project-detail {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    animation: fadeInUp 0.5s ease;
}

.project-detail h3 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.project-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.meta-item i {
    color: var(--accent);
}

.project-description {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.project-summary h4 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.project-sections {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.project-section h4 {
    color: var(--text-primary);
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
}

.project-section p {
    color: var(--text-secondary);
    line-height: 1.7;
}

.project-highlights {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.project-highlights li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.6rem;
    color: var(--text-secondary);
}

.project-highlights li::before {
    content: '•';
    position: absolute;
    left: 0.5rem;
    color: var(--accent);
}

.project-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.project-image {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-image:hover {
    transform: scale(1.05);
    border-color: var(--accent);
}

.project-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.project-technologies {
    margin-top: 2rem;
}

.project-technologies h4 {
    color: var(--text-primary);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* Skills Section */
.skills {
    background: var(--primary);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.skill-category {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.skill-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(var(--accent-rgb), 0.12) 0%,
            transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.skill-category:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(var(--accent-rgb), 0.2);
}

.skill-category:hover::before {
    opacity: 1;
}

.skill-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.skill-header i {
    font-size: 2rem;
    color: var(--accent);
}

.skill-header h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
}

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

.skill-tag {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--text-secondary);
    padding: 0.7rem 1.2rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(var(--accent-rgb), 0.2);
    color: var(--accent-light);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Contact Section */
.contact {
    background: var(--bg-dark);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1100px;
    margin: 0 auto;
}

.contact-info h3 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

.contact-info>p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 3rem;
}

.contact-details {
    margin-bottom: 3rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--accent-rgb), 0.1);
    border-radius: 12px;
    color: var(--accent);
    font-size: 1.3rem;
    flex-shrink: 0;
}

.contact-item h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.contact-item a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--accent);
}

.contact-item p {
    color: var(--text-secondary);
    margin: 0;
}

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

.social-links-contact a {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: white;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 1.3rem;
}

.social-links-contact a:hover {
    background: var(--accent-dark);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(var(--accent-rgb), 0.3);
}

.contact-form-wrapper {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--primary);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-form .btn {
    width: 100%;
    justify-content: center;
}

/* Footer */
.footer {
    background: var(--primary);
    border-top: 1px solid var(--border);
    padding: 2.5rem 0;
    text-align: center;
}

.footer p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Scroll Reveal Animations ===== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Cascade delays for grids */
.scroll-reveal-cascade:nth-child(1) {
    transition-delay: 0.1s;
}

.scroll-reveal-cascade:nth-child(2) {
    transition-delay: 0.2s;
}

.scroll-reveal-cascade:nth-child(3) {
    transition-delay: 0.3s;
}

.scroll-reveal-cascade:nth-child(4) {
    transition-delay: 0.4s;
}

.scroll-reveal-cascade:nth-child(5) {
    transition-delay: 0.5s;
}

.scroll-reveal-cascade:nth-child(6) {
    transition-delay: 0.6s;
}

/* Animation variants */
.scroll-reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.scroll-reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* ===== Performance Optimizations ===== */
.experience-card,
.skill-category,
.stat-item,
.btn,
.social-links a {
    will-change: transform;
}

.floating-shape {
    will-change: transform, opacity;
}

/* Désactiver will-change après animation pour économiser les ressources */
.experience-card:not(:hover),
.skill-category:not(:hover),
.stat-item:not(:hover) {
    will-change: auto;
}

/* Responsive Design */
@media (max-width: 968px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .projects-sidebar {
        width: 100%;
        right: -100%;
    }

    .open-sidebar-btn {
        right: 1rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: rgba(2, 6, 23, 0.98);
        backdrop-filter: blur(20px);
        width: 100%;
        padding: 2rem 0;
        gap: 0;
        border-top: 1px solid var(--border);
        transition: left 0.4s ease;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        width: 100%;
        padding: 1rem 2rem;
    }

    .nav-links a::after {
        display: none;
    }

    .hero {
        min-height: auto;
        padding: 8rem 0 4rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .section-title {
        font-size: 2rem;
        flex-direction: column;
        align-items: flex-start;
    }

    section {
        padding: 4rem 0;
    }

    .about-stats,
    .experience-grid,
    .skills-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 15px;
    }

    .timeline-item {
        padding-left: 50px;
    }

    .timeline-dot {
        left: 6px;
    }

    .card-header {
        flex-direction: column;
    }

    .date-badge {
        align-self: flex-start;
    }

    .project-display {
        padding: 0;
    }

    .project-detail {
        padding: 2rem;
    }

    .contact-form-wrapper {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .stat-item {
        flex-direction: column;
        text-align: center;
    }

    .project-images {
        grid-template-columns: 1fr;
    }
}

/* ===== Mobile Performance Optimizations ===== */
@media (max-width: 768px) {

    /* Simplifier les animations sur mobile pour performance */
    .floating-shape {
        animation: none;
        opacity: 0.2;
    }

    body::before {
        animation: none;
    }

    .hero-background {
        animation: none;
        background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary) 50%, var(--bg-dark) 100%);
    }

    /* Désactiver les effets 3D sur mobile */
    .experience-card::before,
    .skill-category::before,
    .stat-item::before {
        display: none;
    }

    .experience-card:hover,
    .skill-category:hover,
    .stat-item:hover {
        transform: translateY(-5px);
    }
}

/* ===== Accessibility - Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .floating-shape {
        animation: none;
    }

    .hero-background {
        animation: none;
    }
}

/* Stage Banner */
.stage-banner {
    background: var(--primary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 3rem 0;
}

.stage-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.stage-content h2 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
}

.stage-content p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* Projects Preview */
.projects-preview {
    background: var(--bg-dark);
}

.projects-intro {
    color: var(--text-secondary);
    max-width: 720px;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.projects-preview-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Projects Page */
.projects-page {
    padding: 7rem 0;
    background: var(--bg-dark);
}

.projects-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.projects-page-header h1 {
    color: var(--text-primary);
    font-size: 3rem;
    font-family: 'Playfair Display', serif;
}

.project-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.project-card-preview {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.project-card-preview:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(var(--accent-rgb), 0.2);
}

.project-card-preview h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.project-card-preview p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.project-card-preview .meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.project-card-preview .meta i {
    color: var(--accent);
}

/* Project Detail Page */
.project-detail-page {
    padding: 7rem 0;
    background: var(--bg-dark);
}

.project-detail-wrapper {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 3rem;
}

.project-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.project-detail-header h1 {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-family: 'Playfair Display', serif;
}

.project-detail-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    color: var(--text-muted);
}

.project-detail-meta i {
    color: var(--accent);
}

.project-detail-body {
    display: grid;
    gap: 1.5rem;
}

.project-detail-body h4 {
    color: var(--text-primary);
    font-size: 1.2rem;
}

.project-detail-body p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.project-detail-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.project-detail-images img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--border);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-light);
    text-decoration: none;
}

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

@media (max-width: 768px) {
    .stage-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .projects-page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .project-detail-wrapper {
        padding: 2rem;
    }
}

/* ===== Projects List Cards (pcp = project-card-preview) ===== */
.project-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.project-card-preview {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.5s ease both;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.project-card-preview::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.project-card-preview:hover::before {
    transform: scaleX(1);
}

.project-card-preview:hover {
    border-color: var(--accent);
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(var(--accent-rgb), 0.2);
}

.pcp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pcp-number {
    font-size: 2.5rem;
    font-weight: 900;
    font-family: 'Playfair Display', serif;
    color: rgba(var(--accent-rgb), 0.15);
    line-height: 1;
}

.pcp-date {
    font-size: 0.85rem;
    color: var(--accent-light);
    background: rgba(var(--accent-rgb), 0.1);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pcp-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
    font-family: 'Playfair Display', serif;
}

.pcp-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    flex: 1;
}

.pcp-highlights {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.pcp-highlights li {
    font-size: 0.88rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pcp-highlights li i {
    color: var(--accent);
    font-size: 0.7rem;
}

.pcp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.pcp-techs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pcp-techs span {
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-light);
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid rgba(var(--accent-rgb), 0.25);
}

.pcp-techs .more-tag {
    background: rgba(var(--accent-2-rgb), 0.1);
    color: var(--accent-2);
    border-color: rgba(var(--accent-2-rgb), 0.2);
}

.pcp-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.pcp-link:hover {
    gap: 0.9rem;
    color: var(--accent-light);
}

/* ===== Project Detail Page ===== */
.project-detail-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.project-detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.2rem;
}

.project-hero-tag {
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--accent-light);
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid rgba(var(--accent-rgb), 0.25);
}

.project-detail-header h1 {
    font-size: 2.5rem;
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.project-detail-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.2rem;
}

.project-detail-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.project-detail-meta i {
    color: var(--accent);
}

.project-lead {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.project-detail-body {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.project-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
}

.project-section h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
}

.project-section h4 i {
    color: var(--accent);
    font-size: 1rem;
}

.project-section p {
    color: var(--text-secondary);
    line-height: 1.9;
}

.project-section-highlight {
    border-color: rgba(var(--accent-rgb), 0.4);
    background: rgba(var(--accent-rgb), 0.05);
}

.project-section-result {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.04);
}

.project-section-result h4 {
    color: var(--success);
}

.project-section-result h4 i {
    color: var(--success);
}

.project-highlights {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project-highlights li {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.98rem;
    line-height: 1.6;
}

.project-highlights li i {
    color: var(--accent);
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* ===== Project Navigation (prev/next) ===== */
.project-nav {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.project-nav-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    max-width: 45%;
}

.project-nav-btn:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(var(--accent-rgb), 0.2);
}

.project-nav-btn.next {
    margin-left: auto;
    text-align: right;
}

.project-nav-btn span {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.project-nav-btn small {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-nav-btn i {
    color: var(--accent);
    font-size: 1.2rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .project-cards {
        grid-template-columns: 1fr;
    }

    .project-detail-header h1 {
        font-size: 1.75rem;
    }

    .project-nav {
        flex-direction: column;
    }

    .project-nav-btn {
        max-width: 100%;
    }

    .project-nav-btn.next {
        margin-left: 0;
    }
}

