:root {
  --bg: #0a0a0a;
  --fg: #f4f4f1;
  --muted: #8a8a86;
  --line: rgba(244, 244, 241, .16);
  --pad: clamp(18px, 3vw, 44px);
  --sans: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--fg); color: var(--bg); }
.label {
  font-size: 12px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted);
}
em { font-family: var(--serif); font-style: italic; font-weight: 400; }

/* ---------- NAV (barre flottante) ---------- */
.nav {
  position: fixed; top: 16px; left: 0; right: 0; margin: 0 auto; z-index: 50;
  width: fit-content; max-width: calc(100% - 20px);
  display: flex; align-items: center; gap: 4px; padding: 8px;
  background: rgba(12, 12, 12, .72); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: 18px;
}
.nav__logo {
  width: 38px; height: 38px; border-radius: 50%; flex: none; margin: 0 10px 0 4px;
  background: var(--fg); color: var(--bg); display: grid; place-items: center;
  font-weight: 900; font-size: 18px; letter-spacing: -.04em;
  transition: transform .4s cubic-bezier(.65, 0, .35, 1);
}
.nav__logo:hover { transform: rotate(-12deg) scale(1.06); }
.brand { position: fixed; top: 27px; left: var(--pad); z-index: 50; font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
@media (max-width: 620px) { .brand { display: none; } }
.nav__links { display: flex; gap: 2px; }
.nav__links a {
  padding: 9px 14px; border-radius: 11px; font-size: 15px; font-weight: 600;
  letter-spacing: -.01em; white-space: nowrap; transition: background .25s;
}
.nav__links a:hover, .nav__links a.is-active { background: rgba(244, 244, 241, .1); }
.nav__cta {
  margin-left: 10px; padding: 10px 17px; border-radius: 12px; white-space: nowrap;
  background: var(--fg); color: var(--bg); font-weight: 700; font-size: 15px; letter-spacing: -.01em;
  transition: transform .25s, background .25s;
}
.nav__cta:hover { transform: scale(1.04); background: #fff; }
@media (max-width: 620px) {
  .nav__links a { padding: 8px 9px; font-size: 14px; }
  .nav__cta { display: none; }
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px var(--pad) var(--pad);
}
.hero__top {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--pad);
  align-items: end; margin-bottom: clamp(24px, 4vw, 56px);
}
.hero__intro {
  font-size: clamp(22px, 2.6vw, 40px); line-height: 1.12;
  font-weight: 500; letter-spacing: -.02em; max-width: 22ch;
}
.hero__meta { justify-self: end; text-align: right; display: grid; gap: 8px; }
.status { display: inline-flex; align-items: center; gap: 10px; justify-content: flex-end; }
.status i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--fg);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .2; } }
.hero__title {
  font-weight: 900; text-transform: uppercase; line-height: .8;
  letter-spacing: -.03em; font-size: 14vw; white-space: nowrap;
  margin-left: -.04em; border-top: 1px solid var(--line); padding-top: .12em;
}
.hero__clip { display: block; padding-bottom: .06em; }
.hero__word { display: inline-block; transform-origin: center; }

/* ---------- LANCEMENT : le pseudo s'allume au centre puis prend sa place ---------- */
.ch { transition: opacity 1.1s cubic-bezier(.4, 0, .2, 1); }
body.intro { overflow: hidden; }
body.pre .hero__word { opacity: 0; }
body.intro .ch { opacity: .12; }
body.intro .ch.on { opacity: 1; }
/* Les autres éléments arrivent doucement, l'un après l'autre (--d = délai) */
.enter {
  transition:
    opacity 2s cubic-bezier(.65, 0, .35, 1) var(--d, 0s),
    transform 2.2s cubic-bezier(.65, 0, .35, 1) var(--d, 0s),
    filter 2s cubic-bezier(.65, 0, .35, 1) var(--d, 0s);
}
body.intro .enter { opacity: 0; transform: translateY(22px); filter: blur(4px); }
.hero__title { transition: border-color 2s ease 1s; }
body.intro .hero__title { border-color: transparent; }

