/* ==========================================================================
   cv.inovinfo.fr — feuille de style principale
   Thème sombre par défaut, thème clair via [data-theme="light"]
   ========================================================================== */

/* ------------------------------------------------------------------ Fonts */
@font-face {
    font-family: 'Outfit';
    src: url('../fonts/outfit-latin-var.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('../fonts/jetbrains-mono-latin-var.woff2') format('woff2');
    font-weight: 100 800;
    font-style: normal;
    font-display: swap;
}

/* ------------------------------------------------------------------ Tokens */
:root {
    --bg: #05060a;
    --bg-2: #0a0d16;
    --fg: #f4f6ff;
    --fg-2: #a3adc6;
    --fg-3: #647089;
    --cyan: #22e4ff;
    --blue: #4c8dff;
    --violet: #b04bff;
    --green: #34d399;
    --grad: linear-gradient(115deg, var(--cyan) 0%, var(--blue) 48%, var(--violet) 100%);

    --glass: rgba(255, 255, 255, 0.035);
    --glass-strong: rgba(14, 18, 30, 0.72);
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.22);
    --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.7);
    --nav-bg: rgba(10, 13, 22, 0.62);

    --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

    --radius: 22px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --section-y: clamp(5.5rem, 12vw, 10rem);

    color-scheme: dark;
}

[data-theme='light'] {
    --bg: #eef1f8;
    --bg-2: #e4e9f4;
    --fg: #0b1020;
    --fg-2: #46516b;
    --fg-3: #7b86a0;
    --cyan: #7c3aed;
    --blue: #2f5bea;
    --violet: #0e93b8;
    --green: #059669;

    --glass: rgba(255, 255, 255, 0.62);
    --glass-strong: rgba(255, 255, 255, 0.86);
    --line: rgba(15, 23, 42, 0.1);
    --line-strong: rgba(15, 23, 42, 0.26);
    --shadow: 0 30px 70px -32px rgba(30, 41, 90, 0.35);
    --nav-bg: rgba(255, 255, 255, 0.7);

    color-scheme: light;
}

/* ------------------------------------------------------------------- Base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
    html:not(.lenis) {
        scroll-behavior: smooth;
    }
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font);
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transition: background-color 0.5s ease, color 0.5s ease;
}

body.is-loading,
body.menu-open {
    overflow: hidden;
}

img,
svg,
canvas {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

ul {
    list-style: none;
}

section[id],
footer[id] {
    scroll-margin-top: 5rem;
}

::selection {
    background: var(--blue);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--cyan);
    outline-offset: 3px;
    border-radius: 6px;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10000;
    padding: 0.7rem 1.1rem;
    border-radius: 999px;
    background: var(--fg);
    color: var(--bg);
    font-weight: 600;
    transform: translateY(-200%);
    transition: transform 0.3s var(--ease);
}

.skip-link:focus {
    transform: none;
}

/* Lenis */
html.lenis,
html.lenis body {
    height: auto;
}

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

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

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

/* Icônes (sprite SVG inline) */
.icon {
    width: 1.1em;
    height: 1.1em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -0.17em;
    display: inline-block;
}

.icon-brand {
    fill: currentColor;
    stroke: none;
}

.svg-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* --------------------------------------------------------------- Typography */
h1,
h2,
h3 {
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(2.3rem, 5.4vw, 4.4rem);
    letter-spacing: -0.035em;
    word-spacing: 0.08em;
}

h3 {
    font-size: 1.3rem;
    letter-spacing: -0.015em;
    word-spacing: 0.06em;
}

strong {
    font-weight: 600;
    color: var(--fg);
}

.text-gradient {
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Fragments SplitText à l'intérieur d'un dégradé : chaque morceau reprend
   la portion correspondante du dégradé global (variables posées en JS). */
.g-part {
    background-image: var(--grad);
    background-repeat: no-repeat;
    background-size: var(--gw, 100%) 100%;
    background-position: var(--gx, 0) 0;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.4rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--cyan);
}

.eyebrow::before {
    content: '';
    width: 2.4rem;
    height: 1px;
    background: currentColor;
    opacity: 0.7;
}

