/* ============================================================
   PwnMe MMDC 2026 — Landing
   Built on top of École 2600 design system tokens.
   Adds: pixel-art motifs, terminal styling, countdown, grids.
   ============================================================ */

:root {
  --accent: var(--brand-purple);
  --accent-glow: rgba(88, 0, 255, 0.55);
  --accent-glow-soft: rgba(88, 0, 255, 0.22);
  --pixel: 4px;
  --container-wide: 1280px;
  --container: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

img { max-width: 100%; height: auto; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-grad-dark) fixed;
  color: var(--fg-1);
  font-family: var(--font-body);
  overflow-x: clip;
}

/* Pixel grid background — subtle, toggleable */
body.pixel-grid::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(207, 213, 254, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(207, 213, 254, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
}

/* Scanline overlay — very subtle */
body.scanlines::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: repeating-linear-gradient(
    180deg,
    rgba(0,0,0,0) 0,
    rgba(0,0,0,0) 2px,
    rgba(0,0,0,0.06) 2px,
    rgba(0,0,0,0.06) 3px
  );
  mix-blend-mode: multiply;
}

main { position: relative; z-index: 2; }

/* ============================================================
   Layout primitives
   ============================================================ */
.wrap {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter, 80px);
  padding-right: var(--gutter, 80px);
}
.wrap-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin: 0 auto;
  padding-left: var(--gutter, 80px);
  padding-right: var(--gutter, 80px);
}
@media (max-width: 900px) {
  .wrap, .wrap-wide { padding-left: 24px; padding-right: 24px; }
}

section { position: relative; padding: 96px 0; }
@media (max-width: 900px) { section { padding: 64px 0; } }

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.section-eyebrow::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--accent);
  box-shadow:
    -6px 0 0 var(--accent),
    6px 0 0 var(--accent);
  clip-path: polygon(0 40%, 40% 40%, 40% 0, 60% 0, 60% 40%, 100% 40%, 100% 60%, 60% 60%, 60% 100%, 40% 100%, 40% 60%, 0 60%);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  text-wrap: balance;
}
.section-lede {
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 60ch;
  margin: 0;
}

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(7, 8, 16, 0.65);
  border-bottom: 1px solid var(--border-level1);
}
[data-theme="light"] .nav { background: rgba(247, 247, 247, 0.7); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 32px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--fg-1);
  text-decoration: none;
  border-bottom: none;
}
.nav-logo img {
  height: 44px;
  width: auto;
  display: block;
}
.nav-logo .nav-edition {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
  padding: 3px 7px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 14px;
  color: var(--fg-2);
  border-bottom: none;
  font-family: var(--font-body);
  letter-spacing: 0.01em;
  transition: color var(--dur-fast) var(--ease-out);
}
.nav-links a:hover { color: var(--fg-1); opacity: 1; }
@media (max-width: 900px) { .nav-links { display: none; } }

/* ---------- Hamburger toggle (mobile only) ---------- */
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 1px solid var(--border-level1);
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-direction: column;
  transition: border-color 180ms ease, background 180ms ease;
}
.nav-toggle:hover { border-color: var(--accent); }
.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--fg-1);
  border-radius: 1px;
  transition: transform 220ms ease, opacity 180ms ease;
  transform-origin: center;
}
.nav-toggle[data-open="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[data-open="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[data-open="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  /* Hide the topbar CTA on mobile — the drawer carries it as a big button. */
  .nav-cta { display: none !important; }
}

/* ---------- Mobile drawer ---------- */
.nav-mobile {
  position: fixed;
  inset: 72px 0 0 0;
  background: rgba(7, 8, 16, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 49;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  overflow-y: auto;
}
[data-theme="light"] .nav-mobile { background: rgba(247, 247, 247, 0.94); }
.nav-mobile[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}
.nav-mobile-panel {
  padding: 28px 24px 40px;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.nav-mobile-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.nav-mobile-links li {
  border-bottom: 1px solid var(--border-level1);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 260ms ease, transform 260ms ease;
}
.nav-mobile[data-open="true"] .nav-mobile-links li {
  opacity: 1;
  transform: translateY(0);
}
.nav-mobile-links a {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 18px 4px;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--fg-1);
  text-decoration: none;
  border-bottom: none;
}
.nav-mobile-links a[aria-current="page"] {
  color: var(--accent);
}
.nav-mobile-links a:hover { color: var(--accent); }
.nav-mobile-idx {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--fg-3);
}
.nav-mobile-cta {
  align-self: stretch;
  justify-content: center;
  margin-top: 8px;
}
/* Visible only on mobile, but keep CSS scoped */
@media (min-width: 901px) {
  .nav-mobile { display: none; }
}

.nav-cta {
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}
.nav-cta[data-visible="true"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              background var(--dur-base) var(--ease-out);
  white-space: nowrap;
}
.btn:hover { opacity: 0.88; }
.btn:active { opacity: 0.7; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 0 var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 0 28px var(--accent-glow); opacity: 1; }
.btn-secondary {
  background: transparent;
  color: var(--fg-1);
  border: 1px solid var(--border-level2);
}
.btn-secondary:hover { background: var(--bg-card); }
.btn-ghost {
  background: transparent;
  color: var(--fg-2);
  height: 40px;
  padding: 0 14px;
  font-weight: 500;
}
.btn-lg { height: 56px; padding: 0 28px; font-size: 16px; }

.btn .pixel-arrow {
  width: 12px;
  height: 12px;
  background: currentColor;
  clip-path: polygon(0 30%, 60% 30%, 60% 10%, 100% 50%, 60% 90%, 60% 70%, 0 70%);
  display: inline-block;
}

/* Small pixel bullet */
.pxbullet {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  vertical-align: middle;
  margin: 0 10px 3px;
  flex-shrink: 0;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: 64px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 72px;
  align-items: center;
}
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
}

