/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'DM Sans', sans-serif;
    background: #0c0c0c;
    color: #f0f0f0;
    overflow-x: hidden;
}

/* ─── VARIABLES ─── */
:root {
    --cyan: #1cacb9;
    --gold: #f1b600;
    --gradient: linear-gradient(90deg, #1cacb9, #f1b600);
    --gradient-btn: linear-gradient(60deg, #1cacb9, #f1b600);
    --bg: #0c0c0c;
    --bg-2: #101010;
    --bg-card: #141414;
    --bg-card-hover: #191919;
    --text: #f0f0f0;
    --text-muted: #999999;
    --border: rgba(255, 255, 255, 0.07);
    --t: 0.3s ease;
}

/* ─── UTILS ─── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 2rem; }

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

/* ─── NAV ─── */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: transparent;
    border-bottom: 1px solid transparent;
    height: 72px;
    overflow: hidden;
    transition: height 1.4s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.4s ease,
                border-color 0.4s ease;
    display: flex;
    flex-direction: column;
}
/* Nav par défaut : texte blanc */
.nav-links a { color: #fff; }

/* Sur fond clair */
nav.on-light .nav-links a { color: #0c0c0c; }

/* Quand le menu est ouvert */
nav.open {
    background: #ffffff;
    border-color: rgba(0,0,0,0.08);
}
nav.open .nav-links a { color: #0c0c0c; }
nav.open .nav-links a:hover { color: var(--cyan); }

.nav-top {
    height: 72px;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    flex-shrink: 0;
}
.nav-top .hamburger { justify-self: end; }
.nav-logo {
    position: relative;
    display: flex;
    align-items: center;
}
/* Logo du nav : invisible (juste zone de clic) sauf quand menu ouvert */
.nav-logo img { height: 42px; opacity: 0; transition: opacity 0.3s ease; }
.logo-dark { position: absolute; left: 0; }
nav.open .logo-dark { opacity: 1; }

/* ─── BLEND NAV : couche séparée avec mix-blend-mode ─── */
.nav-blend-layer {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 72px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 99;
    pointer-events: none;
    mix-blend-mode: difference;
    transition: opacity 0.3s ease;
}
.nav-blend-layer img { height: 42px; display: block; }
.nav-blend-layer.hidden { opacity: 0; }

/* Carré blend */
.blend-burger {
    width: 48px;
    height: 48px;
    position: relative;
    clip-path: inset(0);
}
.blend-sq-side {
    position: absolute;
    background: #fff;
}
.blend-sq-top, .blend-sq-bottom { width: 32px; height: 4px; left: 8px; }
.blend-sq-top    { top: 6px; }
.blend-sq-bottom { bottom: 6px; }
.blend-sq-left, .blend-sq-right { width: 4px; height: 36px; top: 6px; }
.blend-sq-left  { left: 4px; }
.blend-sq-right { right: 4px; }
.blend-sq-left  { transform-origin: center center; }
.blend-sq-right { transform-origin: center center; }
.blend-sq-top, .blend-sq-bottom, .blend-sq-left, .blend-sq-right {
    transition: transform 0.38s cubic-bezier(0.16,1,0.3,1) 0s;
}
nav.open .blend-sq-top    { transform: translateY(16px); }
nav.open .blend-sq-bottom { transform: translateY(-16px); }
nav.open .blend-sq-left   { transform: scaleY(0); transition: transform 0.08s ease !important; }
nav.open .blend-sq-right  { transform: scaleY(0); transition: transform 0.08s ease !important; }

/* ─── DROPDOWN LINKS ─── */
.nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 1.5rem 0 2rem;
}
.nav-links li {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
nav.open .nav-links li:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.18s; }
nav.open .nav-links li:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.24s; }
nav.open .nav-links li:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.30s; }
nav.open .nav-links li:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.36s; }
nav.open .nav-links li:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.42s; }
.nav-links a {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #f0f0f0;
    text-decoration: none;
    padding: 0.4rem 1rem;
    transition: color var(--t);
    display: block;
}
.nav-links a:hover { color: var(--cyan); }