.section-sub {
    margin-top: 1.4rem;
    max-width: 38rem;
    font-size: 1.2rem;
    color: var(--fg-2);
}

/* ------------------------------------------------------------------- Layout */
.container {
    width: 100%;
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: var(--gutter);
    position: relative;
}

main {
    position: relative;
    z-index: 2;
}

.section {
    position: relative;
    padding-block: var(--section-y);
}

.section-header {
    margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: clamp(1rem, 2vw, 1.75rem);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: clamp(1rem, 2vw, 1.75rem);
}

/* ----------------------------------------------------- Fond global (WebGL) */
#webgl {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 1.6s ease;
}

#webgl.is-on {
    opacity: 1;
}

.aurora {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.aurora i {
    position: absolute;
    width: 70vmax;
    height: 70vmax;
    border-radius: 50%;
    opacity: 0.32;
    will-change: transform;
}

.aurora i:nth-child(1) {
    top: -30vmax;
    left: -20vmax;
    background: radial-gradient(closest-side, var(--blue), transparent 70%);
    animation: drift 26s ease-in-out infinite alternate;
}

.aurora i:nth-child(2) {
    right: -25vmax;
    bottom: -32vmax;
    background: radial-gradient(closest-side, var(--violet), transparent 70%);
    animation: drift 32s ease-in-out infinite alternate-reverse;
}

[data-theme='light'] .aurora i {
    opacity: 0.22;
}

@keyframes drift {
    to {
        transform: translate3d(8vmax, 6vmax, 0) scale(1.15);
    }
}

.grain {
    position: fixed;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

[data-theme='light'] .grain {
    opacity: 0.035;
}

/* --------------------------------------------------------------- Préchargeur */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: var(--bg);
    animation: preFailsafe 0.6s ease 8s forwards;
}

.no-js #preloader {
    display: none;
}

.pre-inner {
    display: grid;
    justify-items: center;
    gap: 1.6rem;
}

.pre-logo {
    font-family: var(--mono);
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
}

.pre-bar {
    width: 11rem;
    height: 2px;
    background: var(--line);
    overflow: hidden;
    border-radius: 2px;
}

.pre-bar span {
    display: block;
    height: 100%;
    background: var(--grad);
    transform: scaleX(0);
    transform-origin: left;
}

.pre-count {
    font-family: var(--mono);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    color: var(--fg-3);
}

@keyframes preFailsafe {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.accent-dot {
    color: var(--cyan);
}

/* -------------------------------------------------------------- Navigation */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: max(0.9rem, env(safe-area-inset-top)) var(--gutter) 0;
    pointer-events: none;
}

.nav-shell {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1100px;
    margin-inline: auto;
    padding: 0.55rem 0.6rem 0.55rem 1.4rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--nav-bg);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    box-shadow: 0 12px 40px -20px rgba(0, 0, 0, 0.6);
    transition: background-color 0.5s, border-color 0.5s;
}

.nav-progress {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    overflow: hidden;
    pointer-events: none;
}

.nav-progress span {
    display: block;
    height: 100%;
    background: var(--grad);
    transform: scaleX(0);
    transform-origin: left;
}

.logo {
    font-family: var(--mono);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.04em;
}

.nav-links {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-links a {
    position: relative;
    z-index: 1;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--fg-2);
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.is-active {
    color: var(--fg);
}

.nav-indicator {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: var(--glass-strong);
    border: 1px solid var(--line);
    opacity: 0;
    transition: transform 0.5s var(--ease), width 0.5s var(--ease), opacity 0.3s;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.icon-btn {
    display: inline-grid;
    grid-auto-flow: column;
    place-items: center;
    gap: 0.5rem;
    height: 2.6rem;
    min-width: 2.6rem;
    padding: 0 0.7rem;
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--fg-2);
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.3s, background 0.3s, border-color 0.3s;
}

.icon-btn:hover {
    color: var(--fg);
    background: var(--glass-strong);
    border-color: var(--line);
}

.icon-btn .icon {
    width: 1.2rem;
    height: 1.2rem;
}

.icon-btn.has-label span {
    display: none;
}

@media (min-width: 1100px) {
    .icon-btn.has-label span {
        display: inline;
    }
}

.lang-toggle {
    display: inline-grid;
    place-items: center;
    height: 2.6rem;
    min-width: 2.6rem;
    padding: 0 0.6rem;
    border-radius: 999px;
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--fg-2);
    transition: color 0.3s, background 0.3s;
}

