/*
Theme Name: Stacky GGT
Theme URI: https://christianduta.com/
Author: Stacky
Author URI: https://stacky.be/
Description: Thème headless
Version: 2.1.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: christian-duta-v2
*/

/* =========================================
   1. RESET & BASE
   ========================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; min-height: 100vh; overflow-x: hidden; }

/* DESIGN DARK MODE */
body {
    background-color: #000000;
    color: #ffffff;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    cursor: none; /* Cache le curseur par défaut (sauf mobile) */
}

a { cursor: none; text-decoration: none; color: inherit; }
ul { list-style: none; }

/* BARBA CONTAINER */
[data-barba="container"] { 
    width: 100%;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* =========================================
   2. ADMIN BAR FIX (WORDPRESS)
   ========================================= */
body.admin-bar .site-header { top: 32px; }

@media screen and (max-width: 782px) {
    body.admin-bar .site-header { top: 46px; }
}

/* Fix pour l'overlay du menu sur mobile avec l'admin bar */
@media screen and (max-width: 1024px) {
    body.admin-bar .main-navigation { top: 46px; height: calc(100vh - 46px); }
}

/* Le curseur passe au-dessus de l'admin bar */
body.admin-bar .custom-cursor { z-index: 999999; }


/* =========================================
   3. HEADER & NAVIGATION (DESKTOP)
   ========================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 50px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    background: transparent;
}

/* État SCROLLÉ */
.site-header.is-scrolled {
    padding: 15px 50px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 90, 125, 0.4);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- LOGO --- */
.header-left { flex: 1; }

.site-logo img {
    height: 80px; /* Grand logo au départ */
    width: auto;
    display: block;
    transition: height 0.3s ease;
}

.site-header.is-scrolled .site-logo img {
    height: 35px; /* Petit logo au scroll */
}

/* --- MENU --- */
.header-center {
    flex: 2;
    display: flex;
    justify-content: center;
}

.main-navigation ul.menu-list {
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-navigation ul.menu-list > li { position: relative; }

.main-navigation ul.menu-list > li > a {
    display: flex;
    align-items: center;
    padding: 10px 0;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    gap: 8px;
    position: relative;
}

/* Soulignement animé */
.main-navigation ul.menu-list > li > a::before {
    content: '';
    position: absolute; bottom: 0; left: 50%;
    width: 0%; height: 2px;
    background-color: #005a7d;
    transition: all 0.3s ease-out;
    transform: translateX(-50%);
}

.main-navigation ul.menu-list > li:hover > a::before,
.main-navigation ul.menu-list > li.current-menu-item > a::before {
    width: 100%;
}

/* Indicateur de sous-menu (flèche) */
.main-navigation ul.menu-list > li.menu-item-has-children > a::after {
    content: '';
    width: 6px; height: 6px;
    border-right: 2px solid #005a7d;
    border-bottom: 2px solid #005a7d;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.main-navigation ul.menu-list > li.menu-item-has-children:hover > a::after {
    transform: rotate(225deg) translateY(-2px);
    border-color: #fff;
}

/* SOUS-MENUS (Dropdowns) */
.main-navigation ul.sub-menu {
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%) translateY(15px);
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    min-width: 220px;
    padding: 15px 0;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 90, 125, 0.3);
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.main-navigation ul.menu-list > li:hover .sub-menu {
    opacity: 1; visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.main-navigation ul.sub-menu li a {
    display: block;
    padding: 12px 20px;
    color: #ccc;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.main-navigation ul.sub-menu li a:hover {
    color: #fff;
    background: rgba(0, 90, 125, 0.2);
    letter-spacing: 2.5px;
}

/* --- BOUTON CTA --- */
.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.cta-button {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 25px;
    background-color: #005a7d;
    color: #fff;
    font-size: 13px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 2px;
    border-radius: 2px;
    transition: all 0.3s ease;
    overflow: hidden; position: relative; z-index: 1;
}

.cta-button::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 0%; height: 100%;
    background-color: #fff;
    transition: all 0.3s ease;
    z-index: -1;
}

.cta-button:hover { color: #005a7d; }
.cta-button:hover::before { width: 100%; }
.cta-arrow { display: inline-block; transition: transform 0.3s ease; }
.cta-button:hover .cta-arrow { transform: translateX(5px); }


/* =========================================
   4. MOBILE MENU & BURGER
   ========================================= */

/* Par défaut (Desktop), on cache le burger */
.header-burger {
    display: none;
    background: none; border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 2000;
    flex-direction: column; gap: 6px;
}

.header-burger span {
    display: block;
    width: 30px; height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
}

/* RESPONSIVE TABLETTE & MOBILE */
/* ================= RESPONSIVE (Tablette & Mobile) ================= */
@media (max-width: 1024px) {

    /* --- LAYOUT HEADER --- */
    .site-header { padding: 20px; }
    .header-inner { justify-content: space-between; }
    .header-center { position: static; flex: 0; }
    .header-right { display: flex; justify-content: flex-end; width: auto; flex: 0; }
    .cta-button { display: none; }
    .custom-cursor { display: none; }
    body { cursor: auto; }
    .header-burger { display: flex; }

    /* --- OVERLAY MENU --- */
    .main-navigation {
        position: fixed;
        top: 0; left: 0;
        width: 100vw; height: 100vh;
        background-color: #000;
        z-index: 1500;
        display: flex;
        flex-direction: column; /* Important pour le scroll si menu long */
        justify-content: flex-start; /* On commence en haut */
        padding-top: 100px; /* Espace pour le header */
        overflow-y: auto; /* Permet de scroller si le menu est trop grand */
        
        visibility: hidden; opacity: 0;
        pointer-events: none;
        transition: all 0.4s ease;
    }

    body.menu-open .main-navigation {
        visibility: visible; opacity: 1;
        pointer-events: auto;
    }

    /* LISTE PRINCIPALE */
    .main-navigation ul.menu-list {
        display: flex;
        flex-direction: column;
        align-items: center; /* Centré horizontalement */
        width: 100%;
        gap: 0; /* On gère l'espacement via padding */
    }

    .main-navigation ul.menu-list > li {
        width: 100%;
        text-align: center;
        position: relative;
        padding: 10px 0;
    }

    .main-navigation ul.menu-list > li > a {
        font-size: 2rem;
        font-weight: 800;
        color: #fff;
        display: inline-block; /* Pour que le click soit précis */
        opacity: 0; transform: translateY(20px); /* Anim GSAP */
    }

    /* On cache les effets desktop */
    .main-navigation ul.menu-list > li > a::after { display: none; }
    .main-navigation ul.menu-list > li > a::before { display: none; }


    /* --- SOUS-MENUS (ACCORDÉON) --- */
    /* On annule le style "popup" du desktop */
    .main-navigation ul.sub-menu {
        position: relative !important; /* Revient dans le flux */
        top: auto !important; left: auto !important;
        transform: none !important;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        backdrop-filter: none !important;
        
        display: none; /* Caché par défaut, géré par JS */
        flex-direction: column;
        gap: 15px;
        padding: 20px 0 10px;
        min-width: 0;
        opacity: 1; visibility: visible; /* On laisse le display gérer */
    }

    .main-navigation ul.sub-menu li a {
        font-size: 1rem; /* Plus petit */
        color: #888; /* Gris */
        text-transform: uppercase;
        letter-spacing: 2px;
        padding: 5px 0;
    }
    
    .main-navigation ul.sub-menu li a:hover {
        color: #fff;
        background: transparent;
    }

    /* --- FLÈCHE D'EXPANSION MOBILE --- */
    /* Créée via JS ou CSS, ici on prépare le style pour le JS */
    /* --- FLÈCHE D'EXPANSION MOBILE (Correction) --- */
    .mobile-dropdown-trigger {
        display: inline-flex;          /* Se met à la suite du texte */
        justify-content: center; 
        align-items: center;
        width: 35px;                   /* Un peu plus petit et discret */
        height: 35px;
        margin-left: 15px;             /* Espace entre le texte et le bouton */
        cursor: pointer;
        
        position: relative;            /* On le remet dans le flux normal */
        vertical-align: middle;        /* Aligné verticalement avec le texte */
        top: -2px;                     /* Petit ajustement optique */
        
        border: 1px solid rgba(255,255,255,0.3);
        border-radius: 50%;
        transition: all 0.3s ease;
    }

    .mobile-dropdown-trigger::after {
        content: '+';
        color: #fff;
        font-size: 18px;
        font-weight: 300;
        line-height: 1;
        transition: transform 0.3s;
    }

    /* Interaction */
    .mobile-dropdown-trigger:hover {
        border-color: #fff;
        background: rgba(255,255,255,0.1);
    }

    /* Quand ouvert */
    .mobile-dropdown-trigger.is-active {
        border-color: #005a7d; /* Teal */
    }

    .mobile-dropdown-trigger.is-active::after {
        transform: rotate(45deg); /* Le + devient x */
        color: #005a7d;
    }

    /* Animation Burger */
    body.menu-open .header-burger span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); background-color: #005a7d; }
    body.menu-open .header-burger span:nth-child(2) { transform: rotate(-45deg) translate(5px, -6px); background-color: #005a7d; }
}


/* =========================================
   5. LOADER, FLASH & CURSOR
   ========================================= */
.loader-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #050505; z-index: 9000;
    display: flex; justify-content: center; align-items: center;
}

.loader-content {
    display: flex; flex-direction: column; align-items: center;
    width: 300px;
}

.loader-logo {
    width: 240px; height: auto;
    margin-bottom: 40px; opacity: 0;
}

.loader-progress-wrapper {
    width: 100%; height: 6px;
    background-color: #1a1a1a;
    border-radius: 10px; overflow: hidden; position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

.loader-progress-bar {
    width: 0%; height: 100%;
    background-color: #005a7d;
    position: absolute; top: 0; left: 0; border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 90, 125, 0.6); 
}

.loader-percentage {
    margin-top: 15px; color: #fff;
    font-weight: 700; font-size: 12px; letter-spacing: 3px;
    opacity: 0.8;
}

.flash-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: #fff; z-index: 10000; opacity: 0; pointer-events: none;
}

