/* =========================================================
   DIGITAL ZOO — Noir & blanc
   ========================================================= */

:root {
  --black: #0a0a0a;
  --ink: #141414;
  --grey-900: #1c1c1c;
  --grey-700: #3a3a3a;
  --grey-500: #7a7a7a;
  --grey-300: #c9c9c9;
  --grey-100: #ececec;
  --white: #fafafa;

  --font-display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --nav-h: 72px;
  --radius: 4px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
body.no-scroll { overflow: hidden; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* ---------- Typo ---------- */
.eyebrow {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--grey-500);
}
.section__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: .01em;
}
.section__lead { max-width: 560px; margin: 16px 0 0; color: var(--grey-500); font-size: 17px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px;
  border: 1.5px solid currentColor;
  border-radius: var(--radius);
  background: transparent;
  font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--light { background: var(--white); color: var(--black); border-color: var(--white); }
.btn--light:hover { background: transparent; color: var(--white); }
.btn--ghost { color: var(--white); }
.btn--ghost:hover { background: var(--white); color: var(--black); }
.btn--small { padding: 9px 16px; font-size: 11px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  color: var(--white);
  transition: background .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(10,10,10,.92); backdrop-filter: blur(10px); border-color: var(--grey-900); }
.nav__logo { font-family: var(--font-display); font-size: 24px; letter-spacing: .04em; line-height: 1; }
.nav__logo span { display: inline-block; margin-left: 6px; padding: 2px 6px 1px; background: var(--white); color: var(--black); }
.nav__menu { display: flex; align-items: center; gap: 32px; }
.nav__menu a {
  position: relative;
  font-size: 13px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
}
.nav__menu a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 1.5px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .3s var(--ease);
}
.nav__menu a:hover::after, .nav__menu a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { padding: 9px 18px; border: 1.5px solid var(--white); border-radius: var(--radius); transition: background .25s, color .25s; }
.nav__cta:hover { background: var(--white); color: var(--black); }

.nav__burger {
  display: none;
  position: relative; z-index: 2;
  width: 44px; height: 44px; padding: 0;
  background: none; border: 0; color: inherit;
}
.nav__burger span {
  position: absolute; left: 10px; width: 24px; height: 2px; background: currentColor;
  transition: transform .3s var(--ease), opacity .2s;
}
.nav__burger span:nth-child(1) { top: 15px; }
.nav__burger span:nth-child(2) { top: 21px; }
.nav__burger span:nth-child(3) { top: 27px; }
.nav.is-open .nav__burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.is-open .nav__burger span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav__burger { display: block; }
  .nav__menu {
    position: fixed; inset: 0;
    flex-direction: column; justify-content: center; gap: 28px;
    background: var(--black);
    opacity: 0; visibility: hidden;
    transition: opacity .35s var(--ease), visibility .35s;
  }
  .nav__menu a { font-family: var(--font-display); font-size: 40px; font-weight: 400; letter-spacing: .02em; opacity: 0; transform: translateY(16px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
  .nav__menu a::after { display: none; }
  .nav__cta { border: 0; padding: 0; }
  .nav.is-open .nav__menu { opacity: 1; visibility: visible; }
  .nav.is-open .nav__menu a { opacity: 1; transform: none; }
  .nav.is-open .nav__menu a:nth-child(2) { transition-delay: .04s; }
  .nav.is-open .nav__menu a:nth-child(3) { transition-delay: .08s; }
  .nav.is-open .nav__menu a:nth-child(4) { transition-delay: .12s; }
  .nav.is-open .nav__menu a:nth-child(5) { transition-delay: .16s; }
  .nav.is-open .nav__menu a:nth-child(6) { transition-delay: .20s; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-end;
  color: var(--white); background: var(--black);
  overflow: hidden;
}
.hero__img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: grayscale(1) contrast(1.1);
  transform: scale(1.06); animation: heroZoom 12s var(--ease) forwards;
}
@keyframes heroZoom { to { transform: scale(1); } }
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.25) 40%, rgba(0,0,0,.85) 100%); }
.hero__content { position: relative; width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter) clamp(64px, 12vh, 120px); }
.hero .eyebrow { color: var(--grey-300); }
.hero__title {
  margin: 0;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(64px, 16vw, 220px); line-height: .88; letter-spacing: -.01em;
}
.hero__subtitle { max-width: 520px; margin: 20px 0 32px; font-size: clamp(16px, 2vw, 20px); color: var(--grey-100); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__scroll {
  position: absolute; right: var(--gutter); bottom: 32px;
  width: 48px; height: 48px; display: grid; place-items: center;
  border: 1.5px solid rgba(255,255,255,.5); border-radius: 50%;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(6px); } }
