:root {
    --theme-bg: #f0f0f0;
    --theme-text: #121212;
    --theme-muted: #353535;
    --theme-panel: rgba(255, 255, 255, 0.74);
    --theme-border: rgba(255, 255, 255, 0.95);
    --theme-accent: #ff2929;
    --theme-accent-rgb: 255, 41, 41;
    --theme-accent-hover: #e91c1c;
    --theme-accent-soft: rgba(255, 41, 41, 0.12);
    --theme-accent-soft-strong: rgba(255, 41, 41, 0.22);
    --theme-accent-soft-heavy: rgba(255, 41, 41, 0.52);
    --theme-accent-outline: rgba(255, 41, 41, 0.3);
    --theme-selection-text: var(--theme-accent);
    --theme-selection-bg: rgba(18, 18, 18, 0.14);
    --theme-shadow: 0 24px 64px rgba(0, 0, 0, 0.12);
    --theme-spot-1: rgba(255, 41, 41, 0.065);
    --theme-spot-2: rgba(255, 98, 98, 0.048);
    --theme-spot-3: rgba(255, 156, 156, 0.042);
    --grain-opacity: 0.042;
    --grain-blend: multiply;
    --grain-size: 420px 420px;
    --bg-spot-1-x: 14%;
    --bg-spot-1-y: 12%;
    --bg-spot-2-x: 84%;
    --bg-spot-2-y: 18%;
    --bg-spot-3-x: 50%;
    --bg-spot-3-y: 88%;
    --bg-spot-4-x: 22%;
    --bg-spot-4-y: 48%;
    --bg-spot-5-x: 80%;
    --bg-spot-5-y: 64%;
    --bg-spot-6-x: 18%;
    --bg-spot-6-y: 78%;
    --bg-spot-7-x: 82%;
    --bg-spot-7-y: 92%;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --theme-bg: #050505;
    --theme-text: #e8edf7;
    --theme-muted: #c2cbde;
    --theme-panel: rgba(17, 17, 17, 0.74);
    --theme-border: rgba(26, 26, 26, 0.638);
    --theme-accent: #ff2929;
    --theme-accent-rgb: 255, 41, 41;
    --theme-accent-hover: #ff5757;
    --theme-accent-soft: rgba(255, 41, 41, 0.2);
    --theme-accent-soft-strong: rgba(255, 41, 41, 0.32);
    --theme-accent-soft-heavy: rgba(255, 41, 41, 0.6);
    --theme-accent-outline: rgba(255, 122, 122, 0.34);
    --theme-selection-text: var(--theme-accent);
    --theme-selection-bg: rgba(255, 255, 255, 0.16);
    --theme-shadow: 0 28px 72px rgba(0, 0, 0, 0.45);
    --theme-spot-1: rgba(255, 41, 41, 0.11);
    --theme-spot-2: rgba(255, 88, 88, 0.08);
    --theme-spot-3: rgba(255, 154, 154, 0.07);
    --grain-opacity: 0.03;
    --grain-blend: overlay;
    --grain-size: 420px 420px;
}

html,
body {
    overscroll-behavior-x: none;
    overscroll-behavior-y: contain;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.016), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, 0.018)),
        radial-gradient(84vw 74vw at var(--bg-spot-1-x) var(--bg-spot-1-y),
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 22%,
            var(--theme-spot-1) 54%,
            rgba(0, 0, 0, 0) 88%),
        radial-gradient(80vw 70vw at var(--bg-spot-2-x) var(--bg-spot-2-y),
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 20%,
            var(--theme-spot-2) 52%,
            rgba(0, 0, 0, 0) 89%),
        radial-gradient(86vw 76vw at var(--bg-spot-3-x) var(--bg-spot-3-y),
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 24%,
            var(--theme-spot-3) 56%,
            rgba(0, 0, 0, 0) 90%),
        var(--theme-bg) !important;
}