.lang-toggle:hover {
    color: var(--fg);
    background: var(--glass-strong);
}

.icon-moon,
[data-theme='light'] .icon-sun {
    display: none;
}

[data-theme='light'] .icon-moon {
    display: block;
}

.menu-btn {
    display: none;
}

.menu-btn .icon-close,
.menu-open .menu-btn .icon-open {
    display: none;
}

.menu-open .menu-btn .icon-close {
    display: block;
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }

    .menu-btn {
        display: inline-grid;
    }
}

/* Menu mobile plein écran */
.menu {
    position: fixed;
    inset: 0;
    z-index: 900;
    display: grid;
    align-items: center;
    padding: 6rem var(--gutter) 3rem;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    -webkit-backdrop-filter: blur(24px);
    backdrop-filter: blur(24px);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

.menu-open .menu {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.menu-inner {
    display: grid;
    gap: 0.4rem;
}

.menu-inner a {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.5rem 0;
    font-size: clamp(2.2rem, 9vw, 3.6rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    border-bottom: 1px solid var(--line);
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), color 0.3s;
}

.menu-open .menu-inner a {
    opacity: 1;
    transform: none;
}

.menu-open .menu-inner a:nth-child(1) { transition-delay: 0.08s; }
.menu-open .menu-inner a:nth-child(2) { transition-delay: 0.14s; }
.menu-open .menu-inner a:nth-child(3) { transition-delay: 0.2s; }
.menu-open .menu-inner a:nth-child(4) { transition-delay: 0.26s; }
.menu-open .menu-inner a:nth-child(5) { transition-delay: 0.32s; }

.menu-inner a small {
    font-family: var(--mono);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--cyan);
}

.menu-inner a:hover {
    color: var(--cyan);
}

/* ------------------------------------------------------------------ Boutons */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 1rem 2rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    overflow: hidden;
    isolation: isolate;
    transition: box-shadow 0.4s var(--ease), border-color 0.3s, color 0.3s, background 0.3s;
    will-change: transform;
}

.btn span {
    display: inline-block;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.28) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.9s var(--ease);
}

.btn:hover::after {
    transform: translateX(120%);
}

.btn-primary {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
    background: linear-gradient(115deg, #2f7cff, #8b3dff);
    box-shadow: 0 10px 34px -10px rgba(76, 141, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 16px 46px -8px rgba(139, 61, 255, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-glass {
    background: var(--glass);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.btn-glass:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

.btn-lg {
    padding: 1.2rem 2.6rem;
    font-size: 1.05rem;
}

.btn .icon {
    width: 1.15em;
    height: 1.15em;
    transition: transform 0.4s var(--ease);
}

.btn:hover .icon {
    transform: translateX(3px);
}

/* -------------------------------------------------------------------- Verre */
.glass {
    position: relative;
    background: var(--glass);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: border-color 0.4s, background-color 0.5s;
}

[data-theme='light'] .glass {
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.glass:hover {
    border-color: var(--line-strong);
}

.card {
    padding: clamp(1.5rem, 2.6vw, 2.2rem);
}

[data-tilt] {
    transform-style: preserve-3d;
    will-change: transform;
}

.glare {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.16), transparent 55%);
    transition: opacity 0.4s;
}

[data-theme='light'] .glare {
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.9), transparent 55%);
}

.is-tilting > .glare,
.is-tilting .holo-glare {
    opacity: 1;
}

.card-icon {
    display: grid;
    place-items: center;
    width: 3.4rem;
    height: 3.4rem;
    margin-bottom: 1.4rem;
    border-radius: 16px;
    color: var(--cyan);
    background: linear-gradient(140deg, color-mix(in srgb, var(--cyan) 20%, transparent), color-mix(in srgb, var(--violet) 16%, transparent));
    border: 1px solid color-mix(in srgb, var(--cyan) 30%, transparent);
    transform: translateZ(30px);
}

.card-icon .icon {
    width: 1.55rem;
    height: 1.55rem;
}

.card-icon.is-green {
    color: var(--green);
    background: color-mix(in srgb, var(--green) 14%, transparent);
    border-color: color-mix(in srgb, var(--green) 32%, transparent);
}

/* -------------------------------------------------------------------- Hero */
#hero {
    position: relative;
    z-index: 2;
    display: grid;
    align-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 7.5rem 0 5.5rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: center;
    gap: clamp(1.5rem, 5vw, 4rem);
}

.system-status {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 1.6rem;
    padding: 0.45rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--glass);
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    color: var(--cyan);
}

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent);
    animation: ping 2.2s ease-out infinite;
}