.hero-text { min-width: 0; }

.hero-side {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
}
@media (max-width: 1100px) {
  .hero-side { margin-top: 8px; }
}

/* Side card - "fiche signaletique" du CTF, meuble la colonne droite sur desktop */
.hero-side-card {
  background: var(--bg-card);
  border: 1px solid var(--border-level1);
  border-radius: 12px;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}
.hero-side-card::before {
  content: "// brief";
  position: absolute;
  top: -10px;
  left: 16px;
  background: var(--bg-page);
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--accent);
}
.hsc-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border-level2);
}
.hsc-row:last-child { border-bottom: 0; padding-bottom: 0; }
.hsc-key {
  color: var(--fg-3);
  letter-spacing: 0.08em;
  text-transform: capitalize;
  flex-shrink: 0;
}
.hsc-val {
  color: var(--fg-1);
  font-weight: 500;
  text-align: right;
}
@media (max-width: 500px) {
  .hero-side-card { padding: 18px 18px; }
  .hsc-row { font-size: 12px; }
}

.hero-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-3);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 28px;
  overflow-wrap: anywhere;
  min-width: 0;
}
.hero-meta-line span { display: inline-flex; align-items: center; min-width: 0; }
.hero-meta-line .pxbullet { background: var(--accent); }

.hero-logo {
  display: block;
  width: 100%;
  max-width: 540px;
  height: auto;
  image-rendering: pixelated;
  margin: 0 0 36px;
  filter: drop-shadow(0 0 30px rgba(88, 0, 255, 0.35));
}
@media (max-width: 1100px) {
  .hero-logo { max-width: 640px; margin-bottom: 28px; }
}
@media (max-width: 600px) {
  .hero-logo { max-width: 100%; }
}

.hero-tagline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin: 0 0 24px;
  text-wrap: balance;
}
.hero-tagline .glow {
  color: var(--accent);
  text-shadow: 0 0 24px var(--accent-glow);
}
.hero-sub {
  font-size: 18px;
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 50ch;
  margin: 0 0 36px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

/* Countdown */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-level1);
  border-radius: 12px;
  position: relative;
}
.countdown::before {
  content: "T-MINUS";
  position: absolute;
  top: -10px;
  left: 16px;
  background: var(--bg-page);
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--accent);
}
.cd-cell { text-align: center; }
.cd-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 54px);
  line-height: 1;
  color: var(--fg-1);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px var(--accent-glow-soft);
}
.cd-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-3);
  margin-top: 6px;
}

