/* National CTF — vitrine ctf.tg, édition 2026
   Généré depuis le design system (tokens.json + components/bundle.css).
   Thème unique, sombre. Polices servies par le site, aucune ressource externe. */

@font-face {
  font-family: "JetBrains Mono";
  src: url("../fonts/JetBrainsMono-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #0a0d0b;
  --ink-2: #0f1411;
  --ink-3: #161d18;
  --line: #222c25;
  --line-2: #2f3b32;
  --line-strong: #5c6e61;
  --paper: #eef1ec;
  --white: #ffffff;
  --soft: #c4ccc5;
  --muted: #8f9b91;
  --green: #22a06b;
  --green-deep: #006a4e;
  --green-glow: rgba(34, 160, 107, 0.16);
  --green-wash: rgba(34, 160, 107, 0.18);
  --yellow: #ffce00;
  --yellow-line: rgba(255, 206, 0, 0.35);
  --yellow-wash: rgba(255, 206, 0, 0.08);
  --red: #d21034;
  --bronze: #c08552;
  --head-bg: rgba(10, 13, 11, 0.82);
  --flag-bg: rgba(15, 20, 17, 0.7);
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 120px;
  --head-height: 64px;
  --wrap: 1160px;
  --radius: 6px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --shadow-cta: 0 10px 30px -10px rgba(238, 241, 236, 0.45);
  --shadow-medal: 0 0 0 4px rgba(255, 206, 0, 0.15);
  --shadow-mark: 0 30px 60px rgba(0, 0, 0, 0.55);
  --font-display: "Tourney", "Arial Narrow", Impact, sans-serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
}

/* =====================================================================
   National CTF — composants (édition 2026)
   Couleurs, rayons, ombres et familles viennent de tokens.css.
   Sur le site : coller tokens.css puis ce fichier dans /css/site.css.
   ===================================================================== */

/* La police variable déclarée avec sa plage de largeur : sans font-stretch
   dans @font-face, les largeurs 110–120 % ne s'appliquent pas. */
@font-face {
  font-family: "Tourney";
  src: url("../fonts/Tourney.ttf") format("truetype");
  font-weight: 100 900;
  font-stretch: 75% 125%;
  font-display: swap;
}

:root {
  --display: var(--font-display);
  --sans: var(--font-sans);
  --mono: var(--font-mono);
  --gutter: clamp(20px, 5vw, 48px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--green); color: var(--ink); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }

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

.tricolore {
  height: 3px;
  background: linear-gradient(90deg, var(--green-deep) 0 33.33%, var(--yellow) 33.33% 66.66%, var(--red) 66.66% 100%);
}

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 20; background: var(--paper); color: var(--ink); padding: 8px 12px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------------------------------------------------------------- header */
.site-head {
  position: sticky; top: 0; z-index: 10;
  background: var(--head-bg);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: var(--head-height); }

.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  font-family: var(--display); font-weight: 700; font-stretch: 112%;
  letter-spacing: 0.06em; font-size: 1.05rem; white-space: nowrap;
}
.brand img { width: 34px; height: 34px; }

.nav { display: flex; gap: 2px; margin-left: auto; align-items: center; }
.nav a {
  position: relative; text-decoration: none; color: var(--soft);
  font-size: 0.92rem; padding: 8px 12px; border-radius: var(--radius);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.nav a:hover { color: var(--paper); background: var(--ink-3); }
.nav .section-link.active { color: var(--paper); }
.nav .section-link.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px;
  height: 2px; border-radius: 2px; background: var(--green);
}
.nav .cta-sm { color: var(--ink); background: var(--paper); font-weight: 600; margin-left: 10px; }
.nav .cta-sm:hover { background: var(--white); color: var(--ink); }

.menu-btn {
  display: none; margin-left: auto; width: 42px; height: 42px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: transparent; cursor: pointer; position: relative;
}
.menu-btn span {
  position: absolute; left: 11px; right: 11px; height: 2px;
  background: var(--paper); border-radius: 2px;
  transition: transform 0.2s var(--ease), top 0.2s var(--ease);
}
.menu-btn span:nth-child(1) { top: 15px; }
.menu-btn span:nth-child(2) { top: 23px; }
.site-head.open .menu-btn span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.site-head.open .menu-btn span:nth-child(2) { top: 19px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 20px; background: var(--ink);
    border-bottom: 1px solid var(--line); display: none;
  }
  .site-head.open .nav { display: flex; }
  .nav a { padding: 14px 4px; font-size: 1rem; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav a:hover { background: transparent; }
  .nav .section-link.active::after { display: none; }
  .nav .section-link.active { color: var(--green); }
  .nav .cta-sm { margin: 16px 0 0; text-align: center; border-radius: var(--radius); border-bottom: 0; }
  .nav.nav-static { position: static; display: flex; flex-direction: row; padding: 0; background: none; border: 0; margin-left: auto; }
  .nav.nav-static .cta-sm { margin: 0; padding: 8px 14px; }
}

/* ------------------------------------------- bandeau d'état (NOUVEAU 2026)
   Une ligne sous l'en-tête : l'état de l'édition et la prochaine échéance.
   data-state = soon | open | live | final | over (posé par le script). */
