/* Le Zinc : ambiance bar de nuit, néons chauds. Pensé d'abord pour le téléphone. */

@font-face {
  font-family: 'Bricolage';
  src: url('../fonts/bricolage-grotesque.woff2') format('woff2');
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --bg: #0e0b12;
  --bg-2: #15101c;
  --surface: #1c1625;
  --surface-2: #261e31;
  --surface-3: #31273f;
  --line: #3b3049;
  --line-soft: #2a2235;
  --text: #f7efe4;
  --muted: #b3a5c2;
  --faint: #7d6f8c;

  --accent: #ffb238;
  --accent-ink: #1d1304;
  --pink: #ff4d8d;
  --violet: #a78bfa;
  --purple: #c084fc;
  --blue: #5ec8ff;
  --green: #7ee081;
  --danger: #ff5470;

  --l1: #5ec8ff;
  --l2: #ffd166;
  --l3: #ff8a3d;
  --l4: #ff3d5a;
  --d1: #fcd581;
  --d2: #8fa8ff;
  --d3: #e38bff;

  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.8);
  --display: 'Bricolage', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  --gutter: 16px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(255, 178, 56, 0.16), transparent 60%),
    radial-gradient(90% 50% at 100% 110%, rgba(255, 77, 141, 0.12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body[data-screen='vie'] {
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(167, 139, 250, 0.2), transparent 60%),
    radial-gradient(80% 50% at 0% 110%, rgba(252, 213, 129, 0.1), transparent 60%),
    var(--bg);
}

body[data-screen='confessionnal'] {
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(192, 132, 252, 0.2), transparent 60%),
    radial-gradient(90% 50% at 100% 110%, rgba(255, 77, 141, 0.12), transparent 60%),
    var(--bg);
}

.app {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.1;
  margin: 0;
}

p {
  margin: 0;
}

a {
  color: var(--accent);
}

button,
input,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.noscript {
  padding: 2rem;
  text-align: center;
}

/* ---------- Barre du haut ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 0 10px;
  margin: 0 calc(var(--gutter) * -1);
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  background: linear-gradient(var(--bg) 70%, transparent);
}

.topbar-title {
  flex: 1;
  min-width: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
}

.topbar-title span {
  font-family: var(--display);
  font-weight: 750;
  font-size: 1.15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-title small {
  color: var(--muted);
  font-size: 0.8rem;
}

.icon-btn {
  position: relative;
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 1.2rem;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.icon-btn:active {
  transform: scale(0.94);
}

.icon-btn.small {
  width: 34px;
  height: 34px;
  font-size: 0.9rem;
}

.icon-spacer {
  width: 44px;
  flex: none;
}

.count-btn .count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--purple);
  color: #1a0f22;
  font-size: 0.72rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

/* ---------- Mise en page ---------- */

.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 12px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.stack.center {
  align-items: center;
  text-align: center;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.lead {
  color: var(--muted);
  font-size: 1rem;
}

.hint {
  color: var(--muted);
  font-size: 0.88rem;
}

.notice {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 178, 56, 0.12);
  border: 1px solid rgba(255, 178, 56, 0.35);
  font-size: 0.95rem;
}

.block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.block-title,
.panel-title {
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.panel-title {
  font-size: 1.3rem;
}

.mini-title {
  font-family: var(--body);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 4px;
}

.big-emoji {
  font-size: 3.2rem;
  line-height: 1;
}

.pulse {
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    transform: scale(1.12);
    filter: drop-shadow(0 0 18px rgba(192, 132, 252, 0.6));
  }
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.1s, background 0.15s, box-shadow 0.2s;
}

.btn:active {
  transform: scale(0.97);
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, #ffc65c, var(--accent) 45%, #ff8a3d);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px -12px rgba(255, 162, 56, 0.8);
}

.btn.ghost {
  background: transparent;
}

.btn.danger {
  border-color: transparent;
  background: linear-gradient(135deg, #ff6b81, var(--danger));
  color: #22040a;
}

.btn.big {
  min-height: 58px;
  font-size: 1.1rem;
  padding: 0 26px;
  flex: 1;
}

.btn.small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.88rem;
}

