/* =================================
   SPATIAL PORTFOLIO - JOAN BEAULAYGUE
   Portfolio immersif type espace/cosmos
   ================================= */

/* === RESET & VARIABLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Couleurs spatiales */
    --space-black: #000000;
    --space-deep: #0a0a0f;
    --space-dark: #0f0f1a;
    --nebula-purple: #6b4c9a;
    --nebula-blue: #2d4a7c;
    --nebula-cyan: #1a5f7a;
    --star-white: #ffffff;
    --star-blue: #a8d8ff;
    --star-purple: #d4b5ff;
    --glow-cyan: #00ffff;
    --glow-pink: #ff00ff;
    --glow-blue: #0099ff;
    
    /* Typographie Apple-style */
    --font-primary: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', sans-serif;
    
    /* Espacements */
    --section-padding: clamp(4rem, 12vh, 8rem);
    --content-max: 1400px;
}

/* === BASE STYLES === */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background: var(--space-black);
    color: var(--star-white);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    font-feature-settings: "kern" 1, "liga" 1;
    text-rendering: optimizeLegibility;
}

/* Canvas 3D Background (optimisé) */
#space-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0;
    animation: fadeInCanvas 2s ease-out forwards;
    will-change: opacity;
}

@keyframes fadeInCanvas {
    to { opacity: 1; }
}

/* === CURSOR (Désactivé pour style Apple) === */
body {
    cursor: default;
}

a, button, .project-item {
    cursor: pointer;
}

/* === NAVIGATION (Mobile First) === */
.nav-spatial {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 100%);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

.nav-spatial.hidden {
    transform: translateY(-100%);
}

.nav-logo {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--glow-cyan), var(--glow-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--star-white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    position: relative;
    padding: 0.5rem 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.8;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--glow-cyan), var(--glow-pink));
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.nav-links a:hover {
    opacity: 1;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Desktop navigation */
@media (min-width: 769px) {
    .nav-spatial {
        padding: 2rem 4rem;
    }
    
    .nav-logo {
        font-size: clamp(1.2rem, 2vw, 1.5rem);
    }
    
    .nav-links {
        gap: 3rem;
    }
    
    .nav-links a {
        font-size: 0.95rem;
    }
}

/* === HERO SECTION (Mobile First) === */
.hero-spatial {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 5rem 1.5rem 3rem;
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    animation: heroAppear 1.5s ease-out 0.5s forwards;
}

@keyframes heroAppear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Photo de profil dans un cadre (Mobile) */
.hero-photo-frame {
    flex-shrink: 0;
    width: 260px;
    height: 330px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(255, 255, 255, 0.08);
    opacity: 0;
    animation: photoAppear 1s ease-out 0.8s forwards;
}

/* Desktop Hero */
@media (min-width: 769px) {
    .hero-spatial {
        padding: 2rem;
    }
    
    .hero-container {
        flex-direction: row;
        text-align: left;
        gap: 5rem;
    }
    
    .hero-photo-frame {
        width: 400px;
        height: 500px;
        border-radius: 20px;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
                    0 0 0 1px rgba(255, 255, 255, 0.08);
    }
}

@keyframes photoAppear {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-photo-frame::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--glow-cyan), var(--glow-pink));
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hero-photo-frame:hover::before {
    opacity: 0.3;
}

.hero-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(5%) brightness(1.05);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-photo-frame:hover img {
    filter: grayscale(0%) brightness(1.1);
    transform: scale(1.03);
}

/* Informations à droite (Mobile First) */
.hero-info {
    flex: 1;
    text-align: center;
}

@media (min-width: 769px) {
    .hero-info {
        text-align: left;
    }
}

/* === FILTER BUTTONS (Portfolio Projects) === */
.filter-bar {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    margin: 1.2rem 0 2rem;
}

.filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01));
    color: var(--star-white);
    border: 1px solid rgba(255,255,255,0.06);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    box-shadow: 0 6px 18px rgba(2,6,23,0.6), inset 0 1px 0 rgba(255,255,255,0.02);
    backdrop-filter: blur(8px) saturate(120%);
    transition: transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1),
                box-shadow 0.18s ease, opacity 0.18s ease, border-color 0.18s ease;
    cursor: pointer;
    opacity: 0.95;
}

/* Larger filter buttons on the projects page */
.projects-page .project-filters .filter-btn {
    padding: 0.9rem 1.4rem;
    font-size: 1.05rem;
    gap: 0.9rem;
    border-radius: 12px;
}

.projects-page .project-filters .filter-btn .filter-icon {
    width: 1.9rem;
    height: 1.9rem;
    font-size: 1.1rem;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
}

@media (max-width: 720px) {
    .projects-page .project-filters .filter-btn { padding: 0.7rem 1rem; font-size: 1rem; }
    .projects-page .project-filters .filter-btn .filter-icon { width: 1.6rem; height: 1.6rem; font-size: 1rem; }
}

.filter-btn .filter-icon {
    display: inline-grid;
    place-items: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    color: var(--star-white);
    font-size: 0.95rem;
}

.filter-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(2,6,23,0.7), inset 0 1px 0 rgba(255,255,255,0.03);
    opacity: 1;
}

