/* ==========================================================================
   1. VARIABLES & FONTS
   ========================================================================== */
@font-face {
    font-family: 'Switzer';
    src: url('ASSET/FONT/Switzer-Variable.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap; 
}

:root {
    --color-bg: #0B0B0B;
    --color-text: #ffffff;
    --color-text-muted: #888888;
    
    --pad-x: 20px; 
    --pad-y: 2rem;
    
    --font-main: 'Switzer', sans-serif;
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background-color: var(--color-bg); color: var(--color-text); font-family: var(--font-main); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }

/* ==========================================================================
   3. CLASSES UTILITAIRES & TYPOGRAPHIE
   ========================================================================== */
.pad-global { padding-left: var(--pad-x); padding-right: var(--pad-x); }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.w-100 { width: 100%; }
.mb-small { margin-bottom: 0.5rem; }
.mb-large { margin-bottom: 2.5rem; }
.block { display: block; line-height: 1.4; }
.mix-blend { mix-blend-mode: difference; z-index: 100; position: relative; }
.img-fluid { max-width: 100%; height: auto; display: block; }
.desktop-only { display: block; }
.overflow-hidden { overflow: hidden; }

.hover-gray { transition: color 0.3s ease; }
.hover-gray:hover { color: var(--color-text-muted); }
.hover-target { cursor: pointer; }

.heading-large { font-size: clamp(2.5rem, 4.2vw, 4.5rem); line-height: 1.1; font-weight: 500; }
.text-regular { font-size: 0.95rem; }
.text-muted { color: var(--color-text-muted); }
.text-label { color: #555555; font-size: 1rem; line-height: 1.5rem; }
.align-bottom { align-items: flex-end; }

/* ==========================================================================
   4. COMPOSANTS GLOBAUX (Curseur, Header, Footer)
   ========================================================================== */
#custom-cursor { position: fixed; top: 0; left: 0; background-color: #333333; color: #ffffff; padding: 6px 14px; font-size: 0.85rem; font-weight: 500; pointer-events: none; z-index: 9999; transform: translate(15px, 15px) scale(0.8); opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease; white-space: nowrap; }
#custom-cursor.active { opacity: 1; transform: translate(15px, 15px) scale(1); }

.header { position: fixed; top: 0; left: 0; width: 100%; padding-top: 20px; padding-bottom: 20px; z-index: 100; }
.logo-img { height: 45px; width: auto; display: block; }
.logo-img-small { height: 40px; width: auto; }

.menu-btn { background: none; border: none; color: white; display: flex; align-items: center; gap: 12px; padding: 0; cursor: pointer; font-family: inherit; }
.menu-icon { position: relative; width: 16px; height: 16px; display: flex; justify-content: center; align-items: center; }
.line { position: absolute; background: white; border-radius: 2px; }
.line-1 { width: 100%; height: 1.5px; }
.line-2 { width: 1.5px; height: 100%; }

.menu-text-wrapper { position: relative; height: 1.2em; width: 55px; overflow: hidden; text-align: left; }
.menu-text-label { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; }
.label-close { top: 100%; }

.menu-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); z-index: 80; opacity: 0; visibility: hidden; pointer-events: none; }
.menu-panel { position: fixed; top: 0; right: 0; width: 45vw; height: 100vh; background: var(--color-bg); z-index: 90; transform: translateX(100%); display: flex; flex-direction: column; justify-content: center; gap: 6rem; }
.menu-link { font-size: clamp(3rem, 5vw, 5rem); font-weight: 500; line-height: 1.1; display: block; transition: color 0.3s ease; }
.menu-link:hover { color: var(--color-text-muted); }
.menu-footer { display: flex; gap: 4rem; }

.bottom-stack { position: relative; z-index: 10; background-color: var(--color-bg); }
.footer { padding-bottom: 2rem; overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2.5rem; position: relative; z-index: 2; }

/* ==========================================================================
   5. PAGE : ACCUEIL (HOME)
   ========================================================================== */
.hero { height: 85vh; position: sticky; top: 0; display: flex; align-items: flex-end; justify-content: flex-start; gap: 15vw; z-index: 1; padding-bottom: 2rem; }
.hero h1 { margin-bottom: 0; flex: 0 0 auto; }
.hero-visual { width: 11vw; min-width: 120px; margin-bottom: 0; }
.hero-slideshow { position: relative; width: 100%; aspect-ratio: 3/4; overflow: hidden; }
.hero-slideshow img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.hero-slideshow img.active { opacity: 1; }
.hero-subtitle { font-size: 0.90rem; white-space: nowrap; margin-top: 1.8rem; line-height: 1.3; }

