/* ==========================================================================
   Korz Portfolio — site public
   Les couleurs de marque (--c1, --c2) viennent du panel admin.
   ========================================================================== */

:root {
  --night: #0D0A18;
  --night-2: #141026;
  --panel: #1A1531;
  --line: rgba(237, 233, 255, .1);
  --ink: #EDE9FF;
  --mute: #9A92B8;
  --c1: #8B5CFF;
  --c2: #FF4FA3;
  --c1-rgb: 139, 92, 255;
  --c2-rgb: 255, 79, 163;
  --grad: linear-gradient(100deg, var(--c1), var(--c2));
  --f-display: "Unbounded", "Arial Black", sans-serif;
  --f-body: "Instrument Sans", system-ui, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.76, 0, .24, 1);
  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --r: 22px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
::selection { background: rgba(var(--c1-rgb), .55); color: #fff; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; top: 1rem; left: 1rem; z-index: 200;
  padding: .7rem 1rem; background: var(--ink); color: var(--night);
  border-radius: 10px; transform: translateY(-200%); transition: transform .3s;
}
.skip:focus { transform: none; }

.display {
  font-family: var(--f-display);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: .9;
  margin: 0;
}

/* ---------- Grain & curseur ---------- */

.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); } 60% { transform: translate(-4%, -1%); }
  80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}

.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor { display: block; position: fixed; inset: 0; pointer-events: none; z-index: 150; }
  .cursor__dot, .cursor__ring { position: absolute; top: 0; left: 0; border-radius: 50%; will-change: transform; }
  .cursor__dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; mix-blend-mode: difference; }
  .cursor__ring {
    width: 38px; height: 38px; margin: -19px 0 0 -19px;
    border: 1px solid rgba(255, 255, 255, .45);
    display: grid; place-items: center;
    transition: width .45s var(--ease-out), height .45s var(--ease-out), margin .45s var(--ease-out),
                background .35s, border-color .35s;
  }
  .cursor__label {
    font: 600 .8rem var(--f-body); font-style: normal; color: #fff;
    opacity: 0; transform: scale(.6); transition: opacity .3s, transform .45s var(--ease-out);
  }
  .cursor.is-hover .cursor__ring { width: 56px; height: 56px; margin: -28px 0 0 -28px; border-color: rgba(var(--c2-rgb), .8); }
  .cursor.is-label .cursor__ring {
    width: 92px; height: 92px; margin: -46px 0 0 -46px;
    background: var(--grad); border-color: transparent;
  }
  .cursor.is-label .cursor__label { opacity: 1; transform: none; }
  .cursor.is-down .cursor__ring { transform: scale(.8); }
  .cursor.is-hidden { opacity: 0; }
}

/* ---------- Rideau de transition ---------- */

.curtain { position: fixed; inset: 0; z-index: 180; pointer-events: none; }
.curtain span {
  position: absolute; inset: 0; transform-origin: top;
  background: var(--c1);
}
.curtain span:last-child { background: var(--night-2); }
body:not(.is-ready) .curtain span { transform: scaleY(1); }
body.is-ready .curtain span { transform: scaleY(0); transition: transform .9s var(--ease-io); }
body.is-ready .curtain span:first-child { transition-delay: .12s; }
body.is-leaving .curtain span { transform-origin: bottom; transform: scaleY(1); transition: transform .6s var(--ease-io); }
body.is-leaving .curtain span:first-child { transition-delay: 0s; }
body.is-leaving .curtain span:last-child { transition-delay: .1s; }

/* ---------- Navigation ---------- */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem var(--pad);
  transition: padding .5s var(--ease-out), background .5s, backdrop-filter .5s, transform .6s var(--ease-out);
}
.nav.is-scrolled {
  padding-top: .7rem; padding-bottom: .7rem;
  background: rgba(13, 10, 24, .6);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.nav.is-hidden { transform: translateY(-110%); }
.nav__brand {
  display: flex; align-items: center; gap: .7rem; text-decoration: none;
  font: 800 1.15rem var(--f-display); letter-spacing: -.02em;
}
.nav__brand img { height: 38px; width: auto; }
.nav__mark {
  width: 22px; height: 22px; border-radius: 7px; background: var(--grad);
  animation: spin 8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.nav__links { display: flex; align-items: center; gap: clamp(.8rem, 2.5vw, 2rem); }
.nav__links a {
  position: relative; text-decoration: none; font-weight: 500; font-size: .98rem;
}
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px;
  background: var(--grad); transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease-out);
}
.nav__links a:not(.nav__cta):hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta {
  padding: .55rem 1.1rem; border-radius: 999px;
  border: 1px solid rgba(var(--c1-rgb), .6);
  transition: background .3s, border-color .3s;
}
.nav__cta:hover { background: rgba(var(--c1-rgb), .2); border-color: var(--c2); }
@media (max-width: 560px) { .nav__links a:not(.nav__cta) { display: none; } }