html.page-long,
html.page-long body {
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.016), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, 0.018)),
        radial-gradient(84vw 74vw at var(--bg-spot-1-x) var(--bg-spot-1-y),
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 22%,
            var(--theme-spot-1) 54%,
            rgba(0, 0, 0, 0) 88%),
        radial-gradient(80vw 70vw at var(--bg-spot-2-x) var(--bg-spot-2-y),
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 20%,
            var(--theme-spot-2) 52%,
            rgba(0, 0, 0, 0) 89%),
        radial-gradient(86vw 76vw at var(--bg-spot-3-x) var(--bg-spot-3-y),
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 24%,
            var(--theme-spot-3) 56%,
            rgba(0, 0, 0, 0) 90%),
        radial-gradient(80vw 70vw at var(--bg-spot-4-x) var(--bg-spot-4-y),
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 20%,
            var(--theme-spot-2) 51%,
            rgba(0, 0, 0, 0) 90%),
        radial-gradient(76vw 66vw at var(--bg-spot-5-x) var(--bg-spot-5-y),
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 24%,
            var(--theme-spot-1) 54%,
            rgba(0, 0, 0, 0) 90%),
        var(--theme-bg) !important;
}

html.page-very-long,
html.page-very-long body {
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.016), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, 0.018)),
        radial-gradient(84vw 74vw at var(--bg-spot-1-x) var(--bg-spot-1-y),
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 22%,
            var(--theme-spot-1) 54%,
            rgba(0, 0, 0, 0) 88%),
        radial-gradient(80vw 70vw at var(--bg-spot-2-x) var(--bg-spot-2-y),
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 20%,
            var(--theme-spot-2) 52%,
            rgba(0, 0, 0, 0) 89%),
        radial-gradient(86vw 76vw at var(--bg-spot-3-x) var(--bg-spot-3-y),
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 24%,
            var(--theme-spot-3) 56%,
            rgba(0, 0, 0, 0) 90%),
        radial-gradient(80vw 70vw at var(--bg-spot-4-x) var(--bg-spot-4-y),
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 20%,
            var(--theme-spot-2) 51%,
            rgba(0, 0, 0, 0) 90%),
        radial-gradient(76vw 66vw at var(--bg-spot-5-x) var(--bg-spot-5-y),
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 24%,
            var(--theme-spot-1) 54%,
            rgba(0, 0, 0, 0) 90%),
        radial-gradient(78vw 68vw at var(--bg-spot-6-x) var(--bg-spot-6-y),
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 24%,
            var(--theme-spot-3) 56%,
            rgba(0, 0, 0, 0) 90%),
        radial-gradient(74vw 64vw at var(--bg-spot-7-x) var(--bg-spot-7-y),
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 22%,
            var(--theme-spot-2) 52%,
            rgba(0, 0, 0, 0) 91%),
        var(--theme-bg) !important;
}

html body,
html.page-long body,
html.page-very-long body,
html.debug-animate-gradients body,
html.debug-animate-gradients.debug-animate-gradients-preview body {
    background: transparent !important;
}

html.debug-animate-gradients,
html.debug-animate-gradients body {
    animation: none !important;
}

/* Debug preview: less diffuse + stronger spots so the motion is easy to see. */
html.debug-animate-gradients.debug-animate-gradients-preview,
html.debug-animate-gradients.debug-animate-gradients-preview body {
    background-size:
        auto,
        92vw 92vw,
        88vw 88vw,
        96vw 96vw,
        90vw 90vw,
        86vw 86vw,
        98vw 98vw,
        84vw 84vw,
        auto !important;
}

html.debug-animate-gradients body {
    isolation: isolate;
}

html.debug-animate-gradients body::before {
    content: "";
    position: fixed;
    inset: -18vmax;
    z-index: -1;
    pointer-events: none;
    opacity: 0.52;
    background:
        radial-gradient(40vw 40vw at 14% 16%, var(--theme-spot-1) 0%, rgba(0, 0, 0, 0) 66%),
        radial-gradient(38vw 38vw at 86% 18%, var(--theme-spot-2) 0%, rgba(0, 0, 0, 0) 68%),
        radial-gradient(42vw 42vw at 52% 86%, var(--theme-spot-3) 0%, rgba(0, 0, 0, 0) 70%);
    transform: translate3d(-10%, -8%, 0) scale(1.16);
    animation: debug-gradient-overlay-drift var(--debug-gradient-anim-duration, 72s) cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
}

