/* Daily Tier : styles, pensés d'abord pour le téléphone. */

:root {
  --bg: #1a1625;
  --surface: #252034;
  --surface-2: #2f2942;
  --text: #f4f1fa;
  --muted: #b3aac6;
  --accent: #a78bfa;
  --accent-text: #1a1625;
  --border: #3b3452;
  --danger: #ff8787;
  --ok: #69db7c;
  --wait: #ffd43b;
  --tier-s: #ff6b6b;
  --tier-a: #ffa94d;
  --tier-b: #ffd43b;
  --tier-c: #69db7c;
  --tier-d: #74c0fc;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Manrope, system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.5;
}

h1, h2, .brand, .hero h1 { font-family: Unbounded, Manrope, system-ui, sans-serif; letter-spacing: -0.01em; }

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.topbar .brand { color: var(--text); font-weight: 700; text-decoration: none; }
.topbar .links { display: flex; align-items: center; gap: 12px; }
.topbar form { margin: 0; }
.help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
  flex-shrink: 0;
}
.help-btn:hover, .help-btn:focus-visible { background: var(--accent); color: var(--accent-text); }

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

.small-hero { padding: 16px 0 8px; }
.small-hero h1 { font-size: 1.8rem; }
details.rules { padding: 0; }
details.rules summary {
  cursor: pointer;
  list-style: none;
  padding: 16px;
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
details.rules summary::-webkit-details-marker { display: none; }
details.rules summary::after { content: '+'; color: var(--accent); font-size: 1.4rem; line-height: 1; }
details.rules[open] summary::after { content: '−'; }
.rules-body { padding: 0 16px 16px; }
.rules-body p { margin: 0 0 10px; }
.rules-body ol { margin: 0 0 10px; padding-left: 20px; }
.rules-body li { margin-bottom: 6px; }
ul.plain { list-style: none; margin: 0 0 10px; padding: 0; }
ul.plain li { margin-bottom: 6px; }
.rules-table { width: 100%; border-collapse: collapse; margin: 0 0 10px; font-size: 0.95rem; }
.rules-table td { padding: 6px 4px; border-top: 1px solid var(--border); vertical-align: top; }
.rules-table tr:first-child td { border-top: none; }
.rules-table td:nth-child(2) { white-space: nowrap; font-weight: 700; color: var(--accent); }
.rules-table td:first-child .S, .rules-table td:first-child .A, .rules-table td:first-child .B,
.rules-table td:first-child .C, .rules-table td:first-child .D { font-weight: 800; }
.rules-body .S, .rules-body .A, .rules-body .B, .rules-body .C, .rules-body .D { font-weight: 800; }

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
}

.hero { text-align: center; padding: 48px 0 24px; }
.hero h1 { font-size: 2.2rem; margin: 0 0 8px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 16px;
  margin-bottom: 16px;
}
.card.highlight { border-color: var(--accent); }
.card h1 { font-size: 1.5rem; margin: 0 0 8px; }
.card h2 { font-size: 1.2rem; margin: 0 0 8px; }

.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

.tiers {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 24px 0;
  font-weight: 800;
  font-size: 1.5rem;
}
.S { color: var(--tier-s); } .A { color: var(--tier-a); } .B { color: var(--tier-b); }
.C { color: var(--tier-c); } .D { color: var(--tier-d); }

.form { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.95rem; }
.form .hint { font-weight: 400; }

input, textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* évite le zoom automatique sur iPhone */
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { resize: vertical; margin: 8px 0 12px; }

.button {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  color: var(--accent-text);
  background: var(--accent);
  border: none;
  border-radius: 12px;
  padding: 12px 20px;
  cursor: pointer;
}
.button.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.hero .button { margin-top: 8px; }

.linkish {
  font: inherit;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
}

.row { display: flex; gap: 10px; flex-wrap: wrap; }

.greeting { margin: 4px 0 12px; }

.wallet {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 16px;
  margin-bottom: 16px;
}
.hero .wallet { margin-top: 16px; text-align: left; }

.last-reveal p { margin: 0 0 6px; }
.tier-badge {
  display: inline-block;
  min-width: 1.6em;
  text-align: center;
  border-radius: 6px;
  font-weight: 800;
  color: #1a1625;
}
.tier-badge.S { background: var(--tier-s); } .tier-badge.A { background: var(--tier-a); }
.tier-badge.B { background: var(--tier-b); } .tier-badge.C { background: var(--tier-c); }
.tier-badge.D { background: var(--tier-d); }

