/* ═══════════════════════════════════════════════════════════════
   A. LIMARI — Système graphique « Jour de match »
   Encre / os / jaune fumigène · Archivo variable (wdth 62–125)
   ═══════════════════════════════════════════════════════════════ */

/* Palette : noir anthracite / vert émeraude, version Jour et Nuit.
   Chaque zone (racine, .theme-alt, .theme-accent, .theme-media) redéfinit
   les mêmes variables sémantiques : les composants n'utilisent que celles-ci. */
:root {
  --anthracite: #1b1e21;
  --paper:      #eeefea;
  --c-light:    #eeefea;
  --c-dark:     #1b1e21;

  /* Fond émeraude des sections « accent » (selon le mode) */
  --accent-fill: #00805c;
  --accent-on:   #eeefea;

  /* Zone claire (mode Jour) */
  --bg:   #eeefea;
  --bg-2: #e3e4de;
  --bg-3: #d7d9d2;
  --fg:   #1b1e21;
  --fg-dim:  rgba(27, 30, 33, .64);
  --fg-mute: rgba(27, 30, 33, .42);
  --line:    rgba(27, 30, 33, .14);
  --accent:      #00805c;
  --on-accent:   #eeefea;
  --accent-text: #006b4d;

  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 2.4vw, 40px);
  --nav-h:  72px;

  --ease-out:  cubic-bezier(.16, 1, .3, 1);
  --ease-io:   cubic-bezier(.76, 0, .24, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);

  color-scheme: light;
}