.custom-cursor {
    position: fixed; top: 0; left: 0; width: 25px; height: 25px;
    pointer-events: none; z-index: 9999;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}
.cursor-corner {
    position: absolute; width: 6px; height: 6px;
    border: 1.5px solid #fff; transition: all 0.2s;
}
.top-left { top: 0; left: 0; border-right: none; border-bottom: none; }
.top-right { top: 0; right: 0; border-left: none; border-bottom: none; }
.bottom-left { bottom: 0; left: 0; border-right: none; border-top: none; }
.bottom-right { bottom: 0; right: 0; border-left: none; border-top: none; }
.cursor-center {
    position: absolute; top: 50%; left: 50%; width: 4px; height: 4px;
    background: #005a7d; border-radius: 50%; transform: translate(-50%, -50%);
}


/* =========================================
   6. PAGES & MODULES
   ========================================= */

/* --- HOME HERO --- */
.hero-section {
    position: relative; height: 100vh; width: 100%;
    overflow: hidden; display: flex; align-items: center; justify-content: center;
}

.hero-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background: #000;
}

.hero-slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0; visibility: hidden; transition: opacity 1s ease; z-index: 0;
}
.hero-slide.active { opacity: 1; visibility: visible; z-index: 1; }

.hero-slide img {
    width: 100%; height: 100%; object-fit: cover; opacity: 0.7;
}