.filter-btn.active {
    background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border-color: rgba(255,255,255,0.12);
    box-shadow: 0 10px 30px rgba(58,116,200,0.12), 0 2px 6px rgba(0,0,0,0.6);
    transform: translateY(-2px) scale(1.02);
}

.filter-btn:focus-visible {
    outline: 3px solid rgba(40,120,255,0.14);
    outline-offset: 4px;
}

/* Small responsive tweak */
@media (max-width: 720px) {
    .filter-bar { gap: 0.4rem; }
    .filter-btn { padding: 0.45rem 0.7rem; font-size: 0.85rem; }
    .filter-btn .filter-icon { width: 1.2rem; height: 1.2rem; }
}

.hero-subtitle {
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    color: var(--star-blue);
    margin-bottom: 0.8rem;
    font-weight: 400;
    opacity: 0.8;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 10vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #ffffff;
    letter-spacing: -0.03em;
    position: relative;
}

@media (min-width: 769px) {
    .hero-subtitle {
        font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    }
    
    .hero-title {
        font-size: clamp(3rem, 8vw, 5rem);
        line-height: 1;
    }
}

.hero-title .word {
    display: inline-block;
    animation: wordAppear 0.8s ease-out forwards;
}

.hero-title .word:nth-child(1) { animation-delay: 1s; }
.hero-title .word:nth-child(2) { 
    animation-delay: 1.2s;
    display: block;
}

@keyframes wordAppear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Diplôme (Mobile First) */
.hero-degree {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 1.4s forwards;
}

@media (min-width: 769px) {
    .hero-degree {
        font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-description {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.65);
    max-width: 100%;
    margin-bottom: 2rem;
    line-height: 1.6;
    font-weight: 400;
    letter-spacing: -0.01em;
}

@media (min-width: 769px) {
    .hero-description {
        font-size: clamp(1.05rem, 1.8vw, 1.25rem);
        max-width: 550px;
    }
}

/* Info stage (Mobile First) */
.hero-stage-info {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 1.6s forwards;
}

@media (min-width: 769px) {
    .hero-stage-info {
        font-size: clamp(0.9rem, 1.4vw, 1rem);
        padding: 0.8rem 1.5rem;
        gap: 0.6rem;
        margin-bottom: 2.5rem;
        background: rgba(0, 217, 255, 0.08);
        border: 1px solid rgba(0, 217, 255, 0.2);
    }
}

.stage-icon {
    font-size: 1.1rem;
}

/* Contact modal popup */
.contact-modal { display:none; position:fixed; inset:0; z-index:10000; }
.contact-modal[aria-hidden="false"] { display:block; }
.contact-modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,0.6); backdrop-filter:blur(2px); }
.contact-modal-card { position:relative; width:clamp(280px,40vw,520px); margin:10vh auto; background:#fff; border-radius:10px; padding:20px; box-shadow:0 12px 30px rgba(0,0,0,0.25); z-index:2; color:#111; }
.contact-modal-close { position:absolute; right:10px; top:8px; border:0; background:transparent; font-size:22px; line-height:1; cursor:pointer; }
.contact-modal-card h3 { margin:0 0 8px 0; }
.contact-modal-card p { margin:0 0 12px 0; color:#333; }
.contact-modal-actions { text-align:right; }
.contact-modal .btn { background:#111; color:#fff; border:0; padding:8px 14px; border-radius:6px; cursor:pointer; }

.stage-text {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    letter-spacing: -0.01em;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.9rem 1.8rem;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--space-black);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 980px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 1.8s forwards;
}

@media (min-width: 769px) {
    .hero-cta {
        padding: 1rem 2rem;
        font-size: 0.95rem;
        gap: 0.8rem;
    }
}

.hero-cta:hover {
    transform: scale(1.02);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 20px 60px rgba(255, 255, 255, 0.15);
}

.hero-cta:active {
    transform: scale(0.98);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fadeIn 1s ease-out 2s forwards;
}

@keyframes fadeIn {
    to { opacity: 0.7; }
}

.scroll-text {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.5);
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, var(--glow-cyan), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(10px); opacity: 0.3; }
}

/* === SECTIONS SPATIALES (Mobile First) === */
.section-spatial {
    min-height: 100vh;
    padding: 4rem 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 769px) {
    .section-spatial {
        padding: var(--section-padding) 4rem;
    }
}

.section-spatial.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-header {
    margin-bottom: 4rem;
    text-align: center;
}

.section-number {
    font-family: var(--font-display);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--glow-cyan);
    margin-bottom: 0.5rem;
    font-weight: 500;
    opacity: 0.6;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 600;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--star-white), var(--star-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

/* === PROJECTS GRID (SPATIAL LAYOUT) === */
.projects-spatial {
    max-width: var(--content-max);
    margin: 0 auto;
    position: relative;
}

/* === CATÉGORIES DE PROJETS === */
.project-category-section {
    margin-bottom: 8rem;
}

.category-header {
    text-align: center;
    margin-bottom: 5rem;
    padding: 0 2rem;
}

.category-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--glow-cyan), var(--glow-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.category-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
    letter-spacing: -0.01em;
}