.event .day-label {
  margin: 0 0 4px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.event h1 { font-size: 1.45rem; }
.event .event-story { margin: 12px 0; }
.event .question { font-weight: 700; font-size: 1.1rem; margin: 16px 0 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.9rem;
  font-weight: 600;
}

.button.wide { display: block; width: 100%; margin-top: 12px; }

.status { display: flex; gap: 20px; font-weight: 600; }

/* ---------- Tierlist ---------- */

.event.compact .question { margin: 4px 0 6px; }

.board { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.tier-row { display: flex; align-items: stretch; gap: 6px; }
.tier-label {
  flex: 0 0 48px;
  font: inherit;
  font-size: 1.4rem;
  font-weight: 800;
  border: none;
  border-radius: 10px;
  color: #1a1625;
  cursor: pointer;
}
.tier-label.S { background: var(--tier-s); } .tier-label.A { background: var(--tier-a); }
.tier-label.B { background: var(--tier-b); } .tier-label.C { background: var(--tier-c); }
.tier-label.D { background: var(--tier-d); }

.tier-drop {
  flex: 1;
  min-height: 56px;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 6px;
  padding: 6px;
  background: var(--surface-2);
  border-radius: 10px;
}
body.placing .tier-drop:not(.pool) { outline: 2px dashed var(--accent); outline-offset: -2px; }
body.placing .tier-label { box-shadow: 0 0 0 3px var(--accent); }

.pool-wrap { margin-top: 16px; }
.pool-title { margin: 0 0 6px; font-weight: 700; }
.pool-title span {
  display: inline-block;
  min-width: 1.6em;
  text-align: center;
  background: var(--accent);
  color: var(--accent-text);
  border-radius: 999px;
  font-size: 0.85rem;
}
.pool-wrap.done .pool-title span { background: var(--ok); }
.tier-drop.pool { min-height: 64px; border: 1px dashed var(--border); background: transparent; }

.pcard {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.pcard.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.pcard.sortable-ghost { opacity: 0.4; }
.pname { font-weight: 600; font-size: 0.95rem; }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}

.mirror { display: flex; gap: 8px; margin-top: 8px; }
.mirror-choice { flex: 1; position: relative; }
.mirror-choice input { position: absolute; opacity: 0; pointer-events: none; }
.mirror-choice span {
  display: block;
  text-align: center;
  padding: 12px 0;
  border-radius: 10px;
  font-size: 1.3rem;
  font-weight: 800;
  background: var(--surface-2);
  border: 2px solid var(--border);
  cursor: pointer;
}
.mirror-choice.S span { color: var(--tier-s); } .mirror-choice.A span { color: var(--tier-a); }
.mirror-choice.B span { color: var(--tier-b); } .mirror-choice.C span { color: var(--tier-c); }
.mirror-choice.D span { color: var(--tier-d); }
.mirror-choice.S input:checked + span { background: var(--tier-s); color: #1a1625; }
.mirror-choice.A input:checked + span { background: var(--tier-a); color: #1a1625; }
.mirror-choice.B input:checked + span { background: var(--tier-b); color: #1a1625; }
.mirror-choice.C input:checked + span { background: var(--tier-c); color: #1a1625; }
.mirror-choice.D input:checked + span { background: var(--tier-d); color: #1a1625; }
.mirror-choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

#tierlist-form > .button.wide { margin-bottom: 24px; }

.countdown { text-align: center; }
.countdown p { margin: 0; }
.countdown .timer { font-size: 1.6rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 4px; }

.flash { border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.flash.error { background: rgba(255, 135, 135, 0.12); color: var(--danger); }
.flash.ok { background: rgba(105, 219, 124, 0.12); color: var(--ok); }

.players { list-style: none; margin: 0; padding: 0; }
.player {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}
.player:first-child { border-top: none; }
.player-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; text-align: right; }
.player-actions form { margin: 0; }

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 8px;
  background: var(--surface-2);
  color: var(--muted);
}
.badge.ok { color: var(--ok); }
.badge.wait { color: var(--wait); }
.badge.off { color: var(--danger); }

/* ---------- Barre du haut et onglets ---------- */

.topbar .brand { font-weight: 900; font-size: 1.05rem; }
.me-link { display: inline-flex; border-radius: 50%; }
.me-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.avatar.sm { width: 30px; height: 30px; font-size: 0.72rem; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; }
.avatar.xl { width: 120px; height: 120px; font-size: 2.4rem; font-family: Unbounded, sans-serif; }

body.with-tabs .page { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  justify-content: space-around;
  background: rgba(26, 22, 37, 0.96);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  backdrop-filter: blur(8px);
}
.tabbar a {
  flex: 1;
  max-width: 96px;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 12px;
}
.tabbar a.active { color: var(--text); }
.tabbar a.active svg { color: var(--accent); }
.tabbar a:focus-visible { outline: 2px solid var(--accent); }

/* ---------- Révélation façon Wrapped ---------- */

body.bare { background: #0f0c16; }
:root {
  --ink: #1a1625;
  --bg-s: #ff6b6b; --bg-a: #ffa94d; --bg-b: #ffd43b; --bg-c: #69db7c; --bg-d: #74c0fc;
  --bg-purple: #b197fc; --bg-pink: #f783ac;
}
.bg-s { background: var(--bg-s); } .bg-a { background: var(--bg-a); } .bg-b { background: var(--bg-b); }
.bg-c { background: var(--bg-c); } .bg-d { background: var(--bg-d); }
.bg-purple { background: var(--bg-purple); } .bg-pink { background: var(--bg-pink); }
.bg-night { background: var(--bg); }

.stories { max-width: 480px; margin: 0 auto; position: relative; }
.story {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  padding: 64px 24px calc(32px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
  color: var(--text);
  overflow: hidden;
}
.story.ink { color: var(--ink); }
.story-progress, .story-close, .story-nav { display: none; }

/* Avec JavaScript : un écran à la fois */
.stories.on { height: 100vh; height: 100dvh; overflow: hidden; }
.stories.on .story { position: absolute; inset: 0; display: none; height: 100%; min-height: 0; }
.stories.on .story.active { display: flex; animation: storyIn 0.35s ease-out; }
.stories.on .story.scroll { overflow-y: auto; }
@keyframes storyIn { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .stories.on .story.active { animation: none; } }

.stories.on .story-progress {
  display: flex;
  gap: 4px;
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  left: 16px;
  right: 16px;
  z-index: 5;
}
.seg { flex: 1; height: 4px; border-radius: 2px; background: rgba(244, 241, 250, 0.28); overflow: hidden; }
.seg i { display: block; height: 100%; width: 0; background: #f4f1fa; transition: width 0.3s; }
.seg.done i { width: 100%; }
.stories.on.on-light .seg { background: rgba(26, 22, 37, 0.22); }
.stories.on.on-light .seg i { background: var(--ink); }

.stories.on .story-close {
  display: flex;
  position: absolute;
  top: calc(24px + env(safe-area-inset-top));
  right: 8px;
  z-index: 6;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: #f4f1fa;
}
.stories.on.on-light .story-close { color: var(--ink); }
.story-nav { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; padding: 0; }
.stories.on .story-nav { display: block; }
.stories.on .story-nav:focus-visible { width: 56px; height: 56px; clip: auto; top: 45%; border-radius: 50%; background: rgba(0,0,0,.4); }
.stories.on .story-nav.prev:focus-visible { left: 8px; }
.stories.on .story-nav.next:focus-visible { right: 8px; }

.story-head { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; padding-right: 40px; }
.story-center { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.story-title { margin: 0; font-family: Unbounded, sans-serif; font-weight: 900; font-size: clamp(2.2rem, 11vw, 3.3rem); line-height: 1; letter-spacing: -0.02em; }
.story-title.sm { font-size: clamp(1.8rem, 9vw, 2.4rem); }
.story-kicker { margin: 0; font-family: Unbounded, sans-serif; font-weight: 800; font-size: 1.35rem; line-height: 1.2; }
.story-kicker.big { font-size: 1.8rem; }
.story-kicker.accent { color: #c4b5fd; font-family: Manrope, sans-serif; font-size: 1.05rem; }
.story-sub { margin: 0; font-size: 1.02rem; font-weight: 700; line-height: 1.35; }
.story-sub.center { text-align: center; }
.story-hint { margin: 0; text-align: center; font-weight: 700; color: #d9d3e8; }

.tiles-row { display: flex; gap: 8px; align-items: center; }
.tiles-row .arrow { font-size: 2rem; font-weight: 800; }
.tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  color: var(--ink);
  font-family: Unbounded, sans-serif;
  font-weight: 900;
  font-size: 1.45rem;
  flex-shrink: 0;
}
.tile.sm { width: 40px; height: 40px; border-radius: 10px; font-size: 1.15rem; }
.tile.lg { width: 96px; height: 96px; border-radius: 24px; font-size: 3.6rem; }
.tile.xl { width: 128px; height: 128px; border-radius: 30px; font-size: 5.6rem; }
.tile.bordered { border: 3px solid var(--ink); box-sizing: border-box; }

.story-panel { background: var(--surface); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.panel-label { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: #c4b5fd; margin: 0; }
.panel-label.dark { color: var(--ink); }
.panel-title { font-family: Unbounded, sans-serif; font-weight: 800; font-size: 1.35rem; }
.panel-text { color: #d9d3e8; }
.panel-question { font-size: 1.2rem; font-weight: 800; }
.chip.light { background: transparent; }

.giant { flex: 1; display: flex; align-items: center; justify-content: center; font-family: Unbounded, sans-serif; font-weight: 900; font-size: min(62vw, 300px); line-height: 0.8; letter-spacing: -0.06em; min-height: 120px; }
.story-cards { display: flex; flex-direction: column; gap: 10px; }
.story-card { background: var(--ink); color: #f4f1fa; border-radius: 22px; padding: 14px; display: flex; gap: 14px; align-items: center; }
.story-card-body { display: flex; flex-direction: column; min-width: 0; }
.story-name { font-family: Unbounded, sans-serif; font-weight: 800; font-size: 1.5rem; line-height: 1.1; }
.story-avg { font-size: 0.9rem; color: #c9c2d9; }
.facts { list-style: none; margin: 6px 0 0; padding: 0; font-size: 0.92rem; font-weight: 600; color: #e9e4f5; }
.facts li { margin-top: 2px; }
.story-cards.compact .story-card { padding: 10px 12px; }
.story-cards.compact .story-name { font-size: 1.15rem; }
.story-cards.compact .facts li:nth-child(n + 3) { display: none; }
.hero-card { flex-direction: column; text-align: center; padding: 22px 16px; }
.hero-card .story-card-body { align-items: center; }
.hero-card .story-name { font-size: 2.2rem; }

.my-tier { display: flex; gap: 18px; align-items: center; }
.recap { background: var(--ink); color: #f4f1fa; border-radius: 22px; padding: 10px; display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.recap-row { display: flex; gap: 6px; align-items: stretch; }
.recap-names { flex: 1; background: var(--surface-2); border-radius: 10px; padding: 6px 10px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-weight: 700; font-size: 0.95rem; }
.recap-names em { font-style: normal; color: #c9c2d9; font-size: 0.8rem; }
.recap-note { margin: 4px 6px; font-size: 0.85rem; color: #c9c2d9; }

.arche-card { background: var(--bg-b); color: var(--ink); border-radius: 22px; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.arche-name { font-family: Unbounded, sans-serif; font-weight: 900; font-size: 1.5rem; line-height: 1.1; }
.stat-block { display: flex; flex-direction: column; gap: 10px; }
.stat-block-head { display: flex; justify-content: space-between; align-items: baseline; font-family: Unbounded, sans-serif; font-weight: 800; font-size: 1.2rem; }
.stat-block-head span + span { font-family: Manrope, sans-serif; font-size: 0.85rem; font-weight: 600; color: #c9c2d9; }
.bar-line { display: flex; flex-direction: column; gap: 4px; }
.bar-label { display: flex; justify-content: space-between; font-weight: 800; }
.bar-label em { font-style: normal; color: #c9c2d9; font-weight: 600; }
.bar { height: 10px; border-radius: 5px; background: var(--surface-2); }
.bar-fill { height: 10px; border-radius: 5px; background: var(--accent); }
.bar-fill.up, b.up { background-color: transparent; }
.bar-fill.up { background: var(--ok); } .bar-fill.down { background: #ff8787; }
b.up { color: var(--ok); } b.down { color: #ff8787; } b.flat { color: #c9c2d9; }

.dark-panel { background: var(--ink); color: #f4f1fa; border-radius: 22px; padding: 4px 16px; margin-top: auto; }
.list-line { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; border-top: 1px solid var(--border); font-weight: 700; }
.list-line:first-child { border-top: none; }
.list-line span + span { font-size: 0.9rem; color: #c9c2d9; font-weight: 600; }
.list-line .ok { color: var(--ok); } .list-line .near { color: var(--tier-b); } .list-line .miss { color: #ff8787; }

.fun-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fun-tile { border-radius: 22px; padding: 14px; min-height: 130px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; color: var(--ink); }
.fun-name { font-family: Unbounded, sans-serif; font-weight: 900; font-size: 1.35rem; line-height: 1.1; overflow-wrap: anywhere; }
.fun-sub { font-size: 0.82rem; font-weight: 700; }
.log-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 12px 14px; font-weight: 700; }

.giant-number { font-family: Unbounded, sans-serif; font-weight: 900; font-size: clamp(5rem, 30vw, 8rem); line-height: 1; letter-spacing: -0.05em; }
.gain-lines { display: flex; flex-direction: column; }
.gain-lines div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 2px solid var(--ink); font-weight: 700; }
.gain-lines div:last-child { border-bottom: none; }
.standing { margin-top: auto; background: var(--ink); color: #f4f1fa; border-radius: 22px; padding: 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.standing div { display: flex; flex-direction: column; }
.standing b { font-family: Unbounded, sans-serif; font-size: 1.4rem; }
.standing span { font-size: 0.8rem; color: #c9c2d9; }

.question-block { background: var(--bg-s); color: var(--ink); border-radius: 22px; padding: 20px; font-family: Unbounded, sans-serif; font-weight: 800; font-size: 1.4rem; line-height: 1.15; }
.story-actions { display: flex; flex-direction: column; gap: 6px; }
.pill-button { display: block; background: #f4f1fa; color: var(--ink); text-decoration: none; text-align: center; border-radius: 999px; padding: 18px; font-family: Unbounded, sans-serif; font-weight: 800; font-size: 1.1rem; }
.pill-link { display: block; text-align: center; color: #d9d3e8; font-weight: 700; padding: 12px; }

/* ---------- Fiches et groupe ---------- */

.page-title { font-size: 1.8rem; margin: 8px 0 16px; }
.profile-head { text-align: center; padding: 16px 0 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.profile-head h1 { margin: 8px 0 0; font-size: 1.7rem; }
.profile-head p { margin: 0; }
.archetype { font-family: Unbounded, sans-serif; font-weight: 800; font-size: 1.2rem; margin-top: 6px !important; }
.title-badge { display: inline-block; background: var(--bg-b); color: var(--ink); font-weight: 800; border-radius: 999px; padding: 2px 12px; font-size: 0.9rem; }
.title-badge.small { font-size: 0.75rem; padding: 1px 8px; margin-top: 4px; }

.radar-wrap { position: relative; max-width: 340px; margin: 0 auto 12px; }
.line-wrap { position: relative; height: 240px; }

.stat-bars { display: flex; flex-direction: column; gap: 8px; }
.stat-bar-row { display: grid; grid-template-columns: 7.5em 1fr 2.2em; align-items: center; gap: 8px; font-weight: 700; font-size: 0.92rem; }
.stat-bar { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.stat-bar span { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.stat-bar-value { text-align: right; font-variant-numeric: tabular-nums; }
.stat-bars.compact { gap: 5px; margin-top: 12px; }
.stat-bars.compact .stat-bar-row { font-size: 0.8rem; grid-template-columns: 6.8em 1fr 2em; }
.stat-bars.compact .stat-bar { height: 7px; }

.tier-counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; text-align: center; margin-bottom: 8px; }
.tier-counts div { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tier-counts .tier-badge { font-size: 1.1rem; padding: 2px 0; width: 2em; }
.tier-counts b { font-size: 1.2rem; }

.history { list-style: none; margin: 0; padding: 0; }
.history li { border-top: 1px solid var(--border); }
.history li:first-child { border-top: none; }
.history a { display: flex; align-items: center; gap: 10px; padding: 10px 0; color: var(--text); text-decoration: none; min-height: 44px; }
.hist-day { font-weight: 800; color: var(--muted); width: 2.6em; font-size: 0.85rem; }
.hist-title { flex: 1; font-weight: 600; }
.logout { margin-bottom: 16px; }

.champions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.champions li { display: flex; gap: 12px; align-items: center; }
.champ-stat { font-size: 1.5rem; width: 1.6em; text-align: center; }
.champ-body { display: flex; flex-direction: column; }
.player-card { display: block; color: var(--text); text-decoration: none; }
.player-card:hover, .player-card:focus-visible { border-color: var(--accent); }
.player-card-head { display: flex; gap: 12px; align-items: center; }
.player-card-head > div { display: flex; flex-direction: column; align-items: flex-start; }
.player-card-name { font-family: Unbounded, sans-serif; font-size: 1.2rem; }

/* ---------- Boutique ---------- */

.shop-wallet { justify-content: center; font-size: 1.1rem; }
.shop-head { display: flex; gap: 12px; align-items: flex-start; }
.shop-emoji { font-size: 1.8rem; line-height: 1; padding-top: 2px; }
.shop-text { flex: 1; }
.shop-text p { margin: 4px 0 0; }
.price { font-family: Unbounded, sans-serif; font-weight: 900; color: var(--tier-b); white-space: nowrap; }
.price::after { content: ' 💰'; font-size: 0.8em; }
.shop-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.shop-actions form { margin: 0; }
.button[disabled] { opacity: 0.5; cursor: not-allowed; }
.stock { font-weight: 700; color: var(--muted); }
.stock.has { color: var(--ok); }
.use-details { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.use-details summary { cursor: pointer; font-weight: 700; color: var(--accent); min-height: 32px; }
.use-form { margin-top: 8px; }
select {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
}
.two-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.used-list { list-style: none; margin: 0; padding: 0; }
.used-list li { display: flex; flex-direction: column; padding: 8px 0; border-top: 1px solid var(--border); }
.used-list li:first-child { border-top: none; }
.unmask-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.unmask-row { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.unmask-row .tier-badge { width: 1.8em; }

/* ---------- Classement, archives, modération ---------- */

.title-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.title-row .page-title { margin: 8px 0 16px; }
.ranking { list-style: none; margin: 0; padding: 0; }
.ranking li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.ranking li:first-child { border-top: none; }
.ranking li.me { background: var(--surface-2); border-radius: 12px; padding: 10px 8px; }
.rank { width: 2.6em; font-family: Unbounded, sans-serif; font-weight: 800; color: var(--muted); font-size: 0.9rem; }
.ranking li:first-child .rank { color: var(--tier-b); }
.rank-player { flex: 1; display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; min-width: 0; }
.rank-player > span { display: flex; flex-direction: column; min-width: 0; }
.rank-points { display: flex; flex-direction: column; align-items: flex-end; }
.rank-points b { font-family: Unbounded, sans-serif; font-size: 1.1rem; }
.podium { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 16px; }
.podium-card { border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.podium-name { font-family: Unbounded, sans-serif; font-weight: 900; font-size: 1.4rem; }
.palmares { list-style: none; margin: 0; padding: 0; }
.palmares li { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 0; border-top: 1px solid var(--border); }
.palmares li:first-child { border-top: none; }
.archives { list-style: none; margin: 0; padding: 0; }
.archives li { border-top: 1px solid var(--border); }
.archives li:first-child { border-top: none; }
.archives a, .archive.skipped { display: flex; gap: 10px; padding: 10px 0; color: var(--text); text-decoration: none; }
.archive-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.archive.skipped { opacity: 0.6; }
.small-title { font-size: 0.95rem; margin: 12px 0 8px; font-family: Manrope, sans-serif; }
.moderation { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid var(--border); }
.moderation form { margin: 0; }
.hidden-ragot span { text-decoration: line-through; opacity: 0.6; }

/* ---------- Photos de profil ---------- */

img.avatar { object-fit: cover; background: var(--surface-2); display: inline-block; }
.avatar { flex-shrink: 0; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.photo-picker { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.photo-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 2px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 2.2rem;
}
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-button { position: relative; cursor: pointer; }
.photo-button:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.photo-missing { color: var(--danger); font-weight: 700; }
.photo-nudge { display: flex; gap: 12px; align-items: center; color: var(--text); text-decoration: none; font-size: 1.4rem; border-color: var(--accent); }
.photo-nudge span { font-size: 1rem; }
.story-card img.avatar.xl, .profile-head img.avatar.xl { border: 4px solid rgba(255,255,255,0.15); }

/* ---------- Objets sur la page tierlist ---------- */

#tierlist-form.locked .board, #tierlist-form.locked .pool-wrap, #tierlist-form.locked .mirror { opacity: 0.6; pointer-events: none; }
.inventory { margin-top: 16px; scroll-margin-top: 16px; }
.item-cards { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 12px; }
.item-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 0 12px; }
.item-card[open] { padding-bottom: 12px; border-color: var(--accent); }
.item-card summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 52px; cursor: pointer; }
.item-card summary::-webkit-details-marker { display: none; }
.item-name { flex: 1; }
.item-use { background: var(--accent); color: var(--accent-text); font-weight: 800; border-radius: 999px; padding: 6px 14px; font-size: 0.9rem; }
.item-card[open] .item-use { background: transparent; color: var(--muted); }
.item-card p { margin: 0 0 4px; }
.use-hint { margin: 8px 0 0; }

/* ---------- Mode appli (installée sur l'écran d'accueil) ---------- */

.topbar { padding-top: max(12px, env(safe-area-inset-top)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.install-card { border-color: var(--accent); }
.install-head { display: flex; gap: 12px; align-items: center; }
.install-head img { border-radius: 12px; }
.install-steps { margin: 12px 0 6px; padding-left: 20px; }
.install-steps li { margin-bottom: 6px; }
.share-icon { vertical-align: -4px; color: var(--accent); }
.install-later { margin-top: 8px; }
@media (display-mode: standalone) {
  body { -webkit-user-select: none; user-select: none; }
  input, textarea, .story-panel, .log-card { -webkit-user-select: text; user-select: text; }
}

/* ---------- Notifications ---------- */

.notif-card { border-color: var(--accent); }
.notif-bell { font-size: 2rem; width: 52px; text-align: center; }
.notif-actions { margin-top: 12px; align-items: center; }

/* ---------- Outils de test ---------- */

.test-tools { border-style: dashed; border-color: var(--tier-b); }
.test-tools form { margin: 0; }
.test-tools > form .button { margin-top: 4px; }
.test-grid { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.test-votes { display: flex; flex-direction: column; gap: 6px; background: var(--surface-2); border-radius: 12px; padding: 10px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.check input { width: auto; }
.button.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }

/* =====================================================================
   Repasse mobile d'abord
   ===================================================================== */

/* Barre du haut : fixe en haut de l'écran */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(26, 22, 37, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  min-height: 56px;
  box-sizing: border-box;
}
.topbar.sub { display: grid; grid-template-columns: 44px 1fr auto; gap: 8px; }
.back-btn {
  width: 44px;
  height: 44px;
  margin-left: -10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  border-radius: 12px;
}
.back-btn:active { background: var(--surface-2); }
.back-btn:focus-visible { outline: 2px solid var(--accent); }
.topbar-title {
  font-family: Unbounded, Manrope, sans-serif;
  font-weight: 800;
  font-size: 1rem;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-link {
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 10px;
  color: var(--muted);
}

/* Page et cartes */
.page { padding: 12px max(16px, env(safe-area-inset-left)) 24px max(16px, env(safe-area-inset-right)); }
.card { border-radius: 18px; padding: 16px; margin-bottom: 12px; }
.button { min-height: 48px; box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; }
.button.wide { display: flex; width: 100%; }
.button.big { min-height: 54px; font-size: 1.05rem; border-radius: 14px; }
.button:active { transform: scale(0.98); }

/* Accueil */
.home-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 4px 0 12px; }
.home-head p { margin: 0; }
.home-title { margin: 0; font-size: 1.7rem; line-height: 1.1; }
.stat-pills { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pill-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}
.pill-stat span { color: var(--muted); font-weight: 600; }

.hero-event { padding: 18px 16px 14px; border-color: #4a4166; }
.event-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.event-top .day-label { margin: 0; font-size: 0.75rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 800;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.timer-chip.soon { color: var(--tier-a); }
.timer-chip.due { color: var(--ok); }
.event-title { margin: 12px 0 8px; font-size: 1.45rem; line-height: 1.15; }
.event-story { margin: 0 0 12px; color: #d9d3e8; }
.event-question { margin: 8px 0 12px; font-size: 1.25rem; font-weight: 800; line-height: 1.25; }
.tl-head .event-question { margin: 10px 0 4px; }
.event-states { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 12px; }
.state { font-size: 0.85rem; font-weight: 700; border-radius: 999px; padding: 4px 10px; border: 1px solid var(--border); }
.state.ok { color: var(--ok); border-color: rgba(105, 219, 124, 0.4); background: rgba(105, 219, 124, 0.08); }
.state.todo { color: var(--text); }
.state.neutral { color: var(--muted); }
.event-foot { text-align: center; margin: 10px 0 0; }
.newcomer { background: var(--surface-2); border-radius: 12px; padding: 12px; margin: 14px 0 0; }
.empty-event { text-align: center; }
.empty-event .tiers { margin: 8px 0 16px; }
.empty-event .button + .button { margin-top: 8px; }

.last-reveal { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; padding: 12px 14px; }
.last-reveal:active { background: var(--surface-2); }
.last-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.last-body .day-label { margin: 0; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.last-body strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-mini {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  font-family: Unbounded, sans-serif;
  font-weight: 900;
  font-size: 1.3rem;
  color: var(--ink);
}
.tile-mini.S { background: var(--tier-s); } .tile-mini.A { background: var(--tier-a); } .tile-mini.B { background: var(--tier-b); }
.tile-mini.C { background: var(--tier-c); } .tile-mini.D { background: var(--tier-d); }
.tile-mini.none { background: var(--surface-2); color: var(--muted); }
.chevron { font-size: 1.6rem; color: var(--muted); line-height: 1; }

.nudges { margin-top: 4px; }
.nudges .card { padding: 14px 16px; }
.photo-nudge { font-size: 1.2rem; }

/* Tierlist : bouton toujours visible en bas */
.sticky-actions {
  position: sticky;
  bottom: 0;
  z-index: 10;
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
  margin: 0 -4px;
  background: linear-gradient(to bottom, rgba(26, 22, 37, 0), var(--bg) 35%);
}
#tierlist-form > .sticky-actions .button { margin: 0; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
.tier-label { min-height: 52px; }
.pcard { min-height: 40px; }

/* Objets : annulation */
.used-line { flex-direction: row !important; justify-content: space-between; align-items: center; gap: 10px; }
.used-body { display: flex; flex-direction: column; min-width: 0; }
.cancel-form { margin: 0; flex-shrink: 0; }
.danger-link { color: var(--danger); min-height: 44px; padding: 0 4px; }

/* Petits écrans */
@media (max-width: 360px) {
  .home-head { flex-direction: column; align-items: flex-start; }
  .stat-pills { justify-content: flex-start; }
  .tabbar a span { font-size: 0.62rem; }
}

/* Boutique compacte */
.me-link, .me-link:hover { text-decoration: none; }
.shop-intro { margin: -4px 0 12px; }
.shop-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px; }
.shop-item .shop-emoji { font-size: 1.7rem; line-height: 1.2; }
.shop-item .shop-text { flex: 1; min-width: 0; }
.shop-item .shop-text p { margin: 2px 0 0; }
.stock-badge { display: inline-block; font-size: 0.72rem; font-weight: 800; color: var(--ok); border: 1px solid rgba(105, 219, 124, 0.4); border-radius: 999px; padding: 0 8px; vertical-align: 2px; }
.buy-form { margin: 0; flex-shrink: 0; }
.buy-btn {
  min-width: 76px;
  min-height: 44px;
  border: none;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.buy-btn[disabled] { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.title-row .pill-stat { flex-shrink: 0; }

/* Classement et groupe plus compacts */
.rank-points { flex-direction: row; align-items: baseline; gap: 4px; }
.ranking li { padding: 8px 0; min-height: 48px; }
.ranking li.me { padding: 8px; margin: 0 -8px; }
.player-card { padding: 12px 14px; }
.player-card .avatar.lg { width: 44px; height: 44px; font-size: 0.95rem; }
.player-card-name { font-size: 1.05rem; }
.stat-bars.compact { margin-top: 10px; gap: 4px; }
.stat-bars.compact .stat-bar-row { font-size: 0.78rem; grid-template-columns: 6.2em 1fr 1.8em; gap: 6px; }
.stat-bars.compact .stat-bar { height: 6px; }
.test-tools .button, .card form .button.secondary { width: 100%; }

/* iOS : barres pleines (pas de flou), l'appli démarre sous la barre d'état */
html { background: var(--bg); }
.topbar {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: var(--bg);
  padding-top: max(10px, env(safe-area-inset-top));
}
.tabbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }

/* Barre d'onglets toujours collée au bas de l'écran */
html, body { min-height: 100%; }
body { min-height: 100vh; min-height: 100dvh; }

/* iOS 26, appli installée : le système floute une bande sous la barre d'état.
   On descend le contenu de la barre du haut sous cette bande, pour qu'il reste net. */
@media (display-mode: standalone) {
  .topbar { padding-top: calc(env(safe-area-inset-top) + 30px); }
}

/* Barre de chargement : apparaît dès qu'on touche un lien ou un bouton d'envoi */
html.is-loading::after {
  content: '';
  position: fixed;
  top: env(safe-area-inset-top);
  left: 0;
  height: 3px;
  width: 100%;
  z-index: 1000;
  background: linear-gradient(90deg, transparent, var(--accent, #a78bfa), transparent);
  background-size: 50% 100%;
  background-repeat: no-repeat;
  animation: dt-loading 0.9s linear infinite;
  pointer-events: none;
}
@keyframes dt-loading { from { background-position: -50% 0; } to { background-position: 150% 0; } }

.app-version { text-align: center; color: var(--muted, #8b8598); font-size: 0.72rem; opacity: 0.7; margin: 28px 0 8px; }

/* Thème du jour */
.theme-title { font-size: 1.55rem; line-height: 1.2; }
.theme-row { display: grid; grid-template-columns: 76px 1fr; gap: 10px; }
.emoji-input { text-align: center; font-size: 1.3rem; }

/* Admin : changer le thème du jour */
.theme-change { margin: 10px 0; }
.theme-change summary { list-style: none; cursor: pointer; display: block; text-align: center; }
.theme-change summary::-webkit-details-marker { display: none; }
.theme-change[open] summary { margin-bottom: 12px; }
.theme-change .check { flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; font-weight: 600; }
.theme-change .check input { width: 22px; height: 22px; flex: none; margin: 0; }

/* Barres du bas (onglets, bouton de la tierlist) : simplement fixées au bas de l'écran.
   Fond un peu plus clair que la page pour qu'on voie qu'elles touchent le bord. */
.tabbar, .bottom-actions {
  position: fixed;
  left: 0;
  right: 0;
  top: auto;
  bottom: 0;
  z-index: 20;
  background: var(--surface);
}
.tabbar { padding: 8px 4px max(8px, calc(env(safe-area-inset-bottom) - 10px)); }
.bottom-actions {
  padding: 10px max(16px, env(safe-area-inset-left)) max(10px, calc(env(safe-area-inset-bottom) - 8px)) max(16px, env(safe-area-inset-right));
  border-top: 1px solid var(--border);
}
.bottom-actions .button { margin: 0 auto; display: block; max-width: 560px; width: 100%; }
body.with-tabs .page, body.with-footer .page { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }

/* Carte du thème : le thème au centre, bien lisible */
.theme-card {
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(167, 139, 250, 0.22), transparent 60%),
    var(--surface);
  border: 1px solid rgba(167, 139, 250, 0.45);
}
.theme-hero { text-align: center; padding: 18px 4px 6px; }
.theme-emoji { display: block; font-size: 3.4rem; line-height: 1; margin-bottom: 12px; }
.theme-name {
  margin: 0;
  font-family: Unbounded, Manrope, system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.45rem, 6.4vw, 1.9rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.theme-extra { margin: 10px 0 0; font-weight: 700; font-size: 1.05rem; }
.theme-hint { margin: 10px auto 0; max-width: 32ch; color: var(--muted); font-size: 0.98rem; font-style: italic; }
.theme-scale {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 18px auto 2px; max-width: 320px;
  font-size: 0.8rem; font-weight: 700; color: var(--muted);
}
.theme-scale .tile-mini { width: 26px; height: 26px; font-size: 0.85rem; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.theme-scale .scale-line { flex: 1; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--tier-s, #ff6b6b), var(--tier-d, #74c0fc)); opacity: 0.7; }
.theme-meta { display: flex; justify-content: center; margin-top: 12px; }
.theme-meta .chips { justify-content: center; margin: 0; }
.theme-card .event-states { justify-content: center; }
.theme-hero.compact { padding-top: 12px; }
.theme-hero.compact .theme-emoji { font-size: 2.6rem; margin-bottom: 8px; }
.theme-hero.compact .theme-name { font-size: clamp(1.3rem, 5.6vw, 1.65rem); }

/* Admin : onglets */
.admin-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  margin: 0 0 14px;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tabs a {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 14px; border-radius: 999px; min-height: 40px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--muted); font-weight: 700; font-size: 0.92rem; text-decoration: none; white-space: nowrap;
}
.admin-tabs a.active { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.admin-tabs .count { background: var(--danger); color: #1a1625; border-radius: 999px; padding: 0 7px; font-size: 0.78rem; }

/* Admin : statistiques de connexion */
.stat-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat-tile { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; }
.stat-tile strong { font-size: 1.35rem; line-height: 1.2; }
.stat-tile span { color: var(--muted); font-size: 0.8rem; }
.player-stats { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 4px; color: var(--muted); }
