:root {
    --c-bg: #000B1C;
    --c-accent: #00F0FF;
    --c-text: #FFFFFF;
    --font-main: 'Teko', sans-serif;
    --skew-angle: -10deg;
}

* { margin: 0; padding: 0; box-sizing: border-box; cursor: none; }

/* SCROLLBAR */
html { scrollbar-width: auto; scrollbar-color: var(--c-accent) var(--c-bg); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--c-bg); border-left: 1px solid rgba(255,255,255,0.1); }
::-webkit-scrollbar-thumb { background: var(--c-accent); border: 2px solid var(--c-bg); }
::-webkit-scrollbar-thumb:hover { background: #FFFFFF; }

body {
    background-color: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-main);
    overflow-x: hidden;
    overscroll-behavior: none;
}

.cursor {
    position: fixed; top: 0; left: 0; width: 50px; height: 50px;
    background: var(--c-accent); border-radius: 50%;
    pointer-events: none !important; z-index: 99999;
    mix-blend-mode: exclusion; transform: translate(-50%, -50%); 
}

#canvas-container {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1; opacity: 0.6; pointer-events: none;
}

/* HERO */
.main-header {
    position: relative; width: 100%; height: 100vh;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 2;
}
.main-header h1 {
    font-size: clamp(5rem, 15vw, 15vh); line-height: 0.9; text-transform: uppercase; font-weight: 600; text-align: center;
    transform: skewX(var(--skew-angle)); margin: 0;
    color: #FFFFFF; text-shadow: 4px 4px 0px rgba(0,0,0,1); 
}
.main-header .subtitle {
    font-size: 1.5rem; color: var(--c-accent); letter-spacing: 4px;
    margin-bottom: 20px; transform: skewX(var(--skew-angle));
    text-shadow: 2px 2px 0px rgba(0,0,0,1);
}

/* LAYOUT DESKTOP */
.split-layout {
    display: flex; flex-direction: row; width: 100%; position: relative; align-items: flex-start;
}
.left-col { width: 50%; position: relative; pointer-events: none; }
.sticky-wrapper {
    position: sticky; top: 0; height: 100vh; display: flex; align-items: center; justify-content: center; z-index: 10; pointer-events: none;
}
.project-preview { position: relative; width: 100%; height: 60vh; visibility: visible; pointer-events: none; }

/* DROITE */
.right-col {
    width: 50%; position: relative; padding-right: 5vw; padding-top: 35vh; padding-left: 5vw; z-index: 20;
}
.projects-list { display: flex; flex-direction: column; }

/* CARROUSEL 3D */
.carousel-stage { position: relative; width: 100%; height: 100%; perspective: 2000px; pointer-events: none; }
.carousel-slot {
    position: absolute; top: 50%; width: 35vw; height: 25vw;
    transform-origin: center center; background: transparent;
    overflow: visible; pointer-events: auto !important; cursor: pointer;
    z-index: 50; transform-style: preserve-3d;
}

/* TRIANGLE */
.hover-bg {
    position: absolute; top: -25%; left: -10%; width: 140%; height: 150%;
    background: var(--c-accent); clip-path: polygon(0 0, 100% 40%, 0 100%);
    transform: translateZ(-100px) rotate(-5deg);
    z-index: 1; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}

/* IMAGE */
.carousel-slot img { 
    width: 100%; height: 100%; object-fit: cover;
    transform: translateZ(50px); position: relative; z-index: 2; transform-origin: center center;
}

/* TEXTE SELECT FILE */
.preview-deco {
    position: absolute; bottom: -50px; right: -20px;
    color: var(--c-accent); font-size: 1.5rem; letter-spacing: 2px;
    background: var(--c-bg); padding: 5px 15px;
    transform: skewX(var(--skew-angle)); border: 1px solid var(--c-accent);
    opacity: 0; z-index: 100; transform: translateZ(51px); 
    pointer-events: none; transform-style: preserve-3d;
}