html.debug-animate-gradients body::after {
    content: "";
    position: fixed;
    inset: -22vmax;
    z-index: -1;
    pointer-events: none;
    opacity: 0.34;
    background:
        radial-gradient(34vw 34vw at 76% 72%, var(--theme-spot-1) 0%, rgba(0, 0, 0, 0) 68%),
        radial-gradient(32vw 32vw at 24% 74%, var(--theme-spot-2) 0%, rgba(0, 0, 0, 0) 70%),
        radial-gradient(36vw 36vw at 42% 18%, var(--theme-spot-3) 0%, rgba(0, 0, 0, 0) 72%);
    transform: translate3d(8%, 9%, 0) scale(1.14);
    animation: debug-gradient-overlay-drift-2 calc(var(--debug-gradient-anim-duration, 72s) * 0.82) cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate;
}

html.debug-animate-gradients.debug-animate-gradients-preview body::before {
    opacity: 0.9;
    filter: contrast(1.04);
}

html.debug-animate-gradients.debug-animate-gradients-preview body::after {
    opacity: 0.68;
    filter: contrast(1.03);
}

html.debug-animate-gradients .site-grain-overlay {
    z-index: -1;
}

/* Keep only the base gradient animation (no extra overlay layers). */
html.debug-animate-gradients body::before,
html.debug-animate-gradients body::after {
    display: none;
}

@keyframes debug-gradient-drift {
    0% {
        background-position:
            0% 0%,
            -16% -12%,
            112% -10%,
            50% 118%,
            -18% 46%,
            110% 68%,
            -12% 96%,
            108% 106%,
            0% 0%;
    }
    50% {
        background-position:
            0% 0%,
            34% 22%,
            72% 36%,
            62% 76%,
            24% 58%,
            78% 54%,
            30% 72%,
            70% 86%,
            0% 0%;
    }
    100% {
        background-position:
            0% 0%,
            118% 28%,
            -18% 44%,
            40% -14%,
            114% 70%,
            -20% 52%,
            106% -12%,
            -16% 102%,
            0% 0%;
    }
}

@keyframes debug-gradient-overlay-drift {
    0% {
        transform: translate3d(-18%, -14%, 0) scale(1.18);
    }
    50% {
        transform: translate3d(10%, 8%, 0) scale(1.24);
    }
    100% {
        transform: translate3d(-8%, 16%, 0) scale(1.20);
    }
}

@keyframes debug-gradient-overlay-drift-2 {
    0% {
        transform: translate3d(16%, 12%, 0) scale(1.16);
    }
    50% {
        transform: translate3d(-12%, -6%, 0) scale(1.22);
    }
    100% {
        transform: translate3d(6%, -14%, 0) scale(1.18);
    }
}

html[data-theme="dark"],
html[data-theme="dark"] body {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] #canvas {
    background: var(--theme-bg) !important;
}


html[data-theme="dark"] .scroll-animation {
    filter: brightness(0) invert(1);
}

html[data-theme="dark"] .theme-switch {
    border-color: var(--theme-border);
    background: var(--theme-panel);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .theme-switch-track {
    background: rgba(231, 239, 255, 0.2);
}

html[data-theme="dark"] .theme-switch input:checked+.theme-switch-track {
    background: var(--theme-accent);
}

html[data-theme="dark"] .theme-switch .theme-switch-icon-sun {
    color: #ffffff;
}

html[data-theme="dark"] .theme-switch .theme-switch-icon-moon {
    color: var(--theme-accent);
}

html.theme-switching * {
    transition: none !important;
}

html.theme-switching .theme-switch {
    transition:
        border-color 320ms ease,
        background-color 320ms ease,
        box-shadow 320ms ease !important;
}

html.theme-switching .theme-switch-track {
    transition:
        background-color 320ms cubic-bezier(0.22, 1, 0.36, 1),
        transform 420ms cubic-bezier(0.22, 1.2, 0.36, 1) !important;
}

html.theme-switching .theme-switch-icon {
    transition:
        transform 560ms cubic-bezier(0.22, 1.28, 0.36, 1),
        opacity 320ms ease !important;
}

html[data-theme="dark"] #logobox,
html[data-theme="dark"] #bar,
html[data-theme="dark"] .nav-arrow {
    background: rgba(13, 13, 13, 0.5) !important;
    border-color: var(--theme-border) !important;
    box-shadow: var(--theme-shadow) !important;
}

html[data-theme="dark"] #nav li a {
    background: var(--theme-accent-soft-strong);
}

html[data-theme="dark"] #nav li a.current {
    background: var(--theme-accent);
}