.btn.wide {
  width: 100%;
}

.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding: 18px 0 calc(var(--safe-bottom) + 14px);
  background: linear-gradient(transparent, var(--bg) 35%);
}

.sticky-actions:empty {
  display: none;
}

/* ---------- Pastilles (choix) ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chip {
  --chip: var(--accent);
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-weight: 650;
  text-align: left;
  transition: border-color 0.15s, background 0.15s, color 0.15s, transform 0.1s;
}

.chip:active {
  transform: scale(0.97);
}

.chip-emoji {
  font-size: 1.05rem;
}

.chip-label {
  font-size: 0.95rem;
}

.chip-hint {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--faint);
}

/* Pastille « en ligne » : émoji + libellé sur une ligne, indice en dessous. */
.chips:not(.chips-grid):not(.tabs-5) .chip {
  display: inline-grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 6px;
  row-gap: 1px;
}

.chips:not(.chips-grid):not(.tabs-5) .chip > :only-child,
.chips:not(.chips-grid):not(.tabs-5) .chip-hint {
  grid-column: 1 / -1;
}

.chips:not(.chips-grid):not(.tabs-5) .chip-label:first-child {
  grid-column: 1 / -1;
}

/* Colonnes régulières pour les choix courts (niveaux, rythme…). */
.chips.cols-2,
.chips.cols-3,
.chips.cols-4 {
  display: grid;
}

.chips.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chips.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chips.cols-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.chips.cols-2 .chip,
.chips.cols-3 .chip,
.chips.cols-4 .chip {
  display: grid;
}

/* Onglets du tirage : cinq colonnes, émoji au-dessus. */
.chips.tabs-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.chips.tabs-5 .chip {
  align-items: center;
  text-align: center;
  padding: 8px 2px;
  gap: 2px;
}

.chips.tabs-5 .chip-label {
  font-size: 0.74rem;
  line-height: 1.1;
}

.chip.on {
  color: var(--text);
  border-color: var(--chip);
  background: color-mix(in srgb, var(--chip) 16%, var(--surface));
  box-shadow: 0 0 0 1px var(--chip) inset, 0 8px 24px -14px var(--chip);
}

.chip.on .chip-hint {
  color: var(--muted);
}

.tabs {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  margin: 0 calc(var(--gutter) * -1);
  padding: 2px var(--gutter);
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tabs .chip {
  flex: none;
  border-radius: 999px;
}

.tabs.two {
  margin: 0;
  padding: 0;
}

.tabs.two .chip {
  flex: 1;
  justify-content: center;
}

.shake {
  animation: shake 0.35s;
}

@keyframes shake {
  25% {
    transform: translateX(-6px);
  }
  75% {
    transform: translateX(6px);
  }
}

/* ---------- Interrupteur ---------- */

.toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  cursor: pointer;
  position: relative;
}

.toggle-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  font-weight: 650;
}

.toggle-text small {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.82rem;
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-ui {
  width: 50px;
  height: 30px;
  flex: none;
  border-radius: 15px;
  background: var(--surface-3);
  position: relative;
  transition: background 0.2s;
}

.toggle-ui::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 0.2s;
}

.toggle input:checked + .toggle-ui {
  background: var(--accent);
}

.toggle input:checked + .toggle-ui::after {
  transform: translateX(20px);
  background: var(--accent-ink);
}

.toggle input:focus-visible + .toggle-ui {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- Champs ---------- */

.input {
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-2);
  font-size: 1.05rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 178, 56, 0.2);
}

textarea.input {
  resize: vertical;
  min-height: 96px;
  line-height: 1.4;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 650;
  font-size: 0.9rem;
  color: var(--muted);
}

.code-input {
  text-transform: uppercase;
  letter-spacing: 0.5em;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  text-align: center;
  padding-left: calc(16px + 0.5em);
}

/* ---------- Joueurs ---------- */