/* ---------- Boutons ---------- */

.btn {
  --h: 3.4rem;
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  height: var(--h); padding: 0 1.8rem; border-radius: 999px; overflow: hidden;
  text-decoration: none; font-weight: 600; font-size: 1rem; cursor: pointer; border: 0;
  isolation: isolate;
}
.btn span { position: relative; z-index: 1; transition: transform .5s var(--ease-out); }
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 10px 40px -10px rgba(var(--c1-rgb), .8); }
.btn--primary::before {
  content: ""; position: absolute; inset: 0; z-index: 0; background: var(--ink);
  transform: translateY(101%); border-radius: 50% 50% 0 0;
  transition: transform .6s var(--ease-out), border-radius .6s var(--ease-out);
}
.btn--primary:hover::before { transform: translateY(0); border-radius: 0; }
.btn--primary:hover { color: var(--night); }
.btn--ghost { color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); background: rgba(255,255,255,.02); }
.btn--ghost:hover { box-shadow: inset 0 0 0 1px rgba(var(--c2-rgb), .8); }

/* ---------- Hero ---------- */

.hero {
  position: relative; min-height: 100svh; display: grid;
  grid-template-rows: 1fr auto; overflow: hidden;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__fallback {
  position: absolute; inset: 0; display: none; place-items: center;
  font: 900 clamp(4rem, 22vw, 22rem)/1 var(--f-display); letter-spacing: -.04em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 12vh;
}
.no-canvas .hero__fallback { display: grid; }
.hero__aurora { position: absolute; inset: 0; filter: blur(80px); opacity: .55; pointer-events: none; }
.hero__aurora i {
  position: absolute; border-radius: 50%; mix-blend-mode: screen;
  animation: float 18s var(--ease-io) infinite alternate;
}
.hero__aurora i:nth-child(1) { width: 45vw; height: 45vw; left: -10vw; top: 5vh; background: rgba(var(--c1-rgb), .45); }
.hero__aurora i:nth-child(2) { width: 38vw; height: 38vw; right: -8vw; top: 25vh; background: rgba(var(--c2-rgb), .35); animation-delay: -6s; }
.hero__aurora i:nth-child(3) { width: 30vw; height: 30vw; left: 35vw; bottom: -15vw; background: rgba(var(--c1-rgb), .3); animation-delay: -12s; }
@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, -4vh) scale(1.15); }
  100% { transform: translate(-4vw, 5vh) scale(.9); }
}
.hero__foot {
  position: relative; z-index: 2; grid-row: 2;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 2rem;
  padding: 0 var(--pad) clamp(2rem, 7vh, 4.5rem);
}
.hero__tagline {
  max-width: 34ch; margin: 0; font-size: clamp(1.1rem, 1.6vw, 1.4rem); line-height: 1.45; color: var(--ink);
}
.hero__tagline .w { display: inline-block; overflow: hidden; vertical-align: top; }
.hero__tagline .w > span {
  display: inline-block; transform: translateY(110%);
  transition: transform 1s var(--ease-out); transition-delay: calc(1s + var(--d) * 28ms);
}
.is-ready .hero__tagline .w > span { transform: none; }
.hero__actions { display: flex; gap: .8rem; flex-wrap: wrap; opacity: 0; transform: translateY(20px); transition: 1s var(--ease-out) 1.5s; }
.is-ready .hero__actions { opacity: 1; transform: none; }
.hero__scroll {
  position: absolute; z-index: 2; left: 50%; bottom: 1.2rem; width: 1px; height: 52px;
  background: var(--line); overflow: hidden;
}
.hero__scroll span { position: absolute; inset: 0; background: var(--grad); animation: drip 2.2s var(--ease-io) infinite; }
@keyframes drip { 0% { transform: translateY(-100%); } 60%, 100% { transform: translateY(100%); } }
@media (max-width: 720px) { .hero__scroll { display: none; } }

/* ---------- Bandeau compétences ---------- */