.status-bar {
  border-bottom: 1px solid var(--line);
  background: var(--ink-2);
  font-size: 0.9rem;
}
.status-bar .wrap {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px 16px; min-height: 44px; padding-block: 8px;
}
.status-bar .state {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--green);
}
.status-bar .state::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 4px var(--green-glow);
}
.status-bar[data-state="live"] .state { color: var(--yellow); }
.status-bar[data-state="live"] .state::before { background: var(--yellow); animation: pulse 1.6s ease-in-out infinite; }
.status-bar[data-state="over"] .state { color: var(--muted); }
.status-bar[data-state="over"] .state::before { background: var(--muted); box-shadow: none; }
.status-bar .detail { color: var(--soft); }
.status-bar a { margin-left: auto; color: var(--paper); font-weight: 600; text-underline-offset: 3px; }
@keyframes pulse { 50% { opacity: 0.35; } }
@media (max-width: 600px) { .status-bar .detail { display: none; } }

/* ------------------------------------------------------------------ hero */
.hero { padding: clamp(56px, 10vw, 120px) 0 0; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--ink-3) 1px, transparent 1px), linear-gradient(90deg, var(--ink-3) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 75% 40%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 75% 40%, #000 0%, transparent 75%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; width: 640px; height: 640px; right: -120px; top: -80px;
  background: radial-gradient(circle, var(--green-glow) 0%, transparent 65%); pointer-events: none;
}
.hero .wrap { position: relative; z-index: 1; }
.hero .wrap:first-child {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 72px); align-items: center;
}
@media (max-width: 860px) {
  .hero .wrap:first-child { grid-template-columns: 1fr; }
  .hero-mark { max-width: 128px; order: -1; }
  .hero::after { width: 420px; height: 420px; right: auto; left: -140px; top: -160px; }
}

/* Variante « visuel » (2026) : image clé plein cadre, sujet à droite,
   moitié gauche vide pour le titre. Remplace l'emblème + trame + halo.
   L'image est un <picture> décoratif (alt="") : WebP ≤ 300 Ko,
   1728×864 en bureau, recadrage 900×1100 centré sur le sujet en mobile. */
.hero-visual { padding-top: clamp(48px, 7vw, 88px); }
.hero-visual::before { display: none; }
.hero-visual::after { display: none; }
.hero-visual .wrap { z-index: 2; }

/* les trois échéances, en une ligne sous les actions */
.hero-dates {
  list-style: none; margin: 28px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start;
  border-top: 1px solid var(--line-2);
}
.hero-dates li { display: grid; gap: 2px; padding: 12px 22px 0 0; margin-right: 22px; border-right: 1px solid var(--line); }
.hero-dates li:last-child { border-right: 0; margin-right: 0; }
.hero-dates b { font-family: var(--display); font-weight: 700; font-stretch: 112%; font-size: 1.15rem; text-transform: uppercase; line-height: 1.1; }
.hero-dates span { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.hero-dates li.done b { color: var(--muted); }
.hero-dates li.now b { color: var(--yellow); }
@media (max-width: 480px) {
  .hero-dates { grid-template-columns: 1fr; border-top: 0; }
  .hero-dates li { grid-template-columns: 7.5rem 1fr; align-items: baseline; padding: 8px 0; margin: 0; border-right: 0; border-top: 1px solid var(--line); }
}
.hero-visual .flagline { margin-top: 18px; }
/* en bureau le visuel n'occupe que la droite : le sujet ne passe jamais sous le texte */
.hero-visual .hero-bg { position: absolute; top: 0; bottom: 0; right: 0; width: min(66%, calc(50% + 480px)); z-index: 0; }
/* le vert d'ambiance de la page commence ici : halo côté texte, comme le bandeau communauté */
.hero-visual { background: radial-gradient(55% 75% at 8% 55%, var(--green-glow), transparent 70%), var(--ink); }
.hero-visual .hero-bg {
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 38%);
}
.hero-visual .hero-bg img,
.hero-visual .hero-bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% 20%; }
/* la boucle vidéo (posée par script en bureau seulement) recouvre l'affiche
   une fois prête ; sans mouvement demandé, elle n'existe pas */
.hero-visual .hero-bg video { opacity: 0; transition: opacity 0.6s ease; }
.hero-visual .hero-bg video.ready { opacity: 1; }
.hero-visual .hero-bg::after { z-index: 1; }
.hero-visual .hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(0deg, var(--ink) 0%, rgba(10, 13, 11, 0) 35%);
}
.hero-visual .wrap:first-child { grid-template-columns: minmax(0, 1fr); max-width: var(--wrap); }
.hero-visual .hero-copy { max-width: 36rem; }
@media (max-width: 860px) {
  /* mobile : le visage en haut, le texte commence là où l'image s'éteint */
  .hero-visual { min-height: 0; padding-top: 92vw; }
  .hero-visual .hero-bg { left: 0; width: auto; bottom: auto; height: 120vw; }
  .hero-visual .hero-bg { -webkit-mask-image: none; mask-image: none; }
  .hero-visual { background: radial-gradient(90% 50% at 0% 70%, var(--green-glow), transparent 70%), var(--ink); }
  .hero-visual .hero-bg img { object-position: 50% 15%; }
  .hero-visual .hero-bg::after { background: linear-gradient(0deg, var(--ink) 8%, rgba(10, 13, 11, 0.55) 35%, rgba(10, 13, 11, 0) 60%); }
}

