        /* Playfair Display - self-hosted (RGPD conforme) */
        @font-face {
            font-family: 'Playfair Display';
            font-style: normal;
            font-weight: 400 900;
            font-display: swap;
            src: url('../fonts/PlayfairDisplay-Variable-latin.woff2') format('woff2');
            unicode-range: U+0000-00FF, U+0100-024F, U+0300-036F, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
        }

        @font-face {
            font-family: 'Playfair Display';
            font-style: italic;
            font-weight: 400 900;
            font-display: swap;
            src: url('../fonts/PlayfairDisplay-Italic-Variable-latin.woff2') format('woff2');
            unicode-range: U+0000-00FF, U+0100-024F, U+0300-036F, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
        }

        @media (pointer: fine) and (hover: hover) {
            * {
                cursor: none;
            }
        }

        html {
            --accent: #ff3e00;
            --accent-rgb: 255, 62, 0;
            --section-color: #ff3e00;
        }

        html,
        body {
            margin: 0;
        }

        body {
            background-color: #020205;
            color: #ffffff;
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        ::selection {
            background: #ff3e00;
            color: #fff;
        }

        /* Sections : flux naturel (snap supprimé), aucun 100vh forcé. */
        section {
            overflow: hidden;
        }
        /* neutralise l'utilitaire .min-h-screen (Tailwind résiduel) */
        .min-h-screen {
            min-height: 0;
        }

        h2 {
            text-shadow: 0 10px 10px rgba(0, 0, 0, 0.8);
        }

        @media (min-width: 1024px) {
            section>div,
            section>.max-w-7xl,
            section>.max-w-4xl {
                width: 100%;
            }

            /* Carrousel portfolio : hauteur de contenu, plus de 100vh */
            #portfolio {
                display: flex;
                flex-direction: column;
                padding: 0;
                overflow: hidden;
            }
        }

        /* ===== PORTFOLIO CAROUSEL ===== */
        .portfolio-carousel {
            position: relative;
            flex: 1;
            display: flex;
            flex-direction: column;
            padding: 5rem 0 0;
            overflow: hidden;
        }

        .portfolio-carousel-header {
            padding: 0 4vw;
            display: flex;
            justify-content: space-between;
            align-items: end;
            margin-bottom: 1.5rem;
            flex-shrink: 0;
        }

        .portfolio-carousel-viewport {
            position: relative;
            flex: 1;
            overflow: hidden;
        }

        .portfolio-carousel-track {
            display: flex;
            height: 100%;
        }

        .portfolio-carousel-slide {
            min-width: 100%;
            height: 100%;
            padding: 0 4vw;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .portfolio-carousel-img-wrap {
            position: relative;
            width: 100%;
            height: 88%;
            border-radius: 1.25rem;
            overflow: hidden;
        }

        /* Cadre au ratio d'un écran 1440x900 (ses enfants sont en absolu), plafonné en hauteur */
        .portfolio-carousel-slide .portfolio-carousel-img-wrap {
            height: auto;
            aspect-ratio: 1440 / 900;
            max-height: 78svh;
        }

        /* Écran : capture fixe + défilement vidéo par-dessus (assets/js/video-groupes.js) */
        .portfolio-carousel-img-wrap .pf-ecran {
            position: absolute;
            inset: 0;
            display: block;
            transition: transform 1.2s cubic-bezier(0.25, 0, 0, 1);
            transform: scale(1.12);
        }

        .portfolio-carousel-slide.active .portfolio-carousel-img-wrap .pf-ecran {
            transform: scale(1);
        }

        .portfolio-carousel-img-wrap .pf-ecran img,
        .portfolio-carousel-img-wrap .pf-ecran video {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            object-position: top;
        }

        .portfolio-carousel-img-wrap .pf-ecran video {
            opacity: 0;
            transition: opacity 0.4s ease;
        }

        .portfolio-carousel-img-wrap .pf-ecran video.is-playing {
            opacity: 1;
        }

        /* Téléphone posé à côté ; sur mobile il passe au-dessus de la barre d'infos */
        .portfolio-carousel-img-wrap .pf-tel {
            position: absolute;
            z-index: 3;
            top: 5%;
            right: 3%;
            height: 78%;
            aspect-ratio: 400 / 854;
            padding: 0.2rem;
            border-radius: 0.8rem;
            background: #0c0c0e;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.35), 0 30px 60px -20px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
        }

        .portfolio-carousel-img-wrap .pf-tel video {
            display: block;
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 0.6rem;
            background: #1a1a1a;
        }

        @media (min-width: 768px) {
            .portfolio-carousel-img-wrap .pf-tel {
                top: 6%;
                right: 4%;
                height: 66%;
                padding: 0.4rem;
                border-radius: 1.6rem;
            }

            .portfolio-carousel-img-wrap .pf-tel video {
                border-radius: 1.2rem;
            }
        }

        .portfolio-carousel-info {
            position: absolute;
            bottom: 0;
            left: 4vw;
            right: 4vw;
            padding: 2rem 2.5rem;
            border-radius: 0 0 1.25rem 1.25rem;
            background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.75));
            backdrop-filter: blur(5px);
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            display: flex;
            justify-content: space-between;
            align-items: end;
        }

        .portfolio-carousel-counter {
            position: absolute;
            top: 5.5rem;
            right: 4vw;
            z-index: 10;
            display: flex;
            align-items: center;
            gap: 1.25rem;
        }

        .portfolio-carousel-counter-num {
            font-size: 0.9rem;
            font-weight: 300;
            letter-spacing: 0.1em;
            font-variant-numeric: tabular-nums;
        }

        .portfolio-carousel-progress {
            display: flex;
            gap: 4px;
        }

        .portfolio-carousel-progress-seg {
            width: 2.5rem;
            height: 2px;
            background: rgba(255, 255, 255, 0.15);
            border-radius: 1px;
            overflow: hidden;
            position: relative;
        }

        .portfolio-carousel-progress-seg::after {
            content: '';
            position: absolute;
            inset: 0;
            background: var(--section-color, #ff3e00);
            transform: scaleX(0);
            transform-origin: left;
            transition: transform 0.8s cubic-bezier(0.76, 0, 0.24, 1);
        }

        .portfolio-carousel-progress-seg.active::after {
            transform: scaleX(1);
        }

        .portfolio-carousel-arrows {
            position: absolute;
            top: calc(6% + 0.75rem);
            bottom: auto;
            right: calc(4vw + 0.75rem);
            z-index: 10;
            display: flex;
            gap: 0.6rem;
        }

        .portfolio-carousel-arrow {
            width: 3rem;
            height: 3rem;
            border-radius: 50%;
            border: 1px solid rgba(255, 255, 255, 0.2);
            background: rgba(255, 255, 255, 0.05);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s;
            color: #fff;
            font-size: 1.1rem;
        }

        .portfolio-carousel-arrow:hover {
            background: var(--section-color, #ff3e00);
            border-color: var(--section-color, #ff3e00);
            transform: scale(1.1);
        }

        .portfolio-carousel-tag {
            padding: 0.35rem 0.9rem;
            border-radius: 9999px;
            font-size: 0.7rem;
            background: rgba(255, 255, 255, 0.08);
            border: 1px solid rgba(255, 255, 255, 0.1);
        }

        /* Portfolio carousel - Mobile */
        @media (max-width: 767px) {
            .portfolio-carousel {
                padding-top: 4rem;
            }

            .portfolio-carousel-header {
                flex-direction: column;
                align-items: start;
                gap: 0.75rem;
                padding: 0 3vw;
            }

            .portfolio-carousel-slide {
                padding: 0 3vw;
            }

            .portfolio-carousel-img-wrap {
                height: 92%;
                border-radius: 0.75rem;
            }

            .portfolio-carousel-info {
                flex-direction: column;
                align-items: start;
                gap: 0.75rem;
                padding: 1rem 28% 1rem 1.25rem;
                left: 3vw;
                right: 3vw;
                border-radius: 0 0 0.75rem 0.75rem;
            }

            .portfolio-carousel-info h3 {
                font-size: 1.3rem;
            }

            .portfolio-carousel-counter {
                top: 4.5rem;
                right: 3vw;
                gap: 0.6rem;
            }

            .portfolio-carousel-counter-num {
                font-size: 0.75rem;
            }

            .portfolio-carousel-progress-seg {
                width: 1.5rem;
            }

            .portfolio-carousel-arrows {
                top: calc(6% + 0.5rem);
                bottom: auto;
                right: calc(4vw + 0.5rem);
                gap: 0.4rem;
            }

            .portfolio-carousel-arrow {
                width: 2.5rem;
                height: 2.5rem;
                font-size: 0.9rem;
            }

            .portfolio-carousel-tag {
                padding: 0.25rem 0.6rem;
                font-size: 0.6rem;
            }
        }

        #webgl-canvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            z-index: -2;
            pointer-events: none;
            opacity: 0;
            transition: opacity 1.5s ease-out;
        }

        #webgl-canvas.visible {
            opacity: 1;
        }

        .canvas-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(10, 10, 10, 0.4);
            /* Darkens the 3D scene */
            z-index: -1;
            pointer-events: none;
        }

        /* Custom Cursor */
        .cursor {
            position: fixed;
            width: 10px;
            height: 10px;
            background: #fff;
            border-radius: 50%;
            pointer-events: none;
            z-index: 9999;
            transform: translate(-50%, -50%);
            transition: transform .15s ease, opacity .15s ease;
        }

        .cursor-follower {
            position: fixed;
            width: 40px;
            height: 40px;
            border: 1px solid rgba(255, 255, 255, .4);
            border-radius: 50%;
            pointer-events: none;
            z-index: 9998;
            transform: translate(-50%, -50%);
        }

        /* Loader */
        .loader {
            position: fixed;
            inset: 0;
            background: #0a0a0a;
            z-index: 10000;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
        }

        .loader-text {
            font-size: 8vw;
            font-weight: 700;
            overflow: hidden;
        }

        .loader-text .char {
            display: inline-block;
            transform: translateY(100%);
        }

        .loader-bar {
            width: 200px;
            height: 2px;
            background: rgba(255, 255, 255, 0.1);
            margin-top: 2rem;
            position: relative;
            overflow: hidden;
        }

        .loader-progress {
            position: absolute;
            left: 0;
            top: 0;
            height: 100%;
            background: #ff3e00;
            width: 0%;
        }

        /* No gradient mesh anymore */
        .gradient-mesh {
            display: none;
        }

        /* Glassmorphism Update */
        .glass {
            background: rgba(20, 20, 30, 0.2);
            backdrop-filter: blur(30px);
            -webkit-backdrop-filter: blur(30px);
            border: 1px solid rgba(255, 255, 255, 0.05);
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
        }

        .glass-card {
            background: linear-gradient(135deg, rgba(30, 30, 40, 0.2) 0%, rgba(20, 20, 30, 0.1) 100%);
            backdrop-filter: blur(2px);
            -webkit-backdrop-filter: blur(2px);
            border: 1px solid rgba(255, 255, 255, 0.05);
            transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s, border-color 0.4s;
            position: relative;
            overflow: hidden;
        }

        /* Spotlight Effect Container */
        .glass-card::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: radial-gradient(800px circle at var(--mouse-x, -500px) var(--mouse-y, -500px), rgba(255, 62, 0, 0.15), transparent 40%);
            z-index: -1;
            opacity: 0;
            transition: opacity 0.5s;
        }

        .glass-card:hover::before {
            opacity: 1;
        }

        .glass-card:hover {
            transform: translateY(-5px);
            border-color: var(--section-color, rgba(255, 62, 0, 0.4));
            box-shadow:
                0 20px 40px -15px var(--section-color-glow, rgba(255, 62, 0, 0.2)),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
            background: linear-gradient(135deg, rgba(40, 40, 55, 0.25) 0%, rgba(25, 25, 35, 0.15) 100%);
        }

        /* Dynamic Section-Matched Icons */
        .section-icon {
            color: var(--section-color, #ff3e00);
            display: block;
            transition: color 1.2s ease;
        }

        .section-icon-text {
            color: var(--section-color, #ff3e00);
            transition: color 1.2s ease;
        }

        /* Magnetic Button */
        .magnetic-btn {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 1rem 2.5rem;
            background: transparent;
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: white;
            font-weight: 500;
            overflow: hidden;
            transition: all 0.3s;
        }

        .magnetic-btn::before {
            content: '';
            position: absolute;
            inset: 0;
            background: #ff3e00;
            transform: scaleX(0);
            transform-origin: right;
            transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            z-index: -1;
        }

        .magnetic-btn:hover::before {
            transform: scaleX(1);
            transform-origin: left;
        }

        .magnetic-btn:hover {
            border-color: #ff3e00;
        }

        /* Text Reveal */
        .reveal-text {
            overflow: hidden;
        }

        .reveal-text .word {
            display: inline-block;
            transform: translateY(100%);
            opacity: 0;
        }

        /* Parallax Images */
        .parallax-img {
            will-change: transform;
            transition: transform 0.1s linear;
        }

        /* Bento Grid */
        .bento-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1.5rem;
        }

        @media (max-width: 1024px) {
            .bento-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 640px) {
            .bento-grid {
                grid-template-columns: 1fr;
            }

            .cursor-dot,
            .cursor-outline {
                display: none;
            }
        }

        /* Scrollbar */
        ::-webkit-scrollbar {
            width: 8px;
        }

        ::-webkit-scrollbar-track {
            background: #0a0a0a;
        }

        ::-webkit-scrollbar-thumb {
            background: rgba(255, 255, 255, 0.2);
            border-radius: 4px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: rgba(255, 62, 0, 0.6);
        }

        /* Navigation */
        .nav-link {
            position: relative;
            overflow: hidden;
        }

        .nav-link::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 100%;
            height: 1px;
            background: var(--section-color, #ff3e00);
            transform: scaleX(0);
            transform-origin: right;
            transition: transform 0.3s;
        }

        .nav-link:hover::after,
        .nav-link.active::after {
            transform: scaleX(1);
            transform-origin: left;
        }

        /* ===== PARTICLE TRAIL CANVAS ===== */
        #particle-trail-canvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100svh;
            z-index: 9998;
            pointer-events: none;
        }

        /* ===== 3D TILT CARDS ===== */
        .tilt-card {
            transform-style: preserve-3d;
            perspective: 1000px;
            transition: transform 0.1s ease;
        }

        .tilt-card .tilt-inner {
            transform: translateZ(20px);
        }

        .tilt-card .tilt-shine {
            position: absolute;
            inset: 0;
            border-radius: inherit;
            background: radial-gradient(circle at var(--shine-x, 50%) var(--shine-y, 50%), rgba(255, 255, 255, 0.08) 0%, transparent 60%);
            pointer-events: none;
            z-index: 2;
            opacity: 0;
            transition: opacity 0.3s;
        }

        .tilt-card:hover .tilt-shine {
            opacity: 1;
        }

        /* ===== INFINITE MARQUEE ===== */
        .marquee-wrapper {
            overflow: hidden;
            white-space: nowrap;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
            padding: 1.5rem 0;
        }

        .marquee-track {
            display: inline-flex;
            animation: marquee-scroll 30s linear infinite;
        }

        .marquee-track .marquee-item {
            display: inline-flex;
            align-items: center;
            padding: 0 2rem;
            font-size: 1.5rem;
            font-weight: 300;
            letter-spacing: 0.05em;
            color: rgba(255, 255, 255, 0.3);
            text-transform: uppercase;
        }

        .marquee-track .marquee-dot {
            width: 6px;
            height: 6px;
            border-radius: 50%;
            background: var(--section-color, #ff3e00);
            margin: 0 2rem;
            flex-shrink: 0;
        }

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

            100% {
                transform: translateX(-50%);
            }
        }

        /* ===== PORTFOLIO IMAGE REVEAL ===== */
        .img-reveal {
            position: relative;
            overflow: hidden;
        }

        .img-reveal::after {
            content: '';
            position: absolute;
            inset: 0;
            background: var(--section-color, #ff3e00);
            transform-origin: left;
            z-index: 1;
        }

        .img-reveal.revealed::after {
            animation: img-reveal-wipe 1.2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
        }

        @keyframes img-reveal-wipe {
            0% {
                transform: scaleX(1);
                transform-origin: left;
            }

            50% {
                transform: scaleX(1);
                transform-origin: right;
            }

            100% {
                transform: scaleX(0);
                transform-origin: right;
            }
        }

        /* ===== DECODE TEXT ===== */
        .decode-text .char {
            display: inline-block;
            opacity: 0;
        }

        /* ===== ENHANCED LOADER ===== */
        .loader {
            position: fixed;
            inset: 0;
            background: #020205;
            z-index: 10000;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            overflow: hidden;
        }

        .loader-glow {
            position: absolute;
            width: 300px;
            height: 300px;
            border-radius: 50%;
            background: radial-gradient(circle, var(--section-color, #ff3e00) 0%, transparent 70%);
            opacity: 0;
            filter: blur(80px);
            transform: scale(0.5);
        }

        /* Contenu masqué tant que GSAP n'a pas pris le relai - uniquement sur pages avec loader */
        .has-loader #smooth-content,
        .has-loader #main-nav {
            opacity: 0;
            visibility: hidden;
        }