.ticker {
  --skew: 0deg;
  position: relative; overflow: hidden; padding: 1.6rem 0;
  border-block: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(var(--c1-rgb), .08), rgba(var(--c2-rgb), .08));
  transform: skewY(calc(var(--skew) * -.25));
}
.ticker__track { display: flex; width: max-content; will-change: transform; }
.ticker__group { display: flex; align-items: center; gap: 2.2rem; padding-right: 2.2rem; }
.ticker__item {
  font: 800 clamp(1.8rem, 4.5vw, 3.6rem)/1 var(--f-display); letter-spacing: -.03em;
  white-space: nowrap; transform: skewX(var(--skew));
}
.ticker__item.is-outline { color: transparent; -webkit-text-stroke: 1.5px var(--ink); }
.ticker__star { width: clamp(20px, 2.4vw, 34px); fill: var(--c2); flex: none; animation: spin 6s linear infinite; }

/* ---------- Projets ---------- */

.work { padding: clamp(5rem, 12vw, 9rem) var(--pad) 4rem; }
.work__head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 2rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.work__head .display { font-size: clamp(3.2rem, 11vw, 9.5rem); }
.work__head sup {
  font-size: .22em; letter-spacing: 0; vertical-align: top; margin-left: .3em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

.filters {
  position: relative; display: flex; flex-wrap: wrap; gap: .3rem; padding: .35rem;
  border-radius: 999px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line);
}
.filters__pill {
  position: absolute; top: 0; left: 0; height: 0; width: 0; border-radius: 999px;
  background: var(--grad); box-shadow: 0 8px 30px -8px rgba(var(--c1-rgb), .9);
  transition: transform .6s var(--ease-out), width .6s var(--ease-out), height .6s var(--ease-out);
}
.filters__btn {
  position: relative; z-index: 1; border: 0; background: none; cursor: pointer;
  padding: .6rem 1.1rem; border-radius: 999px; font-weight: 500; color: var(--mute);
  transition: color .3s;
}
.filters__btn small { font-size: .72em; opacity: .7; margin-left: .2em; }
.filters__btn:hover { color: var(--ink); }
.filters__btn.is-active { color: #fff; }

.grid {
  display: grid; gap: clamp(1rem, 2vw, 1.6rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  grid-auto-flow: dense;
}
@media (min-width: 900px) { .card--wide { grid-column: span 2; } }

.card {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  position: relative; display: flex; flex-direction: column; text-decoration: none;
  border-radius: var(--r); background: var(--night-2);
  box-shadow: inset 0 0 0 1px var(--line);
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .6s var(--ease-out), box-shadow .4s;
}
.card.is-tilting { transition: transform .12s linear, box-shadow .4s; }
.card:hover { box-shadow: inset 0 0 0 1px rgba(var(--c2-rgb), .35), 0 30px 80px -30px var(--cat); }
.card.is-hidden { display: none; }
.card__media {
  position: relative; overflow: hidden; border-radius: var(--r) var(--r) 6px 6px;
  aspect-ratio: 16 / 10; background: var(--panel);
}
.card--wide .card__media { aspect-ratio: 21 / 10; }
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.04); transition: transform 1.2s var(--ease-out), filter .8s;
}
.card:hover .card__media img { transform: scale(1.12); }
.card__glare {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(circle at var(--mx) var(--my), rgba(255,255,255,.28), transparent 45%);
  mix-blend-mode: overlay;
}
.card:hover .card__glare { opacity: 1; }

/* Couverture générée quand aucune image n'est fournie */
.card__gen {
  position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden;
  background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--cat) 70%, transparent), transparent 60%),
    radial-gradient(90% 90% at 100% 100%, rgba(var(--c2-rgb), .55), transparent 60%),
    var(--panel);
}
.card__gen::before {
  content: ""; position: absolute; inset: 0; opacity: .25;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 28px 28px;
  transform: perspective(500px) rotateX(55deg) translateY(30%) scale(2);
  transform-origin: bottom;
}
.card__gen span {
  position: relative; font: 900 clamp(4rem, 9vw, 7rem)/1 var(--f-display); letter-spacing: -.05em;
  color: transparent; -webkit-text-stroke: 2px rgba(255, 255, 255, .85);
  transition: transform 1s var(--ease-out), color .6s;
}
.card:hover .card__gen span { transform: scale(1.12) rotate(-4deg); color: rgba(255,255,255,.95); }
.card__gen--xl span { font-size: clamp(6rem, 22vw, 18rem); }