/* Terminal panel */
.terminal {
  background: rgba(7, 8, 16, 0.85);
  border: 1px solid var(--border-level2);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,0.45),
              0 0 60px rgba(88, 0, 255, 0.12);
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.55;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(207, 213, 254, 0.04);
  border-bottom: 1px solid var(--border-level1);
}
.terminal-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--fg-3); opacity: 0.5;
}
.terminal-dot.r { background: #ff5f56; opacity: 0.9; }
.terminal-dot.y { background: #ffbd2e; opacity: 0.9; }
.terminal-dot.g { background: #27c93f; opacity: 0.9; }
.terminal-title {
  margin-left: 8px;
  color: var(--fg-3);
  font-size: 12px;
  letter-spacing: 0.06em;
}
.terminal-body {
  padding: 18px 20px 22px;
  color: var(--fg-2);
  min-height: 280px;
}
.t-line { white-space: pre-wrap; word-break: break-word; }
.t-prompt { color: var(--accent); }
.t-prompt2 { color: rgb(3, 228, 191); }
.t-comment { color: var(--fg-3); }
.t-flag { color: rgb(75, 255, 84); font-weight: 700; }
.t-warn { color: rgb(252, 219, 106); }
.t-cmd { color: var(--fg-1); }
.t-caret {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--fg-1);
  vertical-align: -3px;
  animation: blink 1s steps(1) infinite;
  margin-left: 2px;
}
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 640px) {
  .terminal { font-size: clamp(11.5px, 3.2vw, 13.5px); }
  .terminal-body { padding: 14px 12px 16px; min-height: 240px; }
  .terminal-bar { padding: 8px 12px; }
  .terminal-title { font-size: 11px; }
  /* Hanging indent: wrapped fragments align past the "[+] " / "$ " prefix
     instead of going back to column 0, so lines stay visually grouped. */
  .t-line { text-indent: -2.5em; padding-left: 2.5em; }
}

/* ============================================================
   Stat ticker strip
   ============================================================ */
.ticker {
  border-top: 1px solid var(--border-level1);
  border-bottom: 1px solid var(--border-level1);
  background: rgba(207, 213, 254, 0.025);
  padding: 0;
}
.ticker-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
}
.ticker-cell {
  padding: 28px 24px;
  border-right: 1px solid var(--border-level1);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ticker-cell:last-child { border-right: none; }
@media (max-width: 900px) {
  .ticker-inner { grid-template-columns: repeat(2, 1fr); }
  .ticker-cell:nth-child(2) { border-right: none; }
  .ticker-cell:nth-child(1), .ticker-cell:nth-child(2) {
    border-bottom: 1px solid var(--border-level1);
  }
}
.ticker-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1;
  letter-spacing: -0.02em;
}
.ticker-num .unit { color: var(--accent); font-size: 0.6em; margin-left: 10px; }
.ticker-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-3);
}

/* ============================================================
   About cards
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 56px;
}
@media (max-width: 1100px) { .about-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .about-grid { grid-template-columns: 1fr; } }
.about-card {
  padding: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-level1);
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  transition: background var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out);
}
.about-card:hover {
  background: rgba(207, 213, 254, 0.08);
  border-color: var(--border-level2);
}
.about-card .pxicon {
  width: 48px;
  height: 48px;
  margin-bottom: 20px;
  display: block;
}
.about-card h3 {
  font-size: 22px;
  margin-bottom: 8px;
}
.about-card p {
  color: var(--fg-2);
  font-size: 15px;
  margin: 0;
}

/* ============================================================
   Category cards
   ============================================================ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 56px;
}
@media (max-width: 1100px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .cat-grid { grid-template-columns: 1fr; } }

.cat-card {
  position: relative;
  padding: 24px;
  padding-left: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-level1);
  border-radius: 12px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
  transition: background var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}
.cat-card:hover { background: rgba(207, 213, 254, 0.08); }
.cat-stripe {
  position: absolute;
  left: 12px;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 2px;
  background: var(--cat-color, var(--accent));
  box-shadow: 0 0 24px 0 var(--cat-color, var(--accent));
}
.cat-pxicon {
  width: 56px;
  height: 56px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(7, 1fr);
  gap: 1px;
}
.cat-pxicon span {
  background: var(--cat-color, var(--accent));
  border-radius: 1px;
}
.cat-pxicon span.off { background: transparent; }
.cat-pxicon span.dim { background: var(--cat-color, var(--accent)); opacity: 0.35; }

.cat-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 0;
}
.cat-desc {
  font-size: 14px;
  color: var(--fg-3);
  line-height: 1.5;
  margin: 0;
}
.cat-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.cat-meta .cat-pts { color: var(--cat-color, var(--accent)); font-weight: 700; }

/* ============================================================
   Page header (subpages like /challenges)
   Smaller than the landing Hero — no countdown, no terminal.
   ============================================================ */
.page-header {
  padding-top: 96px;
  padding-bottom: 24px;
}
.page-header .section-title { font-size: clamp(36px, 5vw, 56px); }
.page-header .section-lede { max-width: 720px; }
@media (max-width: 640px) {
  .page-header { padding-top: 56px; padding-bottom: 8px; }
}


/* ============================================================
   Programme (timeline)
   - Desktop ≥720px:   [time 140px] [bullet]  [event title + desc]
   - Tablet/mobile:    stacked, bullet aligns with the time row
   - Very narrow:      reduced left padding so text never gets squeezed
   ============================================================ */
.timeline {
  margin-top: 56px;
  position: relative;
  /* CSS var so the bullet/line column can shift in one place per breakpoint */
  --tl-rail: 14px;
}