/* ─── LANG SWITCHER ─── */
.lang-switcher {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.lang-switcher span {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    color: rgba(255,255,255,0.25);
}
.lang-switcher a {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: rgba(255,255,255,0.35);
    transition: color var(--t);
}
.lang-switcher a:hover { color: #fff; }
.lang-switcher a.lang-active { color: #fff; }
nav.open .lang-switcher a { color: rgba(0,0,0,0.35); }
nav.open .lang-switcher a:hover { color: var(--cyan); }
nav.open .lang-switcher a.lang-active { color: #0c0c0c; }
nav.open .lang-switcher span { color: rgba(0,0,0,0.2); }

/* ─── BOUTON CARRÉ → TIRET ─── */
.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    width: 48px;
    height: 48px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.sq-side {
    position: absolute;
    background: #f0f0f0;
}
.sq-top, .sq-bottom { width: 32px; height: 4px; left: 8px; }
.sq-top    { top: 6px; }
.sq-bottom { bottom: 6px; }
.sq-left, .sq-right { width: 4px; height: 36px; top: 6px; }
.sq-left  { left: 4px; transform-origin: center top; }
.sq-right { right: 4px; transform-origin: center top; }

nav.on-light .sq-side { background: #0c0c0c; }
nav.open .sq-side     { background: #0c0c0c; }

/* Toutes les barres : même timing, même durée */
.sq-top, .sq-bottom, .sq-left, .sq-right {
    transition: transform 0.38s cubic-bezier(0.16,1,0.3,1) 0s, background 0.3s ease, box-shadow 0.3s ease;
}
.hamburger.hovered {
    transform: rotate(90deg);
}
.blend-burger {
    transition: transform 0.4s cubic-bezier(0.16,1,0.3,1);
}
.blend-burger.hovered:not(.open) {
    transform: rotate(90deg);
}
.sq-left  { transform-origin: center center; }
.sq-right { transform-origin: center center; }

/* Rectangle → Dash : les barres convergent vers le centre */
.hamburger.open .sq-top    { transform: translateY(16px); }
.hamburger.open .sq-bottom { transform: translateY(-16px); }
.hamburger.open .sq-left   { transform: scaleY(0); transition: transform 0.08s ease !important; }
.hamburger.open .sq-right  { transform: scaleY(0); transition: transform 0.08s ease !important; }

/* ─── HERO ─── */
#hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-bottom: 0;
}
#heroGrid {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 65% 35%, rgba(28, 172, 185, 0.15) 0%, transparent 70%),
                radial-gradient(ellipse 50% 50% at 15% 85%, rgba(241, 182, 0, 0.18) 0%, transparent 60%),
                #0c0c0c;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 60%, #0c0c0c 100%);
    z-index: 2;
}
.hero-content {
    position: relative;
    /* Pas de z-index ici pour ne pas créer de stacking context isolant */
    padding-top: 1.5rem;
    padding-bottom: 0;
    padding-left: 11rem;
    padding-right: 0;
    margin-left: 0;
    margin-right: auto;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--cyan);
    border: 1px solid rgba(28, 172, 185, 0.25);
    padding: 0.35rem 0.85rem;
    position: relative;
    z-index: 3;
    border-radius: 100px;
    margin-bottom: 0;
    align-self: flex-start;
}
.hero-label::before {
    content: '';
    display: block;
    width: 6px; height: 6px;
    background: var(--cyan);
    border-radius: 50%;
}
.hero-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(3.2rem, 9vw, 7.5rem);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin-bottom: 1.75rem;
}
.hero-title em {
    font-style: normal;
    display: block;
    color: transparent;
    -webkit-text-stroke: 2px #f0f0f0;
}

/* ── Bounce i ── */
.hero-i { display: inline-block; }
@keyframes dot-bounce {
    0%,100% { transform: translateY(0); }
    30%     { transform: translateY(-11px); }
    60%     { transform: translateY(-4px); }
    80%     { transform: translateY(-8px); }
}
.hero-i.bouncing { animation: dot-bounce 0.55s cubic-bezier(.36,.07,.19,.97) 2; }

/* ── Shimmer stroke wave ── */
.el { display: inline-block; -webkit-text-stroke: inherit; }
@keyframes shimmer-el {
    0%   { -webkit-text-stroke-color: rgba(240,240,240,0.5); color: transparent; }
    25%  { -webkit-text-stroke-color: rgba(241,182,0,1);     color: rgba(241,182,0,0.12); }
    55%  { -webkit-text-stroke-color: rgba(255,255,255,1);   color: rgba(255,255,255,0.18); }
    80%  { -webkit-text-stroke-color: rgba(28,172,185,0.8);  color: rgba(28,172,185,0.08); }
    100% { -webkit-text-stroke-color: rgba(240,240,240,0.5); color: transparent; }
}
.el.shimmer { animation: shimmer-el 0.5s ease-out forwards; }

/* ── Flicker banger ── */
.flicker-word { display: inline; }
.fl { display: inline-block; transition: opacity 0.04s, text-shadow 0.04s; }
.hero-title-video {
    position: absolute;
    top: 42%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110vw;
    height: auto;
    mix-blend-mode: screen;
    z-index: 2;
    pointer-events: none;
}
.hero-sub {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--text-muted);
    max-width: 480px;
    line-height: 1.65;
    margin-bottom: 2.8rem;
    position: relative;
    top: -2px;
    z-index: 3;
    text-align: left;
}
.hero-bottom {
    position: relative;
    z-index: 3;
    margin-top: 51vh;
    align-self: flex-start;
}
.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    position: relative;
    z-index: 3;
}
.btn-primary,
.btn-ghost {
    position: relative;
    border: 1px solid #ffffff;
    box-shadow: inset 0 0 0 4px #0c0c0c, inset 0 0 0 5px #ffffff;
    color: var(--text);
    padding: 0.9rem 2rem;
    border-radius: 100px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    white-space: nowrap;
    background: transparent;
    text-align: center;
}
.btn-primary:hover {
    transform: translateY(-2px) rotate(2deg);
    box-shadow: inset 0 0 0 0px transparent, inset 0 0 0 0px transparent;
}
.btn-ghost:hover {
    transform: translateY(-2px) rotate(-2deg);
    box-shadow: inset 0 0 0 0px transparent, inset 0 0 0 0px transparent;
}
.btn-ghost-text { display: inline-block; transition: transform 0.3s ease; }
.btn-ghost:hover .btn-ghost-text,
.btn-primary:hover .btn-ghost-text { transform: scaleX(1.08); }
#flipperBall {
    position: absolute;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255,255,255,0.9), 0 0 18px rgba(255,255,255,0.4);
    pointer-events: none;
    opacity: 0;
    z-index: 10;
    will-change: left, top, opacity;
}
#flipperScore {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 0; right: 0;
    height: 1.2rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}