.project-item {
    margin-bottom: 15rem;
    position: relative;
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-item:nth-child(even) .project-content {
    flex-direction: row-reverse;
}

.project-content {
    display: flex;
    gap: 4rem;
    align-items: center;
}

.project-visual {
    flex: 1.2;
    position: relative;
}

.project-image {
    width: 100%;
    height: auto;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    transform: scale(1);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.project-item:hover .project-image {
    box-shadow: 0 20px 60px rgba(0, 255, 255, 0.2);
}

.project-image img {
    width: 100%;
    height: auto;
    display: block;
    filter: brightness(0.95) contrast(1.05);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-item:hover .project-image img {
    filter: brightness(1) contrast(1.1);
}

/* Effet de lueur autour de l'image (version subtile Apple) */
.project-image::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(135deg, rgba(0,255,255,0.15), rgba(255,0,255,0.15));
    opacity: 0;
    z-index: -1;
    filter: blur(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
}

.project-item:hover .project-image::before {
    opacity: 1;
}

/* Lazy loading images */
.lazy-load {
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Website Preview with iframe */
.project-website-preview {
    position: relative;
    height: 450px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(31, 41, 55, 0.95));
}

.website-iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 16px;
    transform: scale(1);
    transform-origin: top left;
    transition: transform 0.3s ease;
}

.website-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
    z-index: 5;
}

.project-website-preview:hover .website-overlay {
    opacity: 1;
}

.visit-site-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--glow-cyan), var(--glow-purple));
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.visit-site-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.5);
}

/* Platform Badges */
.platform-badges {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.platform-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.8rem;
    background: rgba(17, 24, 39, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--glow-cyan);
    transition: all 0.3s ease;
}

.platform-badge:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--glow-cyan);
    transform: translateY(-2px);
}

.platform-badge svg {
    width: 14px;
    height: 14px;
}

/* === BEFORE/AFTER SLIDER === */
.before-after-slider {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
}

.before-after-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 66.67%; /* Aspect ratio 3:2 */
    overflow: hidden;
    user-select: none;
}

.before-image,
.after-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.before-image,
.after-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.after-image-wrapper {
    clip-path: inset(0 0 0 50%);
    will-change: clip-path;
}

/* Slider Handle */
.slider-handle {
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: 100%;
    transform: translateX(-50%);
    cursor: ew-resize;
    z-index: 10;
    will-change: left;
}

.slider-line {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: var(--glow-cyan);
    box-shadow: 0 0 20px var(--glow-cyan);
    transform: translateX(-50%);
}

.slider-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 0 30px rgba(0, 255, 255, 0.6),
                0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.slider-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.8),
                0 6px 30px rgba(0, 0, 0, 0.4);
}

.slider-button svg {
    width: 20px;
    height: 20px;
    stroke: var(--space-dark);
    stroke-width: 3;
}

/* Labels Avant/Après */
.ba-label {
    position: absolute;
    top: 20px;
    padding: 0.5rem 1.2rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    border-radius: 20px;
    z-index: 5;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ba-label-before {
    left: 20px;
}

.ba-label-after {
    right: 20px;
    background: rgba(0, 255, 255, 0.2);
    border-color: var(--glow-cyan);
    color: var(--glow-cyan);
}

/* Video project */
.project-video {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 16px;
}

/* Container pour la vidéo avec overlay */
.project-image:has(.project-video) {
    position: relative;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    border-radius: 16px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10;
    cursor: pointer;
}

.video-overlay-icon {
    font-size: 4rem;
    color: var(--glow-cyan);
    animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes pulse-icon {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.video-overlay-text {
    font-size: 1.2rem;
    color: var(--star-white);
    font-weight: 500;
    text-align: center;
    max-width: 300px;
}

/* YouTube embed */
.youtube-embed {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 16px;
}

.youtube-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 16px;
}

.project-video-container {
    overflow: hidden;
    border-radius: 16px;
}

.project-image:has(.project-video):hover .video-overlay {
    opacity: 0;
    visibility: hidden;
}

/* Gallery grid pour DataViz */
.project-gallery {
    padding: 0 !important;
    overflow: visible !important;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0.8rem;
    width: 100%;
    height: 100%;
}

/* Galerie carrousel - grille 2x2 égale */
.gallery-carrousel {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1rem;
}

.gallery-carrousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-carrousel img:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
    z-index: 2;
}

.gallery-main {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 16px;
}

.gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 255, 255, 0.3);
    z-index: 2;
}

.gallery-badge {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background: rgba(0, 255, 255, 0.9);
    color: var(--space-black);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    z-index: 3;
}

.project-info {
    flex: 1;
}

.project-category {
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    color: var(--glow-cyan);
    margin-bottom: 1rem;
    font-weight: 500;
    opacity: 0.8;
}

.project-name {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: var(--star-white);
    letter-spacing: -0.02em;
}

.project-description {
    font-size: 1.05rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.65);
    margin-bottom: 2rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.project-tag {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 20px;
    color: rgba(255,255,255,0.75);
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.01em;
}

.project-tag:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.95);
    transform: translateY(-2px);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-link:hover {
    gap: 0.8rem;
    color: rgba(255,255,255,1);
}