/* ---------- BADGE SUSPENDU (physique : gravité + glisser) ---------- */
.hero { position: relative; }
.lanyard { position: absolute; inset: 0; z-index: 5; pointer-events: none; perspective: 900px; visibility: hidden; }
.lanyard.live { visibility: visible; }
.lanyard svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lanyard text { font: 800 8.5px var(--sans); letter-spacing: .22em; fill: #0a0a0a; }
.badge {
  position: absolute; left: 0; top: 0; font-size: 14px;
  width: 15.6em; height: 22em; transform-origin: 50% -12px; will-change: transform;
  pointer-events: auto; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none;
  background: linear-gradient(155deg, #ffffff, #dcdcd7 70%); color: #0a0a0a;
  border-radius: 1.2em; padding: 2.5em 1.1em 1.1em;
  display: flex; flex-direction: column; gap: .8em;
  box-shadow: 0 30px 60px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 255, 255, .7);
}
.badge:active { cursor: grabbing; }
.badge__clip { position: absolute; left: 50%; top: -18px; width: 10px; height: 34px; margin-left: -5px; border-radius: 5px; background: linear-gradient(90deg, #8d8d8d, #e9e9e9, #8d8d8d); }
.badge__slot { position: absolute; left: 50%; top: .85em; width: 3.4em; height: .7em; margin-left: -1.7em; border-radius: 1em; background: #0a0a0a; }
.badge__head { display: flex; justify-content: space-between; align-items: baseline; }
.badge__head b { font-size: 1.55em; font-weight: 900; letter-spacing: -.04em; line-height: 1; text-transform: uppercase; }
.badge__head span, .badge__foot span { font-size: .62em; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.badge__logo { flex: 1; background: #0a0a0a; border-radius: .8em; display: grid; place-items: center; }
.badge__logo { position: relative; overflow: hidden; }
.badge__slide { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transform: scale(.82) rotate(-8deg); transition: opacity .7s cubic-bezier(.65, 0, .35, 1), transform .9s cubic-bezier(.65, 0, .35, 1); }
.badge__slide.on { opacity: 1; transform: none; }
.badge__slide svg, .badge__slide img { position: static; width: 52%; height: auto; }
#badgeName, #badgeSub { transition: opacity .35s ease; }
.badge__foot { display: flex; justify-content: space-between; align-items: flex-end; }
.badge__bars { width: 4.6em; height: 1.7em; background: repeating-linear-gradient(90deg, #0a0a0a 0 2px, transparent 2px 4px, #0a0a0a 4px 5px, transparent 5px 9px); }
@media (max-width: 820px) { .lanyard { display: none; } }

/* ---------- PARTENAIRES ---------- */
.partners { padding: clamp(36px, 5vw, 70px) var(--pad) 0; text-align: center; }
.partners p { color: var(--muted); font-size: 15px; margin-bottom: clamp(24px, 3vw, 44px); }
.partners { padding-left: 0; padding-right: 0; }
.partners__track { display: flex; align-items: center; width: max-content; animation: slide 32s linear infinite; }
.partners__row:hover .partners__track { animation-play-state: paused; }
.partner { flex: none; margin-right: clamp(48px, 6vw, 96px); white-space: nowrap; }
.partners__row {
  overflow: hidden; max-width: 1200px; margin: 0 auto;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
}
.partner { display: inline-flex; align-items: center; gap: 10px; height: 40px; font-weight: 800; font-size: 26px; letter-spacing: -.03em; color: var(--fg); }
.partner img { height: 100%; width: auto; filter: grayscale(1) brightness(0) invert(1); }
.partner svg { height: 30px; width: auto; }

/* ---------- MARQUEE ---------- */
.marquee { overflow: hidden; padding: clamp(40px, 6vw, 90px) 0; }
.marquee__track { display: flex; gap: 18px; width: max-content; animation: slide 46s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.tile {
  width: clamp(220px, 24vw, 360px); aspect-ratio: 4 / 5; flex: none;
  border: 1px solid var(--line); position: relative; overflow: hidden;
  display: flex; align-items: flex-end; padding: 16px;
}
.tile b { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; position: relative; background: var(--bg); padding: 4px 8px; }
.tile img, .card__visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }

/* Motifs noir & blanc (remplacés par tes images quand tu les ajoutes) */
.p1 { background: repeating-linear-gradient(135deg, var(--fg) 0 2px, transparent 2px 16px); }
.p2 { background: radial-gradient(var(--fg) 1.6px, transparent 1.8px) 0 0 / 18px 18px; }
.p3 { background: linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 32px, linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 32px 100%; }
.p4 { background: repeating-radial-gradient(circle at 50% 110%, var(--fg) 0 2px, transparent 2px 26px); }
.p5 { background: var(--fg); }
.p6 { background: repeating-linear-gradient(90deg, var(--fg) 0 10px, transparent 10px 30px); }

/* ---------- SECTIONS ---------- */
section { padding: clamp(60px, 9vw, 140px) var(--pad); }
.head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--line); padding-bottom: 20px;
  margin-bottom: clamp(28px, 4vw, 56px);
}
.head h2 { font-size: clamp(38px, 6.4vw, 104px); font-weight: 800; letter-spacing: -.045em; line-height: .95; }

/* ---------- WORK ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(18px, 2.4vw, 36px) clamp(18px, 2.4vw, 36px); }
.card { display: block; }
.card__visual {
  aspect-ratio: 16 / 11; border: 1px solid var(--line); position: relative;
  overflow: hidden; display: grid; place-items: center;
}
.card__visual img { transition: transform .8s cubic-bezier(.2, .7, .2, 1); }
.card:hover .card__visual img { transform: scale(1.06); }
.card__mark {
  position: relative; font-weight: 900; text-transform: uppercase;
  font-size: clamp(34px, 5vw, 80px); letter-spacing: -.05em;
  background: var(--bg); padding: .04em .22em .08em; line-height: 1;
  transition: letter-spacing .5s cubic-bezier(.2, .7, .2, 1);
}
.card:hover .card__mark { letter-spacing: -.01em; }
.card__info { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; gap: 16px; }
.card__info h3 { font-size: clamp(18px, 1.7vw, 26px); font-weight: 600; letter-spacing: -.02em; }
.card__info p { color: var(--muted); font-size: 14px; margin-top: 4px; max-width: 46ch; }

/* ---------- ABOUT ---------- */
.about { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(28px, 5vw, 90px); }
.about h2 { font-size: clamp(38px, 5.6vw, 92px); font-weight: 800; letter-spacing: -.045em; line-height: .95; margin-bottom: 28px; }
.about__text { font-size: clamp(18px, 1.6vw, 24px); line-height: 1.35; max-width: 34ch; color: #d2d2ce; }
.about__portrait { aspect-ratio: 4 / 5; border: 1px solid var(--line); position: relative; overflow: hidden; display: grid; place-items: center; }
.about__portrait span { background: var(--bg); padding: 4px 10px; position: relative; }
.lists { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: clamp(36px, 5vw, 72px); }
.lists ul { list-style: none; margin-top: 14px; }
.lists li { padding: 11px 0; border-top: 1px solid var(--line); font-size: 17px; font-weight: 500; letter-spacing: -.01em; }
.btn {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 40px;
  border: 1px solid var(--fg); border-radius: 999px; padding: 15px 26px;
  font-weight: 600; font-size: 14px; letter-spacing: .1em; text-transform: uppercase;
  transition: background .3s, color .3s;
}
.btn:hover { background: var(--fg); color: var(--bg); }
.btn span { transition: transform .3s; }
.btn:hover span { transform: translate(3px, -3px); }

/* ---------- CONTACT ---------- */
.contact { background: var(--fg); color: var(--bg); --line: rgba(10, 10, 10, .18); --muted: #5d5d59; }
.contact h2 { font-size: clamp(46px, 10.5vw, 190px); font-weight: 900; letter-spacing: -.055em; line-height: .86; text-transform: uppercase; }
.contact__row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px;
  margin-top: clamp(40px, 6vw, 90px); border-top: 1px solid var(--line); padding-top: 24px; align-items: start;
}
.contact__row ul { list-style: none; margin-top: 12px; }
.contact__row li a { font-size: clamp(20px, 2vw, 30px); font-weight: 600; letter-spacing: -.02em; display: inline-flex; gap: 8px; }
.contact__row li a:hover { font-family: var(--serif); font-style: italic; font-weight: 400; }
.contact__row p { margin-top: 12px; font-size: 17px; max-width: 30ch; }
.contact .btn { border-color: var(--bg); margin-top: 12px; justify-self: end; }
.contact .btn:hover { background: var(--bg); color: var(--fg); }

footer {
  display: flex; justify-content: space-between; padding: 22px var(--pad);
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}

/* ---------- REVEAL ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 820px) {
  .hero__top, .about, .grid, .contact__row, .lists { grid-template-columns: 1fr; }
  .hero__meta { justify-self: start; text-align: left; }
  .status { justify-content: flex-start; }
  .contact .btn { justify-self: start; }
  .head .label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero__title span { transform: none; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- PAGES SECONDAIRES (projets, réseaux) ---------- */
.sub main { animation: pageIn 1s cubic-bezier(.65, 0, .35, 1) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(24px); } }
.page-head { padding: clamp(130px, 16vw, 210px) var(--pad) clamp(30px, 4vw, 60px); }
.page-head h1 {
  font-size: clamp(64px, 15vw, 250px); font-weight: 900; text-transform: uppercase;
  letter-spacing: -.04em; line-height: .84; margin: 14px 0 28px -.04em;
}
.page-head p { font-size: clamp(18px, 1.7vw, 26px); max-width: 44ch; color: #d2d2ce; line-height: 1.3; }
.page-body { padding-top: 0; }

.project {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4.5vw, 80px);
  align-items: center; padding: clamp(32px, 5vw, 76px) 0; border-top: 1px solid var(--line);
  scroll-margin-top: 90px;
}
.project:nth-child(even) .card__visual { order: 2; }
.project h2 { font-size: clamp(36px, 4.8vw, 76px); font-weight: 800; letter-spacing: -.045em; line-height: .95; margin: 12px 0 18px; }
.project__desc { font-size: clamp(17px, 1.35vw, 20px); color: #d2d2ce; max-width: 46ch; }
.project dl { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 6px clamp(24px, 3vw, 48px); margin-top: 30px; }
.project dt { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); grid-row: 1; }
.project dd { font-size: 16px; font-weight: 600; grid-row: 2; }

.socials { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(14px, 1.6vw, 24px); }
.social {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-height: 250px;
  padding: clamp(22px, 2.4vw, 34px); border: 1px solid var(--line); border-radius: 22px;
  transition: background .45s cubic-bezier(.65, 0, .35, 1), color .45s cubic-bezier(.65, 0, .35, 1), transform .45s cubic-bezier(.65, 0, .35, 1);
}
.social:hover { background: var(--fg); color: var(--bg); transform: translateY(-4px); }
.social__icon { width: 54px; height: 54px; border-radius: 50%; border: 1px solid currentColor; display: grid; place-items: center; margin-bottom: auto; }
.social__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.social__arrow { position: absolute; top: clamp(22px, 2.4vw, 34px); right: clamp(22px, 2.4vw, 34px); font-size: 26px; transition: transform .45s cubic-bezier(.65, 0, .35, 1); }
.social:hover .social__arrow { transform: translate(4px, -4px); }
.social .label { color: inherit; opacity: .6; margin-top: 26px; }
.social h2 { font-size: clamp(28px, 3vw, 46px); font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.social p { max-width: 38ch; opacity: .75; }
.more { display: inline-flex; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; border-bottom: 1px solid currentColor; padding-bottom: 3px; }

@media (max-width: 820px) {
  .project, .socials { grid-template-columns: 1fr; }
  .project:nth-child(even) .card__visual { order: 0; }
}

/* ---------- PAGE PROJETS : ruban WebGL courbé (molette, glisser, défilement auto) ---------- */
body.work {
  height: 100vh; height: 100svh; overflow: hidden; overscroll-behavior: none;
  /* lueur floue aux couleurs du projet au centre (--acc change en fondu) */
  background:
    radial-gradient(75% 65% at 78% 0%, color-mix(in srgb, var(--acc) 46%, transparent), transparent 72%),
    radial-gradient(60% 55% at 0% 100%, color-mix(in srgb, var(--acc) 26%, transparent), transparent 70%),
    var(--bg);
}
.mono { font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; }
#strip { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; animation: pageIn 1.4s cubic-bezier(.65, 0, .35, 1) both; }
#strip.dragging { cursor: grabbing; }
#strip.over { cursor: pointer; }

/* Cube de verre */
.cube-wrap { position: fixed; left: 50%; top: 71%; width: 0; height: 0; perspective: 900px; pointer-events: none; animation: pageIn 1.8s cubic-bezier(.65, 0, .35, 1) .3s both; }
.cube { --s: clamp(84px, 9.5vw, 132px); position: absolute; width: var(--s); height: var(--s); left: calc(var(--s) / -2); top: calc(var(--s) / -2); transform-style: preserve-3d; }
.cube i {
  position: absolute; inset: 0; border: 1px solid rgba(255, 255, 255, .5);
  background: linear-gradient(135deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .02) 60%, rgba(255, 255, 255, .08));
  box-shadow: inset 0 0 26px rgba(255, 255, 255, .08);
}
.cube i:nth-child(1) { transform: translateZ(calc(var(--s) / 2)); }
.cube i:nth-child(2) { transform: rotateY(180deg) translateZ(calc(var(--s) / 2)); }
.cube i:nth-child(3) { transform: rotateY(90deg) translateZ(calc(var(--s) / 2)); }
.cube i:nth-child(4) { transform: rotateY(-90deg) translateZ(calc(var(--s) / 2)); }
.cube i:nth-child(5) { transform: rotateX(90deg) translateZ(calc(var(--s) / 2)); }
.cube i:nth-child(6) { transform: rotateX(-90deg) translateZ(calc(var(--s) / 2)); }
.cube b {
  position: absolute; left: 29%; top: 29%; width: 42%; height: 42%; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #cfcfca); color: #0a0a0a;
  display: grid; place-items: center; font-weight: 900; font-size: calc(var(--s) * .2);
}

.winfo { position: fixed; z-index: 3; left: var(--pad); right: var(--pad); bottom: var(--pad); display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; pointer-events: none; }
.winfo__main { max-width: min(520px, 36vw); transition: opacity .3s ease, transform .5s cubic-bezier(.65, 0, .35, 1); }
.winfo.swap .winfo__main, .winfo.swap .winfo__meta { opacity: 0; transform: translateY(10px); }
.winfo .label { font-size: 11px; }
.winfo h1 { font-size: clamp(30px, 3.6vw, 58px); font-weight: 800; letter-spacing: -.04em; line-height: .95; margin: 10px 0 10px; }
.winfo p { font-size: clamp(14px, 1.1vw, 17px); color: var(--muted); max-width: 46ch; }
.winfo__side { text-align: right; display: grid; gap: 16px; justify-items: end; }
.winfo__meta { display: grid; grid-template-columns: auto auto; gap: 5px 18px; text-align: left; transition: opacity .3s ease, transform .5s cubic-bezier(.65, 0, .35, 1); }
.winfo__meta dt { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.winfo__meta dd { font-size: 13px; font-weight: 600; }
.wbar { position: fixed; left: 50%; bottom: calc(var(--pad) - 4px); width: 96px; height: 1px; margin-left: -48px; background: var(--line); }
.wbar i { position: absolute; top: -4px; left: 0; width: 1px; height: 9px; background: var(--fg); }
@media (max-width: 820px) {
  .cube-wrap { top: 58%; }
  .winfo { flex-direction: column; align-items: flex-start; gap: 12px; }
  .winfo__main { max-width: none; }
  .winfo__side, .wbar { display: none; }
}

/* ---------- CONSTRUCTION PAR CURSEURS (accueil : de « Projets choisis » à « Salut ») ---------- */
.canvas {
  background-image: linear-gradient(rgba(244, 244, 241, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(244, 244, 241, .045) 1px, transparent 1px);
  background-size: 88px 88px; background-position: var(--pad) 0;
}
.js-build .build { clip-path: inset(0 100% 100% 0); }
.js-build .build.built { clip-path: inset(0 0 0 0); transition: clip-path .38s cubic-bezier(.85, 0, .1, 1); }
.js-build .build.done { clip-path: none; transition: none; }
.swarm { position: absolute; left: 0; top: 0; width: 100%; height: 0; z-index: 40; pointer-events: none; }
.swarm__box { position: absolute; border: 1px solid var(--fg); width: 0; height: 0; transition: width .38s cubic-bezier(.85, 0, .1, 1), height .38s cubic-bezier(.85, 0, .1, 1), opacity .35s ease; }
.swarm__box.flash { animation: boxFlash .32s ease-out; }
@keyframes boxFlash { 0% { background: rgba(244, 244, 241, .35); box-shadow: 0 0 0 3px var(--fg); } 100% { background: transparent; box-shadow: 0 0 0 0 transparent; } }
.swarm__box.out { opacity: 0; }
.swarm__box i { position: absolute; width: 7px; height: 7px; background: var(--bg); border: 1px solid var(--fg); }
.swarm__box i:nth-child(1) { left: -4px; top: -4px; } .swarm__box i:nth-child(2) { right: -4px; top: -4px; }
.swarm__box i:nth-child(3) { left: -4px; bottom: -4px; } .swarm__box i:nth-child(4) { right: -4px; bottom: -4px; }
.swarm__box span { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 8px); background: var(--fg); color: var(--bg); font: 600 10px/1 ui-monospace, Menlo, Consolas, monospace; padding: 4px 6px; border-radius: 3px; white-space: nowrap; }
.swarm__cur { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform; }
.swarm__cur.hit svg { transform: scale(.72) rotate(-8deg); }
.swarm__cur.hit::before { content: ""; position: absolute; left: -9px; top: -9px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--fg); animation: hitRing .38s ease-out forwards; }
@keyframes hitRing { to { transform: scale(2.6); opacity: 0; } }
.swarm__cur svg { display: block; width: 20px; height: 20px; transition: transform .12s; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .6)); }
.swarm__cur b { position: absolute; left: 15px; top: 17px; font: 700 11px/1 var(--sans); padding: 4px 8px; border-radius: 999px; white-space: nowrap; background: var(--fg); color: var(--bg); }
.swarm__cur.alt b { background: #1c1c1c; color: var(--fg); box-shadow: inset 0 0 0 1px rgba(244, 244, 241, .5); }

/* ---------- PAGE RÉSEAUX : nuage de points 3D, marqueurs cliquables, panneau latéral ---------- */
body.net { height: 100vh; height: 100svh; overflow: hidden; background: var(--bg); }
#cloud { position: fixed; inset: 0; width: 100%; height: 100%; }
#links { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#links line { stroke: rgba(244, 244, 241, .28); stroke-width: 1; }
.mk {
  position: fixed; left: 0; top: 0; z-index: 4; display: flex; align-items: center; gap: 12px;
  background: none; border: 0; color: var(--fg); cursor: pointer; padding: 0; text-align: left;
  font: 600 12px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  opacity: 0; transition: opacity .8s ease; will-change: transform;
}
.net.ready .mk { opacity: var(--o, 1); }
.mk__box { position: relative; width: 46px; height: 46px; display: grid; place-items: center; margin: -23px 0 -23px -23px; background: rgba(10, 10, 10, .82); transition: background .25s, color .25s; }
.mk__txt { background: rgba(10, 10, 10, .72); padding: 5px 8px; }
/* les quatre coins en équerre, comme un viseur */
.mk__box::before, .mk__box::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 9px 1px, linear-gradient(currentColor, currentColor) 0 0 / 1px 9px,
    linear-gradient(currentColor, currentColor) 100% 0 / 9px 1px, linear-gradient(currentColor, currentColor) 100% 0 / 1px 9px,
    linear-gradient(currentColor, currentColor) 0 100% / 9px 1px, linear-gradient(currentColor, currentColor) 0 100% / 1px 9px,
    linear-gradient(currentColor, currentColor) 100% 100% / 9px 1px, linear-gradient(currentColor, currentColor) 100% 100% / 1px 9px;
  background-repeat: no-repeat; }
.mk__box::after { display: none; }
.mk svg, .mk img { width: 22px; height: 22px; }
.mk svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mk small { display: block; font: 500 11px/1.3 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .02em; color: var(--muted); margin-top: 3px; }
.mk:hover .mk__box, .mk.is-open .mk__box { background: var(--fg); color: var(--bg); }
.net__pts { position: fixed; left: 0; top: 0; opacity: .6; font: 500 11px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; color: var(--muted); }
.net__title {
  position: fixed; left: var(--pad); bottom: var(--pad); z-index: 3; max-width: 13ch; pointer-events: none;
  font-family: var(--serif); font-weight: 400; text-transform: uppercase; font-size: clamp(34px, 4.6vw, 72px); line-height: .98; letter-spacing: -.02em;
  animation: pageIn 1.4s cubic-bezier(.65, 0, .35, 1) .3s both;
}
.net__list { position: fixed; right: var(--pad); bottom: var(--pad); z-index: 3; width: min(330px, 40vw); list-style: none; animation: pageIn 1.4s cubic-bezier(.65, 0, .35, 1) .45s both; }
.net__list button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; width: 100%; padding: 3px 0;
  font: 600 13px/1.4 var(--sans); letter-spacing: .06em; text-transform: uppercase; }
.net__list button span:last-child { color: var(--muted); }
.net__list button:hover span:first-child { text-decoration: underline; text-underline-offset: 4px; }

.sheet-dim { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; transition: opacity .5s ease; }
.sheet {
  position: fixed; z-index: 61; top: 12px; right: 12px; bottom: 12px; width: min(440px, calc(100vw - 24px));
  background: #0f0f0f; border: 1px solid var(--line); border-radius: 22px; overflow: hidden auto; overscroll-behavior: contain;
  transform: translateX(calc(100% + 24px)); transition: transform .6s cubic-bezier(.65, 0, .35, 1);
  scrollbar-width: thin; scrollbar-color: #3a3a3a transparent;
}
.net.sheet-open .sheet { transform: none; }
.net.sheet-open .sheet-dim { opacity: 1; pointer-events: auto; }
.sheet__close { position: sticky; top: 14px; float: right; margin: 14px 14px -54px 0; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(10, 10, 10, .75); color: var(--fg); font-size: 20px; line-height: 1; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.sheet__close:hover { background: var(--fg); color: var(--bg); }
.sheet__hero { height: 270px; position: relative; display: grid; place-items: center; overflow: hidden; border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 50% 50%, rgba(244, 244, 241, .16), transparent 62%), radial-gradient(var(--fg) 1px, transparent 1.3px) 0 0 / 14px 14px; }
.sheet__hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, transparent 20%, #0f0f0f 78%); }
.sheet__hero img.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sheet__icon { position: relative; width: 108px; height: 108px; border-radius: 28px; background: var(--fg); color: var(--bg); display: grid; place-items: center; box-shadow: 0 20px 50px rgba(0, 0, 0, .6); }
.sheet__icon svg, .sheet__icon img { width: 54px; height: 54px; }
.sheet__icon svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sheet__body { padding: 26px 24px 34px; }
.sheet__body h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 8px; }
.sheet__body h3 { font-size: 18px; font-weight: 800; letter-spacing: -.02em; margin: 30px 0 8px; }
.sheet__body p, .sheet__body li { font-size: 16px; line-height: 1.6; color: #e4e4e0; }
.sheet__body ul { padding-left: 20px; }
.sheet__body li { margin: 4px 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; margin: 12px 8px 0 0; padding: 5px 12px 5px 6px; border-radius: 999px; background: #262626; font-size: 13px; font-weight: 600; transition: background .2s, color .2s; }
.chip i { width: 20px; height: 20px; border-radius: 50%; background: var(--fg); color: var(--bg); display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; }
a.chip:hover { background: var(--fg); color: var(--bg); } a.chip:hover i { background: var(--bg); color: var(--fg); }
.chip.off { opacity: .55; }
@media (max-width: 820px) {
  .net__list, .net__pts, .mk small { display: none; }
  .net__title { font-size: 34px; }
}

/* Logo officiel fourni sur fond sombre : on le passe en blanc et le fond disparaît sur une surface noire */
.partner { background: var(--bg); }
.partner img.logo-w, .badge__slide img.logo-w { filter: grayscale(1) brightness(2.2) contrast(4); mix-blend-mode: screen; }
.partner img.logo-w { height: 44px; margin-right: 2px; }
.badge__slide { background: #0a0a0a; }
.badge__slide img.logo-w { width: 70%; }

/* Logos officiels des réseaux : blancs sur fond sombre, noirs quand la case passe en blanc */
.mk img, .sheet__icon img { object-fit: contain; }
.mk img { filter: grayscale(1) brightness(3) contrast(4); }
.mk:hover .mk__box img, .mk.is-open .mk__box img { filter: grayscale(1) brightness(3) contrast(4) invert(1); }
.sheet__icon img { filter: none; }

/* ---------- Couleur d'accent animée + page d'un projet ---------- */
@property --acc { syntax: '<color>'; inherits: true; initial-value: #f4f4f1; }
html { transition: --acc 1.1s cubic-bezier(.65, 0, .35, 1); }
.winfo__open { pointer-events: auto; cursor: pointer; border: 1px solid var(--fg); background: none; color: var(--fg); border-radius: 999px; padding: 11px 18px;
  font: 600 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; transition: background .3s, color .3s; }
.winfo__open:hover { background: var(--fg); color: var(--bg); }
.pd {
  position: fixed; inset: 0; z-index: 46; overflow: hidden auto; overscroll-behavior: contain; --ink: #fff;
  background:
    radial-gradient(90% 75% at 62% -8%, color-mix(in srgb, var(--acc) 62%, transparent), transparent 70%),
    radial-gradient(55% 60% at 0% 100%, color-mix(in srgb, var(--acc) 22%, transparent), transparent 72%),
    #0a0a0a;
  opacity: 0; transform: translateY(40px) scale(.985); pointer-events: none;
  transition: opacity .55s ease, transform .7s cubic-bezier(.65, 0, .35, 1);
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .25) transparent;
}
.pd-open .pd { opacity: 1; transform: none; pointer-events: auto; }
.pd__in { max-width: 1180px; margin: 0 auto; padding: 108px var(--pad) 70px; }
.pd__back { all: unset; cursor: pointer; font: 600 12px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
.pd__back:hover { opacity: 1; }
.pd__head { display: grid; grid-template-columns: auto 1fr; gap: clamp(22px, 3vw, 44px); align-items: end; margin-top: 30px; }
.pd__cover { width: clamp(150px, 19vw, 250px); aspect-ratio: 1; border-radius: 18px; background: var(--acc); color: var(--ink); display: grid; place-items: center; overflow: hidden; position: relative;
  box-shadow: 0 30px 80px color-mix(in srgb, var(--acc) 45%, transparent), 0 20px 50px rgba(0, 0, 0, .5); }
.pd__cover b { font-weight: 900; text-transform: uppercase; letter-spacing: -.04em; font-size: clamp(20px, 2.6vw, 38px); padding: 0 10px; text-align: center; }
.pd__cover svg, .pd__cover img { width: 56%; height: auto; }
.pd__cover img.fill { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd__head h1 { font-size: clamp(40px, 6.4vw, 96px); font-weight: 900; letter-spacing: -.045em; line-height: .92; margin: 10px 0 14px; }
.pd__desc { font-size: clamp(16px, 1.3vw, 19px); max-width: 60ch; color: #e6e6e2; }
.pd__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pd__chips span { background: rgba(255, 255, 255, .1); border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 600; }
.pd__chips i { font-style: normal; opacity: .6; margin-right: 7px; }
.pd__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.pd__go, .pd__alt { border-radius: 12px; padding: 12px 18px; font-weight: 700; font-size: 15px; transition: transform .25s, background .25s; }
.pd__go { background: var(--fg); color: var(--bg); } .pd__go:hover { transform: scale(1.04); }
.pd__alt { background: rgba(255, 255, 255, .1); } .pd__alt:hover { background: rgba(255, 255, 255, .2); }
.pd__cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(22px, 3vw, 44px); margin-top: clamp(34px, 5vw, 64px); align-items: start; }
.pd__list { list-style: none; background: rgba(10, 10, 10, .35); border: 1px solid rgba(255, 255, 255, .08); border-radius: 18px; padding: 8px; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.pd__list li { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; padding: 15px 12px; border-radius: 12px; font-size: 16px; font-weight: 600; transition: background .2s; }
.pd__list li:hover { background: rgba(255, 255, 255, .07); }
.pd__list em { font: 500 12px/1 "JetBrains Mono", ui-monospace, monospace; opacity: .55; font-style: normal; text-align: center; }
.pd__list small { font-size: 13px; font-weight: 500; opacity: .6; }
.pd__frame { display: block; border-radius: 18px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .12); background: rgba(10, 10, 10, .5); transition: transform .4s cubic-bezier(.65, 0, .35, 1); }
a.pd__frame:hover { transform: translateY(-5px); }
.pd__bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; background: rgba(255, 255, 255, .06); }
.pd__bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.pd__bar span { margin-left: 10px; font: 500 12px/1 "JetBrains Mono", ui-monospace, monospace; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd__shot { aspect-ratio: 16 / 10; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--ink);
  background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--acc) 100%, #fff 0%), color-mix(in srgb, var(--acc) 55%, #000)); }
.pd__shot img { width: 100%; height: 100%; object-fit: cover; grid-area: 1 / 1; }
.pd__shot b { font-weight: 900; text-transform: uppercase; letter-spacing: -.04em; font-size: clamp(26px, 3.4vw, 52px); }
.pd__shot small { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
@media (max-width: 820px) { .pd__head, .pd__cols { grid-template-columns: 1fr; } .pd__head { align-items: start; } }

/* Tuiles du carrousel : logo + nom d'une app, lien vers son Discord */
a.tile { background-color: var(--bg); color: var(--fg); transition: border-color .3s, transform .5s cubic-bezier(.65, 0, .35, 1); }
a.tile.p2 { background: radial-gradient(rgba(244, 244, 241, .35) 1.2px, transparent 1.5px) 0 0 / 22px 22px, var(--bg); }
a.tile:hover { border-color: var(--fg); transform: translateY(-6px); }
.tile__logo { position: absolute; inset: 0; display: grid; place-items: center; }
.tile__logo img, .tile__logo svg { width: 42%; height: auto; }
.tile__logo img.logo-w { filter: grayscale(1) brightness(2.2) contrast(4); mix-blend-mode: screen; }
.tile__logo em { font-family: var(--sans); font-style: normal; font-weight: 900; text-transform: uppercase; letter-spacing: -.04em; font-size: clamp(28px, 3vw, 46px); background: var(--bg); padding: .05em .25em; }
.tile__go { position: absolute; top: 16px; right: 16px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; background: var(--bg); padding: 4px 8px; opacity: 0; transition: opacity .3s; }
a.tile:hover .tile__go { opacity: 1; }

/* Compteur de vues : en haut à droite, en miroir du nom */
.views { position: fixed; top: 27px; right: var(--pad); z-index: 50; display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; letter-spacing: -.01em; color: var(--fg); }
.views svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }
@media (max-width: 620px) { .views { display: none; } }