#flipperScore.visible { opacity: 1; }
#flipperScore .fs-current,
#flipperScore .fs-record {
    position: absolute;
    bottom: 0;
    font-family: 'Syne', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
#flipperScore .fs-current { color: #ffffff; text-align: right; }
#flipperScore .fs-record  { color: var(--text-muted); display: none; }
.hero-scroll-hint {
    position: absolute;
    bottom: 2.5rem; left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.hero-scroll-line {
    width: 1px; height: 44px;
    background: linear-gradient(to bottom, var(--cyan), transparent);
    animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 0.25; } 50% { opacity: 1; } }

/* ─── SECTION BASE ─── */
section { padding: 7rem 0; }
.s-label {
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 1rem;
    display: block;
}
.s-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.05;
    margin-bottom: 1.25rem;
}
.s-text {
    color: var(--text-muted);
    line-height: 1.75;
}

/* ─── ABOUT ─── */
#about { background: var(--bg); padding-top: 6rem; }
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: stretch;
}
.about-left { display: flex; flex-direction: column; }
.about-img-wrap {
    position: relative;
    width: 100%;
    flex: 1;
    overflow: visible;
}
.about-img-wrap img {
    width: 100%;
    height: 100%;
    min-height: 420px;
    object-fit: cover;
    object-position: 65% center;
    display: block;
    clip-path: polygon(38% 0, 100% 0, 62% 100%, 0 100%);
}