.project-link::after {
    content: '→';
    font-size: 1.2rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-link:hover::after {
    transform: translateX(4px);
}

/* === ABOUT SECTION === */
.about-spatial {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    line-height: 1.6;
    color: rgba(255,255,255,0.7);
    margin-bottom: 3rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.about-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 600;
    background: linear-gradient(135deg, var(--glow-cyan), var(--glow-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.95rem;
    letter-spacing: -0.01em;
    color: rgba(255,255,255,0.5);
    font-weight: 400;
}

/* === IA EXPERTISE SECTION === */
.ai-expertise {
    margin-top: 4rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(168, 85, 247, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.ai-expertise::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    animation: rotate-glow 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate-glow {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 50px;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.ai-icon {
    color: var(--glow-purple);
    animation: rotate-icon 10s linear infinite;
}

@keyframes rotate-icon {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.ai-label {
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--glow-cyan), var(--glow-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    position: relative;
    z-index: 1;
}

/* === CONTACT SECTION === */
.contact-spatial {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.contact-text {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    line-height: 1.6;
    color: rgba(255,255,255,0.65);
    margin-bottom: 3rem;
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Messages de retour */
.contact-message {
    max-width: 600px;
    margin: 2rem auto;
    padding: 1.2rem 2rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    animation: slideInDown 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.success-message {
    background: rgba(74, 222, 128, 0.15);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ade80;
}

.error-message {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Conteneur du formulaire */
.contact-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

/* Formulaire */
.contact-form {
    background: rgba(15, 15, 26, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(107, 76, 154, 0.3);
    border-radius: 20px;
    padding: 3rem;
    text-align: left;
    transition: all 0.3s ease;
}

.contact-form:hover {
    border-color: rgba(0, 255, 255, 0.3);
    box-shadow: 0 10px 40px rgba(0, 255, 255, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--star-blue);
    margin-bottom: 0.6rem;
    letter-spacing: 0.02em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    font-size: 1rem;
    font-family: var(--font-primary);
    color: var(--star-white);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(107, 76, 154, 0.3);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--glow-cyan);
    box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.1),
                0 5px 20px rgba(0, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.6);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* Bouton submit */
.submit-btn {
    width: 100%;
    padding: 1.2rem 2rem;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: var(--font-primary);
    color: var(--space-black);
    background: linear-gradient(135deg, var(--glow-cyan) 0%, var(--glow-blue) 100%);
    border: none;
    border-radius: 980px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 255, 255, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.btn-icon {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.submit-btn:hover .btn-icon {
    transform: translateX(5px);
}

/* Infos de contact supplémentaires */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(15, 15, 26, 0.4);
    border: 1px solid rgba(107, 76, 154, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.contact-info-item:hover {
    border-color: rgba(107, 76, 154, 0.4);
    background: rgba(15, 15, 26, 0.6);
}

.info-icon {
    font-size: 2rem;
    line-height: 1;
}

.info-content {
    flex: 1;
    text-align: left;
}

.info-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.info-value {
    font-size: 1.05rem;
    color: var(--glow-cyan);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.info-value:hover {
    color: var(--star-blue);
}

.social-links-inline {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-links-inline a {
    font-size: 0.95rem;
    color: var(--star-purple);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.social-links-inline a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--glow-cyan);
    transition: width 0.3s ease;
}

.social-links-inline a:hover {
    color: var(--glow-cyan);
}

.social-links-inline a:hover::after {
    width: 100%;
}

/* Responsive formulaire */
@media (max-width: 768px) {
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .contact-info-item {
        flex-direction: column;
        text-align: center;
    }
    
    .info-content {
        text-align: center;
    }
    
    .social-links-inline {
        justify-content: center;
    }
}

/* Anciens styles de contact (à garder pour compatibilité) */

.contact-btn {
    padding: 1rem 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    text-decoration: none;
    color: var(--star-white);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 980px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.contact-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
    transform: scale(1.02);
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.1);
}

.contact-btn:active {
    transform: scale(0.98);
}

/* === FOOTER === */
.footer-spatial {
    padding: 3rem 4rem;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.5) 100%);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--content-max);
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-text {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
}

.footer-socials {
    display: flex;
    gap: 2rem;
}

.social-link {
    color: rgba(255,255,255,0.6);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--glow-cyan);
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .nav-spatial {
        padding: 1.5rem 2rem;
    }
    
    .nav-links {
        gap: 2rem;
    }
    
    .hero-container {
        flex-direction: column;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-photo-frame {
        width: 300px;
        height: 380px;
    }
    
    .hero-info {
        text-align: center;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .project-content {
        flex-direction: column !important;
        gap: 2rem;
    }
    
    .project-item {
        margin-bottom: 8rem;
    }
}

@media (max-width: 768px) {
    .section-spatial {
        padding: var(--section-padding) 2rem;
    }
    
    .nav-links {
        display: none;
    }
    
    .hero-spatial {
        padding: 1rem;
    }
    
    .hero-photo-frame {
        width: 280px;
        height: 350px;
    }
    
    .hero-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }
    
    .hero-stage-info {
        flex-direction: column;
        gap: 0.3rem;
        text-align: center;
    }
    
    .about-stats {
        gap: 2rem;
    }
    
    .contact-methods {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* === ANIMATIONS AVANCÉES (GPU accelerated) === */
@keyframes float {
    0%, 100% { transform: translateY(0) translateZ(0); }
    50% { transform: translateY(-20px) translateZ(0); }
}

@keyframes rotate {
    from { transform: rotate(0deg) translateZ(0); }
    to { transform: rotate(360deg) translateZ(0); }
}

@keyframes glow {
    0%, 100% { opacity: 0.5; filter: blur(10px); }
    50% { opacity: 1; filter: blur(20px); }
}

/* Particules flottantes (optimisé) */
.particle {
    position: fixed;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.6;
    will-change: transform;
    animation: float 10s ease-in-out infinite;
}

/* === PAGE HEADER (pour page Projets) === */
.page-header-spatial {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    position: relative;
}

.page-header-content {
    max-width: 800px;
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-subtitle {
    font-size: 0.9rem;
    letter-spacing: 0.15em;
    color: var(--glow-cyan);
    text-transform: uppercase;
    margin-bottom: 1rem;
    font-weight: 500;
}

.page-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--star-white) 0%, var(--star-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-description {
    font-size: 1.15rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

.projects-page {
    padding-top: 2rem;
}

.nav-links a.active {
    color: var(--glow-cyan);
    position: relative;
}

.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 2px;
    background: var(--glow-cyan);
    box-shadow: 0 0 10px var(--glow-cyan);
}

/* === TIMELINE (Frise Chronologique) === */
.timeline-section {
    padding: var(--section-padding) 4rem;
}

.section-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 1rem;
    font-weight: 400;
}

/* === TIMELINE (Mobile First) === */
.timeline-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    padding: 2rem 0;
}

/* Ligne verticale de la timeline */
.timeline-container::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        var(--glow-cyan) 10%,
        var(--glow-cyan) 90%,
        transparent 100%
    );
    box-shadow: 0 0 15px var(--glow-cyan);
}

@media (min-width: 769px) {
    .timeline-container::before {
        left: 30px;
        box-shadow: 0 0 20px var(--glow-cyan);
    }
}

.timeline-item {
    position: relative;
    padding-left: 50px;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 769px) {
    .timeline-item {
        padding-left: 80px;
        margin-bottom: 6rem;
    }
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Timeline item petit (pour les intérêts personnels) */
.timeline-item-small {
    margin-bottom: 2rem;
}

@media (min-width: 769px) {
    .timeline-item-small {
        margin-bottom: 3rem;
    }
    
    .timeline-item-small .timeline-content {
        max-width: 65%;
        padding: 1.5rem;
        background: rgba(15, 15, 26, 0.5);
        border-color: rgba(107, 76, 154, 0.25);
    }
}

.timeline-item-small .timeline-dot {
    width: 12px;
    height: 12px;
    border-width: 2px;
}

@media (min-width: 769px) {
    .timeline-item-small .timeline-dot {
        width: 14px;
        height: 14px;
    }
}

/* Point de la timeline */
.timeline-dot {
    position: absolute;
    left: 7px;
    top: 8px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--space-dark);
    border: 3px solid var(--glow-cyan);
    box-shadow: 0 0 15px var(--glow-cyan),
                inset 0 0 8px rgba(0, 255, 255, 0.3);
    z-index: 2;
    transition: all 0.3s ease;
}

@media (min-width: 769px) {
    .timeline-dot {
        left: 22px;
        width: 18px;
        height: 18px;
        box-shadow: 0 0 20px var(--glow-cyan),
                    inset 0 0 10px rgba(0, 255, 255, 0.3);
    }
    
    .timeline-item:hover .timeline-dot {
        transform: scale(1.3);
        box-shadow: 0 0 30px var(--glow-cyan),
                    inset 0 0 15px rgba(0, 255, 255, 0.5);
    }
}

/* Point actif (en cours) */
.timeline-item.active .timeline-dot {
    background: var(--glow-cyan);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px var(--glow-cyan),
                    inset 0 0 10px rgba(0, 255, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 40px var(--glow-cyan),
                    0 0 60px rgba(0, 255, 255, 0.4),
                    inset 0 0 15px rgba(0, 255, 255, 0.6);
    }
}

/* Contenu de la timeline (Mobile First) */
.timeline-content {
    background: rgba(15, 15, 26, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(107, 76, 154, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 769px) {
    .timeline-content {
        border-radius: 16px;
        padding: 2rem;
    }
    
    .timeline-item:hover .timeline-content {
        border-color: var(--glow-cyan);
        box-shadow: 0 10px 40px rgba(0, 255, 255, 0.1);
        transform: translateX(10px);
    }
}

.timeline-date {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--glow-cyan);
    background: rgba(0, 255, 255, 0.1);
    padding: 0.35rem 0.9rem;
    border-radius: 20px;
    margin-bottom: 0.8rem;
}

@media (min-width: 769px) {
    .timeline-date {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
        margin-bottom: 1rem;
    }
}

.timeline-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--star-white);
    line-height: 1.3;
}

@media (min-width: 769px) {
    .timeline-title {
        font-size: 1.6rem;
        line-height: 1.2;
    }
}

.timeline-location {
    font-size: 0.9rem;
    color: var(--star-blue);
    margin-bottom: 0.8rem;
    font-weight: 500;
}

@media (min-width: 769px) {
    .timeline-location {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
}

.timeline-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1rem;
}

@media (min-width: 769px) {
    .timeline-description {
        font-size: 1rem;
        line-height: 1.7;
        margin-bottom: 1.5rem;
    }
}

.timeline-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.8rem;
}

@media (min-width: 769px) {
    .timeline-skills {
        gap: 0.6rem;
        margin-bottom: 1rem;
    }
}

.timeline-skill {
    font-size: 0.75rem;
    padding: 0.35rem 0.8rem;
    background: rgba(107, 76, 154, 0.2);
    border: 1px solid rgba(107, 76, 154, 0.4);
    border-radius: 20px;
    color: var(--star-purple);
    font-weight: 500;
    transition: all 0.3s ease;
}

@media (min-width: 769px) {
    .timeline-skill {
        font-size: 0.8rem;
        padding: 0.4rem 0.9rem;
    }
    
    .timeline-skill:hover {
        background: rgba(107, 76, 154, 0.3);
        border-color: var(--nebula-purple);
        transform: translateY(-2px);
    }
}

.timeline-achievement {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #4ade80;
    font-weight: 600;
    margin-top: 0.8rem;
    padding: 0.45rem 0.9rem;
    background: rgba(74, 222, 128, 0.1);
    border-radius: 8px;
}

@media (min-width: 769px) {
    .timeline-achievement {
        gap: 0.5rem;
        font-size: 0.9rem;
        margin-top: 1rem;
        padding: 0.5rem 1rem;
    }
}

.timeline-current {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--glow-cyan);
    font-weight: 600;
    margin-top: 0.8rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
}

@media (min-width: 769px) {
    .timeline-current {
        gap: 0.6rem;
        font-size: 0.95rem;
        margin-top: 1rem;
        padding: 0.6rem 1.2rem;
    }
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--glow-cyan);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}

/* === SKILLS MARQUEE (Bandes de compétences) === */
.skills-marquee-section {
    position: relative;
    width: 100%;
    padding: 4rem 0;
    overflow: hidden;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(107, 76, 154, 0.05) 50%,
        transparent 100%
    );
}

/* Bandes individuelles */
.marquee-band {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 0.8rem 0;
    white-space: nowrap;
}

/* Rotation des bandes pour effet croisé */
.marquee-band-1 {
    transform: rotate(-2deg);
    background: linear-gradient(
        90deg,
        rgba(0, 255, 255, 0.05) 0%,
        rgba(107, 76, 154, 0.1) 50%,
        rgba(0, 255, 255, 0.05) 100%
    );
    border-top: 1px solid rgba(0, 255, 255, 0.2);
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    margin-bottom: 2rem;
}

.marquee-band-2 {
    transform: rotate(1.5deg);
    background: linear-gradient(
        90deg,
        rgba(155, 89, 182, 0.05) 0%,
        rgba(107, 76, 154, 0.15) 50%,
        rgba(155, 89, 182, 0.05) 100%
    );
    border-top: 1px solid rgba(155, 89, 182, 0.25);
    border-bottom: 1px solid rgba(155, 89, 182, 0.25);
    margin-bottom: 2rem;
}

.marquee-band-3 {
    transform: rotate(-1deg);
    background: linear-gradient(
        90deg,
        rgba(0, 153, 255, 0.05) 0%,
        rgba(45, 74, 124, 0.1) 50%,
        rgba(0, 153, 255, 0.05) 100%
    );
    border-top: 1px solid rgba(0, 153, 255, 0.2);
    border-bottom: 1px solid rgba(0, 153, 255, 0.2);
}

/* Conteneur de défilement */
.marquee-content {
    display: inline-flex;
    align-items: center;
    animation: marquee 40s linear infinite;
    will-change: transform;
}

/* Animation inversée pour la 2ème bande */
.marquee-reverse {
    animation: marquee-reverse 35s linear infinite;
}

/* Items individuels */
.marquee-item {
    display: inline-block;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 2.2rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0 2rem;
    color: transparent;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.9) 0%,
        rgba(168, 216, 255, 0.7) 50%,
        rgba(212, 181, 255, 0.8) 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    text-shadow: 0 0 30px rgba(0, 255, 255, 0.3);
    position: relative;
    transition: all 0.3s ease;
}

/* Effet au survol */
.marquee-item:hover {
    text-shadow: 0 0 40px rgba(0, 255, 255, 0.6),
                 0 0 60px rgba(0, 255, 255, 0.4);
    transform: scale(1.05);
}

/* Séparateur entre les items */
.marquee-item::after {
    content: '•';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(0, 255, 255, 0.3);
    font-size: 0.5em;
}

/* Animations de défilement */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes marquee-reverse {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* Dégradés de fondu sur les bords */
.marquee-band::before,
.marquee-band::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.marquee-band::before {
    left: 0;
    background: linear-gradient(
        90deg,
        var(--space-black) 0%,
        transparent 100%
    );
}

.marquee-band::after {
    right: 0;
    background: linear-gradient(
        270deg,
        var(--space-black) 0%,
        transparent 100%
    );
}

/* Responsive Marquee */
@media (max-width: 768px) {
    .marquee-item {
        font-size: clamp(1rem, 4vw, 1.5rem);
        padding: 0 1.5rem;
    }
    
    .marquee-band {
        padding: 0.6rem 0;
        margin-bottom: 1.5rem !important;
    }
    
    .marquee-band-1 {
        transform: rotate(-3deg);
    }
    
    .marquee-band-2 {
        transform: rotate(2deg);
    }
    
    .marquee-band-3 {
        transform: rotate(-2deg);
    }
    
    .skills-marquee-section {
        padding: 3rem 0;
    }
}

/* ===================================
   BURGER MENU (Mobile Navigation)
   =================================== */

.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

/* Hide close button on desktop (only for mobile burger menu) */
.nav-close {
    display: none;
}

.burger-line {
    width: 100%;
    height: 2px;
    background: var(--star-white);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.burger-menu[aria-expanded="true"] .burger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.burger-menu[aria-expanded="true"] .burger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.burger-menu[aria-expanded="true"] .burger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* === TABLET & BELOW (< 1024px) === */
@media (max-width: 1024px) {
    :root {
        --section-padding: clamp(3rem, 8vh, 6rem);
    }
    
    .nav-spatial {
        padding: 1.5rem 2.5rem;
    }
    
    .hero-container {
        gap: 3rem;
    }
    
    .hero-photo-frame {
        width: 320px;
        height: 420px;
    }
    
    .timeline-container {
        padding: 0 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 2rem;
    }
}

/* === MOBILE & SMALL TABLETS (< 768px) === */
@media (max-width: 768px) {
    :root {
        --section-padding: clamp(2.5rem, 6vh, 4rem);
    }
    
    /* === NAVIGATION MOBILE === */
    .nav-spatial {
        padding: 1rem 1.5rem;
        background: rgba(0,0,0,0.95);
        backdrop-filter: blur(20px);
    }
    
    .burger-menu {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 280px;
        max-width: 85vw;
        background: rgba(10,10,15,0.98);
        backdrop-filter: blur(20px);
        border-left: 1px solid rgba(255,255,255,0.08);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        padding: 2rem;
        transition: right 0.3s ease;
        box-shadow: -10px 0 40px rgba(0,0,0,0.5);
        z-index: 10000;
        list-style: none;
        margin: 0;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links li {
        width: 100%;
        text-align: center;
        list-style: none;
        opacity: 1;
        transform: none;
    }
    
    /* Close button inside menu */
    .nav-close {
        display: flex; /* Show on mobile */
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        width: 40px;
        height: 40px;
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: 50%;
        cursor: pointer;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        z-index: 10001;
    }
    
    .nav-close span {
        font-size: 2rem;
        color: var(--star-white);
        line-height: 1;
        font-weight: 300;
    }
    
    .nav-close:hover {
        background: rgba(255,255,255,0.1);
        border-color: rgba(255,255,255,0.2);
        transform: rotate(90deg);
    }
    
    .nav-links a {
        font-size: 1.2rem;
        padding: 1rem;
        display: block;
        width: 100%;
    }
    
    .nav-links a::after {
        bottom: 0.5rem;
    }
    
    /* === HERO MOBILE === */
    .hero-spatial {
        padding: 5rem 1.5rem 3rem;
        min-height: auto;
    }
    
    .hero-container {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-photo-frame {
        width: 280px;
        height: 350px;
        margin: 0 auto;
    }
    
    .hero-info {
        text-align: center;
    }
    
    .hero-title {
        font-size: clamp(2.5rem, 12vw, 3.5rem);
    }
    
    .hero-description {
        max-width: 100%;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cta-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* === TIMELINE MOBILE === */
    .timeline-container {
        padding: 0 1rem;
    }
    
    .timeline-item {
        padding-left: 2.5rem;
        margin-bottom: 2.5rem;
    }
    
    .timeline-item::before {
        left: 0;
        width: 12px;
        height: 12px;
    }
    
    .timeline-item::after {
        left: 5px;
        width: 2px;
    }
    
    .timeline-year {
        font-size: 0.85rem;
        margin-bottom: 0.4rem;
    }
    
    .timeline-title {
        font-size: 1.2rem;
    }
    
    .timeline-subtitle {
        font-size: 0.95rem;
    }
    
    .timeline-description {
        font-size: 0.9rem;
    }
    
    /* === PROJECTS MOBILE === */
    .page-header-spatial {
        padding: 6rem 1.5rem 3rem;
    }
    
    .page-title {
        font-size: clamp(2.5rem, 10vw, 3.5rem);
    }
    
    .project-filters {
        flex-wrap: wrap;
        gap: 0.8rem;
        justify-content: center;
    }
    
    .projects-page .project-filters .filter-btn {
        padding: 0.7rem 1.1rem;
        font-size: 0.95rem;
    }
    
    .projects-page .project-filters .filter-btn .filter-icon {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.95rem;
    }
    
    .projects-spatial {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 0 1.5rem;
    }
    
    .project-item {
        padding: 1.5rem;
    }
    
    .project-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .project-visual,
    .project-info {
        width: 100%;
    }
    
    .project-name {
        font-size: 1.5rem;
    }
    
    .project-tags {
        flex-wrap: wrap;
    }
    
    /* === CONTACT MOBILE === */
    .contact-container {
        flex-direction: column;
        gap: 2rem;
    }
    
    .contact-form {
        width: 100%;
        padding: 0;
    }
    
    .form-row {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .form-group {
        width: 100%;
    }
    
    .contact-info {
        width: 100%;
        gap: 1.5rem;
    }
    
    /* === MODAL MOBILE === */
    .contact-modal-card {
        width: 90%;
        margin: 20vh auto;
        padding: 1.5rem;
    }
    
    /* === STATS MOBILE === */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    /* === FOOTER MOBILE === */
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .footer-socials {
        gap: 1.5rem;
    }
}

/* === SMALL MOBILE (< 480px) === */
@media (max-width: 480px) {
    .nav-spatial {
        padding: 1rem;
    }
    
    .nav-logo {
        font-size: 1.1rem;
    }
    
    .nav-links {
        width: 100%;
        padding: 1.5rem;
    }
    
    .hero-spatial {
        padding: 4rem 1rem 2rem;
    }
    
    .hero-photo-frame {
        width: 240px;
        height: 300px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle,
    .hero-degree {
        font-size: 0.85rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-stage-info {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .stage-icon {
        font-size: 0.9rem;
    }
    
    .hero-cta {
        padding: 0.8rem 1.5rem;
        font-size: 0.85rem;
        gap: 0.6rem;
    }
    
    .btn-text {
        font-size: 0.85rem;
    }
    
    .btn-icon {
        font-size: 1rem;
    }
    
    /* Hide scroll indicator on mobile */
    .scroll-indicator {
        display: none;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-number {
        font-size: 0.8rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    /* === ABOUT SECTION MOBILE === */
    .about-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-card {
        padding: 1.5rem;
    }
    
    .about-card h3 {
        font-size: 1.3rem;
    }
    
    .about-card p {
        font-size: 0.95rem;
    }
    
    /* === GALLERY GRIDS MOBILE === */
    .gallery-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .gallery-carrousel {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .project-gallery img,
    .project-gallery video {
        aspect-ratio: 16/9;
        object-fit: cover;
    }
    
    /* === VIDEO OVERLAY MOBILE === */
    .video-overlay-text {
        font-size: 0.85rem;
        padding: 0.5rem;
    }
    
    .video-overlay-icon {
        font-size: 2rem;
    }
    
    /* Tap to play instruction on mobile */
    .project-image:has(.project-video) .video-overlay-text::after {
        content: ' (touche pour lire)';
    }
    
    .page-header-spatial {
        padding: 5rem 1rem 2.5rem;
    }
    
    .page-subtitle {
        font-size: 0.85rem;
    }
    
    .page-description {
        font-size: 0.95rem;
    }
    
    .project-filters {
        gap: 0.6rem;
    }
    
    .projects-page .project-filters .filter-btn {
        padding: 0.6rem 0.9rem;
        font-size: 0.85rem;
        gap: 0.6rem;
    }
    
    .projects-page .project-filters .filter-btn .filter-icon {
        width: 1.3rem;
        height: 1.3rem;
        font-size: 0.85rem;
    }
    
    .projects-spatial {
        padding: 0 1rem;
        gap: 2.5rem;
    }
    
    .project-item {
        padding: 1rem;
    }
    
    .project-category {
        font-size: 0.75rem;
    }
    
    .project-name {
        font-size: 1.3rem;
    }
    
    .project-description {
        font-size: 0.9rem;
    }
    
    .project-tag {
        padding: 0.3rem 0.7rem;
        font-size: 0.7rem;
    }
    
    .timeline-item {
        padding-left: 2rem;
        margin-bottom: 2rem;
    }
    
    .timeline-item::before {
        width: 10px;
        height: 10px;
    }
    
    .timeline-title {
        font-size: 1.1rem;
    }
    
    .timeline-subtitle {
        font-size: 0.85rem;
    }
    
    .timeline-description {
        font-size: 0.85rem;
    }
    
    .contact-text {
        font-size: 1rem;
    }
    
    .form-group label {
        font-size: 0.85rem;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 0.95rem;
        padding: 0.8rem 1rem;
    }
    
    .submit-btn {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .contact-info-item {
        padding: 1rem;
    }
    
    .info-icon {
        font-size: 1.5rem;
    }
    
    .info-label {
        font-size: 0.75rem;
    }
    
    .info-value {
        font-size: 0.9rem;
    }
    
    .stats-grid {
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .footer-text {
        font-size: 0.85rem;
    }
    
    .social-link {
        font-size: 0.85rem;
    }
}

/* === LANDSCAPE MOBILE (max-height: 500px and orientation: landscape) === */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-spatial {
        min-height: auto;
        padding: 3rem 1.5rem;
    }
    
    .hero-container {
        flex-direction: row;
        gap: 2rem;
    }
    
    .hero-photo-frame {
        width: 200px;
        height: 280px;
    }
    
    .nav-links {
        height: 100vh;
        justify-content: flex-start;
        padding-top: 4rem;
        gap: 1.5rem;
    }
}

/* === TOUCH DEVICE IMPROVEMENTS === */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .nav-links a {
        padding: 1.2rem;
        min-height: 44px;
    }
    
    .filter-btn {
        min-height: 44px;
        padding: 0.8rem 1.2rem;
    }
    
    .submit-btn {
        min-height: 48px;
    }
    
    .burger-menu {
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .project-item:hover {
        transform: none;
    }
    
    .hero-photo-frame:hover img {
        transform: none;
    }
    
    .nav-links a:hover::after {
        width: 0;
    }
}