.eyebrow {
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); margin: 0 0 20px;
}
.eyebrow::before {
  content: ""; display: inline-block; width: 28px; height: 2px;
  background: var(--yellow); vertical-align: middle; margin-right: 12px;
}
.hero h1 {
  font-family: var(--display); font-weight: 800; font-stretch: 118%;
  font-size: clamp(3rem, 9vw, 6.6rem); line-height: 0.92; letter-spacing: 0.01em;
  margin: 0 0 28px; text-transform: uppercase;
}
.hero h1 span { display: block; }
.hero h1 .accent { color: var(--green); text-shadow: 0 0 40px rgba(34, 160, 107, 0.35); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--soft); max-width: 34em; margin: 0 0 36px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-mark img { width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.55)); }

/* ligne de soumission de flag */
.flagline {
  margin: 32px 0 0; font-family: var(--mono); font-size: 0.86rem; color: var(--muted);
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--flag-bg); max-width: 100%;
}
.flagline .prompt { color: var(--green); }
.flagline .flag { color: var(--paper); overflow-wrap: anywhere; }
.caret { display: inline-block; width: 8px; height: 1.05em; background: var(--green); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ----------------------------------------------- compte à rebours (NOUVEAU) */
.countdown {
  margin: 32px 0 0; display: grid; gap: 10px;
  padding: 18px 20px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--ink-2); max-width: 30rem;
}
.countdown-label {
  margin: 0; font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.countdown-label strong { color: var(--paper); font-weight: 400; }
.countdown ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.countdown li { display: grid; gap: 2px; padding-left: 14px; border-left: 1px solid var(--line); }
.countdown li:first-child { padding-left: 0; border-left: 0; }
.countdown .n {
  font-family: var(--display); font-weight: 800; font-stretch: 118%;
  font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1; color: var(--yellow);
  font-variant-numeric: tabular-nums;
}
.countdown .u { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.countdown[data-state="over"] ol { display: none; }

/* chiffres clés */
.stats { margin: clamp(48px, 8vw, 96px) 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.stats div { padding: 24px 0 28px; border-right: 1px solid var(--line); padding-left: clamp(0px, 2vw, 28px); }
.stats div:first-child { padding-left: 0; }
.stats div:last-child { border-right: 0; }
.stats dt { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.stats dd { margin: 4px 0 0; font-family: var(--display); font-weight: 800; font-stretch: 118%; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1; }
.stats dd { font-variant-numeric: tabular-nums; }
.stats dd small { font-family: var(--mono); font-size: 0.8rem; font-weight: 400; color: var(--muted); margin-left: 4px; }
/* valeur pas encore connue (catégories en cours de recatégorisation) */
.stats dd:empty::before { content: "—"; color: var(--muted); }
@media (max-width: 600px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats div { padding-left: 0; }
  .stats div:nth-child(2) { border-right: 0; padding-left: 20px; }
  .stats div:nth-child(4) { padding-left: 20px; }
  .stats div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none; font-weight: 600; font-size: 0.98rem;
  padding: 14px 22px; border-radius: var(--radius); border: 1px solid var(--paper);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--paper); color: var(--ink); }
.btn-primary:hover { background: var(--white); border-color: var(--white); box-shadow: var(--shadow-cta); }
.btn-ghost { color: var(--paper); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--paper); }
.btn .arrow { font-family: var(--mono); transition: transform 0.15s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-lg { padding: 16px 26px; font-size: 1.02rem; }
.btn-ico { width: 20px; height: 20px; fill: currentColor; }
@media (max-width: 480px) { .actions .btn { flex: 1 1 100%; } }

/* --------------------------------------------------------------- sections */
.section { scroll-margin-top: var(--head-height); padding: clamp(64px, 10vw, 120px) 0; border-bottom: 1px solid var(--line); }
.section-tight { padding: clamp(48px, 7vw, 80px) 0; }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(20px, 5vw, 64px); margin-bottom: clamp(36px, 6vw, 64px); }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }
.section-num { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.14em; color: var(--green); text-transform: uppercase; margin: 0 0 12px; }
.section h2, .h2 {
  font-family: var(--display); font-weight: 700; font-stretch: 112%;
  font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1; text-transform: uppercase;
  letter-spacing: 0.01em; margin: 0;
}
.section-head p { margin: 0; color: var(--soft); font-size: 1.08rem; align-self: end; }

/* cartes */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card {
  position: relative; background: var(--ink-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(24px, 3vw, 32px);
  transition: border-color 0.2s ease, transform 0.2s var(--ease), background-color 0.2s ease;
}
.card:hover { border-color: var(--line-2); background: var(--ink-3); transform: translateY(-3px); }
.card .ico {
  width: 40px; height: 40px; padding: 8px; margin-bottom: 22px; border-radius: var(--radius);
  background: var(--green-glow); stroke: var(--green); fill: none;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.card h3 { font-size: 1.12rem; margin: 0 0 8px; font-weight: 650; letter-spacing: 0.01em; }
.card p { margin: 0; color: var(--muted); font-size: 0.97rem; }
.card .tag { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; display: block; }
.card { display: flex; flex-direction: column; }
/* un exemple d'épreuve réel en pied de carte */
.card .ex {
  margin-top: auto; padding-top: 18px; font-family: var(--mono); font-size: 0.78rem;
  color: var(--soft); line-height: 1.5;
}
.card .ex::before { content: "ex."; display: block; color: var(--green); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 4px; border-top: 1px solid var(--line); padding-top: 14px; }
.card p { margin-bottom: 0; }

/* section Principe : trame discrète à droite derrière l'intro */
.section-grid { position: relative; overflow: hidden; }
.section-grid::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--ink-3) 1px, transparent 1px), linear-gradient(90deg, var(--ink-3) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 50% 45% at 85% 12%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 50% 45% at 85% 12%, #000 0%, transparent 75%);
}
.section-grid .wrap { position: relative; }

/* parcours d'une épreuve : résoudre → soumettre → marquer */
.flow {
  list-style: none; margin: 0 0 clamp(28px, 4vw, 40px); padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2);
}
.flow li { position: relative; padding: 20px 24px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.flow li + li { border-left: 1px solid var(--line); }
.flow li + li::before {
  content: "→"; position: absolute; left: -11px; top: 50%; transform: translateY(-50%);
  width: 22px; height: 22px; display: grid; place-items: center;
  background: var(--ink); border: 1px solid var(--line-2); border-radius: 50%;
  font-family: var(--mono); font-size: 0.75rem; color: var(--green);
}
.flow .k { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.flow .v { font-family: var(--mono); font-size: 0.92rem; color: var(--paper); overflow-wrap: anywhere; }
.flow .v .g { color: var(--green); }
.flow .v .y { color: var(--yellow); }
.flow .d { font-size: 0.88rem; color: var(--muted); }
@media (max-width: 760px) {
  .flow { grid-template-columns: 1fr; }
  .flow li + li { border-left: 0; border-top: 1px solid var(--line); }
  .flow li + li::before { content: "↓"; left: 24px; top: -11px; transform: none; }
}

/* ------------------------------------------------- catégories (15–25 tags)
   Nuage qui passe à la ligne ; l'en-tête porte le total, généré ou saisi. */
.cats-block { margin-top: 32px; }
.cats-head {
  display: flex; align-items: baseline; gap: 10px; margin: 0 0 14px;
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.cats-head output { color: var(--paper); }
.cats { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 0; padding: 0; list-style: none; }
.cats-block .cats { margin-top: 0; }
.cats li {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-family: var(--mono); font-size: 0.82rem; color: var(--soft);
  border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 6px 14px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.cats li::before { content: "#"; color: var(--green); margin-right: -2px; }
.cats li small { font-size: 0.72rem; color: var(--muted); }
.cats li:hover { border-color: var(--green); color: var(--paper); }
@media (max-width: 480px) { .cats li { padding: 5px 11px; font-size: 0.78rem; } }

/* -------------------------------------------------- déroulé daté (2026)
   Les phases gardent leur carte ; une frise de dates les précède. */
.timeline {
  list-style: none; margin: 0 0 clamp(28px, 4vw, 40px); padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.timeline li { position: relative; padding: 22px 20px 0 0; }
.timeline li::before {
  content: ""; position: absolute; top: -5px; left: 0;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink); border: 2px solid var(--green);
}
.timeline li:nth-child(3)::before { border-color: var(--red); }
.timeline li.done::before { background: var(--green); }
.timeline .when { display: block; font-family: var(--display); font-weight: 700; font-stretch: 112%; font-size: 1.5rem; line-height: 1.1; text-transform: uppercase; }
.timeline .what { display: block; color: var(--soft); margin-top: 4px; }
.timeline .note { display: block; font-family: var(--mono); font-size: 0.74rem; color: var(--muted); margin-top: 2px; }
@media (max-width: 760px) {
  .timeline { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--line); padding-left: 20px; }
  .timeline li { padding: 0 0 22px; }
  .timeline li::before { top: 8px; left: -25px; }
}

.phases { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); align-items: stretch; }
.phase {
  position: relative; overflow: hidden; border: 1px solid var(--line); border-top: 3px solid var(--green);
  border-radius: var(--radius); padding: clamp(24px, 3.5vw, 40px); background: var(--ink-2);
}
.phase:last-child { border-top-color: var(--red); }
.phase-num {
  position: absolute; right: 18px; top: 6px; font-family: var(--display); font-weight: 800; font-stretch: 118%;
  font-size: clamp(4rem, 8vw, 6rem); line-height: 1; color: var(--ink-3); pointer-events: none;
}
.phase-link { position: relative; display: flex; align-items: center; justify-content: center; }
.phase-link::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed var(--muted); }
.phase-link::after { content: ""; position: absolute; right: 2px; top: calc(50% - 5px); border: 5px solid transparent; border-left: 7px solid var(--muted); }
.phase-link span { display: none; }
@media (max-width: 760px) {
  .phases { grid-template-columns: 1fr; }
  .phase-link { height: 48px; }
  .phase-link::before { left: 50%; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 1px dashed var(--muted); }
  .phase-link::after { right: auto; top: auto; left: calc(50% - 5px); bottom: 0; border: 5px solid transparent; border-top: 7px solid var(--muted); }
}
.phase .step { position: relative; font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.phase h3 { position: relative; font-family: var(--display); font-weight: 700; font-stretch: 112%; font-size: clamp(1.5rem, 2.6vw, 2rem); text-transform: uppercase; margin: 10px 0 14px; line-height: 1.05; }
.phase p { position: relative; color: var(--soft); margin: 0 0 20px; }
.phase dl { position: relative; margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; font-size: 0.95rem; padding-top: 18px; border-top: 1px solid var(--line); }
.phase dt { color: var(--muted); }
.phase dd { margin: 0; }

/* ----------------------------------------- règles clés (remplace le bloc
   de 11 articles ; la version intégrale reste sur arena.ctf.tg/tos) */
.rules {
  list-style: none; margin: 0; padding: 0; counter-reset: rule;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 5vw, 64px); border-top: 1px solid var(--line);
}
@media (max-width: 760px) { .rules { grid-template-columns: 1fr; } }
.rules li { counter-increment: rule; display: grid; grid-template-columns: 48px 1fr; gap: 8px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.rules li::before { content: counter(rule, decimal-leading-zero); font-family: var(--mono); color: var(--green); font-size: 0.9rem; padding-top: 2px; }
.rules strong { display: block; font-weight: 650; margin-bottom: 2px; }
.rules span { color: var(--muted); font-size: 0.97rem; }
.rules li.severe::before { color: var(--yellow); }
.rules-full {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  margin-top: 28px; font-family: var(--mono); font-size: 0.9rem; color: var(--muted);
}
.rules-full a { color: var(--green); text-underline-offset: 3px; }

/* palmarès */
.fame { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 960px) { .fame { grid-template-columns: 1fr 1fr; } .edition.latest { grid-column: 1 / -1; } }
@media (max-width: 620px) { .fame { grid-template-columns: 1fr; } }
.edition { border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); padding: clamp(22px, 3vw, 32px); }
.edition.latest { border-color: var(--yellow-line); background: radial-gradient(120% 60% at 100% 0%, var(--yellow-wash), transparent 60%), var(--ink-2); }
.edition-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.edition-year { font-family: var(--display); font-weight: 800; font-stretch: 118%; font-size: clamp(2.4rem, 4.5vw, 3.2rem); line-height: 1; margin: 0; }
.edition.latest .edition-year { font-size: clamp(2.8rem, 5.5vw, 4rem); }
.edition-format { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0; }
.edition.latest .edition-format { color: var(--yellow); }
.podium { list-style: none; margin: 0; padding: 0; }
.podium li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.medal { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 0.86rem; color: var(--ink); background: var(--line-2); }
.rank-1 .medal { background: var(--yellow); box-shadow: var(--shadow-medal); }
.rank-2 .medal { background: var(--soft); }
.rank-3 .medal { background: var(--bronze); }
.who { display: grid; gap: 1px; min-width: 0; }
.rank-label { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.podium strong { overflow-wrap: break-word; font-weight: 650; font-size: 1.02rem; line-height: 1.3; }
.podium .rank-1 strong { font-size: 1.18rem; }
.edition.latest .rank-1 strong { font-size: 1.4rem; }
.podium .points { font-family: var(--mono); font-size: 0.8rem; color: var(--soft); white-space: nowrap; }
.podium .members { color: var(--muted); font-size: 0.88rem; }
.mention { margin: 16px 0 0; padding: 12px 14px; border-radius: var(--radius); background: var(--ink-3); font-size: 0.88rem; color: var(--soft); }
.mention::before { content: "★ "; color: var(--yellow); }

/* -------------------------------------------- créateurs (NOUVEAU 2026) */
.creators { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.creators a {
  display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  padding: 6px 16px 6px 6px; border: 1px solid var(--line); border-radius: var(--radius-pill);
  background: var(--ink-2); font-family: var(--mono); font-size: 0.86rem; color: var(--soft);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.creators a:hover { border-color: var(--green); color: var(--paper); }
.creators .mono-av {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink-3); color: var(--green); font-weight: 700; font-size: 0.78rem;
  text-transform: uppercase;
}
.creators .creator-count {
  margin-left: 2px; min-width: 24px; padding: 1px 8px; border-radius: var(--radius-pill);
  background: var(--ink-3); color: var(--green); font-weight: 700; font-size: 0.74rem; text-align: center;
}
.creators a:hover .creator-count { background: var(--green); color: var(--ink); }
.creators-note { margin: 18px 0 0; font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }

/* communauté */
.community {
  position: relative; overflow: hidden; display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: center; gap: 28px; border: 1px solid var(--line-2); border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 56px);
  background: radial-gradient(80% 140% at 0% 0%, var(--green-wash), transparent 60%), var(--ink-2);
}
.community h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); }
.community p:not(.section-num) { margin: 12px 0 0; color: var(--soft); max-width: 34em; }
@media (max-width: 600px) { .community .btn { width: 100%; } }