/* ── Annotations ── */
.about-annots {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 2;
}
.annot {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 10px;
}
.annot-line {
    height: 1px;
    width: 50px;
    background: rgba(255,255,255,0.45);
    transform-origin: left center;
    transform: scaleX(0);
    transition: transform 0.6s cubic-bezier(0.25,0.1,0.25,1);
    flex-shrink: 0;
}
.annot-label {
    font-family: var(--font-head);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.4s ease;
}
.annot-r { flex-direction: row-reverse; }
.annot-r .annot-line { transform-origin: right center; }
/* positions */
.an-1 { top: 14%; left:   0px;  transition-delay: 0s; }
.an-2 { top: 26%; left:  28px;  transition-delay: 0.08s; }
.an-3 { top: 48%; right: 65px;  transition-delay: 0.14s; }
.an-4 { top: 65%; right:  0px;  transition-delay: 0.06s; }
.an-5 { top: 82%; left:  42px;  transition-delay: 0.1s; }
.about-img-wrap:hover .annot-line  { transform: scaleX(1); }
.about-img-wrap:hover .annot-label { opacity: 1; }

.about-body { display: flex; flex-direction: column; gap: 1rem; }
.about-body .s-text { max-width: 540px; }
.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
    margin-top: 1.5rem;
}
.stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.4rem 1.5rem;
    display: flex;
    flex-direction: column;
}
.stat-n {
    font-family: 'Syne', sans-serif;
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.3rem;
    height: 2.4rem;
}
.stat-l { font-size: 0.82rem; color: var(--text-muted); margin-top: auto; }

/* stat 360° orbit */
.stat-orbit-wrap {
    position: relative;
    display: inline-block;
}
.t360 {
    position: relative;
    z-index: 1;
    display: inline-block;
}
.orbit-ball {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    top: 50%; left: 50%;
    margin: -3px 0 0 -3px;
    opacity: 0;
    pointer-events: none;
}
.orbit-ball.running {
    animation: orbit-3d 6s linear infinite;
}
/* 2 révolutions complètes : rev 1 devant à droite, rev 2 devant à gauche */
@keyframes orbit-3d {
    /* — révolution 1 — */
    0%      { z-index: 2; opacity: 1;    box-shadow: 0 0 5px rgba(255,255,255,0.8);
              transform: rotate(0deg)   translateX(36px) rotate(0deg); }
    24.9%   { z-index: 2; opacity: 1; }
    25%     { z-index: 0; opacity: 0.15; box-shadow: none;
              transform: rotate(180deg) translateX(36px) rotate(-180deg); }
    49.9%   { z-index: 0; opacity: 0.15; }
    /* — révolution 2 (inversé) — */
    50%     { z-index: 0; opacity: 0.15; box-shadow: none;
              transform: rotate(360deg) translateX(36px) rotate(-360deg); }
    74.9%   { z-index: 0; opacity: 0.15; }
    75%     { z-index: 2; opacity: 1;    box-shadow: 0 0 5px rgba(255,255,255,0.8);
              transform: rotate(540deg) translateX(36px) rotate(-540deg); }
    99.9%   { z-index: 2; opacity: 1; }
    100%    { z-index: 0; opacity: 0.15; box-shadow: none;
              transform: rotate(720deg) translateX(36px) rotate(-720deg); }
}

/* stat ∞ morph */
.stat-inf {
    display: inline-block;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.3rem;
    transform: scale(2.5);
    transform-origin: left center;
}
.stat-inf span {
    background: linear-gradient(90deg, #1cacb9 40%, #f1b600 150%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-inf.morphing {
    animation: inf-morph 5s ease-in-out infinite;
}
@keyframes inf-morph {
    0%,100% { transform: scale(2.5) scaleX(1)    scaleY(1);    }
    20%     { transform: scale(2.5) scaleX(1.18) scaleY(0.82); }
    50%     { transform: scale(2.5) scaleX(0.88) scaleY(1.14); }
    75%     { transform: scale(2.5) scaleX(1.12) scaleY(0.9);  }
}

/* ─── BANDEAU PHRASE ─── */
.ticker-wrap {
    overflow: hidden;
    white-space: nowrap;
    padding: 1.4rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: transparent;
}
.ticker-track {
    display: inline-flex;
    align-items: center;
    animation: ticker-scroll 18s linear infinite;
}
.ticker-track:hover { animation-play-state: paused; }
.ticker-phrase {
    font-family: 'Syne', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff;
    padding: 0 2.5rem;
    white-space: nowrap;
}
.ticker-sep {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(60deg, #1cacb9, #f1b600);
    flex-shrink: 0;
}
@keyframes ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ─── MOTS-CLÉS COMPÉTENCES ─── */
.skills-band {
    position: relative;
    padding: 3.5rem 0;
    background: linear-gradient(180deg,
        #0c0c0c 0%,
        rgba(28, 172, 185, 0.06) 50%,
        #101010 100%
    );
}
.skills-band .container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-end;
}
.skill-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border: 1px solid rgba(28, 172, 185, 0.25);
    border-radius: 100px;
    font-size: 0.72rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--cyan);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
    box-shadow: 0 0 8px rgba(28, 172, 185, 0.1);
    transition: border-color 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}