html[data-theme="dark"] .floating-video .floating-video-inner,
html[data-theme="dark"] .video-description,
html[data-theme="dark"] .video-infos,
html[data-theme="dark"] .bouton,
html[data-theme="dark"] .bouton-action {
    background: var(--theme-panel) !important;
    border-color: var(--theme-border) !important;
    box-shadow: var(--theme-shadow) !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .floating-video {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .floating-video {
    background-clip: border-box;
}

html[data-theme="dark"] .top-bar p,
html[data-theme="dark"] .titre-video,
html[data-theme="dark"] .type-video,
html[data-theme="dark"] .desc-gauche h1,
html[data-theme="dark"] .desc-droite p,
html[data-theme="dark"] .info-titre,
html[data-theme="dark"] .info-description,
html[data-theme="dark"] .info-credit,
html[data-theme="dark"] .role,
html[data-theme="dark"] .autre,
html[data-theme="dark"] .info-date,
html[data-theme="dark"] .presentation h1 span {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .date,
html[data-theme="dark"] .video-autre,
html[data-theme="dark"] .sub {
    color: var(--theme-muted) !important;
}

html[data-theme="dark"] .scroll-texte,
html[data-theme="dark"] .role span,
html[data-theme="dark"] .autre span,
html[data-theme="dark"] .video-autre span,
html[data-theme="dark"] .video-infos .description-projet,
html[data-theme="dark"] .date-projet,
html[data-theme="dark"] .titre-projet-video,
html[data-theme="dark"] .presentation h1,
html[data-theme="dark"] .courriel {
    color: var(--theme-accent) !important;
}

html[data-theme="dark"] .info-credit img.ligne {
    filter: brightness(0) invert(1);
}

html[data-theme="dark"] #retour {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] #retour:hover,
html[data-theme="dark"] a:hover:not(.ui-btn):not(.glass-button):not(.bouton):not(.bouton-action):not(.courriel) {
    color: var(--theme-accent) !important;
}

html[data-theme="dark"] .video-infos a {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .video-infos a:hover {
    color: var(--theme-accent) !important;
    -webkit-text-stroke: 0.8px var(--theme-accent);
}

html[data-theme="dark"] .project-suggestion-card {
    background: var(--theme-panel) !important;
    border-color: var(--theme-border) !important;
    box-shadow: var(--theme-shadow) !important;
}

html[data-theme="dark"] .titre-credits,
html[data-theme="dark"] .project-gallery-title,
html[data-theme="dark"] #contact-page .titre-credits,
html[data-theme="dark"] .project-suggestions-title {
    color: var(--theme-text) !important;
}

html[data-theme="dark"] .project-suggestion-card:hover {
    border-color: var(--theme-border) !important;
    box-shadow: var(--theme-shadow) !important;
}

html[data-theme="dark"] #project-suggestions-veil {
    background: rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .project-suggestion-meta {
    color: var(--theme-muted) !important;
    text-shadow: none !important;
}

html[data-theme="dark"] .project-suggestion-title {
    color: var(--theme-text) !important;
    text-shadow: none !important;
}

html[data-theme="dark"] .project-suggestion-link.is-empty {
    background: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .project-suggestion-card .color-overlay {
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.90) 10%, rgba(0, 0, 0, 0.60) 60%, rgba(0, 0, 0, 0.08) 100%) !important;
}

html[data-theme="dark"] .project-suggestion-card:hover .color-overlay,
html[data-theme="dark"] .project-suggestion-card .video-block:hover .color-overlay {
    opacity: 1 !important;
}

html[data-theme="dark"] .project-suggestion-card .lecture {
    filter: brightness(0) invert(1) drop-shadow(0 0 22px rgba(0, 0, 0, 0.45));
}

html[data-theme="dark"] .bouton:hover {
    background: rgba(24, 33, 51, 0.95) !important;
    border-color: rgba(159, 179, 220, 0.5) !important;
    color: var(--theme-accent) !important;
}

html[data-theme="dark"] #content > section#plan0 #btndiscute {
    background: var(--theme-accent) !important;
    border-color: var(--theme-accent) !important;
    color: #ffffff !important;
}

html[data-theme="dark"] #content > section#plan0 #btndiscute:hover {
    background: var(--theme-accent-hover) !important;
    border-color: var(--theme-accent-hover) !important;
    color: #ffffff !important;
}


html[data-theme="dark"] .loader-inner {
    border-color: var(--theme-accent-outline);
    border-top-color: var(--theme-accent);
}

::selection {
    color: var(--theme-selection-text);
    background: var(--theme-selection-bg);
}

::-moz-selection {
    color: var(--theme-selection-text);
    background: var(--theme-selection-bg);
}

.site-grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    opacity: var(--grain-opacity);
    mix-blend-mode: var(--grain-blend);
    background: url('/ASSETS/video/Grain.gif');
    background-repeat: repeat;
    background-size: var(--grain-size);
}