.avatar {
  --p: var(--accent);
  width: 40px;
  height: 40px;
  flex: none;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--p) 24%, var(--surface-2));
  box-shadow: 0 0 0 2px var(--p);
  font-size: 1.3rem;
  line-height: 1;
}

.avatar-sm {
  width: 30px;
  height: 30px;
  font-size: 1rem;
  box-shadow: 0 0 0 2px var(--p);
}

.avatar-lg {
  width: 64px;
  height: 64px;
  font-size: 2rem;
}

.avatar-xl {
  width: 92px;
  height: 92px;
  font-size: 3rem;
  box-shadow: 0 0 0 3px var(--p), 0 0 40px -6px var(--p);
}

.name-tag {
  --p: var(--accent);
  font-family: var(--display);
  font-weight: 800;
  color: var(--p);
}

.players-editor {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.players-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.player {
  --p: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  animation: pop 0.25s ease-out;
}

.player-name {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.players-list.compact .avatar {
  width: 32px;
  height: 32px;
  font-size: 1.05rem;
}

.players-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 0.92rem;
}

.add-player {
  display: flex;
  gap: 8px;
}

.add-btn {
  width: 52px;
  min-height: 50px;
  padding: 0;
  font-size: 1.6rem;
  border-radius: var(--radius-sm);
  flex: none;
}

@keyframes pop {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
}

/* ---------- Accueil ---------- */

.home {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: calc(env(safe-area-inset-top, 0px) + 28px) 0 calc(var(--safe-bottom) + 20px);
  flex: 1;
}

.hero {
  text-align: center;
  padding: 10px 0 4px;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 0.18em;
  font-size: clamp(3.4rem, 17vw, 5.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 0.95;
}

.logo-le {
  font-size: 0.42em;
  font-weight: 500;
  color: var(--muted);
  transform: translateY(-0.9em);
}

.logo-zinc {
  background: linear-gradient(180deg, #ffe2a6, var(--accent) 55%, #ff7a3d);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 24px rgba(255, 162, 56, 0.45));
  animation: neon 4s ease-in-out infinite;
}

@keyframes neon {
  0%,
  100% {
    filter: drop-shadow(0 0 24px rgba(255, 162, 56, 0.45));
  }
  48% {
    filter: drop-shadow(0 0 30px rgba(255, 162, 56, 0.7));
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(255, 162, 56, 0.2));
  }
  52% {
    filter: drop-shadow(0 0 30px rgba(255, 162, 56, 0.7));
  }
}

.tagline {
  margin-top: 8px;
  color: var(--muted);
}

.players-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  min-height: 60px;
}

.strip-avatars {
  display: flex;
}

.strip-avatars .avatar {
  margin-right: -8px;
  border: 2px solid var(--surface);
}

.strip-avatars.center {
  justify-content: center;
  flex-wrap: wrap;
  row-gap: 8px;
  padding-right: 8px;
}

.strip-text {
  flex: 1;
  font-weight: 700;
  margin-left: 8px;
}

.strip-emoji {
  font-size: 1.5rem;
}

.strip-action {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.92rem;
}

.modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.mode {
  --tone: var(--accent);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 150px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--tone) 35%, var(--line-soft));
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--tone) 26%, transparent), transparent 60%),
    var(--surface);
  color: var(--text);
  text-decoration: none;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.12s, border-color 0.2s;
  animation: rise 0.45s ease-out both;
}

.mode:nth-child(2) {
  animation-delay: 0.05s;
}
.mode:nth-child(3) {
  animation-delay: 0.1s;
}
.mode:nth-child(4) {
  animation-delay: 0.15s;
}
.mode:nth-child(5) {
  animation-delay: 0.2s;
}

.mode:active {
  transform: scale(0.98);
}

.mode.wide {
  grid-column: 1 / -1;
  min-height: 128px;
}

.mode-emoji {
  font-size: 2.1rem;
  line-height: 1;
  margin-bottom: auto;
  padding-bottom: 12px;
}

.mode-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.1;
}

.mode-text {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.3;
}

.mode-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: color-mix(in srgb, var(--tone) 22%, transparent);
  color: var(--tone);
}