.skill-tag::after {
    content: '';
    position: absolute;
    top: -100%;
    left: -80%;
    width: 35%;
    height: 300%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.22) 50%, transparent 100%);
    transform: skewX(-40deg);
    opacity: 0;
}
.skill-tag.sheen::after {
    animation: tag-sheen 0.55s ease forwards;
}
.skill-tag.lit {
    border-color: rgba(28, 172, 185, 0.9);
    color: #fff;
    box-shadow: 0 0 14px rgba(28, 172, 185, 0.35);
}
@keyframes tag-sheen {
    0%   { left: -80%; opacity: 1; }
    100% { left: 130%; opacity: 1; }
}
.skill-tag:hover {
    border-color: #1cacb9;
    box-shadow: 0 0 14px rgba(28, 172, 185, 0.3);
}
.skill-tag.playing {
    border-color: #34d382 !important;
    color: #34d382 !important;
    box-shadow: 0 0 20px rgba(52, 211, 130, 0.55) !important;
    transform: scale(1.08) translateZ(0);
    transition: transform 0.07s ease, border-color 0.07s ease, color 0.07s ease, box-shadow 0.07s ease;
}
.skill-tag.wrong {
    border-color: #e05555 !important;
    color: #e05555 !important;
    box-shadow: 0 0 16px rgba(224, 85, 85, 0.5) !important;
    transition: border-color 0.07s ease, color 0.07s ease, box-shadow 0.07s ease;
}
@keyframes riff-won {
    0%   { transform: scale(1) translateZ(0); }
    30%  { transform: scale(1.15) translateZ(0); }
    60%  { transform: scale(0.95) translateZ(0); }
    100% { transform: scale(1) translateZ(0); }
}
.skill-tag.won {
    animation: riff-won 0.5s ease forwards;
    border-color: #34d382 !important;
    color: #34d382 !important;
    box-shadow: 0 0 28px rgba(52, 211, 130, 0.7) !important;
}
.skills-hint {
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.18);
    text-align: center;
    margin-top: 0.75rem;
}
#skillsHint {
    transition: opacity 0.25s ease;
}
.hint-btn {
    background: none;
    border: 1px solid rgba(255,255,255,0.2);
    color: rgba(255,255,255,0.35);
    border-radius: 50%;
    width: 22px; height: 22px;
    font-size: 0.68rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-left: 6px;
    transition: border-color 0.2s, color 0.2s;
    flex-shrink: 0;
}
.hint-btn:hover { border-color: rgba(255,255,255,0.5); color: rgba(255,255,255,0.7); }
.hint-sound {
    display: inline-flex;
    align-items: center;
    color: #1cacb9;
    opacity: 0.75;
    filter: drop-shadow(0 0 4px rgba(28,172,185,0.5));
    align-self: center;
}
.note-arrow {
    position: absolute;
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    pointer-events: none;
    opacity: 0;
    transform: translateX(-50%);
    transition: opacity 0.2s ease;
    white-space: nowrap;
}
.note-arrow.visible { opacity: 1; }

