/* ==========================================================================
   VARIABLES & DESIGN SYSTEM (DARK MODE PAR DÉFAUT + LIGHT MODE)
   ========================================================================== */
:root {
    /* Palette Sombre (Défaut - Inspiré par Linear & Raycast) */
    --bg-main: #0B0F17;
    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --primary: #3B82F6;
    --primary-hover: #2563EB;
    --accent: #8B5CF6;
    --border: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(255, 255, 255, 0.03);
    --pill-bg: rgba(255, 255, 255, 0.06);
    --input-bg: rgba(255, 255, 255, 0.04);
    
    /* Composants */
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    /* Glassmorphic & Ombres */
    --glass-bg: rgba(15, 23, 42, 0.65);
    --glass-border: rgba(255, 255, 255, 0.1);
    --nav-bg-scrolled: rgba(11, 15, 23, 0.85);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 12px 32px -4px rgba(0, 0, 0, 0.4);

    /* Transitions */
    --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Palette Claire (Surchargée par data-theme="light") */
[data-theme="light"] {
    --bg-main: #FAFBFC;
    --text-primary: #0F172A;
    --text-secondary: #64748B;
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --accent: #7C3AED;
    --border: #E2E8F0;
    --card-bg: #FFFFFF;
    --pill-bg: #F1F5F9;
    --input-bg: #FFFFFF;
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(226, 232, 240, 0.8);
    --nav-bg-scrolled: rgba(255, 255, 255, 0.85);
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 12px 24px -4px rgba(15, 23, 42, 0.06);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


html {
    scroll-behavior: smooth;
    font-size: 16px;

    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
    /* Masque la barre de défilement (Firefox) */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Masque la barre de défilement (WebKit / Chrome / Safari / Edge) */
body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

/* ==========================================================================
   LAYOUT & UTILITIES
   ========================================================================== */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 120px 0;
}

.section-header {
    margin-bottom: 64px;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.text-center {
    text-align: center;
}

/* Arrière-plan animé */
.glow-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    animation: float 20s infinite ease-in-out alternate;
}

[data-theme="light"] .blob {
    opacity: 0.35;
}

.blob-1 {
    top: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
}

.blob-2 {
    bottom: 10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 50px) scale(1.1); }
}

/* Glassmorphism Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth), background-color var(--transition-smooth);
}

.glass-card:hover {
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   BOUTONS & BADGES & THEME TOGGLE
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background-color: var(--pill-bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

[data-theme="light"] .btn-secondary:hover {
    background-color: #E2E8F0;
}

.btn-outline {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background-color: var(--pill-bg);
    border-color: var(--text-secondary);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 10px 18px;
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
}

.theme-toggle-btn {
    background: var(--pill-bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
    transform: scale(1.05);
    border-color: var(--primary);
}

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

[data-theme="light"] .sun-icon { display: none; }
[data-theme="light"] .moon-icon { display: block; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 24px;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
}

/* ==========================================================================
   HEADER / NAVBAR
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-fast);
}

.navbar.scrolled {
    padding: 12px 0;
    background: var(--nav-bg-scrolled);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

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

.brand-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.03em;
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
}

.burger-btn span {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 140px 0 80px;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 36px;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

.hero-image-wrapper {
    position: relative;
}

.profile-card {
    padding: 20px;
    text-align: center;
}

.profile-frame {
    width: 100%;
    height: 380px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 16px;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #10B981;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ==========================================================================
   SECTION VALEURS / VIE PRIVÉE & LIBERTÉS
   ========================================================================== */
.values-section {
    padding: 60px 0 0;
}

.values-card {
    max-width: 860px;
    margin: 0 auto;
    padding: 56px 64px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.values-card::before {
    content: "";
    position: absolute;
    top: -100px;
    right: -100px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
    opacity: 0.18;
    filter: blur(60px);
    pointer-events: none;
}

.values-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
}

.values-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.values-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.values-text {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.75;
    max-width: 640px;
    margin: 0 auto 32px;
}

.values-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.values-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ==========================================================================
   SECTION A PROPOS
   ========================================================================== */
.about-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.about-card {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 40px;
}

.about-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.about-text h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

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

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.stat-card {
    padding: 32px;
    text-align: center;
}

.stat-number, .stat-plus {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.stat-label {
    display: block;
    margin-top: 8px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================================================
   SECTION PROJETS
   ========================================================================== */
.projects-stack {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.project-card {
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-4px);
}

.featured-project {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.project-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.project-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.project-description {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 1rem;
}

.project-tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.tech-pill {
    padding: 4px 12px;
    background: var(--pill-bg);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.secondary-projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

/* Mockup UI */
.preview-mockup {
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-md);
}

.mockup-header {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}

.mockup-header .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #334155;
}

.mockup-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mockup-ui-element {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.mockup-ui-element.title-bar {
    height: 20px;
    width: 60%;
}

.mockup-ui-element.card-item {
    height: 60px;
    width: 100%;
}

.mockup-ui-element.card-item.short {
    width: 80%;
}

/* ==========================================================================
   SECTION TECHNOLOGIES
   ========================================================================== */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 20px;
}

.tech-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    gap: 12px;
    text-align: center;
}

.tech-badge:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.tech-icon {
    font-size: 2rem;
}

.tech-name {
    font-weight: 600;
    font-size: 0.95rem;
}

/* ==========================================================================
   SECTION CONTACT & FOOTER
   ========================================================================== */
.contact-card {
    max-width: 640px;
    margin: 0 auto;
    padding: 48px;
}

.contact-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.contact-link-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color var(--transition-fast);
}

.contact-link-item:hover {
    color: var(--primary);
}

.social-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.social-link:hover {
    color: var(--primary);
}

.social-separator {
    color: var(--border);
}

.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    background: var(--bg-main);
    transition: background-color var(--transition-smooth);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-text, .footer-copy {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   ANIMATIONS Intersection Observer
   ========================================================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.15s; }
.delay-2 { transition-delay: 0.3s; }

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

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

    .about-card {
        flex-direction: column;
        text-align: center;
    }

    /* Technologies & Outils : visible uniquement sur PC (>= 992px) */
    .tech-section {
        display: none;
    }

    .nav-links a[href="#tech"] {
        display: none;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 80px 0;
    }

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

    .burger-btn {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--bg-main);
        flex-direction: column;
        padding: 24px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        box-shadow: var(--shadow-md);
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .secondary-projects-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .values-card {
        padding: 36px 24px;
    }

    .values-title {
        font-size: 1.9rem;
    }

    .footer-container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}



.project-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.phone-mockup {
    position: relative;
    width: clamp(180px, 18vw, 220px);
    border-radius: 42px;
    padding: 10px;
    background: linear-gradient(
        145deg,
        #2b2b2b,
        #0d0d0d
    );
    box-shadow:
        0 30px 80px rgba(0,0,0,.25),
        0 0 0 1px rgba(255,255,255,.08);
    transform: rotate(-6deg);
    transition: .35s ease;
}

.featured-project:hover .phone-mockup {
    transform: rotate(-2deg) translateY(-8px) scale(1.02);
}

.phone-screen {
    overflow: hidden;
    border-radius: 34px;
    background: #000;
}

.phone-screen img {
    display: block;
    width: 100%;
    height: auto;
}

/* Dynamic Island */

.phone-mockup::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 92px;
    height: 24px;
    border-radius: 999px;
    background: #000;
    z-index: 20;
}

/* Reflet */

.phone-mockup::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 42px;
    background:
        linear-gradient(
            120deg,
            rgba(255,255,255,.18),
            rgba(255,255,255,0) 35%
        );
    pointer-events: none;
}