.tone-amber {
  --tone: var(--accent);
}
.tone-pink {
  --tone: var(--pink);
}
.tone-blue {
  --tone: var(--blue);
}
.tone-violet {
  --tone: var(--violet);
}
.tone-purple {
  --tone: var(--purple);
}

@keyframes rise {
  from {
    transform: translateY(14px);
    opacity: 0;
  }
}

.home-foot {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: 0.85rem;
  margin-top: auto;
}

.home-foot a {
  color: var(--muted);
}

/* ---------- Cartes ---------- */

.stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 52vh;
}

.swipe {
  touch-action: pan-y;
}

.card {
  --lv: var(--accent);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 50vh;
  padding: 22px 22px 20px;
  border-radius: 28px;
  border: 1px solid color-mix(in srgb, var(--lv) 50%, transparent);
  background:
    radial-gradient(130% 70% at 0% 0%, color-mix(in srgb, var(--lv) 22%, transparent), transparent 65%),
    linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03) inset,
    0 30px 80px -30px color-mix(in srgb, var(--lv) 70%, transparent);
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  inset: auto -30% -60% auto;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--lv) 18%, transparent), transparent 70%);
  pointer-events: none;
}

/* Dans le Confessionnal, la question laisse de la place aux boutons de réponse. */
.page.session .card {
  min-height: 30vh;
}

.card.tone-compact,
.card.tone-preview,
.page.session .card.tone-compact,
.page.session .card.tone-preview {
  min-height: 0;
  gap: 10px;
  padding: 16px 18px;
}

.card.tone-compact .card-text {
  font-size: 1.2rem;
}

.card.tone-preview .card-text {
  font-size: 1.3rem;
}