#projects-container { width: 100%; display: flex; flex-direction: column; position: relative; z-index: 2; }
.project-section { position: sticky; top: 0; height: 100vh; width: 100%; overflow: hidden; display: flex; align-items: center; text-decoration: none; display: block; }

/* Correction du flou : l'image est beaucoup plus grande pour cacher ses bords pendant le parallaxe */
.project-bg { 
    position: absolute; 
    top: -40%; 
    left: -15%; 
    width: 130%; 
    height: 180%; 
    background-size: cover; 
    background-position: center; 
    filter: blur(12px) brightness(0.5); 
    transform: scale(1.05); /* Pousse les bords flous en dehors de l'écran */
    z-index: 1; 
}

.project-title { position: absolute; left: var(--pad-x); top: 50%; transform: translateY(-50%); z-index: 3; font-size: clamp(2rem, 5vw, 6rem); font-weight: 500; line-height: 1; margin: 0; color: #fff;}
.project-year { position: absolute; right: var(--pad-x); top: 50%; transform: translateY(-50%); z-index: 3; font-size: 0.95rem; color: #fff;}
.project-img-wrapper { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 34vw; max-width: 550px; aspect-ratio: 16/11; overflow: hidden; z-index: 4; }

/* Sécurité parallaxe vignette */
.project-img-wrapper img { width: 100%; height: 135%; object-fit: cover; object-position: center; position: relative; top: -17.5%; }

.cta-section { padding-top: 2vh; padding-bottom: 18vh; border-top: 1px solid rgba(255, 255, 255, 0.1); }
.cta-link { transition: color 0.3s ease; align-items: center; }
.heading-cta { font-size: clamp(2rem, 3.5vw, 4rem); font-weight: 500; }
.cta-arrow { transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), stroke 0.3s ease; }
.cta-link:hover { color: var(--color-text-muted); }
.cta-link:hover .cta-arrow { transform: translateX(10px); stroke: var(--color-text-muted); }

.auto-slideshow { position: relative; width: 100%; aspect-ratio: 3/4; overflow: hidden; }
.auto-slideshow img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.auto-slideshow img.active { opacity: 1; }

/* ==========================================================================
   6. PAGE : PROJETS (LISTE & FILTRES)
   ========================================================================== */
.page-projets { padding-top: 25vh; min-height: 100vh; }
.page-projets .heading-large { font-size: clamp(3rem, 5.5vw, 6rem); margin-bottom: 1.5rem; }

.filters { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 2rem; }
.filter-btn { background: none; border: none; color: var(--color-text-muted); font-family: inherit; font-size: 1rem; font-weight: 400; cursor: pointer; padding-bottom: 0.3rem; position: relative; white-space: nowrap; transition: color 0.3s ease; }
.filter-btn:hover, .filter-btn.active { color: var(--color-text); }
.filter-btn::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 1px; background-color: var(--color-text); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease; }
.filter-btn.active::after { transform: scaleX(1); }

.projets-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3.5rem 1rem; padding-bottom: 10vh; }
.project-card { display: block; text-decoration: none; }
.project-card-img { width: 100%; aspect-ratio: 16/11; overflow: hidden; background-color: var(--color-bg); margin-bottom: 1rem; position: relative; }
.project-card-title { font-size: 1.2rem; font-weight: 500; margin-bottom: 0.2rem; }
.project-card-year { font-size: 0.9rem; color: var(--color-text-muted); }

/* Sécurité parallaxe vignettes grille */
.parallax-wrap { width: 100%; height: 135%; position: relative; top: -17.5%; }
.parallax-wrap img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   11. PAGE : À PROPOS (Scroll + Accordéon)
   ========================================================================== */
.about-scroll-section { height: 100vh; width: 100%; overflow: hidden; position: relative; background-color: var(--color-bg); }
.about-scroll-wrapper { display: flex; width: 200vw; height: 100%; flex-wrap: nowrap; will-change: transform; }
.about-panel { width: 100vw; height: 100%; flex: 0 0 100vw; display: flex; align-items: center; }

.about-title-col { width: 50%; display: flex; justify-content: flex-start; align-items: center; }
.about-img-col { width: 50%; height: 100vh; }
.about-img-col img, .about-img-col video { width: 100%; height: 100%; object-fit: cover; }