/* Etats fallback du Programme (fetch programme.json) */
.tl-loading {
  margin-top: 56px;
  padding: 32px;
  text-align: center;
  color: var(--fg-3);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.05em;
}
.tl-fallback {
  margin-top: 56px;
  padding: 24px 28px;
  border: 1px solid rgba(255, 219, 106, 0.30);
  background: rgba(255, 219, 106, 0.06);
  border-radius: 8px;
  color: var(--fg-2);
}
[data-theme="light"] .tl-fallback {
  border-color: rgba(255, 169, 0, 0.35);
  background: rgba(255, 219, 106, 0.10);
}
.tl-fallback p { margin: 0 0 12px; }
.tl-fallback p:last-child { margin-bottom: 0; }
.tl-fallback ul { margin: 0 0 16px; padding-left: 22px; }
.tl-fallback li { margin-bottom: 4px; }
.tl-fallback a { color: var(--accent); border-bottom: 1px solid rgba(125, 86, 240, 0.40); }
.timeline::before {
  content: "";
  position: absolute;
  left: var(--tl-rail);
  top: 8px;
  bottom: 8px;
  width: 2px;
  background:
    repeating-linear-gradient(
      to bottom,
      var(--accent) 0,
      var(--accent) 6px,
      transparent 6px,
      transparent 12px
    );
}
.tl-row {
  position: relative;
  padding: 16px 0 16px calc(var(--tl-rail) + 36px);
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
}
.tl-row::before {
  content: "";
  position: absolute;
  left: calc(var(--tl-rail) - 6px);
  top: 22px;
  width: 14px;
  height: 14px;
  background: var(--bg-page);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px var(--bg-page), 0 0 18px var(--accent-glow);
  transition: background 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}
.tl-time {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
  letter-spacing: 0.05em;
  font-weight: 700;
  /* keep the column compact even when the layout collapses to 1 col */
  white-space: nowrap;
}
.tl-event { min-width: 0; }
.tl-event h4 {
  font-size: 20px;
  margin: 0 0 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  line-height: 1.25;
}
.tl-event p {
  color: var(--fg-2);
  font-size: 14px;
  margin: 0;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

/* Row type variants — give each kind of event its own visual code,
   no emoji needed. Bullet style + small mono tag on the title. */
.tl-row.tl-drop::before {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg-page), 0 0 22px var(--accent-glow);
}
.tl-row.tl-ceremony::before {
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--bg-page), 0 0 24px var(--accent-glow);
}
.tl-row.tl-stop::before {
  background: var(--brand-red);
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px var(--bg-page), 0 0 28px rgba(255, 35, 0, 0.55);
}

.tl-tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  border-radius: 4px;
  border: 1px solid currentColor;
  background: transparent;
}
.tl-tag-stop { color: var(--brand-red); }
.tl-tag-drop { color: var(--accent); }

/* ---------- Responsive breakpoints ---------- */
/* Tablet & small desktop: stack time above event but keep generous gutters */
@media (max-width: 720px) {
  .timeline { --tl-rail: 12px; margin-top: 40px; }
  .tl-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 14px 0 14px calc(var(--tl-rail) + 28px);
  }
  .tl-row::before { top: 18px; }
  .tl-event h4 { font-size: 18px; }
}
/* Phone narrow (≤420px): tighten further so descriptions don't choke */
@media (max-width: 420px) {
  .timeline { --tl-rail: 10px; margin-top: 32px; }
  .tl-row {
    padding: 12px 0 12px calc(var(--tl-rail) + 22px);
  }
  .tl-row::before {
    width: 12px; height: 12px; top: 16px;
    left: calc(var(--tl-rail) - 5px);
  }
  .tl-time { font-size: 12.5px; letter-spacing: 0.04em; }
  .tl-event h4 { font-size: 17px; gap: 8px; }
  .tl-event p  { font-size: 13.5px; }
  .tl-tag { height: 20px; padding: 0 6px; font-size: 10px; }
}

/* ============================================================
   Prizes podium
   ============================================================ */
.prize {
  padding: 32px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border-level1);
  border-radius: 12px;
  position: relative;
  text-align: left;
}
.prize-rank-badge {
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--border-level2);
  color: var(--fg-1);
  font-weight: 700;
  font-size: 12px;
  border-radius: 4px;
}

/* ============================================================
   Sponsors - single grid, auto-fit pour ajout facile d'entreprises
   ============================================================ */
.partner-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1px;
  margin-top: 40px;
  background: var(--border-level1);
  border: 1px solid var(--border-level1);
  border-radius: 12px;
  overflow: hidden;
}
.partner {
  /* flex plutot que grid : la derniere rangee (incomplete) est centree
     via justify-content au lieu de coller a gauche. Le max-width borne
     la croissance pour qu'un logo orphelin se centre proprement. */
  flex: 1 1 280px;
  max-width: 360px;
  background: var(--bg-page);
  min-height: 120px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--fg-3);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.02em;
  line-height: 1.25;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out);
}
.partner:hover { background: var(--bg-level1); color: var(--fg-1); }
/* Lien sponsor : rend toute la cellule cliquable, sans soulignement ni
   changement de couleur (le logo parle de lui-meme). */
