@font-face {
  font-family: 'Big Shoulders';
  src: url('/fonts/big-shoulders.woff2') format('woff2');
  font-weight: 500 900;
  font-display: swap;
}
@font-face {
  font-family: 'Familjen';
  src: url('/fonts/familjen-roman.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'Familjen';
  src: url('/fonts/familjen-oblique.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jetbrains-mono.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --ink: #0b0a09;
  --ink-2: #12100e;
  --ink-3: #1a1714;
  --ink-4: #24201c;
  --line: rgba(236, 226, 208, 0.08);
  --line-2: rgba(236, 226, 208, 0.15);
  --line-3: rgba(236, 226, 208, 0.28);
  --bone: #ece2d0;
  --bone-2: #b9ae9c;
  --bone-3: #7d7467;
  --bone-4: #554e45;
  --amber: #ffb547;
  --amber-soft: rgba(255, 181, 71, 0.14);
  --rose: #ff3e7f;
  --rose-soft: rgba(255, 62, 127, 0.14);
  --green: #7fd1a4;
  --red: #ff6b5e;

  --f-display: 'Big Shoulders', 'Arial Narrow', sans-serif;
  --f-text: 'Familjen', 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --gutter: clamp(18px, 4vw, 56px);
  --max: 1280px;
  --radius: 3px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--bone);
  font: 400 16px/1.55 var(--f-text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.06;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 0.9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 62, 127, 0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(255, 181, 71, 0.05), transparent 60%);
}
main { flex: 1; width: 100%; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--rose); color: var(--ink); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---------- Chrome ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 14px var(--gutter);
  background: rgba(11, 10, 9, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  text-decoration: none;
  line-height: 1;
}
.wordmark-ah {
  font: 900 26px/1 var(--f-display);
  letter-spacing: 0.02em;
  color: #ffd1e0;
  text-shadow: 0 0 6px rgba(255, 62, 127, 0.9), 0 0 18px rgba(255, 62, 127, 0.55);
}
.wordmark-games {
  font: 700 15px/1 var(--f-display);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--bone-2);
}
.nav { display: flex; gap: 26px; }
.nav a {
  position: relative;
  font: 500 13px/1 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone-3);
  padding: 6px 0;
  transition: color 0.2s;
}
.nav a:hover { color: var(--bone); }
.nav a.is-active { color: var(--bone); }
.nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -15px;
  height: 2px;
  background: var(--amber);
  box-shadow: 0 0 10px var(--amber);
}
.whoami {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}
.whoami-name { color: var(--bone-2); max-width: 18ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whoami form { margin: 0; }
.link-quiet {
  background: none;
  border: 0;
  padding: 0;
  font: 500 12px/1 var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bone-4);
  transition: color 0.2s;
}
.link-quiet:hover { color: var(--rose); }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 28px var(--gutter);
  border-top: 1px solid var(--line);
  font: 400 12px/1.4 var(--f-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--bone-4);
}
.footer-sign { display: inline-flex; align-items: center; gap: 8px; }
.sign-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--rose);
  box-shadow: 0 0 8px var(--rose);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }

/* ---------- Typographie ---------- */

.display {
  margin: 0;
  font: 800 clamp(44px, 7vw, 96px)/0.92 var(--f-display);
  letter-spacing: -0.005em;
  text-transform: uppercase;
  text-wrap: balance;
}
.kicker {
  margin: 0 0 18px;
  font: 500 12px/1 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
}
.lede {
  margin: 22px 0 0;
  max-width: 56ch;
  font-size: clamp(17px, 1.5vw, 19px);
  line-height: 1.5;
  color: var(--bone-2);
  text-wrap: pretty;
}
.link {
  font: 500 12px/1 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--bone-3);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 3px;
  transition: color 0.2s, border-color 0.2s;
}
.link:hover { color: var(--amber); border-color: var(--amber); }
.empty { margin: 0; color: var(--bone-3); font-style: italic; }

.notice {
  margin: 24px 0 0;
  padding: 12px 16px;
  max-width: 60ch;
  border-left: 2px solid var(--amber);
  background: var(--amber-soft);
  color: var(--bone);
  font-size: 15px;
}
.notice-error { border-color: var(--red); background: rgba(255, 107, 94, 0.1); }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: 600 15px/1 var(--f-text);
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, border-color 0.18s, transform 0.12s, box-shadow 0.18s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--bone); color: var(--ink); }
.btn-primary:not(:disabled):hover { background: var(--amber); box-shadow: 0 0 24px rgba(255, 181, 71, 0.35); }
.btn-discord { background: var(--bone); color: var(--ink); min-height: 54px; padding: 0 26px; font-size: 16px; }
.btn-discord:hover { background: #fff; box-shadow: 0 0 0 1px var(--bone), 0 0 32px rgba(255, 62, 127, 0.35); }
.btn-ghost { border-color: var(--line-2); color: var(--bone); background: transparent; }
.btn-ghost:not(:disabled):hover { border-color: var(--bone-2); background: rgba(236, 226, 208, 0.04); }
.btn-danger { border-color: rgba(255, 107, 94, 0.4); color: var(--red); background: transparent; }
.btn-danger:hover { background: rgba(255, 107, 94, 0.08); }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: 13px; }
.icon-discord { width: 22px; height: 22px; }