/* ITEMS MENU */
.project-item {
    position: relative; height: 12vh; width: 90%;
    margin-bottom: 2vh; pointer-events: auto !important; z-index: 100;
    background: rgba(255,0,0,0.001); display: flex; 
}
.project-content {
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: space-between;
    padding: 0 2vw; transform: skewX(var(--skew-angle));
    border: 1px solid rgba(255,255,255,0.1); background: rgba(0, 11, 28, 0.8);
    pointer-events: none; transition: transform 0.2s ease;
}
.project-item.is-active .project-content {
    background: linear-gradient(90deg, rgba(0,240,255,0.2) 0%, rgba(0,0,0,0) 100%);
    border-color: var(--c-accent); border-left-width: 10px;
    transform: skewX(var(--skew-angle)) translateX(-40px);
}
.project-title { font-size: 2.2rem; color: var(--c-text); white-space: nowrap; }
.project-meta { font-size: 1.2rem; opacity: 0.6; }

.spacer-bottom { height: 50vh; }
#tilt-wrapper, .smooth-wrapper { pointer-events: none; transform-style: preserve-3d; }


/* ======================================================= */
/* ⚠️ MOBILE FINAL (CLEAN VERSION) ⚠️ */
/* ======================================================= */

/* 1. Par défaut (PC) : Cacher les contrôles mobiles */
.mobile-controls {
    display: none;
}

@media screen and (max-width: 1024px) {
    
    /* --- RESET GLOBAL --- */
    .cursor { display: none !important; }
    * { cursor: auto !important; }
    body { overflow: hidden !important; width: 100vw; height: 100vh; position: fixed; }

    /* --- LAYOUT --- */
    
    /* CACHER LE MENU LISTE (C'est ici que ça bloquait avant) */
    .right-col {
        display: none !important;
    }

    /* Header caché pour laisser place au portfolio */
    .main-header { display: none !important; }

    /* L'image prend tout l'écran */
    .split-layout { display: block !important; width: 100%; height: 100%; }
    
    .left-col {
        width: 100% !important;
        height: 100% !important;
        position: fixed !important;
        top: 0; left: 0;
        z-index: 1;
        /* Fond sombre au cas où l'image charge mal */
        background: radial-gradient(circle at center, #001533 0%, #000000 100%);
    }

    .sticky-wrapper {
        height: 100% !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Ajustement de la taille de l'image (Carousel Slot) */
    .carousel-stage { perspective: 800px; }
    .carousel-slot {
        width: 80vw !important;
        height: 80vw !important; 
        max-height: 50vh;
    }
    
    /* Désactivation des effets de survol 3D complexes */
    #tilt-wrapper, .smooth-wrapper {
        transform: none !important;
        perspective: none !important;
    }

    /* --- CONTRÔLES MOBILES (FLÈCHES) --- */
    .mobile-controls {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        position: fixed; 
        bottom: 5vh;    
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        z-index: 999; 
        pointer-events: auto; 
    }

    .mob-arrow {
        background: rgba(0, 11, 28, 0.8);
        border: 1px solid var(--c-accent);
        color: var(--c-accent);
        font-size: 1.5rem;
        width: 60px;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: center;
        transform: skewX(-10deg); 
        backdrop-filter: blur(5px);
        transition: transform 0.1s;
    }
    .mob-arrow:active {
        transform: skewX(-10deg) scale(0.9);
        background: var(--c-accent);
        color: #000;
    }

    .mob-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        transform: skewX(-10deg);
        pointer-events: none;
    }

    #mob-title {
        font-size: 2rem;
        line-height: 1;
        font-weight: 600;
        color: #FFFFFF;
        text-shadow: 2px 2px 0 #000;
        margin-bottom: 5px;
    }

    #mob-meta {
        font-size: 1rem;
        color: var(--c-accent);
        background: rgba(0,0,0,0.6);
        padding: 2px 8px;
    }
}