/* ==========================================================================
   Cochon Pendu en ligne — design façon application
   Mobile first, une seule colonne sur telephone, grilles a partir de 768px.
   ========================================================================== */

:root {
  --brand: #ff6b4a;
  --brand-dark: #e14b2b;
  --brand-soft: #fff0eb;
  --violet: #7c5cff;
  --violet-soft: #f1edff;
  --pink: #ff9bb3;
  --bg: #fff7f2;
  --card: #ffffff;
  --dark: #241b36;
  --text: #2b2340;
  --muted: #7a7190;
  --line: #f1e7e2;
  --ok: #1fa96b;
  --warn: #ef9f18;
  --danger: #e5484d;
  --radius-lg: 20px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 4px 16px rgba(43, 35, 64, .07);
  --shadow-lg: 0 14px 34px rgba(43, 35, 64, .12);
  --nav-h: 66px;
  --font: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Baloo 2", "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--dark);
  margin: 0 0 8px;
  line-height: 1.2;
  letter-spacing: -.01em;
}

h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 17px; }
p { margin: 0 0 12px; }
a { color: var(--brand-dark); text-decoration: none; }

[hidden] { display: none !important; }

img { max-width: 100%; display: block; }
svg { flex: none; }

/* ------------------------------------------------------------- structure */

.app-shell {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: rgba(255, 247, 242, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--dark);
  min-width: 0;
}

.topbar .brand img,
.topbar .brand .logo-mark { width: 34px; height: 34px; border-radius: 10px; }

.topbar .spacer { flex: 1; }

.page {
  flex: 1;
  padding: 16px 16px calc(var(--nav-h) + 26px + env(safe-area-inset-bottom, 0px));
  overflow-x: hidden;
}

.page-head { margin-bottom: 14px; }
.page-head p { color: var(--muted); margin: 0; font-size: 14px; }

.section { margin-bottom: 22px; }
.section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.section-head h2 { margin: 0; }
.section-head .spacer { flex: 1; }

/* --------------------------------------------------------- navigation basse */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  gap: 2px;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid rgba(43, 35, 64, .08);
  max-width: 520px;
  margin: 0 auto;
}

.bottom-nav a {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  transition: transform .12s ease, color .15s ease, background .15s ease;
  overflow: hidden;
}

.bottom-nav a span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.bottom-nav a:active { transform: scale(.97); }
.bottom-nav a.active {
  color: var(--brand-dark);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 107, 74, .18);
}
.bottom-nav a.active svg { stroke: var(--brand-dark); }
.bottom-nav a svg { width: 22px; height: 22px; stroke: var(--muted); }

/* ---------------------------------------------------------------- cartes */

.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid rgba(43, 35, 64, .03);
}