/* ---------- Avatars ---------- */

.avatar {
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: var(--ink-4);
}
.avatar-xs { width: 22px; height: 22px; }
.avatar-sm { width: 28px; height: 28px; }
.avatar-md { width: 40px; height: 40px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-initial {
  display: inline-grid;
  place-items: center;
  font: 700 0.9em/1 var(--f-display);
  color: var(--bone-2);
  border: 1px solid var(--line-2);
}
.avatar-xs.avatar-initial { font-size: 11px; }
.avatar-sm.avatar-initial { font-size: 13px; }
.avatar-md.avatar-initial { font-size: 18px; }
.avatar-lg.avatar-initial { font-size: 28px; }

/* ---------- Jetons ---------- */

.tile {
  --tile-size: 44px;
  position: relative;
  display: inline-grid;
  place-items: center;
  width: var(--tile-size);
  height: var(--tile-size);
  border-radius: calc(var(--tile-size) * 0.12);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, #f2e8d3, #e1d2b2);
  box-shadow:
    inset 0 -2px 0 rgba(120, 92, 52, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 2px 0 #9f8a66,
    0 4px 10px rgba(0, 0, 0, 0.45);
  color: #1d1812;
  user-select: none;
}
.tile-l {
  font: 700 calc(var(--tile-size) * 0.56)/1 var(--f-text);
  letter-spacing: -0.02em;
  transform: translate(-4%, 2%);
}
.tile-v {
  position: absolute;
  right: 9%;
  bottom: 7%;
  font: 700 calc(var(--tile-size) * 0.22)/1 var(--f-text);
}
.tileword { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.tileword-gap { width: 18px; }
.tileword-md .tile { --tile-size: 46px; }
.tileword-lg .tile { --tile-size: clamp(48px, 7vw, 76px); }
.tileword-xl { gap: clamp(4px, 0.8vw, 10px); }
.tileword-xl .tile { --tile-size: clamp(36px, 8.2vw, 96px); }
.tileword-tilt .tile:nth-child(odd) { transform: rotate(-4deg) translateY(4px); }
.tileword-tilt .tile:nth-child(even) { transform: rotate(3deg); }
.tileword-tilt .tile:nth-child(3n) { transform: rotate(-1.5deg) translateY(-6px); }

/* ---------- Entrée (visiteur) ---------- */

.page-entrance .topbar { background: transparent; border-color: transparent; backdrop-filter: none; }
.entrance {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(40px, 9vh, 120px) var(--gutter) 80px;
}
.entrance-sign {
  display: flex;
  align-items: baseline;
  gap: clamp(10px, 2vw, 24px);
  margin-bottom: clamp(28px, 5vh, 56px);
  font: 900 clamp(84px, 17vw, 240px)/0.8 var(--f-display);
  letter-spacing: -0.01em;
}
.neon-rose {
  color: #ffe1ea;
  text-shadow:
    0 0 4px #fff,
    0 0 12px var(--rose),
    0 0 32px var(--rose),
    0 0 72px rgba(255, 62, 127, 0.6);
  animation: flicker 7s infinite;
}
.neon-bone {
  color: transparent;
  -webkit-text-stroke: 2px var(--bone-3);
}
@keyframes flicker {
  0%, 18%, 20%, 52%, 54%, 100% { opacity: 1; }
  19%, 53% { opacity: 0.55; }
  53.5% { opacity: 0.85; }
}
.entrance-title {
  margin: 0;
  max-width: 16ch;
  font: 700 clamp(30px, 4vw, 52px)/1.02 var(--f-display);
  text-transform: uppercase;
}
.entrance-lede {
  margin: 20px 0 0;
  max-width: 48ch;
  font-size: clamp(17px, 1.5vw, 19px);
  color: var(--bone-2);
}
.entrance-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }
.entrance-fine {
  margin: 18px 0 0;
  font: 400 12px/1.5 var(--f-mono);
  letter-spacing: 0.04em;
  color: var(--bone-4);
}
.entrance-tiles {
  position: absolute;
  right: var(--gutter);
  bottom: 60px;
  opacity: 0.95;
}
@media (max-width: 900px) {
  .entrance-tiles { position: static; margin-top: 56px; }
}

/* ---------- Contrôle d'accès ---------- */

.doorman {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(48px, 10vh, 120px) var(--gutter) 80px;
}
.doorman .display { font-size: clamp(40px, 6vw, 72px); }
.steps { list-style: none; margin: 44px 0 36px; padding: 0; display: grid; gap: 14px; }
.steps li {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  background: var(--ink-2);
}
.steps strong { font: 700 22px/1.1 var(--f-display); text-transform: uppercase; letter-spacing: 0.02em; }
.steps p { margin: 6px 0 16px; color: var(--bone-3); }
.steps form { margin: 0; }
.step-n { font: 800 40px/1 var(--f-display); color: var(--amber); }

/* ---------- Sections ---------- */

.hello, .hub-head, .section {
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.hello { padding-top: clamp(40px, 8vh, 96px); padding-bottom: 20px; }
.section { padding-top: 56px; }
.section:last-of-type { padding-bottom: 80px; }
.section-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}
.section-head h2 {
  margin: 0;
  font: 500 12px/1 var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone-3);
  white-space: nowrap;
}
.section-head::after {
  content: '';
  order: 1;
  flex: 1;
  height: 1px;
  background: var(--line);
}
.section-head .link { order: 2; }

/* ---------- Bornes de jeu ---------- */

.cabinets {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 14px;
}
@media (max-width: 860px) { .cabinets { grid-template-columns: 1fr; } }
.cabinet {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 300px;
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--ink-2);
  text-decoration: none;
  overflow: hidden;
  transition: border-color 0.25s, background 0.25s;
}
.cabinet-scrabble {
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(31, 92, 74, 0.35), transparent 70%),
    var(--ink-2);
}
.cabinet-scrabble:hover { border-color: var(--line-3); }
.cabinet-scrabble:hover .tile { transform: translateY(-3px); }
.cabinet-scrabble .tile { transition: transform 0.3s var(--ease); transition-delay: calc(var(--i) * 30ms); }
.cabinet-no {
  font: 500 12px/1 var(--f-mono);
  letter-spacing: 0.14em;
  color: var(--bone-4);
}
.cabinet-body { display: grid; gap: 10px; margin-top: auto; max-width: 52ch; }
.cabinet-title { font: 800 44px/0.95 var(--f-display); text-transform: uppercase; }
.cabinet-desc { color: var(--bone-2); }
.cabinet-cta {
  position: absolute;
  right: 28px;
  bottom: 28px;
  font: 600 13px/1 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
}
.cabinet-soon {
  border-style: dashed;
  background: transparent;
}
.cabinet-soon .cabinet-title { color: var(--bone-3); font-size: 32px; }
.cabinet-soon .cabinet-desc { color: var(--bone-4); }
@media (max-width: 560px) {
  .cabinet-cta { position: static; }
  .cabinet-art .tile { --tile-size: 34px; }
}