.partner-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-decoration: none;
  /* annule le border-bottom global applique a tous les <a> (design-system) */
  border-bottom: none;
  color: inherit;
}
.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 10px;
  padding: 16px 22px;
  width: 100%;
  max-width: 230px;
  min-height: 120px;
}
.partner-logo img {
  display: block;
  max-width: 100%;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
}
/* Logos quasi carrés (sceaux, écussons) : rendus plus grands pour
   équilibrer visuellement avec les logos larges (Synacktiv, Equans). */
.partner-logo.is-md img { max-height: 72px; }
.partner-logo.is-lg img { max-height: 88px; }

/* Soutien du territoire (Saint-Quentin-en-Yvelines) : mis en avant
   separement, centre sous la grille partenaires. */
.territory {
  margin-top: 40px;
  text-align: center;
}
.territory-label {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--fg-2);
  margin: 0 0 18px;
}
.territory-link {
  display: inline-flex;
  border-bottom: none;
}
.territory-link:hover { opacity: 1; }
.territory-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 10px;
  padding: 18px 28px;
}
.territory-logo img {
  display: block;
  max-height: 96px;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* ============================================================
   FAQ accordion
   ============================================================ */
.faq-list {
  margin-top: 56px;
  border-top: 1px solid var(--border-level1);
}
.faq-item {
  border-bottom: 1px solid var(--border-level1);
}
.faq-q {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--fg-1);
  padding: 24px 0;
  text-align: left;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.faq-q:hover { color: var(--accent); }
.faq-toggle {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 22px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  transition: transform var(--dur-base) var(--ease-out);
}
.faq-item[data-open] .faq-toggle { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur-slow) var(--ease-out);
  color: var(--fg-2);
  font-size: 16px;
  line-height: 1.6;
}
.faq-item[data-open] .faq-a { max-height: 400px; }
.faq-a-inner { padding: 0 0 24px; max-width: 70ch; }

/* ============================================================
   Final CTA
   ============================================================ */
.cta-final {
  margin: 56px 0;
  padding: 64px 48px;
  background:
    radial-gradient(ellipse 60% 80% at 80% 20%, rgba(88, 0, 255, 0.25), transparent 60%),
    radial-gradient(ellipse 60% 80% at 20% 100%, rgba(213, 66, 255, 0.18), transparent 60%),
    rgba(18, 21, 43, 0.7);
  border: 1px solid var(--border-level2);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.cta-final::before {
  /* corner pixels */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0 0, var(--accent) 4px, transparent 5px) 0 0/24px 24px,
    radial-gradient(circle at 100% 0, var(--accent) 4px, transparent 5px) 0 0/24px 24px;
  opacity: 0;
  pointer-events: none;
}
.cta-final h2 {
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 16px;
}
.cta-final p {
  color: var(--fg-2);
  font-size: 18px;
  max-width: 50ch;
  margin: 0 auto 32px;
}
.cta-final .hero-cta-row { justify-content: center; margin-bottom: 0; }

/* ============================================================
   Footer
   ============================================================ */
footer {
  border-top: 1px solid var(--border-level1);
  padding: 56px 0 32px;
  margin-top: 0;
  color: var(--fg-3);
  font-size: 14px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.footer-brand img { height: 32px; image-rendering: pixelated; margin-bottom: 16px; }
.footer-brand p { color: var(--fg-3); max-width: 32ch; font-size: 14px; margin: 0; }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-2);
  margin: 0 0 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--fg-3); border-bottom: none; font-size: 14px; }
.footer-col a:hover { color: var(--fg-1); opacity: 1; }
.footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--border-level1);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--fg-3);
}
.footer-bar .flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-3);
}
.footer-bar .flag code {
  background: rgba(207, 213, 254, 0.06);
  padding: 4px 8px;
  border-radius: 4px;
  color: var(--fg-2);
}
@media (max-width: 700px) { .footer-bar { flex-direction: column; gap: 12px; align-items: flex-start; } }

/* ============================================================
   Reveal on scroll
   ============================================================ */