.card.tone-vie {
  border-color: color-mix(in srgb, var(--lv) 45%, transparent);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.card-type {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.card-level {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--lv);
  background: color-mix(in srgb, var(--lv) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--lv) 40%, transparent);
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.card-text {
  font-family: var(--display);
  font-weight: 650;
  font-size: clamp(1.4rem, 6.2vw, 2.05rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.card-name {
  --p: var(--accent);
  color: var(--p);
  font-weight: 800;
}

.card-kicker {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.card-foot {
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.who,
.who-duel {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
}

.who-all {
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
}

.versus {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.6rem;
  color: var(--pink);
  text-shadow: 0 0 18px rgba(255, 77, 141, 0.6);
}

.versus.small {
  font-size: 1rem;
}

.scale {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.scale span:last-child {
  text-align: right;
}

.scale b {
  color: var(--text);
}

.deal {
  animation: deal 0.42s cubic-bezier(0.2, 0.9, 0.25, 1.15);
}

.deal-back {
  animation: dealBack 0.38s cubic-bezier(0.2, 0.9, 0.25, 1.1);
}

@keyframes deal {
  from {
    transform: translateX(40px) rotate(4deg) scale(0.96);
    opacity: 0;
  }
}

@keyframes dealBack {
  from {
    transform: translateX(-40px) rotate(-4deg) scale(0.96);
    opacity: 0;
  }
}

.flow {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.counter {
  color: var(--faint);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Tour de jeu ---------- */

.turn-intro {
  --p: var(--accent);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  padding: 28px 18px;
  border-radius: 28px;
  background: radial-gradient(90% 60% at 50% 0%, color-mix(in srgb, var(--p) 20%, transparent), transparent 70%), var(--surface);
  border: 1px solid color-mix(in srgb, var(--p) 40%, transparent);
  animation: pop 0.35s ease-out;
}

.turn-label {
  margin-top: 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  font-weight: 700;
}

.turn-name {
  font-size: clamp(2.4rem, 12vw, 3.4rem);
  font-weight: 800;
  color: var(--p);
  text-shadow: 0 0 30px color-mix(in srgb, var(--p) 50%, transparent);
  overflow-wrap: anywhere;
}

.turn-q {
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 650;
  margin: 6px 0 4px;
}

.choice-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 800;
  transition: transform 0.1s;
}

.choice span {
  font-size: 2rem;
}

.choice:active {
  transform: scale(0.96);
}

.choice.verite {
  border-color: rgba(94, 200, 255, 0.5);
  background: linear-gradient(160deg, rgba(94, 200, 255, 0.2), var(--surface-2));
}

.choice.action {
  border-color: rgba(255, 77, 141, 0.5);
  background: linear-gradient(160deg, rgba(255, 77, 141, 0.2), var(--surface-2));
}

/* ---------- Tirage au sort ---------- */

.tirage .draw-options:empty {
  display: none;
}

.inline-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 650;
}

.draw-stage {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  min-height: 42vh;
}

.draw-stage.boom {
  animation: boom 0.6s;
}

@keyframes boom {
  20% {
    transform: scale(1.04);
  }
}

.draw-idle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  color: var(--muted);
  font-size: 1.1rem;
}

.reel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 220px;
  padding: 20px;
  border-radius: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
}

.reel-name {
  --p: var(--accent);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2rem, 11vw, 3.2rem);
  color: var(--p);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.reel.tick .avatar {
  transform: scale(0.94);
}

.reel.landed {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset, 0 20px 60px -20px rgba(255, 178, 56, 0.8);
  animation: land 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}

.reel.landed .reel-name {
  text-shadow: 0 0 26px color-mix(in srgb, var(--p) 60%, transparent);
}

@keyframes land {
  from {
    transform: scale(0.92);
  }
}

.duel {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}

.duel .reel {
  min-height: 180px;
  padding: 14px 8px;
}

.duel .reel-name {
  font-size: clamp(1.3rem, 6.5vw, 2rem);
}

.teams {
  display: grid;
  gap: 12px;
}

.team {
  --team: var(--accent);
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--team) 50%, transparent);
  background: linear-gradient(150deg, color-mix(in srgb, var(--team) 18%, transparent), var(--surface) 70%);
  animation: rise 0.4s ease-out both;
  animation-delay: var(--delay);
}

.team h3 {
  color: var(--team);
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.team ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.team li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.order {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order li {
  --p: var(--accent);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  font-weight: 700;
  font-size: 1.1rem;
  animation: rise 0.35s ease-out both;
  animation-delay: var(--delay);
}

.order-n {
  width: 30px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--p);
}

.pay-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
}

.drumroll {
  color: var(--muted);
  font-weight: 700;
  animation: pulse 0.5s ease-in-out infinite;
}

.reel.pay.landed {
  border-color: var(--danger);
  box-shadow: 0 0 0 1px var(--danger) inset, 0 20px 70px -15px rgba(255, 84, 112, 0.9);
}

.pay-line {
  min-height: 1.6em;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--danger);
}

/* ---------- Confessionnal ---------- */

.net-banner {
  position: sticky;
  top: 64px;
  z-index: 15;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255, 84, 112, 0.16);
  border: 1px solid rgba(255, 84, 112, 0.5);
  font-weight: 650;
  font-size: 0.9rem;
  text-align: center;
}

.entry {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: calc(var(--safe-bottom) + 20px);
}

.entry-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  color: var(--muted);
  padding-top: 6px;
}

.entry-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.how {
  list-style: none;
  padding: 16px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.92rem;
}

.how b {
  color: var(--purple);
}

.invite {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--purple) 40%, var(--line-soft));
}

.qr-wrap {
  width: clamp(118px, 36vw, 148px);
  height: clamp(118px, 36vw, 148px);
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  display: grid;
  place-items: center;
}

.qr {
  width: 100%;
  height: 100%;
  display: block;
}

.invite-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.invite-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.invite-code {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.8rem, 9vw, 2.4rem);
  letter-spacing: 0.14em;
  color: var(--purple);
  line-height: 1;
}