/* ─── SERVICES ─── */
#services { background: var(--bg-2); padding-top: 3.5rem; padding-bottom: 5rem; }
.services-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    margin-bottom: 3.5rem;
    flex-wrap: wrap;
}
.services-top .s-text { max-width: 440px; }
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}
.services-category {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}
.services-category:first-child { margin-top: 0; }
.services-category-label {
    font-family: 'Syne', sans-serif;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    white-space: nowrap;
}
.services-category-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}
.service-card {
    position: relative;
    --ba: 135deg;
    background:
        linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        linear-gradient(var(--ba), rgba(255,255,255,0.07), rgba(255,255,255,0.07)) border-box;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 2rem;
    transition: background 0.4s ease, opacity 0.4s ease, transform 0.5s ease;
    will-change: transform;
}
.service-a11y {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 2rem;
    color: var(--cyan);
}
.service-a11y p { color: var(--text-muted); margin: 0; font-size: 0.93rem; line-height: 1.65; }
.service-card:hover {
    background:
        linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        linear-gradient(var(--ba), rgba(28,172,185,0.42), rgba(241,182,0,0.32)) border-box;
}
.service-icon {
    width: 46px; height: 46px;
    border-radius: 10px;
    background: var(--gradient);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    margin-bottom: 1.4rem;
    flex-shrink: 0;
}
.service-icon--video {
    background: transparent;
    border-radius: 0;
    border: none;
}
.service-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.65rem;
}
.service-desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.65; }

/* ─── PORTFOLIO ─── */
#portfolio { background: linear-gradient(to bottom, var(--bg-2) 0%, var(--bg) 140px, var(--bg) 100%); padding-top: 4rem; padding-bottom: 1rem; }
.portfolio-top { text-align: center; margin-bottom: 3rem; }
.portfolio-top .s-text { max-width: 500px; margin: 0.75rem auto 0; }
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 1.2rem;
}
.p-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    cursor: pointer;
}
.p-item.featured {
    grid-column: span 2;
    grid-row: span 1;
}
.p-item-inner {
    aspect-ratio: 16/9;
    width: 100%;
    height: 100%;
    position: relative;
    display: block;
}
.p-item:not(.featured) .p-item-inner { aspect-ratio: 4/3; }
.p-thumb {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, filter 0.5s ease;
}
.p-item:hover .p-thumb {
    transform: scale(1.05);
    filter: brightness(0.55);
}
.p-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 55%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.4rem;
    opacity: 0;
    transition: opacity var(--t);
}
.p-item:hover .p-overlay { opacity: 1; }
.p-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) scale(0.75);
    width: 54px; height: 54px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.55);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.p-item:hover .p-play { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.p-play svg { margin-left: 3px; }
.p-title {
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
}
.p-tag { font-size: 0.75rem; color: var(--cyan); margin-top: 0.15rem; }
/* Placeholder */
.p-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    height: 100%;
    min-height: 180px;
}
.p-placeholder-icon { font-size: 2rem; opacity: 0.2; }

/* ─── PROJECT CARD (layout horizontal full-width) ─── */
/* ─── PROJECT CARD (layout horizontal full-width) ─── */
.p-project-card {
    grid-column: span 3;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: none;
    padding: 3rem 5vw;
    gap: 0;
    box-sizing: border-box;
}
.p-project-images {
    position: relative;
    flex: 0 0 50%;
    margin-left: 4%;
    height: 350px;
    overflow: hidden;
    perspective: 1200px;
    margin-right: -30px;
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.85) 7%, black 22%, black 78%, rgba(0,0,0,0.85) 93%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.85) 7%, black 22%, black 78%, rgba(0,0,0,0.85) 93%, transparent 100%);
    transition: mask-image 0.3s ease, -webkit-mask-image 0.3s ease;
}
.p-project-images.carousel-active {
    mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 4%, black 96%, transparent 100%);
}
.p-stack-img {
    position: absolute;
    width: 430px; height: 269px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 10px 32px rgba(0,0,0,0.55);
    user-select: none;
    left: 50%; top: 50%;
    margin-left: -215px; margin-top: -134px;
    transform-origin: center center;
    transition: transform 1.4s cubic-bezier(0.25,0.1,0.25,1), opacity 1s ease;
}
/* Repos : empilées légèrement décalées, centrées */
.p-stack-back  { transform: translate(-14px, 14px) scale(0.86); opacity: 0.45; z-index: 1; }
.p-stack-mid   { transform: translate(-7px,   7px) scale(0.93); opacity: 0.70; z-index: 2; clip-path: inset(1px 0 0 0 round 8px); }
.p-stack-front { transform: translate(0,       0)  scale(1);    opacity: 1;    z-index: 3; }