@keyframes ping {
    to {
        box-shadow: 0 0 0 0.6rem transparent;
    }
}

.caret {
    width: 0.55rem;
    height: 1rem;
    margin-left: -0.3rem;
    background: var(--cyan);
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.main-title {
    display: grid;
    font-size: clamp(3.4rem, 10.5vw, 8.6rem);
    line-height: 0.93;
    letter-spacing: -0.055em;
    perspective: 900px;
    padding-bottom: 0.08em;
}

.t-line {
    display: block;
    width: max-content;
    max-width: 100%;
}

.t-line .sc {
    display: inline-block;
    transform-origin: 50% 100%;
    will-change: transform;
}

.role-subtitle {
    margin-top: 1.6rem;
    font-size: clamp(1.25rem, 2.4vw, 1.75rem);
    font-weight: 500;
    color: var(--fg);
}

.hero-pitch {
    max-width: 34rem;
    margin: 1rem 0 2.4rem;
    font-size: 1.2rem;
    color: var(--fg-2);
}

.cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Carte holographique 3D */
.hero-visual {
    display: grid;
    place-items: center;
}

.holo {
    position: relative;
    width: min(100%, 520px);
    aspect-ratio: 1;
    perspective: 1100px;
}

.holo-card {
    position: absolute;
    right: 2%;
    bottom: 8%;
    z-index: 2;
    display: grid;
    justify-items: center;
    gap: 1.2rem;
    width: 15.5rem;
    padding: 1.7rem 1.4rem 1.6rem;
    border: 1px solid var(--line-strong);
    border-radius: 28px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    backdrop-filter: blur(22px) saturate(160%);
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transform-style: preserve-3d;
    will-change: transform;
}

[data-theme='light'] .holo-card {
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.45));
    box-shadow: 0 40px 80px -34px rgba(30, 41, 90, 0.5), inset 0 1px 0 #fff;
}

.holo-glare {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.28), transparent 60%);
    transition: opacity 0.4s;
}

.holo-layer {
    transform-style: preserve-3d;
}

.holo-portrait {
    position: relative;
    width: 9.4rem;
    height: 9.4rem;
    padding: 4px;
    border-radius: 50%;
    background: var(--grad);
    box-shadow: 0 18px 50px -12px rgba(76, 141, 255, 0.6);
    transform: translateZ(60px);
}

.holo-portrait img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg);
}

.holo-meta {
    display: grid;
    justify-items: center;
    gap: 0.2rem;
    text-align: center;
    transform: translateZ(38px);
}

.holo-meta strong {
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.holo-meta span {
    font-family: var(--mono);
    font-size: 0.74rem;
    letter-spacing: 0.05em;
    color: var(--fg-2);
}

.orbit {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.orbit-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.95rem;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--glass-strong);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.6);
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    will-change: transform, opacity;
    transform: translate(-50%, -50%);
}

.orbit-badge .icon {
    color: var(--cyan);
}

/* Petits écrans : badges statiques sous la carte */
@media (max-width: 991px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    #hero {
        padding-top: 7rem;
    }

    .holo {
        display: grid;
        justify-items: center;
        aspect-ratio: auto;
        width: 100%;
        gap: 1.6rem;
    }

    .holo-card {
        position: relative;
        right: auto;
        bottom: auto;
    }

    .orbit {
        position: static;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.6rem;
        pointer-events: auto;
    }

    .orbit-badge {
        position: static;
        transform: none !important;
        opacity: 1 !important;
    }
}