.site-grain-overlay[data-background-motion="page-scroll"] {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: var(--site-energy-height, 100%);
}

.site-energy-background,
.site-grainient-background,
.site-video-background {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: var(--site-energy-height, 100vh);
    pointer-events: none;
    z-index: -2;
    display: block;
    overflow: hidden;
    background: #000;
    opacity: 1;
    mix-blend-mode: normal;
    filter: none;
    transition: opacity 320ms ease;
}

.site-energy-background[data-energy-motion="page-scroll"],
.site-energy-background[data-energy-motion="index-zoom"],
.site-grainient-background[data-energy-motion="page-scroll"],
.site-grainient-background[data-energy-motion="index-zoom"],
.site-video-background[data-energy-motion="page-scroll"],
.site-video-background[data-energy-motion="index-zoom"] {
    transform: translate3d(0, var(--site-energy-translate-y, 0px), 0) scale(var(--site-energy-scale, 1));
    transform-origin: center center;
    will-change: transform;
}

.site-energy-background[data-energy-motion="page-scroll"],
.site-grainient-background[data-energy-motion="page-scroll"],
.site-video-background[data-energy-motion="page-scroll"] {
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    transform: scale(var(--site-energy-scale, 1));
}

html.index-touch-layout[data-background-renderer="video"] .site-video-background[data-energy-motion="fixed"] {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    transform: translate3d(0, 0, 0);
}

html[data-background-renderer="energy"] .site-energy-background,
html[data-background-renderer="grainient"] .site-grainient-background,
html[data-background-renderer="video"] .site-video-background {
    opacity: 1;
}

html[data-background-renderer="energy"] .site-energy-background[data-energy-motion="fixed"],
html[data-background-renderer="grainient"] .site-grainient-background[data-energy-motion="fixed"] {
    opacity: 0;
}

html[data-background-renderer="energy"]:not([data-active-plan-level="0"]):not([data-plan0-transition-lock="1"]):not([data-plan0-foreground-visible="1"]) .site-energy-background[data-energy-motion="fixed"],
html[data-background-renderer="grainient"]:not([data-active-plan-level="0"]):not([data-plan0-transition-lock="1"]):not([data-plan0-foreground-visible="1"]) .site-grainient-background[data-energy-motion="fixed"] {
    opacity: 1;
}

html[data-background-renderer="energy"][data-active-plan-level="0"],
html[data-background-renderer="energy"][data-plan0-transition-lock="1"],
html[data-background-renderer="energy"][data-plan0-foreground-visible="1"],
html[data-background-renderer="grainient"][data-active-plan-level="0"],
html[data-background-renderer="grainient"][data-plan0-transition-lock="1"],
html[data-background-renderer="grainient"][data-plan0-foreground-visible="1"] {
    background: var(--theme-bg) !important;
}

html[data-background-renderer="energy"] .site-grain-overlay[data-background-motion="fixed"] {
    opacity: 0;
}

html[data-background-renderer="energy"] .site-grain-overlay,
html[data-background-renderer="grainient"] .site-grain-overlay,
html[data-background-renderer="video"] .site-grain-overlay {
    z-index: -1 !important;
    opacity: 0.05;
    mix-blend-mode: screen;
}

html[data-background-renderer="energy"]:not([data-active-plan-level="0"]):not([data-plan0-transition-lock="1"]):not([data-plan0-foreground-visible="1"]) .site-grain-overlay[data-background-motion="fixed"],
html[data-background-renderer="grainient"]:not([data-active-plan-level="0"]):not([data-plan0-transition-lock="1"]):not([data-plan0-foreground-visible="1"]) .site-grain-overlay[data-background-motion="fixed"] {
    opacity: 0.05;
}

.site-energy-react-shell,
.site-energy-react-mesh,
.site-grainient-react-shell,
.site-grainient-react-shell canvas,
.site-video-background-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.site-video-background-media {
    display: block;
    object-fit: cover;
    object-position: center center;
    background: #050505;
}