.hero-content { text-align: center; z-index: 2; mix-blend-mode: difference; }

.hero-title {
    font-size: clamp(3rem, 9vw, 9rem); line-height: 0.9;
    text-transform: uppercase; font-weight: 900;
    color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, 0.8);
    position: relative; z-index: 10;
}

.hero-title .text-accent {
    color: #fff; -webkit-text-stroke: 0; font-style: italic; color: #005a7d;
}
.hero-title .line { display: block; overflow: hidden; }

.scroll-down {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    font-size: 12px; text-transform: uppercase; letter-spacing: 2px;
}
.scroll-down .line { width: 1px; height: 50px; background: #fff; }


/* --- SPLIT SECTION --- */
.split-section { height: 100vh; display: flex; overflow: hidden; }

.split-col {
    position: relative; flex: 1; height: 100%;
    display: flex; justify-content: center; align-items: center;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    text-decoration: none; overflow: hidden;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.split-bg {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    transition: transform 0.8s ease; filter: grayscale(100%); z-index: 0;
}

.split-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); transition: opacity 0.5s; z-index: 1;
}

.split-content { position: relative; z-index: 2; text-align: center; }

.split-content h2 {
    font-size: 4rem; text-transform: uppercase; color: #fff; margin-bottom: 20px;
    transform: translateY(20px); transition: transform 0.5s;
}

.btn-arrow {
    display: inline-block; padding: 10px 20px; border: 1px solid #fff;
    color: #fff; text-transform: uppercase; opacity: 0; transform: translateY(20px);
    transition: all 0.5s;
}