.scroll-hint {
    position: absolute;
    left: 50%;
    bottom: 1.6rem;
    display: grid;
    justify-items: center;
    gap: 0.6rem;
    font-family: var(--mono);
    font-size: 0.68rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--fg-3);
    transform: translateX(-50%);
}

.scroll-mouse {
    display: grid;
    justify-items: center;
    width: 1.4rem;
    height: 2.2rem;
    padding-top: 0.4rem;
    border: 1.5px solid var(--fg-3);
    border-radius: 999px;
}

.scroll-mouse i {
    width: 3px;
    height: 0.4rem;
    border-radius: 3px;
    background: var(--cyan);
    animation: wheel 1.8s var(--ease) infinite;
}

@keyframes wheel {
    0% { transform: translateY(0); opacity: 1; }
    80%, 100% { transform: translateY(0.7rem); opacity: 0; }
}

@media (max-width: 991px), (max-height: 700px) {
    .scroll-hint {
        display: none;
    }
}

/* ------------------------------------------------------------------- Stats */
.stats {
    position: relative;
    z-index: 2;
    padding-block: 1rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(0.8rem, 1.6vw, 1.4rem);
}

.stat {
    display: grid;
    gap: 0.4rem;
    padding: clamp(1.2rem, 2.2vw, 1.9rem);
}

.stat-num {
    font-size: clamp(2.2rem, 4.4vw, 3.6rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    background: var(--grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.stat-label {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--fg-2);
}

@media (max-width: 860px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ------------------------------------------------------------------ Piliers */
.pillar {
    overflow: hidden;
}

.pillar h3 {
    margin-bottom: 0.7rem;
    transform: translateZ(24px);
}

.pillar p {
    color: var(--fg-2);
    transform: translateZ(12px);
}

.pillar-num {
    position: absolute;
    top: 0.6rem;
    right: 1.2rem;
    font-size: 5.5rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.06em;
    color: transparent;
    -webkit-text-stroke: 1px var(--line-strong);
    opacity: 0.7;
}

/* ----------------------------------------------------------------- Timeline */
.timeline {
    position: relative;
    display: grid;
    gap: clamp(1.2rem, 2.4vw, 2rem);
    padding-left: clamp(2.2rem, 5vw, 3.4rem);
}

.tl-rail {
    position: absolute;
    top: 0.5rem;
    bottom: 0.5rem;
    left: 0.55rem;
    width: 2px;
    border-radius: 2px;
    background: var(--line);
}

.tl-fill {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(to bottom, var(--cyan), var(--violet));
    box-shadow: 0 0 14px color-mix(in srgb, var(--cyan) 60%, transparent);
    transform: scaleY(0);
    transform-origin: top;
}

.tl-item {
    position: relative;
}

.tl-dot {
    position: absolute;
    top: 2.1rem;
    left: calc(-1 * clamp(2.2rem, 5vw, 3.4rem) + 0.05rem);
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid var(--line-strong);
    border-radius: 50%;
    background: var(--bg);
    transition: background 0.4s, border-color 0.4s, box-shadow 0.4s, transform 0.4s var(--ease);
}

.tl-item.is-active .tl-dot {
    border-color: var(--cyan);
    background: var(--cyan);
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--cyan) 20%, transparent), 0 0 24px var(--cyan);
    transform: scale(1.15);
}

.tl-dot.is-live::after {
    content: '';
    position: absolute;
    inset: -2px;
    border: 1px solid var(--cyan);
    border-radius: 50%;
    animation: ripple 2.4s ease-out infinite;
}

@keyframes ripple {
    from { transform: scale(1); opacity: 0.9; }
    to { transform: scale(3); opacity: 0; }
}

.tl-card {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    column-gap: clamp(1.5rem, 3.5vw, 3.5rem);
    align-items: start;
}

.tl-card > * {
    grid-column: 1;
}

.tl-card .task-list {
    grid-column: 2;
    grid-row: 1 / span 4;
    margin-top: 0.3rem;
}

.tl-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem 1rem;
    margin-bottom: 1rem;
}