.reveal {
  /*opacity: 0;*/
  transform: translateY(12px);
  transition: opacity 320ms var(--ease-out), transform 320ms var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ============================================================
   Pixel decoration corners
   ============================================================ */
.pxcorner {
  display: inline-block;
  width: 16px; height: 16px;
  background: var(--accent);
  position: absolute;
  clip-path: polygon(0 0, 100% 0, 100% 25%, 25% 25%, 25% 100%, 0 100%);
}

/* Section divider — pixel row */
.pxrow {
  height: 8px;
  background-image: linear-gradient(90deg, var(--accent) 50%, transparent 50%);
  background-size: 16px 8px;
  opacity: 0.18;
  margin: 0;
  border: none;
}

/* ============================================================
   Registration page
   ============================================================ */
.wrap-narrow {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding-left: var(--gutter, 80px);
  padding-right: var(--gutter, 80px);
}
@media (max-width: 720px) {
  .wrap-narrow { padding-left: 20px; padding-right: 20px; }
}

#register { padding: 96px 0 120px; }
@media (max-width: 720px) { #register { padding: 64px 0 80px; } }

.reg-alert {
  padding: 14px 16px;
  border-radius: 4px;
  font-size: 14px;
  border: 1px solid transparent;
}
.reg-alert-error {
  background: rgba(255, 35, 0, 0.08);
  border-color: rgba(255, 35, 0, 0.40);
  color: var(--fg-1);
}


/* ============================================================
   Legal pages (mentions-legales / confidentialite / cgu / cookies)
   ============================================================ */
.legal-page { padding: 80px 0 120px; }
@media (max-width: 720px) { .legal-page { padding: 56px 0 72px; } }

.legal-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
@media (max-width: 980px) {
  .legal-layout { grid-template-columns: 1fr; gap: 32px; }
}

.legal-sidebar {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  font-size: 14px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 4px;
}
@media (max-width: 980px) {
  .legal-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    padding: 20px;
    border: 1px solid rgba(207, 213, 254, 0.10);
    border-radius: 8px;
    background: rgba(207, 213, 254, 0.03);
  }
}
[data-theme="light"] .legal-sidebar {
  border-color: rgba(18, 21, 43, 0.10);
  background: rgba(18, 21, 43, 0.02);
}

.legal-side-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--fg-3);
  margin: 0 0 12px;
}

.legal-side-nav,
.legal-side-toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.legal-side-nav li,
.legal-side-toc li { margin: 0; }
.legal-side-nav a,
.legal-side-toc a {
  display: block;
  padding: 8px 12px;
  color: var(--fg-2);
  border: none;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.legal-side-nav a:hover,
.legal-side-toc a:hover {
  color: var(--fg-1);
  background: rgba(207, 213, 254, 0.04);
  opacity: 1;
}
[data-theme="light"] .legal-side-nav a:hover,
[data-theme="light"] .legal-side-toc a:hover { background: rgba(18, 21, 43, 0.04); }

.legal-side-nav a.is-active {
  color: var(--fg-1);
  border-left-color: var(--accent);
  background: rgba(88, 0, 255, 0.10);
}
[data-theme="light"] .legal-side-nav a.is-active { background: rgba(88, 0, 255, 0.08); }

.legal-side-toc a { font-size: 13px; padding: 6px 12px; }

.legal-side-contact p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.5;
}
.legal-side-contact p:last-child { margin-bottom: 0; }
.legal-side-contact a {
  color: var(--fg-1);
  border-bottom: 1px solid rgba(125, 86, 240, 0.40);
}
.legal-side-mute { color: var(--fg-3); font-size: 12px; }

.legal-main { min-width: 0; }

.legal-header { margin-bottom: 40px; }
.legal-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--accent);
  margin: 0 0 12px;
}
.legal-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  color: var(--fg-1);
  margin: 0;
  letter-spacing: -0.02em;
}

.legal-content {
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg-2);
  max-width: 780px;
}
.legal-content h2 {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--fg-1);
  margin: 48px 0 16px;
  padding-top: 24px;
  border-top: 1px solid rgba(207, 213, 254, 0.10);
  scroll-margin-top: 96px;
}
[data-theme="light"] .legal-content h2 { border-top-color: rgba(18, 21, 43, 0.10); }
.legal-content h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.legal-content h3 {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--fg-1);
  margin: 24px 0 8px;
}

.legal-content p,
.legal-content li { color: var(--fg-2); }
.legal-content p { margin: 0 0 14px; }
.legal-content ul { padding-left: 22px; margin: 0 0 16px; }
.legal-content li { margin-bottom: 6px; }
.legal-content strong { color: var(--fg-1); font-weight: 600; }

.legal-content a {
  color: var(--accent);
  border-bottom-color: rgba(125, 86, 240, 0.40);
}
.legal-content code {
  font-family: var(--font-mono);
  background: rgba(207, 213, 254, 0.06);
  color: var(--fg-1);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.92em;
}
[data-theme="light"] .legal-content code { background: rgba(18, 21, 43, 0.05); }

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}
.legal-table th,
.legal-table td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid rgba(207, 213, 254, 0.10);
  vertical-align: top;
}
[data-theme="light"] .legal-table th,
[data-theme="light"] .legal-table td { border-color: rgba(18, 21, 43, 0.10); }
.legal-table th {
  background: rgba(207, 213, 254, 0.04);
  font-family: var(--font-mono);
  color: var(--fg-1);
  font-weight: 600;
  letter-spacing: 0.02em;
}
[data-theme="light"] .legal-table th { background: rgba(18, 21, 43, 0.03); }

