/* ============================================================
   JOSE LAN — style principal
   Palette tirée du logo :
   fond #1a1e23 · or #ffcd00 · blanc #f4f6f8 · gris #8b939e
   ============================================================ */

:root {
  --bg: #1a1e23;
  --surface: #22272e;
  --surface-2: #2a3038;
  --gold: #ffcd00;
  --gold-dark: #d9ad00;
  --white: #f4f6f8;
  --muted: #8b939e;
  --green: #4ade80;
  --font-display: "Saira", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ---------- HERO ---------- */
.hero {
  text-align: center;
  padding: 3rem 1rem 0;
  position: relative;
}

.hero-logo {
  width: min(420px, 80vw);
  height: auto;
  user-select: none;
  cursor: pointer;
  transition: transform .15s ease;
}
.hero-logo:active { transform: scale(.97); }

.hero-edition {
  font-family: var(--font-mono);
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-top: -1rem;
}

.blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-date {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  letter-spacing: .04em;
  margin-top: .6rem;
  color: var(--white);
}

/* Câble ethernet animé qui relie le hero au contenu */
.cable { width: 100%; margin-top: 2rem; }
.cable svg { display: block; width: 100%; height: 60px; }
.cable-line {
  fill: none;
  stroke: var(--surface-2);
  stroke-width: 6;
  stroke-linecap: round;
}
.cable-packets {
  fill: none;
  stroke: var(--gold);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 14 90;
  animation: packets 2.4s linear infinite;
}
@keyframes packets { to { stroke-dashoffset: -104; } }

/* ---------- SECTIONS ---------- */
main {
  max-width: 860px;
  margin: 0 auto;
  padding: 1rem 1.25rem 4rem;
}

.section { margin-top: 3.5rem; }

.section-title {
  font-style: italic;
  font-weight: 800;
  font-size: clamp(1.4rem, 4vw, 2rem);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: 1.4rem;
  display: flex;
  align-items: baseline;
  gap: .8rem;
  flex-wrap: wrap;
}

.tag {
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 500;
  font-size: .95rem;
  color: var(--bg);
  background: var(--gold);
  padding: .15rem .55rem;
  border-radius: 4px;
}

/* ---------- JOUEURS ---------- */
.players { list-style: none; }

.player {
  display: flex;
  align-items: center;
  gap: .9rem;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-left: 4px solid var(--gold);
  padding: .85rem 1.1rem;
  margin-bottom: .55rem;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  transition: transform .15s ease, background .15s ease;
}
.player:hover { transform: translateX(6px); background: var(--surface-2); }

.status {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  flex-shrink: 0;
}

.player-name { flex: 1; font-weight: 500; }
.aka { color: var(--gold); font-weight: 600; }
.player-ping { color: var(--muted); font-size: .9rem; }

/* Easter egg : couronne de José */
#jose { position: relative; }
#jose::after {
  content: "👑";
  position: absolute;
  right: 5.5rem;
  opacity: 0;
  transform: translateY(6px) rotate(-15deg);
  transition: opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
#jose:hover::after { opacity: 1; transform: translateY(0) rotate(0deg); }

.players-count {
  font-family: var(--font-mono);
  color: var(--muted);
  font-size: .9rem;
  margin-top: .8rem;
}

/* ---------- JEUX ---------- */
.games {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: .9rem;
}

.game {
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: 8px;
  padding: 1.4rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  text-decoration: none;
  color: var(--white);
  transition: transform .15s ease, border-color .15s ease;
}
.game:hover { transform: translateY(-4px); border-color: var(--gold); }

.game-icon { font-size: 1.8rem; }

.game-name {
  font-style: italic;
  font-weight: 800;
  font-size: 1.2rem;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.game-note { font-family: var(--font-mono); font-size: .82rem; color: var(--muted); }

.game-link .game-note { color: var(--gold); }

.game-mystery { cursor: pointer; user-select: none; }
.game-mystery:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---------- FOOTER ---------- */
.footer {
  text-align: center;
  padding: 2.5rem 1rem;
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--muted);
  border-top: 1px solid var(--surface-2);
}

.ch-cross {
  display: inline-block;
  background: #d52b1e;
  color: #fff;
  width: 1.2em; height: 1.2em;
  line-height: 1.2em;
  border-radius: 3px;
  font-weight: 600;
  text-align: center;
}

/* ---------- EASTER EGG : connexion perdue ---------- */
.disconnect-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 14, .96);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.disconnect-overlay.active { display: flex; }

.disconnect-box { text-align: center; font-family: var(--font-mono); }
.disconnect-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(1.8rem, 6vw, 3rem);
  color: var(--gold);
  animation: glitch .3s steps(2) infinite;
}
@keyframes glitch {
  0% { transform: translate(0); }
  50% { transform: translate(-2px, 1px); }
  100% { transform: translate(2px, -1px); }
}
.disconnect-sub { color: var(--muted); margin-top: .6rem; }
.disconnect-dots { color: var(--white); margin-top: 1.4rem; }

/* ---------- EASTER EGG : party mode (code Konami) ---------- */
body.party .hero-logo { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

body.party .player { border-left-color: var(--green); }

.confetti {
  position: fixed;
  top: -20px;
  font-size: 1.4rem;
  z-index: 90;
  pointer-events: none;
  animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: .6; }
}

/* ---------- Accessibilité / mobile ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (max-width: 520px) {
  .player-ping { display: none; }
  #jose::after { right: 1rem; }
}