.tl-head h3 {
    font-size: clamp(1.35rem, 2.2vw, 1.7rem);
    transform: translateZ(26px);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.2rem 0.75rem;
    border: 1px solid color-mix(in srgb, var(--green) 40%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--green) 12%, transparent);
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--green);
}

.pill i {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: currentColor;
    animation: blink 1.4s steps(1) infinite;
}

.tl-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1.1rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--cyan);
}

.tl-meta .icon {
    margin-right: 0.35rem;
}

.tl-desc {
    color: var(--fg-2);
}

.task-list {
    display: grid;
    gap: 0.7rem;
}

.task-list li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--fg-2);
}

.task-list li::before {
    content: '';
    position: absolute;
    top: 0.62em;
    left: 0;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: var(--grad);
    box-shadow: 0 0 10px color-mix(in srgb, var(--cyan) 50%, transparent);
}

@media (max-width: 860px) {
    .tl-card {
        display: block;
    }

    .tl-card .task-list {
        margin-top: 1.3rem;
    }
}

/* ---------------------------------------------------------------- Formation */
.edu {
    overflow: hidden;
}

.edu .card-icon {
    margin-bottom: 1.2rem;
}

.edu-period {
    display: inline-block;
    margin-bottom: 0.7rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--cyan);
}

.edu h3 {
    margin-bottom: 0.7rem;
    font-size: 1.45rem;
}

.edu-school {
    margin-bottom: 0.4rem;
    font-weight: 600;
}

.edu-desc {
    color: var(--fg-2);
}

/* -------------------------------------------------------------- Compétences */
.skills-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: center;
    gap: clamp(1rem, 4vw, 3rem);
}

.skills-head {
    margin-bottom: 0;
}

.drag-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 2rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fg-3);
}

@media (max-width: 640px) {
    .drag-hint {
        display: none;
    }
}

.sphere-wrap {
    position: relative;
    height: clamp(340px, 46vw, 600px);
}

/* Par défaut (sans JS / petits écrans) : nuage de puces classique */
.sphere {
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    gap: 0.6rem;
    height: 100%;
}

.sphere-tag {
    padding: 0.5rem 1rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--glass);
    font-family: var(--mono);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    color: var(--fg);
}

.sphere-wrap.is-3d {
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.sphere-wrap.is-3d.is-dragging {
    cursor: grabbing;
}

.sphere-wrap.is-3d .sphere {
    position: relative;
    display: block;
}

.sphere-wrap.is-3d .sphere-tag {
    position: absolute;
    top: 50%;
    left: 50%;
    font-size: 1rem;
    will-change: transform, opacity;
    backface-visibility: hidden;
    transition: background 0.25s, border-color 0.25s, color 0.25s, box-shadow 0.25s;
}

.sphere-wrap.is-3d .sphere-tag:hover {
    background: var(--grad);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 10px 30px -8px rgba(76, 141, 255, 0.7);
}

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

    .sphere-wrap {
        height: clamp(380px, 95vw, 560px);
    }
}

/* --------------------------------------------- Portfolio : scroll horizontal */
.h-section {
    position: relative;
    z-index: 2;
    padding-block: var(--section-y);
}

.h-viewport {
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.h-track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: clamp(1rem, 2vw, 1.75rem);
}

.h-intro {
    grid-column: 1 / -1;
    margin-bottom: clamp(1.5rem, 4vw, 3rem);
}

.h-hint {
    display: none;
}

.p-card {
    position: relative;
    display: block;
    min-height: 26rem;
}

/* Mode horizontal épinglé (activé par le JS, ≥ 1025 px) */
html.h-pin .h-section {
    padding-block: 0;
}

html.h-pin .h-viewport {
    display: flex;
    align-items: center;
    max-width: none;
    height: 100vh;
    height: 100svh;
    padding: 0;
    overflow: hidden;
    perspective: 1500px;
    perspective-origin: 50% 50%;
}

