@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Space Grotesk', sans-serif;
    background: #050208;
    color: #fff;
    overflow-x: hidden;
    cursor: default;
}

body.menu-open {
    overflow: hidden;
}

/* L'arrière-plan en canvas couvre toute la page */
#background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    filter: blur(100px);
    z-index: 0;
}

/* Tous les contenus sont au-dessus du canvas */
.content, .projects-header, .projects-gallery {
    position: relative;
    z-index: 1;
}

/* NAVIGATION - Effet liquid glass amélioré */
.navbar {
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    background: rgba(8, 4, 12, 0.4);
    backdrop-filter: blur(20px);
    padding: 10px;
    border-radius: 20px;
    box-shadow: 
        0 0 50px rgba(139, 92, 246, 0.15),
        0 10px 30px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    z-index: 1000;
    animation: navbarFadeIn 0.6s ease-out 0.2s backwards;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar.scrolled {
    background: rgba(8, 4, 12, 0.85);
    backdrop-filter: blur(40px);
    box-shadow: 
        0 0 80px rgba(139, 92, 246, 0.25),
        0 15px 40px rgba(0, 0, 0, 0.7),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    top: 25px;
    padding: 12px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: translateX(-50%) scale(1.02);
}

@keyframes navbarFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -30px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.nav-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 14px 32px;
    border-radius: 16px;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    letter-spacing: 0.04em;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(168, 85, 247, 0.1));
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: -1;
}