/* partenaires */
.partners { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 620px) { .partners { grid-template-columns: 1fr; } }
.partners figure { margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--ink-2); transition: border-color 0.2s ease, background-color 0.2s ease; }
.partners figure:hover { border-color: var(--line-2); background: var(--ink-3); }
.partners a { display: grid; place-items: center; height: 120px; padding: 24px; opacity: 0.8; transition: opacity 0.15s ease; }
.partners figure:hover a, .partners a:focus-visible { opacity: 1; }
.partners img { height: 44px; width: auto; }
.partners img.mono { filter: brightness(0) invert(1); }
.partners figcaption { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); padding: 12px 18px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- footer */
.site-foot { padding: 48px 0 40px; color: var(--muted); font-size: 0.9rem; }
.foot-main { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.foot-main .foot-tag { margin-right: auto; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-foot a { text-decoration: none; color: var(--soft); }
.site-foot a:hover { color: var(--paper); }
.site-foot .signature { display: flex; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 0.8rem; justify-content: center; }
.site-foot .signature strong { color: var(--paper); }

/* ------------------------------------------------------------- animation */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* -------------------------------------------- séquence d'ouverture (init)
   ~1,8 s, une seule fois au chargement. Activée par la classe .intro posée
   sur <html> par un script en tête de <body> ; sans JS ou sous
   prefers-reduced-motion, la classe n'existe pas et la page est déjà
   complète. Motif unique : le décodage (0/1 → texte), écho de la pluie
   binaire du visuel ; la police variable passe de 75 % à 118 % de largeur. */
@media (prefers-reduced-motion: no-preference) {
  .intro .tricolore { transform-origin: left center; animation: nctf-draw 0.7s var(--ease) both; }
  .intro .site-head { animation: nctf-drop 0.6s var(--ease) 0.2s both; }
  .intro .status-bar { animation: nctf-fade 0.5s ease 1.5s both; }

  .intro .hero-bg picture { display: block; position: absolute; inset: 0; animation: nctf-unveil 1.6s var(--ease) 0.15s both; }

  .intro .hero .eyebrow { animation: nctf-fade 0.4s ease 0.35s both; }
  .intro .hero .eyebrow::before { animation: nctf-grow 0.5s var(--ease) 0.4s both; }
  .intro .hero h1 span:first-child { animation: nctf-stretch 1.1s cubic-bezier(0.2, 0.8, 0.1, 1) 0.45s both; }
  .intro .hero h1 .accent { animation: nctf-fade 0.2s linear 0.85s both, nctf-glow 0.9s ease-out 1.45s both; }
  .intro .hero h1 .r26 { animation: nctf-fade 0.2s linear 0.85s both; }

  .intro .hero .lead,
  .intro .hero .actions,
  .intro .hero-dates li,
  .intro .hero .countdown,
  .intro .hero .stats > div { animation: nctf-rise 0.7s var(--ease) both; animation-delay: var(--d, 1s); }
  .intro .hero .lead { --d: 0.95s; }
  .intro .hero .actions { --d: 1.05s; }
  .intro .hero-dates li:nth-child(1) { --d: 1.15s; }
  .intro .hero-dates li:nth-child(2) { --d: 1.22s; }
  .intro .hero-dates li:nth-child(3) { --d: 1.29s; }
  .intro .hero .countdown { --d: 1.35s; }
  .intro .hero .stats > div:nth-child(1) { --d: 1.3s; }
  .intro .hero .stats > div:nth-child(2) { --d: 1.36s; }
  .intro .hero .stats > div:nth-child(3) { --d: 1.42s; }
  .intro .hero .stats > div:nth-child(4) { --d: 1.48s; }
  .intro .hero .stats { animation: nctf-line 0.9s var(--ease) 1.2s both; }
}
@keyframes nctf-draw { from { transform: scaleX(0); } to { transform: none; } }
@keyframes nctf-drop { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
@keyframes nctf-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nctf-unveil {
  from { opacity: 0; transform: scale(1.06); filter: brightness(0.3); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes nctf-grow { from { width: 0; } to { width: 28px; } }
@keyframes nctf-stretch {
  from { opacity: 0; font-stretch: 75%; letter-spacing: -0.02em; }
  35% { opacity: 1; }
  to { opacity: 1; font-stretch: 118%; letter-spacing: 0.01em; }
}
@keyframes nctf-glow {
  from { text-shadow: 0 0 0 rgba(34, 160, 107, 0); }
  30% { text-shadow: 0 0 60px rgba(34, 160, 107, 0.8); }
  to { text-shadow: 0 0 40px rgba(34, 160, 107, 0.35); }
}
@keyframes nctf-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes nctf-line { from { border-top-color: transparent; } to { border-top-color: var(--line); } }

/* ------------------------------------------------ intro cinématique (2026)
   Calque plein écran au-dessus de la vitrine déjà rendue. Affiché seulement
   quand <html> porte .cine-on (posé avant le premier rendu par le script de
   config) : sans JS, sous prefers-reduced-motion ou déjà vue, il n'existe pas. */
:root { --console: var(--font-mono); }
.cine { display: none; }
.cine-on { overflow: hidden; }
.cine-on .cine {
  display: grid; grid-template-rows: auto 1fr auto;
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink); color: var(--paper);
  font-family: var(--console);
  padding: calc(16px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  cursor: pointer;
}
/* sortie : le texte s'efface d'abord, puis tout le calque se dissout sur le hero qui s'installe */
.cine.out { animation: cine-out 1.1s cubic-bezier(0.4, 0, 0.2, 1) 0.35s both; pointer-events: none; }
.cine.out .cine-stage { opacity: 0; transform: scale(0.985); transition: opacity 0.45s ease, transform 0.8s var(--ease); }
.cine.out .cine-top, .cine.out .cine-bottom { opacity: 0; transition: opacity 0.35s ease; }
@keyframes cine-out { to { opacity: 0; } }

/* fond : grille fine (repli sans WebGL), vignette */
.cine-bg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.cine-bg::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--ink-3) 1px, transparent 1px), linear-gradient(90deg, var(--ink-3) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 10%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, #000 10%, transparent 80%);
}
/* scène 3D (Three.js) : remplace la grille CSS quand WebGL est disponible */
.cine-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; animation: nctf-fade 1.2s ease both; }
.cine-bg.gl::before { display: none; }
/* lisibilité du texte devant la scène : le halo devient un voile sombre au centre */
.cine-bg.gl .cine-glow { width: 100%; height: 100%; background: radial-gradient(ellipse 55% 50% at 50% 50%, rgba(10, 13, 11, 0.6), transparent 75%); }
.cine-glow { position: absolute; width: 70vmax; height: 70vmax; left: 50%; top: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle, var(--green-glow) 0%, transparent 60%); pointer-events: none; }

.cine-top, .cine-bottom { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cine-mark { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.cine-mark b { color: var(--green); font-weight: 400; }
.cine-skip {
  font: inherit; font-size: 0.8rem; color: var(--paper); background: transparent; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 8px 12px;
  display: inline-flex; align-items: center; gap: 10px;
}
.cine-skip:hover { border-color: var(--paper); }
.cine-skip kbd { font: inherit; font-size: 0.7rem; color: var(--muted); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; }
@media (max-width: 600px) { .cine-skip kbd { display: none; } }

.cine-stage { position: relative; display: grid; place-items: center; min-height: 0; }
.scene {
  grid-area: 1 / 1; width: min(100%, 980px); max-height: 100%;
  opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.6s var(--ease), visibility 0s 0.45s;
}
.scene.on { opacity: 1; visibility: visible; transform: none; transition: opacity 0.45s ease 0.1s, transform 0.6s var(--ease) 0.1s; }
.cap { margin: 0 0 clamp(16px, 3vh, 28px); font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--green); }
.cap::before { content: "// "; color: var(--muted); }

/* 1 · boot */
.boot { list-style: none; margin: 0 auto; padding: 0; width: min(100%, 640px); font-size: clamp(0.82rem, 2.2vw, 1rem); line-height: 2; }
.boot li { display: flex; gap: 12px; opacity: 0; }
.boot li.in { opacity: 1; }
.boot .p { color: var(--green); }
.boot .t { flex: 1; min-width: 0; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.boot .s { color: var(--muted); }
.boot li.in .s { color: var(--green); }
.boot li.in .s.live { color: var(--ink); background: var(--yellow); padding: 0 6px; border-radius: 3px; }
@media (max-width: 480px) { .boot .t { white-space: normal; } }

/* 2 · marque */
.brandmark { text-align: center; }
.brandmark .big {
  margin: 0; font-family: var(--display); font-weight: 800; font-stretch: 118%;
  font-size: clamp(4.2rem, 19vw, 12rem); line-height: 0.9; letter-spacing: 0.02em;
}
.brandmark .big .r { color: var(--red); text-shadow: 0 0 30px rgba(210, 16, 52, 0.25); }
.brandmark .tri { width: min(320px, 60%); height: 3px; margin: clamp(18px, 3vh, 28px) auto; background: linear-gradient(90deg, var(--green-deep) 0 33.33%, var(--yellow) 33.33% 66.66%, var(--red) 66.66% 100%); transform: scaleX(0); }
.brandmark .tag { margin: 0; font-size: clamp(0.78rem, 2.4vw, 1rem); letter-spacing: 0.18em; text-transform: uppercase; color: var(--soft); }
.scene.on .brandmark .big .n { animation: nctf-stretch 1.2s cubic-bezier(0.2, 0.8, 0.1, 1) 0.15s both; display: inline-block; }
.scene.on .brandmark .tri { animation: nctf-draw 0.8s var(--ease) 0.9s both; }
.scene.on .brandmark .tag { animation: nctf-rise 0.6s var(--ease) 1.2s both; }

/* 3 · arsenal */
.nums { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; border-top: 1px solid var(--line-2); }
.nums div { padding: clamp(16px, 3vh, 28px) 20px 0 0; border-right: 1px solid var(--line); margin-right: 20px; }
.nums div:last-child { border-right: 0; }
.nums dd { margin: 0; font-family: var(--display); font-weight: 800; font-stretch: 118%; font-size: clamp(3rem, 10vw, 6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.nums dt { margin-top: 8px; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.nums div:nth-child(1) dd { color: var(--green); }
.nums div:nth-child(3) dd { color: var(--yellow); }
@media (max-width: 600px) {
  .nums { grid-template-columns: 1fr 1fr; }
  .nums div { margin-right: 0; padding-right: 12px; border-right: 0; }
}

/* 4 · secteurs (15–25) */
.secs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.secs li {
  display: inline-flex; align-items: baseline; gap: 8px;
  border: 1px solid var(--line-2); border-radius: var(--radius-pill); padding: 7px 14px;
  font-size: clamp(0.8rem, 2.2vw, 0.95rem); color: var(--paper); background: rgba(15, 20, 17, 0.8);
  opacity: 0; transform: translateY(8px);
}
.secs li::before { content: "#"; color: var(--green); margin-right: -4px; }
.secs li b { font-weight: 400; color: var(--yellow); font-size: 0.85em; }
.scene.on .secs li { animation: nctf-rise 0.45s var(--ease) both; animation-delay: calc(0.15s + var(--i) * 0.07s); }

/* 5 · calendrier */
.cal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cal article { border: 1px solid var(--line-2); border-top: 3px solid var(--green); border-radius: var(--radius); padding: clamp(18px, 3vh, 28px); background: rgba(15, 20, 17, 0.85); }
.cal article + article { border-top-color: var(--red); }
.cal .k { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.cal .d { display: block; margin: 8px 0 10px; font-family: var(--display); font-weight: 800; font-stretch: 118%; font-size: clamp(2rem, 6vw, 3.4rem); line-height: 1; text-transform: uppercase; }
.cal .m { color: var(--soft); font-size: 0.9rem; }
.cal-note { margin: 14px 0 0; font-size: 0.82rem; color: var(--muted); }
.cal-note b { color: var(--yellow); font-weight: 400; }
.scene.on .cal article { animation: nctf-rise 0.6s var(--ease) both; }
.scene.on .cal article + article { animation-delay: 0.35s; }
@media (max-width: 600px) { .cal { grid-template-columns: 1fr; } }

/* 6 · fin */
.fin { text-align: center; }
.fin .w { margin: 0; font-family: var(--display); font-weight: 800; font-stretch: 118%; font-size: clamp(2.2rem, 8vw, 5.4rem); line-height: 0.95; text-transform: uppercase; }
.fin .w span { color: var(--green); }
.fin .f { margin: clamp(18px, 3vh, 28px) 0 0; font-size: clamp(0.9rem, 2.6vw, 1.15rem); color: var(--muted); }
.fin .f b { color: var(--paper); font-weight: 400; }
.fin .f i { font-style: normal; color: var(--yellow); }
.scene.on .fin .f { animation: nctf-rise 0.6s var(--ease) 0.5s both; }

/* progression en 6 segments */
.cine-progress { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex: 1; max-width: 520px; }
.cine-progress li { flex: 1; height: 3px; background: var(--line-2); border-radius: 2px; overflow: hidden; }
.cine-progress li i { display: block; height: 100%; background: var(--green); transform-origin: left; transform: scaleX(0); }
.cine-progress li.done i { transform: none; }
.cine-progress li.now i { animation: cine-fill var(--dur, 3s) linear both; }
.cine.paused .cine-progress li.now i { animation-play-state: paused; }
@keyframes cine-fill { from { transform: scaleX(0); } to { transform: none; } }
.cine-hint { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
@media (max-width: 480px) {
  .cine-bottom { flex-direction: column-reverse; align-items: stretch; gap: 10px; }
  .cine-progress { max-width: none; }
  .cine-hint { text-align: center; }
}

/* hero NCTF26 : le « 26 » en rouge, puces de secteurs, lien « revoir l'intro » */
.hero h1.one span { display: inline; }
/* le titre reçoit le focus par script à la sortie de l'intro : pas d'anneau, ce n'est pas un contrôle */
.hero h1[tabindex="-1"]:focus { outline: none; }
.hero h1 .r26 { color: var(--red); text-shadow: 0 0 40px rgba(210, 16, 52, 0.35); }
.hero-chips { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; max-width: 40rem; }
.hero-chips li { font-family: var(--mono); font-size: 0.74rem; color: var(--soft); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 3px 10px; background: var(--flag-bg); }
.hero-chips li::before { content: "#"; color: var(--green); }
.replay {
  margin-top: 14px; padding: 0; border: 0; background: none; cursor: pointer;
  font-family: var(--mono); font-size: 0.78rem; color: var(--muted); text-decoration: underline; text-underline-offset: 3px;
}
.replay:hover { color: var(--paper); }

/* --------------------------------------------- effets de la vitrine (fx) */
/* frise du déroulé : un filet vert qui se remplit au défilement (--p de 0 à 1) */
.timeline { position: relative; }
.timeline::after {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px;
  background: linear-gradient(90deg, var(--green), var(--yellow) 60%, var(--red));
  transform-origin: left center; transform: scaleX(var(--p, 1));
}
@media (max-width: 760px) { .timeline::after { display: none; } }


/* ------------------------------------------------------------------- 404 */
.notfound { min-height: calc(100vh - 68px); display: grid; place-items: center; text-align: center; padding: 48px var(--gutter); }
.notfound .code { font-family: var(--display); font-weight: 800; font-stretch: 118%; font-size: clamp(6rem, 22vw, 14rem); line-height: 0.9; margin: 0; }
.notfound .code span:nth-child(1) { color: var(--green); }
.notfound .code span:nth-child(2) { color: var(--yellow); }
.notfound .code span:nth-child(3) { color: var(--red); }
.notfound p { color: var(--soft); margin: 18px 0 32px; }
/* easter egg volontairement discret : décoratif, hors exigence de contraste */
.notfound .octal { font-family: var(--mono); font-size: 0.78rem; color: var(--line-2); word-break: break-all; margin-top: 40px; user-select: all; }

/* page : en-tête collant sous la zone sûre des téléphones, titres équilibrés */
.site-head { top: env(safe-area-inset-top, 0px); }
h1, h2, h3 { text-wrap: balance; }
.cats-head .draft { color: var(--muted); letter-spacing: 0.04em; text-transform: none; }
.cats-head .draft::before { content: "· "; }
.countdown[hidden] { display: none; }
.lead code { font-family: var(--mono); font-size: 0.9em; color: var(--paper); background: var(--ink-3); padding: 0.1em 0.4em; border-radius: 4px; }