/* Zone sombre : mode Nuit, blocs alternés en mode Jour, médias */
[data-mode="night"], .theme-alt, .theme-media {
  --bg:   #1b1e21;
  --bg-2: #23272b;
  --bg-3: #2c3136;
  --fg:   #eceee9;
  --fg-dim:  rgba(236, 238, 233, .62);
  --fg-mute: rgba(236, 238, 233, .4);
  --line:    rgba(236, 238, 233, .13);
  --accent:      #14b386;
  --on-accent:   #111315;
  --accent-text: #2fcf9c;
}
[data-mode="night"] {
  --accent-fill: #14b386;
  --accent-on:   #111315;
  color-scheme: dark;
}
/* En mode Nuit, les blocs alternés restent sombres mais un ton au-dessus */
[data-mode="night"] .theme-alt { --bg: #23272b; --bg-2: #2b3035; --bg-3: #343a40; }
.theme-accent {
  --bg:   var(--accent-fill);
  --fg:   var(--accent-on);
  --bg-2: color-mix(in srgb, var(--accent-fill) 82%, #000);
  --bg-3: color-mix(in srgb, var(--accent-fill) 70%, #000);
  --fg-dim:  color-mix(in srgb, var(--accent-on) 70%, transparent);
  --fg-mute: color-mix(in srgb, var(--accent-on) 48%, transparent);
  --line:    color-mix(in srgb, var(--accent-on) 22%, transparent);
  --accent:      var(--accent-on);
  --on-accent:   var(--accent-fill);
  --accent-text: var(--accent-on);
}
.theme-alt, .theme-accent, .theme-media { background: var(--bg); color: var(--fg); }

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; background: none; border: 0; }
button { cursor: pointer; }
ul, ol { list-style: none; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip {
  position: fixed; top: 12px; left: 12px; z-index: 200;
  background: var(--accent); color: var(--on-accent); padding: 10px 14px;
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ── Typographie ───────────────────────────────────────────── */
.t-display {
  font-family: var(--font);
  font-stretch: 62%;
  font-weight: 900;
  text-transform: uppercase;
  line-height: .84;
  letter-spacing: -.005em;
}
.t-label {
  font-stretch: 125%;
  font-weight: 600;
  font-size: 11px;
  line-height: 1.25;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.t-num {
  font-stretch: 100%;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.t-lead {
  font-size: clamp(19px, 1.7vw, 26px);
  line-height: 1.32;
  font-weight: 450;
  letter-spacing: -.01em;
}
.t-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--outline, var(--fg));
}
.dim  { color: var(--fg-dim); }
.mute { color: var(--fg-mute); }

/* Lignes masquées (SplitText) */
.line-mask { overflow: clip; padding-bottom: .04em; margin-bottom: -.04em; }

/* ── Mise en page ──────────────────────────────────────────── */
.wrap { padding-inline: var(--gutter); }
.section { position: relative; padding-block: clamp(96px, 14vw, 200px); }

.sec-head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px;
  margin-bottom: clamp(40px, 6vw, 88px);
}
.sec-head__title { font-size: clamp(56px, 11vw, 190px); }
.sec-head__aside { text-align: right; display: grid; gap: 14px; justify-items: end; }
.kicker { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; }
.kicker::before {
  content: ""; width: 8px; height: 8px; background: var(--accent); flex: none;
}

/* ── Grain argentique ──────────────────────────────────────── */
.grain {
  position: fixed; inset: -50%;
  z-index: 90; pointer-events: none;
  opacity: .075;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1s steps(1) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-4%, 3%); }
  40%  { transform: translate(3%, -5%); }
  60%  { transform: translate(-2%, 6%); }
  80%  { transform: translate(5%, -2%); }
}

/* ── Boutons & liens ───────────────────────────────────────── */
.btn {
  --b-bg: var(--accent); --b-fg: var(--on-accent); --b-hover: var(--fg);
  position: relative;
  display: inline-flex; align-items: center; gap: 14px;
  height: 54px; padding: 0 22px;
  background: var(--b-bg); color: var(--b-fg);
  font-stretch: 125%; font-weight: 700; font-size: 12px;
  letter-spacing: .06em; text-transform: uppercase;
  overflow: hidden; isolation: isolate;
  transition: color .5s var(--ease-out);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--b-hover);
  transform: translateY(101%);
  transition: transform .5s var(--ease-out);
}
.btn:hover { color: var(--bg); }
.btn:hover::before { transform: none; }
.btn__arrow { width: 14px; height: 14px; flex: none; transition: transform .5s var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--ink  { --b-bg: var(--fg); --b-fg: var(--bg); --b-hover: var(--accent-text); }
.btn--line { --b-bg: transparent; --b-fg: var(--fg); box-shadow: inset 0 0 0 1px currentColor; }

.u {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .6s var(--ease-out);
  padding-bottom: 2px;
}
.u:hover, .u.is-on { background-size: 100% 1px; }
.u--on { background-size: 100% 1px; }
.u--on:hover { background-position: 100% 100%; animation: u-swap .8s var(--ease-out); }
@keyframes u-swap {
  0%   { background-size: 100% 1px; background-position: 100% 100%; }
  50%  { background-size: 0 1px;    background-position: 100% 100%; }
  51%  { background-size: 0 1px;    background-position: 0 100%; }
  100% { background-size: 100% 1px; background-position: 0 100%; }
}

.chip {
  display: inline-flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 12px;
  background: var(--accent); color: var(--on-accent);
}
.chip--line { background: none; color: inherit; box-shadow: inset 0 0 0 1px var(--line); }
.pulse {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none;
  animation: pulse 1.6s var(--ease-out) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 currentColor; }
  70%  { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

/* ── Navigation ────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 70;
  height: var(--nav-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding-inline: var(--gutter);
  color: var(--fg);
  transition: color .4s ease, transform .6s var(--ease-out);
}
body[data-nav="alt"] .nav, body[data-nav="media"] .nav { color: var(--c-light); }
body[data-nav="accent"] .nav, body.menu-open .nav { color: var(--accent-on); }
.nav.is-hidden { transform: translateY(-110%); }
body.menu-open .nav { transform: none; }

/* Marque : wordmark + étoile (le même motif que les rubans) */
.nav__brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; }
.star {
  display: inline-block; width: 1em; height: 1em; flex: none;
  background: var(--accent-text);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}
body[data-nav="alt"] .nav .star, body[data-nav="media"] .nav .star { background: #2fcf9c; }
body[data-nav="accent"] .nav .star, body.menu-open .nav .star { background: currentColor; }
.nav__star { font-size: 22px; transition: transform .9s var(--ease-back); }
.nav__brand:hover .nav__star { transform: rotate(90deg) scale(1.1); }
.nav__word { font-size: 30px; line-height: .8; letter-spacing: -.01em; padding-top: 2px; }
.nav__name { line-height: 1.2; opacity: .7; padding-left: 10px; margin-left: 2px; border-left: 1px solid currentColor; border-color: color-mix(in srgb, currentColor 30%, transparent); }

.nav__clock { display: flex; gap: 10px; align-items: center; justify-self: center; }
.nav__clock time { font-stretch: 100%; font-variant-numeric: tabular-nums; }

.nav__right { justify-self: end; display: flex; align-items: center; gap: clamp(16px, 2.2vw, 32px); }
.nav__links { display: flex; gap: clamp(18px, 2.4vw, 36px); }
.nav__links a { position: relative; display: inline-flex; gap: 4px; }
.nav__links a sup { font-size: 8px; opacity: .6; transform: translateY(-2px); }
.nav__links a[aria-current="page"]::before {
  content: ""; position: absolute; left: -12px; top: 50%;
  width: 6px; height: 6px; background: currentColor; transform: translateY(-50%);
}

/* Bascule Jour / Nuit */
.mode { display: inline-flex; align-items: center; gap: 8px; height: 32px; }
.mode__label { opacity: .42; transition: opacity .4s; }
.mode__track {
  position: relative; width: 28px; height: 14px; flex: none;
  box-shadow: inset 0 0 0 1px currentColor;
}
.mode__track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 8px; height: 8px;
  background: currentColor;
  transition: transform .55s var(--ease-back);
}
:root:not([data-mode="night"]) .mode__day { opacity: 1; }
[data-mode="night"] .mode__night { opacity: 1; }
[data-mode="night"] .mode__track::after { transform: translateX(14px); }
.mode:hover .mode__label { opacity: 1; }

.nav__burger {
  display: none; align-items: center; gap: 10px; height: 38px; padding: 0 14px;
  box-shadow: inset 0 0 0 1px currentColor;
}
.nav__burger i { position: relative; width: 16px; height: 8px; }
.nav__burger i::before, .nav__burger i::after {
  content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
  transition: transform .5s var(--ease-out), top .5s var(--ease-out);
}
.nav__burger i::before { top: 0; }
.nav__burger i::after  { top: 6.5px; }
body.menu-open .nav__burger i::before { top: 3.25px; transform: rotate(45deg); }
body.menu-open .nav__burger i::after  { top: 3.25px; transform: rotate(-45deg); }

/* Transition circulaire entre les modes (View Transitions) */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* Menu plein écran (jaune) */
.menu {
  position: fixed; inset: 0; z-index: 60;
  background: var(--accent-fill); color: var(--accent-on);
  display: grid; grid-template-rows: 1fr auto;
  padding: calc(var(--nav-h) + 24px) var(--gutter) 28px;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
}
.menu__links { align-self: center; display: grid; }
.menu__links a {
  display: flex; align-items: baseline; gap: 14px;
  font-size: clamp(64px, 19vw, 180px);
  border-bottom: 1px solid color-mix(in srgb, var(--accent-on) 22%, transparent);
}
.menu__links a span:first-child { font-stretch: 100%; font-weight: 600; font-size: 12px; letter-spacing: .06em; }
.menu__foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }

/* ── Transition de page (stinger façon replay TV) ──────────── */
.stinger {
  position: fixed; inset: 0; z-index: 100;
  pointer-events: none;
  overflow: hidden;
}
.stinger.is-active { pointer-events: all; }
.stinger__band {
  position: absolute; top: -20%; bottom: -20%; left: -25%; width: 150%;
  transform: translateX(110%) skewX(-14deg);
}
.stinger__band:nth-child(1) { background: var(--accent-fill); }
.stinger__band:nth-child(2) { background: var(--fg); }
.stinger__band:nth-child(3) {
  background: var(--bg);
  display: grid; place-items: center;
}
.stinger__mark {
  transform: skewX(14deg);
  display: flex; align-items: center; gap: 18px;
  color: var(--fg);
}
.stinger__mark .star { font-size: 54px; }
.stinger__mark .t-display { font-size: 84px; }
html.is-entering .stinger__band { transform: translateX(0) skewX(-14deg); }

/* ── Bandeau ruban (marquee) ───────────────────────────────── */
.tape {
  position: relative; z-index: 5;
  width: 112vw; margin-left: -6vw;
  background: var(--accent-fill); color: var(--accent-on);
  overflow: hidden; white-space: nowrap;
  padding: .32em 0 .26em;
  font-size: clamp(30px, 4.6vw, 72px);
  transform: rotate(-2.2deg);
}
.tape--ink { background: var(--fg); color: var(--bg); transform: rotate(1.6deg); }
.tape__track { display: inline-flex; will-change: transform; }
.tape__item { display: inline-flex; align-items: center; gap: .32em; padding-right: .32em; }
.tape__star {
  width: .42em; height: .42em; background: currentColor; flex: none;
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
}