.p-project-connector {
    flex-shrink: 0;
    width: 140px;
    height: 1px;
    background: var(--border);
    margin: 0 1.5rem 0 -28px;
    position: relative;
    z-index: 5;
    transition: transform 0.6s ease;
}
.p-project-info {
    flex: 1;
    transition: transform 0.6s ease;
}
.p-project-card:hover .p-project-connector,
.p-project-card:hover .p-project-info { transform: translateX(65px); }
.p-project-category {
    font-size: 0.78rem;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.6rem;
}
.p-project-name {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1;
    letter-spacing: 0.05em;
    margin-top: 0.3rem;
    margin-bottom: 0.3rem;
}
.p-project-subtitle {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 0.1rem;
}
.p-project-domains {
    margin-top: 0.1rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.7rem;
    font-weight: 300;
    color: var(--cyan);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    line-height: 1.8;
}

.portfolio-cta {
    text-align: center;
    margin-top: 2.5rem;
}
.portfolio-cta p { color: var(--text-muted); font-size: 0.875rem; }
.cta-arrow {
    text-decoration: none;
    color: var(--text);
    font-size: 1.6rem;
    line-height: 1;
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.cta-arrow:hover { transform: translateX(8px); }

/* ─── VIDEO MODAL ─── */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(10px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t);
}
.modal.open { opacity: 1; pointer-events: all; }
.modal-box {
    position: relative;
    width: min(90vw, 900px);
}
.modal-video {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 12px;
    display: block;
}
.modal-close-btn {
    position: absolute;
    top: -2.75rem; right: 0;
    background: none; border: none;
    color: rgba(255,255,255,0.6);
    font-size: 1.4rem;
    cursor: pointer;
    transition: color var(--t);
}
.modal-close-btn:hover { color: #fff; }

/* ─── PROCESS ─── */
#process { background: linear-gradient(to bottom, var(--bg) 0%, var(--bg-2) 140px, var(--bg-2) 100%); padding-top: 3.5rem; }
.process-top { text-align: center; margin-bottom: 4rem; }
.process-top .s-text { max-width: 480px; margin: 0.75rem auto 0; }
.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    position: relative;
}
/* SVG ligne ondulante */
.process-svg-line {
    position: absolute;
    top: 0; left: calc(12.5% + 28px);
    width: calc(75% - 56px);
    height: 56px;
    overflow: visible;
    pointer-events: none;
    z-index: 0;
}
.process-steps { counter-reset: step-counter; }
.p-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 1rem 1.5rem;
    position: relative;
    counter-increment: step-counter;
}
.step-num {
    width: 56px; height: 56px;
    border-radius: 50%;
    background:
        linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        linear-gradient(135deg, rgba(28,172,185,0.35), rgba(241,182,0,0.25)) border-box;
    border: 1px solid transparent;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Syne', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
    transition: background var(--t), color var(--t), box-shadow var(--t);
}
.p-step.near .step-num {
    background:
        linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        linear-gradient(135deg, rgba(28,172,185,0.7), rgba(241,182,0,0.6)) border-box;
    border: 1px solid transparent;
    color: #fff;
    box-shadow: 0 0 22px rgba(28,172,185,0.3);
}
.p-step.near .step-title { color: #fff; }
.p-step.near .step-desc { color: rgba(240,240,240,0.75); }
.step-title {
    font-family: 'Syne', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.7rem;
    transition: color var(--t);
}
.step-desc { font-size: 0.86rem; color: var(--text-muted); line-height: 1.65; transition: color var(--t); }

/* ─── CONTACT ─── */
#contact { background: linear-gradient(to bottom, var(--bg-2) 0%, #080808 100%); }
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 5rem;
    align-items: start;
}
.contact-grid > *:first-child {
    margin-top: -5rem;
}
.contact-grid > *:last-child {
    margin-top: 2rem;
}
.contact-info .s-title { margin-bottom: 1rem; }
.contact-info .s-text { max-width: 380px; }
.contact-links {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 2.5rem;
}
.c-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: color var(--t);
}
.c-link:hover { color: var(--text); }
.c-link-icon {
    width: 38px; height: 38px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.f-group { display: flex; flex-direction: column; gap: 0.4rem; }
.f-group label { font-size: 0.8rem; color: var(--text-muted); letter-spacing: 0.03em; }
.f-group input,
.f-group textarea,
.f-group select {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    color: var(--text);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color var(--t);
    width: 100%;
    appearance: none;
}
.f-group input:focus,
.f-group textarea:focus,
.f-group select:focus { border-color: var(--cyan); }
.f-group input::placeholder,
.f-group textarea::placeholder { color: rgba(255,255,255,0.18); }
.f-group textarea { resize: vertical; min-height: 130px; }
.f-group select option { background: #1a1a1a; }
.f-submit {
    align-self: flex-start;
    background: var(--bg-card);
    border: 2px solid #ffffff;
    box-shadow: inset 0 0 0 4px var(--bg-card), inset 0 0 0 5px #ffffff;
    color: var(--text);
    padding: 0.9rem 2rem;
    border-radius: 100px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: box-shadow 0.4s ease, background 0.4s ease, border-color 0.4s ease, transform 0.3s ease;
}
.f-submit:hover {
    background:
        linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
        linear-gradient(90deg, #1cacb9, #f1b600) border-box;
    border: 2px solid transparent;
    box-shadow: none;
    transform: translateY(-2px);
}

/* ─── FORMULAIRE CONTACT — ÉTATS ─── */
.form-feedback {
    display: none;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    line-height: 1.6;
}
.form-feedback.success {
    display: block;
    background: rgba(28,172,185,0.08);
    border: 1px solid rgba(28,172,185,0.25);
    color: var(--text-muted);
}
.form-feedback.error {
    display: block;
    background: rgba(224,85,85,0.08);
    border: 1px solid rgba(224,85,85,0.25);
    color: rgba(224,85,85,0.85);
}
.f-submit.sending {
    opacity: 0.5;
    pointer-events: none;
}

/* ─── BACK TO TOP ─── */
#backToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    pointer-events: none;
    z-index: 90;
}
#backToTop.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
#backToTop:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 14px rgba(28, 172, 185, 0.3);
}

/* ─── DODGE GAME ─── */
#dodge-zone {
    margin-top: 2.5rem;
    height: 160px;
    position: relative;
}
#dodge-hint, #dodge-score {
    font-family: 'Syne', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    line-height: 1.9;
    white-space: nowrap;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