.card__body { padding: 1.3rem 1.4rem 1.5rem; transition: transform .6s var(--ease-out); }
.card.is-tilting .card__body { transform: translateZ(30px); }
.card__meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; font-size: .85rem; color: var(--mute); }
.card__cat { display: inline-flex; align-items: center; gap: .5rem; }
.card__cat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cat); box-shadow: 0 0 12px var(--cat); }
.card__title {
  margin: .55rem 0 .35rem; font: 600 clamp(1.25rem, 1.9vw, 1.6rem)/1.15 var(--f-display); letter-spacing: -.02em;
}
.card--wide .card__title { font-size: clamp(1.5rem, 2.6vw, 2.2rem); }
.card__sum { margin: 0; color: var(--mute); font-size: .98rem; max-width: 60ch; }
.card__tags { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.card__tags li {
  font-size: .78rem; padding: .25rem .65rem; border-radius: 999px;
  background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--line);
}

/* Entrée des cartes au scroll */
.js .card[data-reveal] { opacity: 0; transform: translateY(60px) scale(.96); }
.js .card[data-reveal].is-in {
  opacity: 1; transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: opacity 1s var(--ease-out), transform 1.1s var(--ease-out);
  transition-delay: calc(var(--stagger, 0) * 90ms);
}

.empty {
  padding: 5rem 2rem; text-align: center; border-radius: var(--r);
  border: 1px dashed var(--line); color: var(--mute);
}

/* ---------- À propos ---------- */

.about, .contact { padding: clamp(5rem, 12vw, 9rem) var(--pad); }
.about__label {
  margin: 0 0 2rem; font: 500 1rem var(--f-body); color: var(--mute);
  display: flex; align-items: center; gap: .8rem;
}
.about__label::before { content: ""; width: 34px; height: 2px; background: var(--grad); }
.about__text {
  margin: 0; max-width: 24ch;
  font: 600 clamp(1.8rem, 4.6vw, 4rem)/1.12 var(--f-display); letter-spacing: -.03em;
}
.about__text .word { color: rgba(237, 233, 255, .14); transition: color .35s; }
.about__text .word.is-lit { color: var(--ink); }

/* ---------- Contact ---------- */

.contact { border-top: 1px solid var(--line); }
.contact__big {
  display: inline-flex; flex-direction: column; text-decoration: none;
  font: 900 clamp(2.6rem, 9vw, 8.5rem)/.95 var(--f-display); letter-spacing: -.045em;
}
.contact__line--grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.contact__line--grad:has(.ch) { background: none; color: inherit; }
.contact__line--grad .ch { color: color-mix(in oklab, var(--c1), var(--c2) calc(var(--p) * 100%)); }
.contact__big .ch { display: inline-block; transition: transform .5s var(--ease-out); }
.contact__big:hover .ch { transform: translateY(calc(sin(var(--k) * 1rad) * -.12em)) rotate(calc(sin(var(--k) * 1rad) * 6deg)); }
.contact__mail { margin: 1.5rem 0 0; color: var(--mute); font-size: 1.1rem; }
.socials { display: flex; flex-wrap: wrap; gap: .7rem; list-style: none; padding: 0; margin: 3rem 0 0; }
.socials a, .socials__plain {
  display: inline-block; padding: .75rem 1.3rem; border-radius: 999px; text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--line); transition: background .3s, box-shadow .3s;
}
.socials a:hover { background: rgba(var(--c1-rgb), .18); box-shadow: inset 0 0 0 1px rgba(var(--c1-rgb), .7); }
.socials__plain { color: var(--mute); }

/* ---------- Pied de page ---------- */

.foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 2rem var(--pad); border-top: 1px solid var(--line); color: var(--mute); font-size: .92rem;
}
.foot p { margin: 0; }
.foot__top { text-decoration: none; padding: .5rem 1rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); }

/* ---------- Page projet ---------- */