.nav-link:hover {
    color: #ffffff;
    transform: translateY(-2px);
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link:active {
    transform: translateY(0);
}

/* CONTENU PRINCIPAL */
.content {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 40px;
}

.text-container {
    text-align: center;
    max-width: 100%;
}

.main-title {
    font-size: clamp(60px, 12vw, 180px);
    font-weight: 700;
    line-height: 0.9;
    margin-bottom: 20px;
    position: relative;
}

.line {
    display: block;
    background: linear-gradient(to right, #fff 20%, #c4b5fd 50%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeUp 0.8s ease-out backwards;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.line:hover {
    letter-spacing: 0.05em;
    filter: drop-shadow(0 0 40px rgba(139, 92, 246, 0.4));
}

.line:nth-child(2) {
    animation-delay: 0.2s;
}

/* CONTAINER POUR LE SOUS-TITRE ET LES TRAITS */
.subtitle-container {
    position: relative;
    display: inline-block;
    margin-top: 40px;
}

.subtitle {
    font-size: clamp(18px, 3vw, 28px);
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    animation: fadeUp 0.8s ease-out 0.4s backwards;
    padding: 0 15px;
    transition: all 0.4s ease;
    cursor: default;
    max-width: 100%;
    word-break: keep-all;
    display: inline-block;
    position: relative;
    z-index: 2;
}

.subtitle:hover {
    letter-spacing: 0.35em;
    color: rgba(255, 255, 255, 1);
}

.subtitle-container::before,
.subtitle-container::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 1px;
    transition: all 0.4s ease;
    z-index: 1;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.4s forwards;
}

.subtitle-container::before {
    left: -60px;
    background: linear-gradient(90deg, transparent, #8b5cf6);
}

.subtitle-container::after {
    right: -60px;
    background: linear-gradient(90deg, #8b5cf6, transparent);
}

.subtitle-container:hover::before {
    width: 50px;
    left: -65px;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
}

.subtitle-container:hover::after {
    width: 50px;
    right: -65px;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* INDICATEUR DE SCROLL */
.scroll-indicator {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.scroll-text {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
    animation: scrollTextPulse 2s ease-in-out infinite;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(139, 92, 246, 0.8),
        transparent
    );
    animation: scrollLinePulse 2s ease-in-out infinite;
}

@keyframes scrollTextPulse {
    0%, 100% {
        opacity: 0.6;
        transform: translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateY(-5px);
    }
}

@keyframes scrollLinePulse {
    0%, 100% {
        height: 60px;
        opacity: 0.6;
    }
    50% {
        height: 80px;
        opacity: 1;
    }
}

/* MENU MOBILE */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: rgba(8, 4, 12, 0.5);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    cursor: pointer;
    z-index: 2000;
    box-shadow: 
        0 0 40px rgba(139, 92, 246, 0.15),
        0 5px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-menu-toggle.scrolled {
    top: 25px;
    background: rgba(8, 4, 12, 0.8);
    backdrop-filter: blur(35px);
    box-shadow: 
        0 0 60px rgba(139, 92, 246, 0.2),
        0 8px 25px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: scale(1.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: #8b5cf6;
    border-radius: 2px;
    transition: all 0.3s ease;
    display: block;
    position: absolute;
    left: 50%;
    margin-left: -12px;
}

.mobile-menu-toggle span:nth-child(1) {
    top: 20px;
}

.mobile-menu-toggle span:nth-child(2) {
    top: 26px;
}

.mobile-menu-toggle span:nth-child(3) {
    top: 32px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    top: 26px;
    transform: rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    top: 26px;
    transform: rotate(-45deg);
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(5, 2, 8, 0.95);
    backdrop-filter: blur(40px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 50px;
    z-index: 1500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
}

.mobile-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(139, 92, 246, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(168, 85, 247, 0.15) 0%, transparent 50%);
    filter: blur(100px);
}

.mobile-menu.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.4s ease;
    position: relative;
    cursor: pointer;
    z-index: 1;
    text-align: center;
    width: 100%;
}

.mobile-nav-link::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #8b5cf6, transparent);
    transition: width 0.4s ease;
}

.mobile-nav-link:active,
.mobile-nav-link:hover {
    color: #ffffff;
    transform: scale(1.05);
}

.mobile-nav-link:active::after,
.mobile-nav-link:hover::after {
    width: 80%;
}

/* SECTION TITRE DES PROJETS - SUR LE MÊME ARRIÈRE-PLAN */
.projects-header {
    padding: 120px 40px 60px;
    text-align: center;
    background: transparent;
}

.projects-header .section-title {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 700;
    background: linear-gradient(to right, #fff 30%, #c4b5fd 60%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.2s forwards;
}

.projects-header .section-subtitle {
    font-size: clamp(14px, 2vw, 18px);
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeUp 0.8s ease-out 0.4s forwards;
}

/* GALERIE D'IMAGES PLEINE LARGEUR - SUR LE MÊME ARRIÈRE-PLAN */
.projects-gallery {
    min-height: 100vh;
    padding: 0;
    overflow: hidden;
    width: 100%;
    background: transparent;
}

.gallery-container {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.gallery-wrapper {
    position: relative;
    height: 100%;
    width: 100%;
}

.gallery-track {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* SLIDE DE PROJET */
.project-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* IMAGE DU SLIDE */
.project-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.project-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
    transition: transform 1.2s ease, filter 0.8s ease;
}

.project-slide.active .project-image-container img {
    transform: scale(1.05);
    filter: brightness(0.85);
}

/* CONTENU DU SLIDE - Version simplifiée */
.project-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 40px;
    background: rgba(8, 4, 12, 0.7);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 0 40px;
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.8s ease 0.3s;
}

.project-slide.active .project-content {
    transform: translateY(0);
    opacity: 1;
}

/* TITRE DU PROJET */
.project-title {
    font-size: clamp(36px, 5vw, 48px);
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    line-height: 1.1;
    background: linear-gradient(to right, #fff 30%, #c4b5fd 60%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-year {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 30px;
}

/* BOUTON VOIR LE PROJET */
.project-link {
    display: inline-block;
    padding: 14px 40px;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 4px 25px rgba(139, 92, 246, 0.4);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.project-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(139, 92, 246, 0.6);
    border-color: rgba(255, 255, 255, 0.1);
}

/* FLÈCHES DE NAVIGATION */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 40px;
    z-index: 10;
    pointer-events: none;
}

.nav-arrow {
    width: 70px;
    height: 70px;
    background: rgba(8, 4, 12, 0.8);
    backdrop-filter: blur(25px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
    border: 1px solid rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 40px rgba(139, 92, 246, 0.2);
}

.nav-arrow i {
    font-size: 24px;
    color: #8b5cf6;
    transition: all 0.3s ease;
}

.nav-arrow:hover {
    background: rgba(139, 92, 246, 0.3);
    transform: scale(1.15);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 0 60px rgba(139, 92, 246, 0.4);
}

.nav-arrow:hover i {
    color: white;
    transform: scale(1.1);
}

.nav-arrow:active {
    transform: scale(0.95);
}

/* INDICATEURS DE PROGRESSION */
.gallery-indicators {
    position: absolute;
    bottom: 40px;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 15px;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #8b5cf6;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.4s ease;
}

.indicator.active::before {
    transform: scale(1);
}

.indicator:hover {
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

/* NUMÉRO DE SLIDE */
.slide-counter {
    position: absolute;
    bottom: 40px;
    right: 40px;
    z-index: 10;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    letter-spacing: 0.1em;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .navbar {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .content {
        padding: 0 30px;
    }
    
    .main-title {
        margin-bottom: 30px;
    }
    
    .subtitle {
        font-size: clamp(16px, 4vw, 20px);
        letter-spacing: 0.25em;
        padding: 0 15px;
    }
    
    .subtitle-container::before,
    .subtitle-container::after {
        width: 25px;
    }
    
    .subtitle-container::before {
        left: -40px;
    }
    
    .subtitle-container::after {
        right: -40px;
    }
    
    .subtitle-container:hover::before {
        width: 35px;
        left: -45px;
    }
    
    .subtitle-container:hover::after {
        width: 35px;
        right: -45px;
    }
    
    .subtitle:hover {
        letter-spacing: 0.28em;
    }
    
    .projects-header {
        padding: 100px 20px 50px;
    }
    
    .gallery-nav {
        padding: 0 20px;
    }
    
    .nav-arrow {
        width: 60px;
        height: 60px;
    }
    
    .nav-arrow i {
        font-size: 20px;
    }
    
    .project-content {
        padding: 30px;
        margin: 0 20px;
    }
    
    .project-title {
        font-size: clamp(28px, 8vw, 36px);
    }
    
    .project-year {
        font-size: 14px;
    }
    
    .gallery-indicators {
        bottom: 30px;
        gap: 12px;
    }
    
    .indicator {
        width: 10px;
        height: 10px;
    }
    
    .slide-counter {
        bottom: 30px;
        right: 30px;
    }
    
    .scroll-indicator {
        bottom: 30px;
    }
    
    .mobile-nav-link {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 0 25px;
    }
    
    .main-title {
        font-size: clamp(50px, 10vw, 80px);
    }
    
    .subtitle {
        font-size: clamp(14px, 3.5vw, 18px);
        letter-spacing: 0.2em;
        padding: 0 12px;
    }
    
    .subtitle-container::before,
    .subtitle-container::after {
        width: 20px;
    }
    
    .subtitle-container::before {
        left: -35px;
    }
    
    .subtitle-container::after {
        right: -35px;
    }
    
    .subtitle-container:hover::before {
        width: 30px;
        left: -40px;
    }
    
    .subtitle-container:hover::after {
        width: 30px;
        right: -40px;
    }
    
    .subtitle:hover {
        letter-spacing: 0.23em;
    }
    
    .projects-header {
        padding: 80px 15px 40px;
    }
    
    .gallery-nav {
        padding: 0 15px;
    }
    
    .nav-arrow {
        width: 50px;
        height: 50px;
    }
    
    .nav-arrow i {
        font-size: 18px;
    }
    
    .project-content {
        padding: 25px;
        margin: 0 15px;
    }
    
    .project-title {
        font-size: clamp(24px, 7vw, 30px);
    }
    
    .project-link {
        padding: 12px 30px;
        font-size: 13px;
    }
    
    .gallery-indicators {
        bottom: 25px;
        gap: 10px;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
    }
    
    .slide-counter {
        bottom: 25px;
        right: 25px;
        font-size: 12px;
    }
    
    .scroll-indicator {
        bottom: 20px;
    }
    
    .mobile-nav-link {
        font-size: 20px;
    }
    
    .mobile-menu {
        gap: 40px;
    }
    
    .mobile-menu-toggle {
        top: 25px;
        right: 25px;
        width: 45px;
        height: 45px;
    }
}