/* Hover */
.split-col:hover { flex: 2; }
.split-col:hover .split-bg { transform: scale(1.1); filter: grayscale(0%); }
.split-col:hover .split-overlay { opacity: 0.2; }
.split-col:hover h2 { transform: translateY(0); }
.split-col:hover .btn-arrow { opacity: 1; transform: translateY(0); background: #005a7d; border-color: #005a7d; }


/* --- HORIZONTAL SCROLL --- */
.gallery-scroll-section {
    padding: 0; overflow: hidden; background: #050505; position: relative;
}

.gallery-wrapper {
    height: 100vh; width: 100%; display: flex; align-items: center; overflow: hidden;
}

.gallery-track {
    display: flex; gap: 5vw; padding-left: 10vw; padding-right: 10vw;
    width: max-content;
}

.gallery-item {
    position: relative; width: 45vw; height: 60vh;
    flex-shrink: 0; display: block;
}

.gallery-item img {
    width: 100%; height: 100%; object-fit: cover;
    filter: brightness(0.7) grayscale(100%); transition: all 0.5s ease;
}

.gallery-item:hover img { filter: brightness(1) grayscale(0%); transform: scale(1.05); }

.item-info {
    position: absolute; bottom: -40px; left: 0; width: 100%;
}
.item-info h3 { font-size: 1.2rem; text-transform: uppercase; color: #fff; margin: 0; }
.item-info p { font-size: 0.8rem; color: #005a7d; margin: 0; }

.see-more {
    display: flex; justify-content: center; align-items: center;
    background: #111; border: 1px solid #333; width: 20vw !important;
}
.see-more-content { text-align: center; text-transform: uppercase; letter-spacing: 2px; }
.see-more .arrow { display: block; font-size: 30px; margin-top: 10px; color: #005a7d; }


/* --- ARCHIVE / SINGLE --- */
.gallery-header { padding: 180px 50px 80px; text-align: center; }

.gallery-title {
    font-size: clamp(3rem, 6vw, 6rem); text-transform: uppercase;
    font-weight: 800; line-height: 1; margin-bottom: 20px;
}
.gallery-title .text-stroke { color: transparent; -webkit-text-stroke: 1px #fff; }
.gallery-subtitle { font-size: 14px; letter-spacing: 2px; text-transform: uppercase; color: #005a7d; }

.gallery-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; padding: 0 50px 100px;
}
.gallery-item { position: relative; overflow: hidden; cursor: none; }
.gallery-img-wrapper {
    position: relative; width: 100%; padding-bottom: 120%; overflow: hidden; background-color: #111;
}
.gallery-img-wrapper img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1); filter: grayscale(20%);
}
.gallery-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.3); transition: background 0.5s;
}
.gallery-info {
    position: absolute; bottom: 30px; left: 30px; z-index: 2;
    transform: translateY(20px); opacity: 0; transition: all 0.5s ease;
}
.gallery-cat { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: #005a7d; margin-bottom: 5px; }
.gallery-project-title { font-size: 24px; text-transform: uppercase; color: #fff; margin: 0; }

.gallery-item:hover .gallery-img-wrapper img { transform: scale(1.1); filter: grayscale(0%); }
.gallery-item:hover .gallery-overlay { background: rgba(0,0,0,0.6); }
.gallery-item:hover .gallery-info { transform: translateY(0); opacity: 1; }

@media (max-width: 768px) {
    .gallery-grid { grid-template-columns: 1fr; padding: 0 20px 100px; }
    .gallery-header { padding: 120px 20px 50px; }
    .gallery-info { opacity: 1; transform: translateY(0); }
}

/* SINGLE */
.project-hero {
    position: relative; height: 100vh; display: flex; align-items: center; justify-content: center;
    text-align: center; overflow: hidden;
}
.project-hero .hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.project-header-content { position: relative; z-index: 2; mix-blend-mode: difference; }
.project-cat { display: block; font-size: 12px; letter-spacing: 4px; text-transform: uppercase; margin-bottom: 20px; color: #005a7d; }
.project-title { font-size: clamp(3rem, 7vw, 7rem); text-transform: uppercase; font-weight: 800; line-height: 1; color: #fff; }

.section-padding { padding: 100px 0; }
.container-narrow { max-width: 900px; margin: 0 auto; padding: 0 20px; }
.content-body p { font-size: 18px; line-height: 1.6; margin-bottom: 30px; color: #ccc; }
.content-body figure { margin: 40px 0; }
.content-body img { width: 100%; height: auto; border-radius: 4px; }

.project-nav { border-top: 1px solid #222; }
.nav-links { display: flex; }
.nav-item { flex: 1; padding: 80px 40px; text-decoration: none; border-right: 1px solid #222; transition: background 0.3s; }
.nav-item:last-child { border-right: none; text-align: right; }
.nav-item span { font-size: 10px; text-transform: uppercase; letter-spacing: 2px; color: #666; }
.nav-item h3 { font-size: 24px; color: #fff; margin-top: 10px; text-transform: uppercase; }
.nav-item:hover { background: #080808; }
.nav-item:hover h3 { color: #005a7d; }

@media (max-width: 768px) {
    .nav-links { flex-direction: column; }
    .nav-item { border-right: none; border-bottom: 1px solid #222; padding: 40px 20px; text-align: center !important; }
}