.card.tight { padding: 14px; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card.clickable { transition: transform .12s ease, box-shadow .15s ease; cursor: pointer; }
.card.clickable:active { transform: scale(.97); box-shadow: var(--shadow-lg); }

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.card-head h3 { margin: 0; }
.card-head .spacer { flex: 1; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.mono { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- boutons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .12s ease, filter .15s ease, box-shadow .15s ease;
  box-shadow: 0 6px 16px rgba(255, 107, 74, .28);
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; box-shadow: none; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; stroke: currentColor; }

.btn.secondary {
  background: var(--violet);
  box-shadow: 0 6px 16px rgba(124, 92, 255, .25);
}
.btn.ghost {
  background: #fff;
  color: var(--text);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn.soft {
  background: var(--brand-soft);
  color: var(--brand-dark);
  box-shadow: none;
}
.btn.danger { background: var(--danger); box-shadow: 0 6px 16px rgba(229, 72, 77, .25); }
.btn.ok { background: var(--ok); box-shadow: 0 6px 16px rgba(31, 169, 107, .25); }
.btn.sm { padding: 10px 14px; font-size: 14px; border-radius: var(--radius-sm); }
.btn.block { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn-row > .btn { flex: 1 1 160px; width: auto; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: none;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px var(--line);
  cursor: pointer;
  transition: transform .12s ease;
}
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 20px; height: 20px; stroke: var(--text); }

/* -------------------------------------------------------------- formulaires */

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 6px;
}
.input, .select, .textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: #fff;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(255, 107, 74, .12);
}
.textarea { min-height: 90px; resize: vertical; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.switch-row:last-child { border-bottom: none; }
.switch-row .label { font-weight: 700; font-size: 14px; }
.switch {
  position: relative;
  width: 48px;
  height: 28px;
  flex: none;
  border-radius: 999px;
  background: #e6dedb;
  border: none;
  cursor: pointer;
  transition: background .18s ease;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
  transition: transform .18s ease;
}
.switch[aria-checked="true"] { background: var(--brand); }
.switch[aria-checked="true"]::after { transform: translateX(20px); }

/* ------------------------------------------------------------------ divers */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: var(--brand-soft);
  color: var(--brand-dark);
  white-space: nowrap;
}
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.ok { background: #e6f7ef; color: var(--ok); }
.badge.warn { background: #fdf1dc; color: #a9700a; }
.badge.danger { background: #fdeaea; color: var(--danger); }
.badge.grey { background: #f2eeec; color: var(--muted); }

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  flex: none;
  background: var(--violet);
}
.avatar.sm { width: 32px; height: 32px; border-radius: 11px; font-size: 14px; }
.avatar.lg { width: 56px; height: 56px; border-radius: 18px; font-size: 24px; }

.list { display: flex; flex-direction: column; gap: 10px; }
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .12s ease;
  min-width: 0;
}
.list-row:active { transform: scale(.985); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .grow strong { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .grow span { font-size: 12.5px; color: var(--muted); }

.empty {
  text-align: center;
  padding: 26px 16px;
  color: var(--muted);
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  background: #fffdfc;
}
.empty svg { width: 40px; height: 40px; stroke: var(--line); margin-bottom: 8px; }

.toast-box {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(var(--nav-h) + 18px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  padding: 0 16px;
}
.toast {
  max-width: 460px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--dark);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  animation: toastIn .22s ease;
}
.toast.ok { background: var(--ok); }
.toast.err { background: var(--danger); }
.toast.warn { background: var(--warn); color: #3b2a05; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.sheet-wrap {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(36, 27, 54, .45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: fadeIn .18s ease;
}
.sheet {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border-radius: 22px 22px 0 0;
  padding: 18px 18px calc(20px + env(safe-area-inset-bottom, 0px));
  max-height: 88vh;
  overflow-y: auto;
  animation: sheetUp .24s ease;
}
.sheet h2 { margin-top: 0; }
.sheet .grabber {
  width: 44px;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
  margin: 0 auto 14px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(30px); } to { transform: none; } }

/* ------------------------------------------------------------------ accueil */

.hero {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow-lg);
  background: var(--dark);
}
.hero img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  opacity: .82;
}
.hero-body {
  position: absolute;
  inset: auto 0 0 0;
  padding: 16px;
  background: linear-gradient(to top, rgba(36, 27, 54, .92), rgba(36, 27, 54, .1));
  color: #fff;
}
.hero-body h1 { color: #fff; font-size: 23px; margin-bottom: 4px; }
.hero-body p { color: rgba(255, 255, 255, .86); font-size: 13.5px; margin: 0 0 12px; }
.hero .btn-row .btn { flex: 1 1 140px; }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.stat {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--dark);
}
.stat span { font-size: 12px; color: var(--muted); font-weight: 700; }

.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mini-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 116px;
  background: var(--dark);
}
.mini-card img { width: 100%; height: 100%; object-fit: cover; opacity: .72; }
.mini-card b {
  position: absolute;
  left: 10px;
  bottom: 8px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
}

.podium {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.podium-card { display: flex; align-items: center; gap: 12px; padding: 14px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.podium-card .rank {
  font-family: var(--font-display);
  font-size: 20px;
  width: 34px;
  text-align: center;
  color: var(--muted);
}
.podium-card.first { background: linear-gradient(135deg, #fff, #fff2ec); }
.podium-card.first .rank { color: var(--brand-dark); }

.rank-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius-sm); }
.rank-row:nth-child(odd) { background: #fffaf8; }
.rank-row .pos { width: 26px; font-weight: 800; color: var(--muted); font-size: 13px; }
.rank-row .grow { flex: 1; min-width: 0; }
.rank-row .grow strong { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .grow span { font-size: 12px; color: var(--muted); }
.rank-row.me { background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px rgba(255, 107, 74, .3); }

/* ------------------------------------------------------------- le cochon */

.hangman {
  position: relative;
  background: linear-gradient(180deg, #fffaf7, #fff);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 8px;
  margin-bottom: 14px;
}
.hangman svg { width: 100%; height: auto; max-height: 232px; display: block; }
.hangman .rope-line { stroke: #b98a6b; stroke-width: 4; stroke-linecap: round; fill: none; }
.hangman .frame path { stroke: #8d6a52; stroke-width: 9; stroke-linecap: round; fill: none; }
.hangman .pig-part { opacity: 0; }
.hangman .pig-part.show { animation: popIn .3s ease forwards; }
@keyframes popIn { 0% { opacity: 0; transform: scale(.4); } 70% { opacity: 1; transform: scale(1.08); } 100% { opacity: 1; transform: scale(1); } }

.lives {
  position: absolute;
  top: 10px;
  right: 12px;
  display: flex;
  gap: 4px;
}
.lives i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--brand);
  display: block;
  transition: background .2s ease, transform .2s ease;
}
.lives i.off { background: #ece4e1; transform: scale(.8); }

.word-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0 0 6px;
}
.word-letter {
  min-width: 30px;
  height: 42px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow);
  border-bottom: 3px solid var(--brand);
  transition: transform .18s ease;
}
.word-letter.space { background: transparent; box-shadow: none; border-bottom: none; min-width: 10px; }
.word-letter.new { animation: flip .35s ease; }
@keyframes flip { from { transform: rotateX(85deg); } to { transform: none; } }

.game-meta { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 12px; }

.keyboard {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.key {
  aspect-ratio: 1 / 1;
  border: none;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  cursor: pointer;
  transition: transform .1s ease, background .15s ease, color .15s ease;
}
.key:active { transform: scale(.93); }
.key:disabled { cursor: default; }
.key.used { background: #f3eeec; color: #c8bfc0; box-shadow: none; }
.key.hit { background: var(--ok); color: #fff; box-shadow: none; }
.key.miss { background: #fbe3e3; color: var(--danger); box-shadow: none; }

.turn-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--violet-soft);
  color: var(--violet);
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.turn-banner.mine { background: var(--brand-soft); color: var(--brand-dark); }
.turn-banner .bar {
  flex: 1 1 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
  overflow: hidden;
}
.turn-banner .bar i { display: block; height: 100%; background: currentColor; transition: width .4s linear; }

.players-inline {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.player-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow);
  min-width: 0;
}
.player-chip.turn { box-shadow: inset 0 0 0 2px var(--brand), var(--shadow); }
.player-chip .grow { flex: 1; min-width: 0; }
.player-chip strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-chip span { font-size: 12px; color: var(--muted); }
.player-chip .score { font-family: var(--font-display); font-size: 17px; color: var(--dark); }
.player-chip .off-dot { width: 8px; height: 8px; border-radius: 50%; background: #d8d2d0; }
.player-chip .on-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }

.code-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--dark);
  color: #fff;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 3px;
}

.chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 210px;
  overflow-y: auto;
  padding: 4px 2px;
}
.chat-line { font-size: 13.5px; line-height: 1.45; }
.chat-line b { color: var(--dark); }
.chat-line.sys { color: var(--muted); font-style: italic; font-size: 12.5px; }
.chat-form { display: flex; gap: 8px; margin-top: 10px; }
.chat-form .input { flex: 1; }
.chat-form .btn { width: auto; padding: 12px 16px; }

/* ------------------------------------------------------------------- admin */

.admin .topbar { background: rgba(36, 27, 54, .92); border-bottom-color: rgba(255, 255, 255, .1); }
.admin .topbar .brand { color: #fff; }
.admin .topbar .icon-btn { background: rgba(255, 255, 255, .12); box-shadow: none; }
.admin .topbar .icon-btn svg { stroke: #fff; }
.admin .bottom-nav a.active { background: var(--violet-soft); color: var(--violet); }
.admin .bottom-nav a.active svg { stroke: var(--violet); }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th, table.data td { padding: 10px 8px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
table.data td.wrap { white-space: normal; min-width: 160px; }

.chart-box { position: relative; height: 220px; width: 100%; }

.bar-chart { display: flex; align-items: flex-end; gap: 6px; height: 130px; }
.bar-chart .bar { flex: 1 1 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.bar-chart .bar i {
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--brand), #ffb59e);
  min-height: 4px;
  transition: height .4s ease;
}
.bar-chart .bar small { font-size: 9.5px; color: var(--muted); white-space: nowrap; }

/* -------------------------------------------------------------- utilitaires */

.stack { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
.fab-space { height: 8px; }

/* ---------------------------------------------------------------- splash */

#app-splash {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: #ff6b4a;
  color: #fff;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
}
#app-splash img { width: 96px; height: 96px; border-radius: 22px; }
#app-splash.show { display: flex; animation: splashOut .4s ease 1.2s forwards; }
@keyframes splashOut { to { opacity: 0; visibility: hidden; } }

/* -------------------------------------------------------- tablettes et plus */

@media (min-width: 768px) {
  .app-shell { max-width: 760px; }
  .bottom-nav { max-width: 760px; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .mini-grid { grid-template-columns: repeat(4, 1fr); }
  .podium { grid-template-columns: repeat(3, 1fr); }
  .players-inline { grid-template-columns: 1fr 1fr; }
  .keyboard { grid-template-columns: repeat(9, 1fr); }
  .hero img { height: 280px; }
  .page { padding-left: 24px; padding-right: 24px; }
  .word-letter { min-width: 36px; height: 48px; font-size: 26px; }
  .btn-row > .btn { flex: 0 1 auto; min-width: 150px; width: auto; }
}

@media (min-width: 1024px) {
  .app-shell { max-width: 900px; }
  .bottom-nav { max-width: 900px; }
  .admin-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