html[data-background-renderer="energy"] body::before,
html[data-background-renderer="energy"] body::after,
html[data-background-renderer="grainient"] body::before,
html[data-background-renderer="grainient"] body::after,
html[data-background-renderer="video"] body::before,
html[data-background-renderer="video"] body::after {
    display: none !important;
}

html[data-theme="light"][data-background-renderer="energy"] .site-energy-background {
    opacity: 1;
    mix-blend-mode: normal;
    filter: none;
}

html[data-theme="dark"][data-background-renderer="energy"] .site-energy-background {
    opacity: 1;
    mix-blend-mode: normal;
}

html[data-background-renderer="grainient"] .site-grainient-background {
    opacity: 1;
    mix-blend-mode: normal;
    background: #0c0c0c;
}

html[data-background-renderer="video"] .site-video-background {
    opacity: 1;
    mix-blend-mode: normal;
    background: #050505;
}

html[data-background-renderer="energy"][data-active-plan-level="0"] .site-energy-background[data-energy-motion="fixed"],
html[data-background-renderer="energy"][data-plan0-transition-lock="1"] .site-energy-background[data-energy-motion="fixed"],
html[data-background-renderer="energy"][data-plan0-foreground-visible="1"] .site-energy-background[data-energy-motion="fixed"],
html[data-background-renderer="grainient"][data-active-plan-level="0"] .site-grainient-background[data-energy-motion="fixed"],
html[data-background-renderer="grainient"][data-plan0-transition-lock="1"] .site-grainient-background[data-energy-motion="fixed"],
html[data-background-renderer="grainient"][data-plan0-foreground-visible="1"] .site-grainient-background[data-energy-motion="fixed"] {
    opacity: 0;
}

html.vimeo-fullscreen-active .site-grain-overlay {
    display: none !important;
}

html.vimeo-fullscreen-active .site-energy-background,
html.vimeo-fullscreen-active .site-grainient-background,
html.vimeo-fullscreen-active .site-video-background {
    display: none !important;
}

html.debug-disable-grain .site-grain-overlay,
html.debug-disable-grain .loader-frame::after {
    display: none !important;
}

body {
    position: relative;
    z-index: 0;
}

html.lenis,
html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* Keep fullscreen backdrop dark even when page-long gradients are active. */
html.vimeo-fullscreen-active,
html.vimeo-fullscreen-active body,
html.vimeo-fullscreen-active.page-long,
html.vimeo-fullscreen-active.page-long body,
html.vimeo-fullscreen-active.page-very-long,
html.vimeo-fullscreen-active.page-very-long body {
    background: #000 !important;
}

.glass-button,
.bouton.glass-button,
.bouton-action.glass-button,
.courriel.glass-button {
    --glass-button-bg: rgba(var(--theme-accent-rgb), 0.72);
    --glass-button-bg-hover: rgba(var(--theme-accent-rgb), 0.82);
    --glass-button-color: #ffffff;
    --glass-button-shadow:
        0 16px 30px rgba(16, 19, 23, 0.12),
        0 12px 30px rgba(var(--theme-accent-rgb), 0.16);
    --glass-button-shadow-hover:
        0 22px 40px rgba(16, 19, 23, 0.14),
        0 16px 36px rgba(var(--theme-accent-rgb), 0.22);
    --glass-button-halo-x: 152px;
    --glass-button-halo-y: 108px;
    --glass-button-halo-core: rgba(var(--theme-accent-rgb), 0.38);
    --glass-button-halo-mid: rgba(var(--theme-accent-rgb), 0.14);
    --glass-button-pointer-x: 50%;
    --glass-button-pointer-y: 50%;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border: 0 !important;
    background: var(--glass-button-bg) !important;
    color: var(--glass-button-color) !important;
    box-shadow: var(--glass-button-shadow) !important;
    text-decoration: none !important;
    transform: scale(1);
    transform-origin: 50% 50%;
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
    transition:
        transform 340ms cubic-bezier(0.22, 1, 0.36, 1),
        background 280ms ease,
        color 220ms ease,
        box-shadow 320ms ease,
        -webkit-backdrop-filter 320ms ease,
        backdrop-filter 320ms ease;
}