#dodge-best {
    font-family: 'Syne', sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, 1.4rem);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}
#dodge-hint.blink { animation: blink 1.1s step-end infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
.dodge-boundary {
    position: fixed;
    pointer-events: none;
    z-index: 9997;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.dodge-boundary.vertical {
    width: 1px;
    background: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,0.5) 18%, rgba(255,255,255,0.5) 82%, transparent 100%);
}
.dodge-boundary.horizontal {
    height: 1px;
    background: linear-gradient(to right, transparent 0%, rgba(255,255,255,0.5) 18%, rgba(255,255,255,0.5) 82%, transparent 100%);
}
#custom-cursor.cursor-dead {
    animation: cursor-blink 0.26s step-end 3;
}
@keyframes cursor-blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
.dodge-el {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    background: rgba(255,255,255,0.5);
}

/* ─── FOOTER ─── */
footer {
    background: #080808;
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    display: flex;
    align-items: center;
}
.footer-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 0.5rem 1.5rem;
}
.footer-logo { grid-column: 2; grid-row: 1; display: flex; justify-content: center; }
.footer-copy { grid-column: 1; grid-row: 1; font-size: 0.8rem; color: var(--text-muted); text-align: right; padding-right: 3rem; }
.footer-legal { grid-column: 3; grid-row: 1; justify-self: start; padding-left: 3rem; }
.footer-a11y { grid-column: 1; grid-row: 2; font-size: 0.72rem; color: rgba(153,153,153,0.5); text-align: right; padding-right: 3rem; }
.footer-logo img { height: 36px; display: block; }
.footer-legal { font-size: 0.8rem; color: var(--text-muted); text-decoration: none; transition: color var(--t); }
.footer-legal:hover { color: var(--cyan); }
.footer-socials { display: flex; gap: 0.75rem; }
.social-btn {
    width: 36px; height: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--t), border-color var(--t);
}
.social-btn:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }

/* ─── REVEAL ANIMATION ─── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