/* ── Révélations (états initiaux seulement si JS actif) ────── */
.js [data-reveal] { opacity: 0; transform: translateY(28px); }
.js [data-split] { visibility: hidden; }
.reduced [data-reveal], .reduced [data-split] { opacity: 1 !important; transform: none !important; visibility: visible !important; }

/* Image avec fondu au chargement */
.img-fade { opacity: 0; transition: opacity .9s var(--ease-out); }
.img-fade.is-loaded { opacity: 1; }

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  position: relative; overflow: hidden;
  padding-top: clamp(64px, 8vw, 120px);
  background: var(--bg);
}
.footer__top {
  display: grid; gap: 32px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-bottom: clamp(48px, 6vw, 96px);
}
.footer__col .t-label { margin-bottom: 16px; color: var(--fg-mute); }
.footer__col ul { display: grid; gap: 6px; }
.footer__col a, .footer__col p, .footer__col time { font-size: 15px; }
.footer__col time { font-variant-numeric: tabular-nums; }
.footer__mark {
  display: block; white-space: nowrap;
  color: var(--fg);
  font-size: 27vw;
  line-height: .74;
  margin-bottom: -.035em;
  padding-inline: var(--gutter);
  user-select: none;
}
.footer__mark .char { display: inline-block; will-change: transform; }
.footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px;
  padding-block: 20px 26px;
  border-top: 1px solid var(--line);
  color: var(--fg-dim);
}
.footer__bottom button { text-transform: inherit; letter-spacing: inherit; font: inherit; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --nav-h: 64px; }
  .nav { grid-template-columns: 1fr auto; }
  .nav__clock, .nav__links { display: none; }
  .nav__burger { display: inline-flex; }
  .nav__name { display: none; }
  .nav__right { gap: 10px; }
  .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sec-head { grid-template-columns: 1fr; }
  .sec-head__aside { justify-items: start; text-align: left; }
  .t-outline { -webkit-text-stroke-width: 1px; }
}
@media (max-width: 520px) {
  .mode__label { display: none; }
  .mode__track { width: 34px; height: 18px; }
  .mode__track::after { width: 10px; height: 10px; top: 4px; left: 4px; }
  [data-mode="night"] .mode__track::after { transform: translateX(16px); }
  .nav__burger { padding: 0 12px; }
  .footer__top { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .btn { height: 50px; padding: 0 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