.glass-button::before,
.bouton.glass-button::before,
.bouton-action.glass-button::before,
.courriel.glass-button::before {
    content: "";
    position: absolute;
    inset: -20px;
    border-radius: calc(var(--ui-btn-radius, 10px) + 18px);
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transform: scale(0.94);
    filter: blur(18px);
    transition:
        transform 360ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 220ms ease;
    background:
        radial-gradient(
            ellipse var(--glass-button-halo-x) var(--glass-button-halo-y) at var(--glass-button-pointer-x) var(--glass-button-pointer-y),
            var(--glass-button-halo-core) 0,
            var(--glass-button-halo-mid) 34%,
            rgba(var(--theme-accent-rgb), 0.05) 52%,
            transparent 76%
        );
}

.glass-button > *,
.bouton.glass-button > *,
.bouton-action.glass-button > *,
.courriel.glass-button > * {
    position: relative;
    z-index: 2;
}

.glass-button:hover,
.glass-button:focus-visible,
.bouton.glass-button:hover,
.bouton.glass-button:focus-visible,
.bouton-action.glass-button:hover,
.bouton-action.glass-button:focus-visible,
.courriel.glass-button:hover,
.courriel.glass-button:focus-visible {
    transform: scale(1.024);
    background: var(--glass-button-bg-hover) !important;
    color: var(--glass-button-color) !important;
    box-shadow: var(--glass-button-shadow-hover) !important;
    -webkit-backdrop-filter: blur(18px) saturate(158%);
    backdrop-filter: blur(18px) saturate(158%);
}

.glass-button.is-pointer-active::before,
.glass-button:focus-visible::before,
.bouton.glass-button.is-pointer-active::before,
.bouton.glass-button:focus-visible::before,
.bouton-action.glass-button.is-pointer-active::before,
.bouton-action.glass-button:focus-visible::before,
.courriel.glass-button.is-pointer-active::before,
.courriel.glass-button:focus-visible::before {
    opacity: 1;
    transform: scale(1);
}

.glass-button:active,
.bouton.glass-button:active,
.bouton-action.glass-button:active,
.courriel.glass-button:active {
    transform: scale(1.01);
}

.glass-button:focus-visible,
.bouton.glass-button:focus-visible,
.bouton-action.glass-button:focus-visible,
.courriel.glass-button:focus-visible {
    outline: 2px solid var(--theme-accent);
    outline-offset: 3px;
}

.glass-button--secondary {
    --glass-button-bg: rgba(255, 255, 255, 0.72);
    --glass-button-bg-hover: rgba(255, 255, 255, 0.84);
    --glass-button-color: #141414;
    --glass-button-shadow:
        0 14px 28px rgba(16, 19, 23, 0.08),
        0 10px 24px rgba(255, 255, 255, 0.28);
    --glass-button-shadow-hover:
        0 20px 36px rgba(16, 19, 23, 0.1),
        0 12px 28px rgba(var(--theme-accent-rgb), 0.12);
    --glass-button-halo-x: 136px;
    --glass-button-halo-y: 96px;
    --glass-button-halo-core: rgba(var(--theme-accent-rgb), 0.26);
    --glass-button-halo-mid: rgba(var(--theme-accent-rgb), 0.1);
}

html[data-theme="dark"] .glass-button,
html[data-theme="dark"] .bouton.glass-button,
html[data-theme="dark"] .bouton-action.glass-button,
html[data-theme="dark"] .courriel.glass-button {
    --glass-button-shadow:
        0 18px 32px rgba(0, 0, 0, 0.34),
        0 14px 30px rgba(var(--theme-accent-rgb), 0.2);
    --glass-button-shadow-hover:
        0 24px 44px rgba(0, 0, 0, 0.38),
        0 18px 40px rgba(var(--theme-accent-rgb), 0.24);
    --glass-button-halo-core: rgba(var(--theme-accent-rgb), 0.4);
    --glass-button-halo-mid: rgba(var(--theme-accent-rgb), 0.16);
    background: var(--glass-button-bg) !important;
    color: var(--glass-button-color) !important;
    border-color: transparent !important;
}

html[data-theme="dark"] .glass-button--secondary {
    --glass-button-bg: rgba(255, 255, 255, 0.1);
    --glass-button-bg-hover: rgba(255, 255, 255, 0.14);
    --glass-button-color: #f4f7ff;
    --glass-button-shadow:
        0 16px 30px rgba(0, 0, 0, 0.3),
        0 8px 22px rgba(255, 255, 255, 0.06);
    --glass-button-shadow-hover:
        0 22px 38px rgba(0, 0, 0, 0.34),
        0 12px 28px rgba(var(--theme-accent-rgb), 0.12);
}