.about-text-panel { justify-content: center; }
.about-text-content { max-width: 900px; padding: 0 var(--pad-x); }
.about-p { font-size: clamp(1.1rem, 1.6vw, 1.6rem); line-height: 1.5; margin-bottom: 2rem; font-weight: 400; color: #fff;}

.services-section { padding-top: 15vh; padding-bottom: 15vh; }
.services-grid { display: grid; grid-template-columns: 1.5fr 3fr; gap: 8vw; }

.services-left { display: flex; flex-direction: column; gap: 3rem; }
.services-slideshow { width: 100%; max-width: 250px; }

.services-right { display: flex; flex-direction: column; }
.accordion-item { border-bottom: 1px solid rgba(255,255,255,0.1); }
.accordion-item:first-child { border-top: 1px solid rgba(255,255,255,0.1); }

.accordion-header { display: flex; justify-content: space-between; align-items: center; padding: 2rem 0; cursor: pointer; transition: color 0.3s ease; }
.accordion-header:hover { color: var(--color-text-muted); }

.accordion-title { font-size: clamp(1.1rem, 1.8vw, 1.9rem); font-weight: 400; }

.accordion-icon { position: relative; width: 18px; height: 18px; }
.accordion-icon .line { position: absolute; background: currentColor; border-radius: 2px; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.accordion-icon .line-1 { width: 100%; height: 1.5px; }
.accordion-icon .line-2 { width: 1.5px; height: 100%; transition: transform 0.4s ease, opacity 0.4s ease; }

.accordion-content { height: 0; overflow: hidden; opacity: 0; }

.accordion-content-inner { padding-bottom: 2.5rem; max-width: 90%; color: var(--color-text-muted); font-size: 0.95rem; line-height: 1.5; }
.accordion-content-inner p { margin-bottom: 1.2rem; }
.accordion-content-inner p:last-child { margin-bottom: 0; }

/* ==========================================================================
   12. BANDEAU DES PARTENAIRES (Marquee)
   ========================================================================== */
.partners-section { padding-top: 15vh; padding-bottom: 22vh; overflow: hidden; }
.marquee-container { display: flex; overflow: hidden; user-select: none; margin-top: 5rem; mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent); }
.marquee-track { display: flex; flex-shrink: 0; align-items: center; gap: 6rem; padding-right: 6rem; width: max-content; animation: scroll-marquee 35s linear infinite; }
.partner-logo { height: 45px; width: auto; opacity: 0.35; filter: grayscale(100%); transition: opacity 0.4s ease, filter 0.4s ease; }
.partner-logo:hover { opacity: 0.9; filter: grayscale(0%); }

@keyframes scroll-marquee {
    from { transform: translateX(0); }
    to { transform: translateX(-100%); } 
}

/* ==========================================================================
   13. PAGE DÉTAIL PROJET
   ========================================================================== */
.project-detail-header { padding-top: 22vh; padding-bottom: 2vh; }

.project-title-main { font-size: clamp(3rem, 5.5vw, 6rem); margin: 0; line-height: 1; font-weight: 500; }

.project-hero { width: 100%; height: 100vh; overflow: hidden; position: relative; }
/* Sécurité parallaxe Hero */
.parallax-wrap-hero { width: 100%; height: 140%; position: relative; top: -20%; }
.parallax-wrap-hero img { width: 100%; height: 100%; object-fit: cover; }

.project-info-section { padding-top: 15vh; padding-bottom: 15vh; }

.project-info-grid { display: grid; grid-template-columns: 400px 1fr; gap: 4vw; }

.meta-column { display: flex; flex-direction: column; gap: 2rem; font-size: 1rem; color: #b3b3b3; line-height: 1.5rem; }
.info-column { max-width: 550px; padding-left: 0; } 
.project-text { font-size: 1rem; line-height: 1.5rem; font-weight: 400; margin-bottom: 1.5rem; color: #E0E0E0; }

.project-gallery-section { height: 100vh; width: 100%; overflow: hidden; position: relative; background-color: var(--color-bg); }
.project-gallery-wrapper { display: flex; height: 100%; flex-wrap: nowrap; will-change: transform; width: max-content; }
.gallery-item { height: 100vh; display: flex; align-items: center; justify-content: center; padding: 0; flex-shrink: 0; }
.gallery-item img, .gallery-item video { height: 100vh; width: auto; object-fit: cover; max-width: none; display: block; }

.next-project-container { padding-top: 25vh; padding-bottom: 0; }

.relative-section { 
    position: relative !important; 
    height: 100vh !important; 
    width: 100%; 
    display: flex; 
    align-items: center; 
    text-decoration: none; 
    overflow: hidden; 
}


/* ==========================================================================
   14. RESPONSIVE DESIGN (Mobiles & Tablettes)
   ========================================================================== */
@media (max-width: 1024px) {
    .hero { flex-direction: column; align-items: flex-start; justify-content: center; gap: 6vw; }
    .hero h1 { margin-top: 6vh; }
    .hero-visual { width: 28vw; min-width: 180px; }
    .hero-subtitle { white-space: normal; }
    .project-img-wrapper { width: 50vw; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 3rem; }
    .desktop-only { display: none; }
    .menu-panel { width: 60vw; }
    
    .services-grid { grid-template-columns: 1fr 2fr; gap: 4vw; }
    .accordion-content-inner { max-width: 100%; }
}

@media (max-width: 768px) {
    :root { --pad-x: 25px; }
    
    .hero { gap: 12vw; }
    .hero h1 { margin-top: 15vh; }
    .heading-large { font-size: 4.2rem; line-height: 1; }
    .hero-visual { width: 25vw; }
    .hero-subtitle { font-size: 1.1rem; margin-top: 3.5rem; white-space: nowrap; }
    
    .project-section { display: flex; flex-direction: column; justify-content: center; align-items: center; padding-top: 10vh; }
    .project-title { position: relative; left: auto; top: auto; transform: none; font-size: 2.5rem; text-align: center; z-index: 3; margin-bottom: 1.5rem; }
    .project-img-wrapper { position: relative; left: auto; top: auto; transform: none; width: 75vw; z-index: 2; margin-bottom: 2.5rem; }
    .project-year { display: none; } 
    
    .cta-section { padding-top: 4vh; padding-bottom: 10vh; }
    .cta-arrow { width: 40px; height: 40px; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    #custom-cursor { display: none; }
    
    .menu-panel { width: 100vw; gap: 4rem; }
    .menu-link { font-size: 4rem; } 
    .menu-footer { flex-direction: column; gap: 2rem; }
    .menu-footer .text-regular { font-size: 1.2rem; } 

    .page-projets { padding-top: 18vh; } 
    .filters { gap: 1rem; margin-bottom: 2rem; }
    .projets-grid { grid-template-columns: 1fr; gap: 2.5rem; } 

    .about-scroll-section { height: auto; overflow: visible; padding-top: 15vh; }
    .about-scroll-wrapper { width: 100%; flex-direction: column; }
    .about-panel { width: 100%; height: auto; flex: 0 0 auto; flex-direction: column; align-items: flex-start; flex: unset; }
    .about-title-col { width: 100%; padding-bottom: 2rem; justify-content: flex-start; }
    .about-img-col { width: 100%; height: 50vh; }
    .about-text-panel { margin-top: 4rem; }
    .about-text-content { max-width: 100%; }
    .about-p { font-size: 1.15rem; }
    
    .services-section { padding-top: 10vh; }
    .services-grid { grid-template-columns: 1fr; gap: 4rem; }
    .services-slideshow { max-width: 50vw; }
    .accordion-header { padding: 1.5rem 0; }

    .partners-section { padding-top: 10vh; padding-bottom: 16vh; }
    .partner-logo { height: 32px; }
    .marquee-track { gap: 3rem; padding-right: 3rem; animation-duration: 20s; }
    .marquee-container { margin-top: 3.5rem; }

    /* Responsive Détail Projet */
    .project-detail-header { flex-direction: column; align-items: flex-start; gap: 1rem; padding-top: 20vh; }
    
    .project-info-grid { grid-template-columns: 1fr; gap: 4rem; }
    .info-column { max-width: 100%; padding-left: 0; } 
    
    .project-gallery-section { height: auto; overflow: visible; padding: 0; }
    .project-gallery-wrapper { flex-direction: column; width: 100%; height: auto; padding: 0; gap: 0;}
    .gallery-item { height: auto; width: 100%; padding: 0; }
    .gallery-item img, .gallery-item video { width: 100%; height: auto; max-width: 100%; }
    
    .next-project-container { padding-top: 5vh; }
    .relative-section { height: 75vh !important; }
}