.project { padding-top: clamp(7rem, 14vh, 9rem); }
.project__head { padding: 0 var(--pad); }
.project__back {
  display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--mute);
  padding: .5rem 1rem .5rem .7rem; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line);
  transition: color .3s, box-shadow .3s;
}
.project__back svg { width: 18px; height: 18px; }
.project__back:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--cat); }
.project__title {
  margin: 2.5rem 0 1.2rem; max-width: 16ch;
  font: 900 clamp(2.8rem, 9vw, 8rem)/.92 var(--f-display); letter-spacing: -.045em;
}
.project__title .ch {
  display: inline-block; opacity: 0; transform: translateY(.5em) rotate(8deg);
  transition: opacity .8s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: calc(.55s + var(--k) * 30ms);
}
.is-ready .project__title .ch { opacity: 1; transform: none; }
.project__lead { margin: 0; max-width: 52ch; color: var(--mute); font-size: clamp(1.1rem, 1.6vw, 1.3rem); }
.project__facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.5rem 2rem;
  margin: 3rem 0 0; padding: 1.6rem 0; border-block: 1px solid var(--line);
}
.project__facts dt { color: var(--mute); font-size: .85rem; margin-bottom: .35rem; }
.project__facts dd { margin: 0; font-weight: 500; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.project__facts .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cat); box-shadow: 0 0 12px var(--cat); }
.project__links a { text-decoration: underline; text-decoration-color: var(--cat); text-underline-offset: 4px; margin-right: .8rem; }
.project__cover {
  position: relative; margin: clamp(2.5rem, 6vw, 4.5rem) var(--pad) 0; border-radius: calc(var(--r) * 1.4);
  overflow: hidden; aspect-ratio: 16 / 8; background: var(--panel);
}
.project__cover img { width: 100%; height: 115%; object-fit: cover; will-change: transform; }
.project__content {
  max-width: 68ch; margin: clamp(3rem, 7vw, 6rem) auto; padding: 0 var(--pad);
  font-size: clamp(1.05rem, 1.25vw, 1.2rem); line-height: 1.75; color: #D8D3EE;
}
.project__content p:first-child::first-line { color: var(--ink); font-weight: 600; }

.gallery {
  display: grid; gap: 1rem; padding: 0 var(--pad); margin-top: clamp(1rem, 3vw, 2rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.gallery__item {
  padding: 0; border: 0; border-radius: var(--r); overflow: hidden; cursor: zoom-in;
  aspect-ratio: 4 / 3; background: var(--panel);
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.gallery__item:hover img { transform: scale(1.07); }

.lightbox {
  position: fixed; inset: 0; z-index: 170; display: grid; place-items: center;
  background: rgba(8, 6, 16, .92); backdrop-filter: blur(10px);
  animation: fade .35s var(--ease-out);
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 88vw; max-height: 82vh; border-radius: 14px; animation: pop .5s var(--ease-out); }
.lightbox__close, .lightbox__nav {
  position: absolute; border: 0; cursor: pointer; width: 54px; height: 54px; border-radius: 50%;
  background: rgba(255, 255, 255, .08); font-size: 1.8rem; line-height: 1; transition: background .3s;
}
.lightbox__close:hover, .lightbox__nav:hover { background: var(--c1); }
.lightbox__close { top: 1.2rem; right: 1.2rem; }
.lightbox__nav--prev { left: 1.2rem; }
.lightbox__nav--next { right: 1.2rem; }
.lightbox__count { position: absolute; bottom: 1rem; margin: 0; color: var(--mute); font-size: .9rem; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.92); } }

.next {
  position: relative; display: block; margin-top: clamp(4rem, 10vw, 8rem); overflow: hidden;
  padding: clamp(3rem, 9vw, 7rem) var(--pad); text-decoration: none; border-top: 1px solid var(--line);
  isolation: isolate;
}
.next::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, var(--cat), var(--c2));
  transform: scaleY(0); transform-origin: bottom; transition: transform .8s var(--ease-io);
}
.next:hover::before { transform: scaleY(1); }
.next__label { display: block; color: var(--mute); margin-bottom: 1rem; transition: color .5s; }
.next:hover .next__label { color: rgba(255, 255, 255, .85); }
.next__title {
  display: block; font: 900 clamp(2.4rem, 8vw, 7rem)/.95 var(--f-display); letter-spacing: -.045em;
  transition: transform .8s var(--ease-out);
}
.next:hover .next__title { transform: translateX(2vw); }

.notfound { min-height: 80vh; display: grid; place-content: center; justify-items: start; gap: 1.2rem; padding: 8rem var(--pad) 4rem; }
.notfound .display { font-size: clamp(6rem, 25vw, 18rem); background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound p { margin: 0; color: var(--mute); font-size: 1.2rem; }

/* ---------- Mouvement réduit ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important;
  }
  html { scroll-behavior: auto; }
  .grain { display: none; }
  .js .card[data-reveal] { opacity: 1; transform: none; }
  .about__text .word { color: var(--ink); }
}