@media (max-width: 600px) { .hero__scroll { display: none; } .hero__actions .btn { flex: 1 1 100%; } }

/* ---------- Ticker ---------- */
.ticker { overflow: hidden; background: var(--white); color: var(--black); border-block: 1px solid var(--black); padding: 14px 0; }
.ticker__track { display: flex; gap: 32px; width: max-content; animation: ticker 28s linear infinite; }
.ticker__track span { font-family: var(--font-display); font-size: 28px; line-height: 1; white-space: nowrap; }
.ticker__track span:nth-child(even) { font-size: 14px; align-self: center; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 1200px; margin: 0 auto; }
.stat { padding: 48px var(--gutter); display: flex; flex-direction: column; gap: 6px; border-right: 1px solid var(--grey-100); }
.stat:last-child { border-right: 0; }
.stat__num { font-family: var(--font-display); font-size: clamp(48px, 7vw, 88px); line-height: 1; }
.stat__label { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--grey-500); }
@media (max-width: 760px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 32px var(--gutter); border-bottom: 1px solid var(--grey-100); }
  .stat:nth-child(2) { border-right: 0; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 12vw, 140px) 0; }
.section--dark { background: var(--black); color: var(--white); }
.section--dark .section__lead { color: var(--grey-300); }
.section__head { margin-bottom: clamp(40px, 6vw, 64px); }
.section__head--row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }

/* ---------- Vidéo ---------- */
.video {
  position: relative; aspect-ratio: 16 / 9; width: 100%;
  background: var(--grey-900); border: 1px solid var(--grey-700); overflow: hidden;
}
.video iframe, .video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video__empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--grey-500); font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }

/* ---------- Équipe ---------- */
.team { display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; background: var(--black); border: 2px solid var(--black); }
.member { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--ink); color: var(--white); }
.member img {
  width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: filter .5s var(--ease), transform .6s var(--ease);
}
.member:hover img { filter: grayscale(0); transform: scale(1.05); }
.member__info {
  position: absolute; inset: auto 0 0 0; padding: 40px 16px 16px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.9));
}
.member__num { position: absolute; top: 12px; left: 14px; font-family: var(--font-display); font-size: 18px; color: var(--white); mix-blend-mode: difference; }
.member__animal { display: block; font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 30px); line-height: 1; text-transform: uppercase; }
.member__name { display: block; margin-top: 6px; font-size: 13px; color: var(--grey-300); }
@media (max-width: 1000px) { .team { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .team { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Classement ---------- */
.board__meta { display: flex; align-items: center; gap: 16px; }
.board__status { font-size: 12px; letter-spacing: .08em; color: var(--grey-500); }
.board__status.is-error { color: var(--white); }

.board__summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-bottom: 40px; background: var(--grey-700); border: 1px solid var(--grey-700); }
.summary { padding: 24px; background: var(--black); }
.summary__label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--grey-500); }
.summary__value { display: block; margin-top: 8px; font-family: var(--font-display); font-size: clamp(28px, 4vw, 44px); line-height: 1.05; overflow-wrap: anywhere; }
.summary__sub { display: block; margin-top: 4px; font-size: 13px; color: var(--grey-300); }
@media (max-width: 700px) { .board__summary { grid-template-columns: 1fr; } }