.legal-sep {
  border: none;
  border-top: 1px dashed rgba(207, 213, 254, 0.18);
  margin: 48px 0 24px;
}
[data-theme="light"] .legal-sep { border-top-color: rgba(18, 21, 43, 0.18); }

.legal-foot {
  font-size: 13px;
  color: var(--fg-3);
  font-style: italic;
}

/* Métadonnées de document (version + date publication) */
.legal-doc-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 8px 0 0;
  font-size: 13px;
}
.legal-doc-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(125, 86, 240, 0.12);
  color: var(--accent);
  border: 1px solid rgba(125, 86, 240, 0.25);
  padding: 3px 8px;
  border-radius: 3px;
}
.legal-doc-mute {
  color: var(--fg-3);
  font-size: 12px;
}

/* Note de précision sous une section */
.legal-note {
  background: rgba(125, 86, 240, 0.06);
  border-left: 3px solid var(--accent);
  padding: 12px 16px;
  margin: 12px 0 18px;
  font-size: 14.5px;
  border-radius: 0 4px 4px 0;
}
[data-theme="light"] .legal-note {
  background: rgba(125, 86, 240, 0.05);
}

/* Ancre copiable au survol des h2 */
.legal-content h2 {
  position: relative;
}
.legal-h-anchor {
  margin-left: 10px;
  font-family: var(--font-mono);
  font-size: 18px;
  color: var(--fg-3);
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
  border-bottom: none !important;
  text-decoration: none;
}
.legal-content h2:hover .legal-h-anchor,
.legal-h-anchor:focus {
  opacity: 1;
}
.legal-h-anchor:hover {
  color: var(--accent);
}

/* Lien retour en haut */
.legal-back-top {
  display: inline-block;
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-3);
  text-decoration: none;
  border-bottom: 1px dashed rgba(207, 213, 254, 0.20);
  padding-bottom: 2px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.legal-back-top:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
[data-theme="light"] .legal-back-top {
  border-bottom-color: rgba(18, 21, 43, 0.20);
}

/* ============================================================
   INSCRIPTION - layout 2 colonnes desktop (pitch a gauche, form a droite)
   ============================================================ */
.inscription-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 64px;
  align-items: start;
  max-width: 1080px;
  margin: 0 auto;
}
@media (max-width: 1000px) {
  .inscription-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 560px;
  }
}

.inscription-pitch .section-title { margin-top: 12px; }
.inscription-pitch .section-lede { margin-bottom: 32px; max-width: 46ch; }

/* Card formulaire */
.email-form-card {
  background: var(--bg-level1);
  border: 1px solid var(--bg-level2);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-top: 4em;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
}
@media (max-width: 1000px) {
  .email-form-card { margin-top: 0; }
}
.email-form-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 24px;
  right: 24px;
  height: 3px;
  background: var(--accent);
  border-radius: 0 0 3px 3px;
}
@media (max-width: 500px) {
  .email-form-card { padding: 24px 20px; }
}

.efc-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 20px;
  border-bottom: 1px dashed var(--bg-level2);
}
.efc-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.efc-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--fg-primary);
  line-height: 1.2;
}
.efc-head p {
  margin: 0;
  font-size: 14px;
  color: var(--fg-secondary);
  line-height: 1.5;
}

.efc-turnstile { min-height: 65px; }

/* Selecteur de categorie (Premiere / Terminale / Bac+1 / Bac+2) */
.efc-cat {
  border: none;
  padding: 0;
  margin: 0 0 4px;
}
.efc-cat-legend {
  font-size: 12px;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-3);
  margin-bottom: 10px;
  padding: 0;
}
.efc-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 600px) {
  .efc-cat-grid { grid-template-columns: repeat(2, 1fr); }
}
.efc-cat-opt {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1.5px solid var(--bg-level2);
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  transition: border-color 160ms var(--ease-out),
              background 160ms var(--ease-out),
              transform 160ms var(--ease-out);
  text-align: center;
}
.efc-cat-opt:hover { border-color: var(--border-level2); background: rgba(255, 255, 255, 0.05); }
.efc-cat-opt input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.efc-cat-opt[data-checked="true"] {
  border-color: var(--brand-purple);
  background: rgba(88, 0, 255, 0.10);
  box-shadow: 0 0 0 3px rgba(88, 0, 255, 0.18);
}
.efc-cat-opt input[type="radio"]:focus-visible ~ .efc-cat-label {
  text-decoration: underline;
}
.efc-cat-label {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-1);
  line-height: 1.1;
}
.efc-cat-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--fg-3);
  text-transform: lowercase;
}