.invite-link {
  color: var(--faint);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

@media (max-width: 360px) {
  .invite {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .invite-info {
    align-items: center;
  }
}

.mini-players {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.mini-player {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  font-weight: 650;
  font-size: 0.9rem;
  animation: pop 0.25s ease-out;
}

.mini-player.away {
  opacity: 0.45;
}

.waiting {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 26px 10px 10px;
  color: var(--muted);
}

.picker {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
  font-weight: 750;
  transition: transform 0.1s, border-color 0.15s;
}

.pick:active {
  transform: scale(0.97);
}

.pick small {
  color: var(--faint);
  font-weight: 500;
  font-size: 0.76rem;
}

.pick-emoji {
  font-size: 1.4rem;
}

.pick-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pick-row .pick {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  font-size: 0.9rem;
}

.badge {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--purple);
  color: #1a0f22;
  font-size: 0.75rem;
  font-weight: 800;
  display: inline-grid;
  place-items: center;
}

.preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-margin-bottom: 20px;
}

.preview:empty {
  display: none;
}

.custom {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.answer-zone {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.yesno {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.answer-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 22px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.2rem;
  transition: transform 0.1s;
}

.answer-btn span {
  font-size: 2.2rem;
}

.answer-btn:active {
  transform: scale(0.96);
}

.answer-btn.yes {
  border-color: rgba(255, 77, 141, 0.55);
  background: linear-gradient(160deg, rgba(255, 77, 141, 0.22), var(--surface));
}

.answer-btn.no {
  border-color: rgba(94, 200, 255, 0.55);
  background: linear-gradient(160deg, rgba(94, 200, 255, 0.2), var(--surface));
}

.free-answer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.free-answer .row {
  justify-content: space-between;
}

.char-count {
  color: var(--faint);
}

.vote-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.vote-btn {
  min-height: 56px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 750;
  font-size: 1.02rem;
  overflow-wrap: anywhere;
  transition: transform 0.1s;
}

.vote-btn:active {
  transform: scale(0.96);
}

.vote-btn small {
  color: var(--faint);
  font-weight: 500;
}

.vote-btn.on,
.note-btn.on {
  border-color: var(--purple);
  background: color-mix(in srgb, var(--purple) 22%, var(--surface));
}

.note-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.note-btn {
  --i: 0;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--l4) calc(var(--i) * 5%), var(--surface));
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.4rem;
  transition: transform 0.1s;
}

.note-btn:active {
  transform: scale(0.92);
}

.sent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 22px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  text-align: center;
}

.sent-title {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.4rem;
}

.sent-mine {
  font-weight: 650;
  overflow-wrap: anywhere;
}

.progress-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress {
  height: 10px;
  border-radius: 5px;
  background: var(--surface-3);
  overflow: hidden;
}

.progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  transition: width 0.4s ease;
}

.progress-label {
  font-weight: 700;
}

.pending {
  color: var(--muted);
  font-size: 0.88rem;
}

.host-controls {
  justify-content: stretch;
}

.host-controls .btn {
  flex: 1;
}

.propose {
  align-self: center;
}

.results {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px 16px;
  border-radius: var(--radius);
  background: radial-gradient(90% 70% at 50% 0%, rgba(192, 132, 252, 0.2), transparent 70%), var(--surface);
  border: 1px solid color-mix(in srgb, var(--purple) 40%, var(--line-soft));
  text-align: center;
  animation: pop 0.4s ease-out;
}

.result-big {
  font-family: var(--display);
  font-weight: 800;
  line-height: 1;
}