.table-wrap { width: 100%; overflow-x: auto; }
.board { width: 100%; border-collapse: collapse; font-size: 15px; }
.board th {
  padding: 14px 16px; text-align: left;
  font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: var(--grey-500); border-bottom: 1px solid var(--grey-700);
  white-space: nowrap; user-select: none;
}
.board th[data-sort] { cursor: pointer; }
.board th[data-sort]:hover { color: var(--white); }
.board th.is-sorted { color: var(--white); }
.board th.is-sorted::after { content: " ↓"; }
.board th.is-sorted.is-asc::after { content: " ↑"; }
.board td { padding: 16px; border-bottom: 1px solid var(--grey-900); vertical-align: middle; }
.board tbody tr { transition: background .2s; }
.board tbody tr:hover { background: var(--grey-900); }
.col-rank { width: 64px; }
.col-num { text-align: right !important; white-space: nowrap; }
.rank { font-family: var(--font-display); font-size: 22px; color: var(--grey-500); }
.board tr.is-podium .rank { color: var(--white); }
.board tr.is-first td { background: var(--white); color: var(--black); }
.board tr.is-first .rank, .board tr.is-first .shame-pips { color: var(--black); }
.board tr.is-first:hover td { background: var(--grey-100); }
.player { display: flex; align-items: center; gap: 14px; }
.player__avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; object-fit: cover; filter: grayscale(1); border: 1.5px solid currentColor; }
.player__avatar--empty { display: grid; place-items: center; font-family: var(--font-display); font-size: 16px; background: var(--grey-900); }
.player__name { font-weight: 600; }
.player__animal { display: block; font-size: 12px; color: var(--grey-500); }
.score { font-family: var(--font-display); font-size: 24px; letter-spacing: .02em; }
.score small { font-family: var(--font-body); font-size: 11px; color: var(--grey-500); margin-left: 4px; }
.shame { display: inline-flex; align-items: center; gap: 10px; justify-content: flex-end; }
.shame__count { font-family: var(--font-display); font-size: 22px; }
.shame-pips { display: inline-flex; gap: 3px; color: var(--grey-500); }
.shame-pips i { width: 6px; height: 14px; background: currentColor; display: block; }
.board tr.is-shame-king .shame__count::before { content: "🐌 "; font-size: 16px; }
.board__empty { padding: 48px 16px !important; text-align: center; color: var(--grey-500); }
@media (max-width: 600px) {
  .board td, .board th { padding: 12px 8px; }
  .col-rank { width: 40px; }
  .shame-pips { display: none; }
  .player__avatar { width: 32px; height: 32px; }
  .player__animal { display: none; }
}

/* ---------- Galerie ---------- */
.gallery { columns: 3 280px; column-gap: 12px; }
.gallery__item {
  position: relative; display: block; width: 100%; margin: 0 0 12px; padding: 0;
  break-inside: avoid; border: 0; background: var(--grey-100); overflow: hidden; text-align: left;
}
.gallery__item img { width: 100%; height: auto; filter: grayscale(1); transition: filter .5s var(--ease), transform .6s var(--ease); }
.gallery__item:hover img { filter: grayscale(0); transform: scale(1.03); }
.gallery__caption {
  position: absolute; inset: auto 0 0 0; padding: 32px 16px 14px;
  color: var(--white); font-size: 13px; font-weight: 500; letter-spacing: .04em;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.8));
  opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s;
}
.gallery__item:hover .gallery__caption, .gallery__item:focus-visible .gallery__caption { opacity: 1; transform: none; }
@media (hover: none) { .gallery__caption { opacity: 1; transform: none; } }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.95); color: var(--white); padding: 64px 16px;
}
.lightbox[hidden] { display: none; }
.lightbox__figure { margin: 0; max-width: 1100px; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lightbox__figure img { max-height: calc(100vh - 160px); width: auto; object-fit: contain; }
.lightbox__figure figcaption { margin-top: 14px; font-size: 14px; color: var(--grey-300); text-align: center; }
.lightbox__btn {
  position: absolute; width: 48px; height: 48px;
  background: none; border: 1.5px solid rgba(255,255,255,.4); border-radius: 50%;
  color: var(--white); font-size: 18px; transition: background .2s, color .2s;
}
.lightbox__btn:hover { background: var(--white); color: var(--black); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) { .lightbox__prev, .lightbox__next { top: auto; bottom: 16px; transform: none; } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }
.form { display: grid; gap: 20px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; }
.field span { font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--grey-500); }
.field input, .field textarea {
  width: 100%; padding: 14px 0;
  background: transparent; color: var(--white);
  border: 0; border-bottom: 1.5px solid var(--grey-700); border-radius: 0;
  font: inherit; font-size: 16px; resize: vertical;
  transition: border-color .25s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--white); }
.field.is-invalid input, .field.is-invalid textarea { border-color: var(--white); border-bottom-style: dashed; }
.form__feedback { margin: 0; min-height: 1.6em; font-size: 14px; color: var(--grey-300); }

/* ---------- Footer ---------- */
.footer { background: var(--black); color: var(--white); border-top: 1px solid var(--grey-900); padding: 40px 0; }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer__links { display: flex; gap: 24px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.footer__links a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer__copy { font-size: 12px; color: var(--grey-500); }

/* ---------- Apparition au scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