/* Choix optionnel presentiel - case a cocher custom */
.efc-onsite {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--bg-level2);
  border-radius: var(--radius-md, 8px);
  cursor: pointer;
  transition: border-color 180ms var(--ease-out), background 180ms var(--ease-out);
}
.efc-onsite:hover { border-color: var(--border-level2); background: rgba(255, 255, 255, 0.05); }
.efc-onsite input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.efc-onsite-box {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 10px;
  border: 1.5px solid var(--border-level2, #444);
  border-radius: 4px;
  background: var(--bg-level0, #0d0f14);
  position: relative;
  transition: border-color 160ms var(--ease-out), background 160ms var(--ease-out);
}
.efc-onsite input[type="checkbox"]:checked ~ .efc-onsite-box {
  background: var(--brand-purple);
  border-color: var(--brand-purple);
}
.efc-onsite input[type="checkbox"]:checked ~ .efc-onsite-box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.efc-onsite input[type="checkbox"]:focus-visible ~ .efc-onsite-box {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.efc-onsite-text p {
  font-size: 12px;
  line-height: 1.45;
  color: var(--fg-1);
  margin: 0;
  padding: 0;
}
.efc-onsite-hint {
  display: block;
  font-size: 11px;
  color: var(--fg-tertiary);
  font-family: monospace;
}

.efc-rgpd {
  margin: 0;
  font-size: 12px;
  color: var(--fg-tertiary);
  line-height: 1.5;
}

/* Email form (utilise dans .email-form-card) */
.email-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.email-input {
  background: var(--bg-page);
  border: 1.5px solid var(--bg-level2);
  border-radius: var(--radius-md);
  color: var(--fg-primary);
  font-family: var(--font-body);
  font-size: 16px;
  padding: 14px 16px;
  width: 100%;
  transition: border-color 0.2s;
  outline: none;
}

.email-input:focus {
  border-color: var(--accent);
}

.email-input::placeholder {
  color: var(--fg-tertiary);
}

/* ============================================================
   PRIZE CARDS JR - une carte par categorie, contenu centre
   La grille auto-fit s'adapte au nombre de cartes (ajout/retrait facile)
   ============================================================ */
.prize-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.prize-header .section-title { margin-left: auto; margin-right: auto; }
.prize-header .section-lede { margin-left: auto; margin-right: auto; }

.prize-grid-jr {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
}

@media (max-width: 1200px) {
  .prize-grid-jr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 720px;
  }
}

@media (max-width: 640px) {
  .prize-grid-jr {
    grid-template-columns: 1fr;
    max-width: 440px;
    gap: 18px;
  }
}

.pc-card {
  background: var(--bg-level1);
  border: 1px solid var(--bg-level2);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 220ms var(--ease-out), border-color 220ms var(--ease-out);
}
.pc-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-level2);
}

.pc-stripe { height: 4px; }

.pc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--bg-level2);
}

.pc-cat {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pc-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 4px 9px;
  border-radius: 10px;
  background: var(--bg-level2);
  color: var(--fg-tertiary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.pc-body {
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
}

.pc-winners {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 24px;
}

.pc-num {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 800;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.pc-unit {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg-secondary);
  letter-spacing: 0.04em;
}

.pc-headline {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--fg-primary);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
  text-wrap: balance;
}

.pc-sub {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg-primary);
  line-height: 1.4;
  margin-bottom: 14px;
  text-wrap: balance;
  max-width: 22ch;
}

.pc-context {
  font-size: 13px;
  color: var(--fg-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
  text-wrap: balance;
  max-width: 24ch;
}

.pc-when {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-level2);
  color: var(--fg-secondary);
  border: 1px solid var(--bg-component);
  letter-spacing: 0.04em;
  margin-top: auto;
}

.pc-when-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.prize-footnote {
  max-width: 720px;
  margin: 36px auto 0;
  text-align: center;
  font-size: 13px;
  color: var(--fg-tertiary);
  line-height: 1.55;
  font-style: italic;
}

/* ============================================================
   Legal pages footer - inter-page navigation
   ============================================================ */
.legal-footer {
  border-top: 1px solid var(--border-level1);
  padding: 32px 0;
  margin-top: 64px;
  font-size: 13px;
  color: var(--fg-3);
  text-align: center;
}
.legal-footer nav { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.legal-footer a { color: var(--fg-2); text-decoration: none; }
.legal-footer a:hover { color: var(--accent); }
.legal-footer-sep { opacity: 0.4; }
.legal-footer p { margin: 16px 0 0; opacity: 0.6; }