html[data-theme="dark"] .glass-button:hover,
html[data-theme="dark"] .glass-button:focus-visible,
html[data-theme="dark"] .bouton.glass-button:hover,
html[data-theme="dark"] .bouton.glass-button:focus-visible,
html[data-theme="dark"] .bouton-action.glass-button:hover,
html[data-theme="dark"] .bouton-action.glass-button:focus-visible,
html[data-theme="dark"] .courriel.glass-button:hover,
html[data-theme="dark"] .courriel.glass-button:focus-visible {
    background: var(--glass-button-bg-hover) !important;
    color: var(--glass-button-color) !important;
    box-shadow: var(--glass-button-shadow-hover) !important;
    border-color: transparent !important;
}

#content > section#plan0 #btndiscute.glass-button,
#content > section#plan0 #btncontact.glass-button,
.plan-outro-btn.glass-button,
#contact-page .courriel.glass-button {
    filter: none !important;
}

html[data-theme="dark"] #content > section#plan0 #btndiscute.glass-button:hover,
html[data-theme="dark"] #content > section#plan0 #btndiscute.glass-button:focus-visible {
    background: var(--glass-button-bg-hover) !important;
    color: var(--glass-button-color) !important;
    box-shadow: var(--glass-button-shadow-hover) !important;
}

#content > section#plan0 .presentation h1 {
    font-size: clamp(52px, 6.6vw, 80px) !important;
    line-height: 1.12 !important;
    letter-spacing: -0.015em;
}

#content > section#plan0 .presentation h1 span span {
    font-size: inherit !important;
    line-height: inherit !important;
}

#content > section#plan0 .bouton,
#content > section#plan0 .bouton-action,
#contact-page .courriel.glass-button {
    font-size: var(--type-ui-button) !important;
    line-height: 1.08 !important;
}

.plan-outro-text,
.project-suggestions-title,
.project-gallery-title,
.titre-credits,
#contact-page .titre-credits {
    font-size: var(--type-section-title) !important;
    line-height: 1.18 !important;
}

.top-bar p,
.project-suggestion-card .top-bar p {
    font-size: var(--type-meta) !important;
    line-height: 1.2 !important;
}

.video-block h2,
.project-suggestion-title {
    font-size: var(--type-card-title) !important;
    line-height: 1.14 !important;
}

.video-block h3,
.project-suggestion-meta {
    font-size: var(--type-meta) !important;
    line-height: 1.35 !important;
}

html.index-touch-layout .video-block h3,
html.index-touch-layout .top-bar p {
    font-size: var(--type-meta) !important;
    line-height: 1.32 !important;
}

#intro {
    font-size: var(--type-section-title) !important;
    line-height: 1.38 !important;
}

#intro span {
    font-size: var(--type-body-lg) !important;
}

#txt {
    font-size: var(--type-body-lg) !important;
    line-height: 1.72 !important;
}

#retour {
    font-size: var(--type-body-xl) !important;
}

body[data-project-source] .presentation h1 {
    font-size: var(--type-display-hero) !important;
    line-height: 1.12 !important;
}

body[data-project-source] .desc-gauche h1,
#contact-page .desc-gauche h1 {
    font-size: var(--type-page-title) !important;
    line-height: 1.24 !important;
}

body[data-project-source] .desc-droite,
#contact-page .desc-droite {
    font-size: var(--type-body-lg) !important;
    line-height: 1.72 !important;
}

.date-projet,
.description-projet,
.video-infos .description-projet {
    font-size: var(--type-body-xl) !important;
    line-height: 1.5 !important;
}

.role,
.autre {
    font-size: var(--type-body-xl) !important;
    line-height: 1.64 !important;
}

.role-projet,
.video-autre,
.date,
.info-credit,
.info-credit a {
    font-size: var(--type-body-sm) !important;
    line-height: 1.8 !important;
}

body[data-project-source] .info-credit,
body[data-project-source] .info-credit a {
    font-size: var(--type-body) !important;
    line-height: 1.58 !important;
}

@media (prefers-reduced-motion: reduce) {
    .glass-button,
    .glass-button::before {
        transition-duration: 1ms !important;
    }
}