html.h-pin .h-track {
    display: flex;
    align-items: center;
    gap: clamp(2rem, 3.4vw, 3.6rem);
    width: max-content;
    padding: 0 max(var(--gutter), calc((100vw - 1280px) / 2 + var(--gutter))) 0;
    transform-style: preserve-3d;
    will-change: transform;
}

/* Les cartes reculées en Z passent derrière le plan de la piste : la piste ne doit pas capter les clics. */
html.h-pin .h-track {
    pointer-events: none;
}

html.h-pin .h-track > * {
    pointer-events: auto;
}
html.h-pin .h-intro {
    flex: none;
    width: min(34rem, 42vw);
    margin: 0;
    padding-right: 2rem;
}

html.h-pin .h-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    margin-top: 2.4rem;
    font-family: var(--mono);
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--fg-3);
}

.h-hint-line {
    width: 3rem;
    height: 1px;
    background: currentColor;
}

html.h-pin .p-card {
    flex: none;
    width: clamp(310px, 25vw, 430px);
    height: clamp(430px, 64vh, 580px);
    min-height: 0;
    transform-style: preserve-3d;
    will-change: transform, opacity;
}

.p-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: color-mix(in srgb, var(--bg-2) 88%, transparent);
    -webkit-backdrop-filter: blur(22px);
    backdrop-filter: blur(22px);
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    transform-style: preserve-3d;
    transition: border-color 0.4s, box-shadow 0.5s;
    will-change: transform;
}

.p-card:hover .p-inner {
    border-color: var(--line-strong);
    box-shadow: 0 40px 90px -30px rgb(var(--pc1-rgb, 76 141 255) / 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.p-1 { --pc1-rgb: 124 58 237; --pc2-rgb: 59 130 246; }
.p-2 { --pc1-rgb: 5 150 105; --pc2-rgb: 52 211 153; }
.p-3 { --pc1-rgb: 234 88 12; --pc2-rgb: 251 191 36; }
.p-4 { --pc1-rgb: 219 39 119; --pc2-rgb: 168 85 247; }

.p-cover {
    position: relative;
    display: grid;
    place-items: center;
    flex: 0 0 46%;
    overflow: hidden;
    background:
        radial-gradient(120% 110% at 15% 0%, rgb(var(--pc1-rgb) / 0.75), transparent 62%),
        radial-gradient(110% 110% at 100% 100%, rgb(var(--pc2-rgb) / 0.6), transparent 62%),
        rgb(var(--pc1-rgb) / 0.12);
}

.p-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
    background-size: 34px 34px;
    -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 10%, transparent 75%);
    mask-image: radial-gradient(circle at 50% 50%, #000 10%, transparent 75%);
}

.p-index {
    position: absolute;
    top: 0.9rem;
    left: 1.2rem;
    font-family: var(--mono);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.85);
}

.p-logo {
    position: relative;
    display: grid;
    place-items: center;
    width: 5.6rem;
    height: 5.6rem;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 26px 50px -16px rgba(0, 0, 0, 0.55);
    transform: translateZ(70px);
}

.p-logo img {
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 12px;
    object-fit: contain;
}

.p-logo b {
    font-size: 2.6rem;
    font-weight: 700;
    color: #fff;
}

.p-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.5rem 1.6rem 1.5rem;
    transform: translateZ(30px);
}

.p-body h3 {
    margin-bottom: 0.6rem;
    font-size: 1.55rem;
}

.p-body p {
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--fg-2);
}

.p-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    padding: 0.2rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--glass);
    font-family: var(--mono);
    font-size: 0.68rem;
    color: var(--fg-2);
}

.p-go {
    display: grid;
    flex: none;
    place-items: center;
    width: 2.7rem;
    height: 2.7rem;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    transition: background 0.35s, color 0.35s, transform 0.5s var(--ease), border-color 0.35s;
}

.p-card:hover .p-go {
    background: var(--fg);
    border-color: var(--fg);
    color: var(--bg);
    transform: rotate(45deg);
}

.p-more .p-inner {
    border-style: dashed;
    justify-content: center;
    background: repeating-linear-gradient(135deg, transparent 0 12px, rgba(255, 255, 255, 0.03) 12px 24px), var(--glass-strong);
}