.result-big .num {
  font-size: 4.6rem;
  background: linear-gradient(180deg, #f5d0ff, var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.result-big .den {
  font-size: 1.8rem;
  color: var(--muted);
}

.result-sub {
  font-weight: 700;
  font-size: 1.1rem;
}

.split {
  --pct: 50%;
  width: 100%;
  display: flex;
  height: 44px;
  border-radius: 22px;
  overflow: hidden;
  font-weight: 800;
}

.split-yes,
.split-no {
  display: grid;
  place-items: center;
  white-space: nowrap;
  min-width: 56px;
}

.split-yes {
  width: var(--pct);
  background: linear-gradient(90deg, #ff4d8d, #ff7aa8);
  color: #2a0614;
}

.split-no {
  flex: 1;
  background: var(--surface-3);
  color: var(--text);
}

.bubbles {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.bubble {
  padding: 12px 16px;
  border-radius: 18px 18px 18px 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 1.05rem;
  overflow-wrap: anywhere;
  animation: rise 0.4s ease-out both;
  animation-delay: var(--delay);
}

.bubble:nth-child(even) {
  border-radius: 18px 18px 6px 18px;
  align-self: flex-end;
  background: color-mix(in srgb, var(--purple) 16%, var(--surface-2));
}

.ranking {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ranking li {
  --w: 0%;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 10px;
  text-align: left;
  animation: rise 0.4s ease-out both;
  animation-delay: var(--delay);
}

.rank-name {
  font-weight: 750;
  overflow-wrap: anywhere;
}

.rank-votes {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.rank-bar {
  grid-column: 1 / -1;
  height: 12px;
  width: var(--w);
  min-width: 12px;
  border-radius: 6px;
  background: var(--surface-3);
}

.ranking li.top .rank-bar {
  background: linear-gradient(90deg, var(--purple), var(--pink));
}

.histo {
  width: 100%;
  height: 130px;
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 4px;
  align-items: end;
}

.histo-col {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
}

.histo-bar {
  --hh: 0%;
  width: 100%;
  height: var(--hh);
  min-height: 3px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--pink), var(--purple));
  display: flex;
  justify-content: center;
  align-items: flex-start;
  font-size: 0.72rem;
  font-weight: 800;
  color: #1a0f22;
  padding-top: 2px;
}

.histo-label {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.sheet-players {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sheet-players li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.sheet-name {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.sheet-name small {
  color: var(--muted);
  font-weight: 500;
}

.dot {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--faint);
}

.dot.on {
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(192, 132, 252, 0.2);
  color: var(--purple);
}

.tag.ok {
  background: rgba(126, 224, 129, 0.18);
  color: var(--green);
}

/* ---------- Règles ---------- */

.golden {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: var(--radius);
  background: linear-gradient(150deg, rgba(255, 178, 56, 0.14), var(--surface) 70%);
  border: 1px solid rgba(255, 178, 56, 0.35);
}

.rule {
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  padding: 0 16px;
}

.rule summary {
  cursor: pointer;
  padding: 14px 0;
  font-family: var(--display);
  font-weight: 750;
  font-size: 1.05rem;
  list-style: none;
}

.rule summary::-webkit-details-marker {
  display: none;
}

.rule summary::after {
  content: '+';
  float: right;
  color: var(--muted);
}

.rule[open] summary::after {
  content: '−';
}

.rule p {
  color: var(--muted);
  padding-bottom: 12px;
}

.credits {
  text-align: center;
  color: var(--faint);
  font-size: 0.85rem;
  padding: 12px 0 calc(var(--safe-bottom) + 20px);
}

.credits a {
  color: var(--muted);
}

/* ---------- Chargement, toasts, fenêtres ---------- */

.loading {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 40vh;
  color: var(--muted);
  text-align: center;
}

.loading-glass {
  font-size: 2.6rem;
  animation: wobble 1.1s ease-in-out infinite;
}

@keyframes wobble {
  50% {
    transform: rotate(-12deg) translateY(-4px);
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--safe-bottom) + 92px);
  z-index: 100;
  max-width: min(92vw, 480px);
  padding: 12px 18px;
  border-radius: 16px;
  background: #2b2236;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-weight: 650;
  text-align: center;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast[data-tone='warn'] {
  border-color: rgba(255, 178, 56, 0.6);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  padding-bottom: calc(var(--safe-bottom) + 16px);
  background: rgba(8, 5, 12, 0.7);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.18s;
}

.modal-backdrop.show {
  opacity: 1;
}

.modal {
  width: 100%;
  max-width: 520px;
  max-height: 86dvh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px 18px 16px;
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateY(30px);
  transition: transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

.modal-backdrop.show .modal {
  transform: none;
}

.modal-title {
  font-size: 1.35rem;
}

.modal-body {
  color: var(--text);
}

.modal-body p {
  color: var(--muted);
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.modal-actions .btn {
  flex: 1;
}

@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