/* ---------- Tableau des tables (façon panneau d'affichage) ---------- */

.tables { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.table-row { border-bottom: 1px solid var(--line); }
.table-row a {
  display: grid;
  grid-template-columns: 60px 110px minmax(0, 1fr) 200px 110px;
  align-items: center;
  gap: 18px;
  padding: 16px 4px;
  text-decoration: none;
  transition: background 0.2s;
}
.table-row a:hover { background: rgba(236, 226, 208, 0.03); }
.table-row a:hover .table-action { color: var(--amber); }
.table-no { font: 600 13px/1 var(--f-mono); color: var(--amber); letter-spacing: 0.06em; }
.table-game { font: 700 20px/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.02em; }
.table-players { display: flex; flex-wrap: wrap; gap: 6px 14px; min-width: 0; }
.table-player { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--bone-2); }
.table-status { display: grid; gap: 4px; }
.status { font: 600 11px/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; }
.status-wait { color: var(--amber); }
.status-live { color: var(--rose); }
.status-live::before { content: '● '; }
.status-detail { font: 400 12px/1 var(--f-mono); color: var(--bone-4); }
.table-action { justify-self: end; font: 600 12px/1 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--bone-3); transition: color 0.2s; }
@media (max-width: 860px) {
  .table-row a { grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: 'no players action' 'no status action'; row-gap: 8px; }
  .table-no { grid-area: no; }
  .table-game { display: none; }
  .table-players { grid-area: players; }
  .table-status { grid-area: status; display: flex; gap: 10px; align-items: center; }
  .table-action { grid-area: action; }
}

.resume { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.resume a {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line-2);
  border-left: 2px solid var(--amber);
  background: var(--ink-2);
  text-decoration: none;
  transition: background 0.2s;
}
.resume a:hover { background: var(--ink-3); }
.resume-game { font: 600 11px/1 var(--f-mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber); }
.resume-label { font-weight: 600; }
.resume-when { font: 400 12px/1 var(--f-mono); color: var(--bone-4); }

/* ---------- Formulaires ---------- */

.choice { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.choice legend {
  width: 100%;
  margin-bottom: 8px;
  font: 500 11px/1 var(--f-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bone-4);
}
.choice label { position: relative; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--bone-2);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.choice label > span:hover { border-color: var(--bone-3); color: var(--bone); }
.choice input:checked + span { border-color: var(--amber); color: var(--bone); background: var(--amber-soft); }
.choice input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.choice-stack { flex-direction: column; }
.choice-stack label > span { width: 100%; justify-content: space-between; min-height: 42px; }
.choice-stack em { font: 400 12px/1 var(--f-mono); font-style: normal; color: var(--bone-4); }