.p-more .p-body {
    flex: none;
    gap: 0.4rem;
    align-items: flex-start;
    padding: 2rem;
}

.p-more .p-go {
    margin-bottom: 1.2rem;
}

/* ------------------------------------------------------------------ Contact */
.footer {
    overflow: hidden;
    padding-bottom: 0;
    text-align: center;
    z-index: 2;
}

.big-marquee {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    overflow: hidden;
    transform: translateY(-58%);
    pointer-events: none;
    opacity: 0.9;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 15%, #000 85%, transparent);
}

.big-marquee-track {
    display: flex;
    width: max-content;
    will-change: transform;
}

.big-marquee-track span {
    padding-right: 0.5em;
    font-size: clamp(6rem, 20vw, 17rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    color: transparent;
    -webkit-text-stroke: 1px var(--line-strong);
}

.footer-inner {
    position: relative;
    z-index: 1;
}

.footer-inner::before {
    content: '';
    position: absolute;
    inset: 6% 8% 24%;
    z-index: -1;
    border-radius: 50%;
    background: radial-gradient(closest-side, color-mix(in srgb, var(--bg) 72%, transparent), transparent);
    pointer-events: none;
}

.footer .eyebrow::before {
    display: none;
}

.footer-title {
    max-width: 18ch;
    margin-inline: auto;
    font-size: clamp(2.4rem, 6.2vw, 5.2rem);
}

.footer-desc {
    max-width: 40rem;
    margin: 2rem auto 3rem;
    font-size: 1.18rem;
    color: var(--fg-2);
}

.contact-links {
    display: grid;
    justify-items: center;
    gap: 1.6rem;
}

.contact-primary {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.copy-btn {
    width: 3.6rem;
    height: 3.6rem;
    border-color: var(--line);
    background: var(--glass);
}

.copy-btn {
    position: relative;
}

.copy-btn::after {
    content: attr(data-toast);
    position: absolute;
    bottom: calc(100% + 0.6rem);
    left: 50%;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: var(--fg);
    color: var(--bg);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 6px);
    transition: opacity 0.25s, transform 0.4s var(--ease);
}

.copy-btn[data-toast]::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

.copy-btn .icon-check,
.copy-btn.is-copied .icon-copy {
    display: none;
}

.copy-btn.is-copied .icon-check {
    display: block;
    color: var(--green);
}

.contact-secondary {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.9rem;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: clamp(5rem, 12vw, 9rem);
    padding: 1.8rem 0 calc(1.8rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    font-size: 0.9rem;
    color: var(--fg-3);
}

.footer-bottom p {
    margin: 0;
}

.to-top {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--fg-2);
    transition: color 0.3s;
}

.to-top:hover {
    color: var(--cyan);
}

/* Thème clair : palette d'origine inversée (violet → bleu → cyan) pour se démarquer du thème sombre */
[data-theme='light'] .btn-primary {
    background: linear-gradient(115deg, #7c3aed, #2f7cff);
    box-shadow: 0 10px 34px -10px rgba(124, 58, 237, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

[data-theme='light'] .btn-primary:hover {
    box-shadow: 0 16px 46px -8px rgba(47, 124, 255, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

[data-theme='light'] .holo-portrait {
    box-shadow: 0 18px 50px -12px rgba(124, 58, 237, 0.5);
}

[data-theme='light'] .sphere-wrap.is-3d .sphere-tag:hover {
    box-shadow: 0 10px 30px -8px rgba(124, 58, 237, 0.55);
}
/* --------------------------------------------------------- Transition de thème */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-old(root) {
    z-index: 1;
}

::view-transition-new(root) {
    z-index: 2;
}

/* ------------------------------------------------------------- Accessibilité */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }

    .status-dot,
    .caret,
    .scroll-mouse i,
    .pill i {
        animation: none !important;
    }
}

@media screen {
    #cv-template {
        display: none;
    }
}

@media (max-width: 560px) {
    body {
        font-size: 1rem;
    }

    .btn {
        padding: 0.95rem 1.6rem;
    }

    .nav-shell {
        padding-left: 1.1rem;
    }

    .contact-secondary .btn {
        flex: 1 1 100%;
    }
}
