/* lelauncher.fr — site public (sombre, mobile d'abord). Aucune dépendance externe. */
:root {
  --bg: #0a0a12;
  --bg-2: #0e0e18;
  --surface: #14141f;
  --surface-2: #1b1b2a;
  --surface-3: #232336;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .15);
  --text: #f4f4f9;
  --muted: #a5a5b9;
  --cyan: #25f4ee;
  --pink: #fe2c55;
  --gold: #ffd166;
  --silver: #d5dbe6;
  --bronze: #f0a272;
  --ok: #3ddc97;
  --warn: #ffc857;
  --bad: #ff5c7a;
  --game: var(--cyan);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 40px rgba(0, 0, 0, .45);
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --grad: linear-gradient(120deg, var(--cyan), #8f8cff 50%, var(--pink));
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #7ff9f5; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, "Cascadia Code", Consolas, Menlo, monospace; font-size: .92em; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
::selection { background: rgba(37, 244, 238, .35); color: #fff; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--cyan); color: #000; padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ------------------------------------------------------------------ Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em;
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 650; font-size: .95rem; text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); color: var(--text); border-color: rgba(255, 255, 255, .25); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--grad); border-color: transparent; color: #07070d; }
.btn-primary:hover { color: #07070d; background: var(--grad); box-shadow: 0 6px 24px rgba(37, 244, 238, .25), 0 6px 24px rgba(254, 44, 85, .2); border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .875rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

input, select, textarea { font: inherit; color: var(--text); }
input[type="search"], input[type="text"], input:not([type]) {
  -webkit-appearance: none; appearance: none;
}

/* ------------------------------------------------------------------ Barre du haut */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(10, 10, 18, .78);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; flex: none; margin-right: auto; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.08rem; letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.top-search { flex: 0 1 260px; min-width: 0; }
.brand img { flex: none; }
.top-search input {
  width: 100%; height: 40px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-2); font-size: .92rem;
}
.top-search input::placeholder { color: #8a8aa0; }
.home .top-search { display: none; }

/* ------------------------------------------------------------------ Accueil */
.hero { position: relative; overflow: hidden; padding: 56px 0 44px; text-align: center; }
.hero-glow, .profile-glow {
  position: absolute; inset: -40% -10% auto; height: 520px; pointer-events: none;
  background:
    radial-gradient(40% 55% at 30% 50%, rgba(37, 244, 238, .22), transparent 70%),
    radial-gradient(40% 55% at 72% 45%, rgba(254, 44, 85, .2), transparent 70%);
  filter: blur(10px);
}
.hero-in { position: relative; }
.eyebrow {
  display: inline-block; margin: 0 0 18px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04);
  color: #cfd0dc; font-size: .8rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase;
}
.hero-title { font-size: clamp(2.6rem, 11vw, 5.4rem); font-weight: 850; letter-spacing: -.035em; margin-bottom: .2em; }
.hero-sub { max-width: 34em; margin: 0 auto 28px; color: #c9c9d8; font-size: clamp(1.02rem, 3.6vw, 1.22rem); }
.hero-search {
  display: flex; align-items: center; gap: 6px; max-width: 520px; margin: 0 auto;
  padding: 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
}
.hero-search:focus-within { border-color: rgba(37, 244, 238, .55); }
.hero-search .btn { padding: 0 16px; }
.hero-search-at { padding-left: 14px; color: var(--muted); font-weight: 700; }
.hero-search input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; font-size: 1rem; padding: 0 4px; }
.hero-search input:focus { outline: none; }
.hero-search input::placeholder { color: #8a8aa0; }

.section { padding: 28px 16px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-title { font-size: clamp(1.3rem, 4.6vw, 1.7rem); font-weight: 800; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.step { position: relative; padding: 20px 20px 18px 72px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step h3 { font-size: 1.05rem; margin-bottom: .3em; }
.step p { margin: 0; color: var(--muted); font-size: .95rem; }
.step-num {
  position: absolute; left: 18px; top: 18px; width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; font-weight: 850; color: #07070d; background: var(--grad);
}

.creator-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: 1fr; }
.creator-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); color: var(--text); text-decoration: none;
  transition: border-color .15s ease, transform .15s ease, background .15s ease;
}
.creator-card:hover { color: var(--text); border-color: rgba(37, 244, 238, .45); background: var(--surface-2); transform: translateY(-1px); }
.creator-card-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.creator-card-text strong, .creator-card-text .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.creator-card-text .muted { font-size: .9rem; }
.creator-card-go { color: var(--muted); font-size: 1.2rem; transition: transform .15s ease, color .15s ease; }
.creator-card:hover .creator-card-go { transform: translateX(3px); color: var(--cyan); }
.chip {
  align-self: flex-start; margin-top: 6px; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 650;
  background: rgba(37, 244, 238, .1); color: #9ff7f3; border: 1px solid rgba(37, 244, 238, .22);
}

.empty { padding: 26px 20px; border-radius: var(--radius); border: 1px dashed var(--line-2); text-align: center; background: rgba(255, 255, 255, .015); }
.empty p:last-child { margin-bottom: 0; }
.empty-lg { padding: 48px 20px; }
.empty-emoji { font-size: 2.6rem; margin-bottom: .2em; }

/* ------------------------------------------------------------------ Avatars (repli : initiales) */
.avatar {
  position: relative; flex: none; display: inline-grid; place-items: center; overflow: hidden;
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, #263042, #3a2234); color: #fff; font-weight: 750;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.avatar-initials { line-height: 1; letter-spacing: .02em; font-size: calc(var(--s, 40px) * .38); }
.avatar-xs { width: 28px; height: 28px; --s: 28px; }
.avatar-sm { width: 36px; height: 36px; --s: 36px; }
.avatar-md { width: 44px; height: 44px; --s: 44px; }
.avatar-lg { width: 54px; height: 54px; --s: 54px; }
.avatar-xl { width: 92px; height: 92px; --s: 92px; box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px rgba(37, 244, 238, .7), 0 10px 40px rgba(254, 44, 85, .25); }
.avatar-empty { background: var(--surface-3); color: var(--muted); }

/* ------------------------------------------------------------------ Page créateur */
.profile { position: relative; overflow: hidden; padding: 34px 0 22px; }
.profile-in { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 16px 18px; align-items: center; }
.profile-text { min-width: 0; }
.profile-name { font-size: clamp(1.6rem, 7vw, 2.6rem); font-weight: 850; margin: 0; overflow-wrap: anywhere; }
.profile-handle { margin: 2px 0 8px; color: var(--muted); font-weight: 600; }
.profile-stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); font-size: .9rem; }
.profile-stats strong { color: var(--text); }
.profile-tiktok { grid-column: 1 / -1; justify-self: start; }

.game-tabs { margin-top: 6px; }
.game-tabs ul {
  list-style: none; margin: 0; padding: 4px 0 8px; display: flex; gap: 8px; overflow-x: auto;
  scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
}
.game-tabs ul::-webkit-scrollbar { display: none; }
.game-tab {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px;
  white-space: nowrap; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--line); color: #d6d6e2; text-decoration: none; font-weight: 650;
}
.game-tab:hover { color: var(--text); border-color: var(--line-2); }
.game-tab[aria-current="page"] {
  color: var(--text); border-color: color-mix(in srgb, var(--game) 70%, transparent);
  background: color-mix(in srgb, var(--game) 16%, var(--surface));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--game) 35%, transparent) inset;
}
.game-emoji { font-size: 1.15em; }

.board-layout { display: grid; gap: 18px; padding-top: 14px; padding-bottom: 40px; }
.board-main { min-width: 0; }
.board-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 14px; }
.board-head .section-title { margin: 0; }
.segmented { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.segmented a {
  min-width: 76px; height: 36px; padding: 0 14px; display: inline-grid; place-items: center; border-radius: 999px;
  color: #c9c9d8; text-decoration: none; font-weight: 650; font-size: .9rem;
}
.segmented a:hover { color: var(--text); }
.segmented a[aria-current="page"] { background: var(--text); color: #0a0a12; }

.find { margin-bottom: 14px; }
.find-label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
.find-row { display: flex; gap: 8px; }
.find-row input {
  flex: 1; min-width: 0; height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); font-size: 1rem;
}
.find-row input:focus { outline: none; border-color: rgba(37, 244, 238, .6); box-shadow: 0 0 0 3px rgba(37, 244, 238, .18); }
.find-row input::placeholder { color: #8a8aa0; }

.me-card {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px 14px; border-radius: var(--radius-sm);
  background: linear-gradient(90deg, rgba(37, 244, 238, .14), rgba(254, 44, 85, .1)); border: 1px solid rgba(37, 244, 238, .35);
}
.me-card-none { background: var(--surface); border-color: var(--line-2); flex-wrap: wrap; }
.me-rank { font-weight: 850; font-size: 1.35rem; min-width: 2.6ch; text-align: center; }
.me-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.me-text .muted { font-size: .88rem; }

.board-meta { font-size: .86rem; margin-bottom: 8px; }
.board-wrap { border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.board { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.board th {
  text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
  font-weight: 700; padding: 12px 8px; border-bottom: 1px solid var(--line); background: var(--bg-2);
}
.board td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.board tbody tr:last-child td { border-bottom: 0; }
.board .c-rank { width: 44px; text-align: center; padding-left: 10px; }
.board .c-num { text-align: right; white-space: nowrap; width: 1%; padding-right: 12px; }
.board th.c-num { text-align: right; }
.board .c-wins { font-weight: 800; }
.board abbr { text-decoration: none; }
.rank { display: inline-grid; place-items: center; min-width: 28px; font-weight: 750; color: #d8d8e4; }
.medal { font-size: 1.3rem; line-height: 1; }
.board tr.top1 { background: linear-gradient(90deg, rgba(255, 209, 102, .12), transparent 70%); }
.board tr.top2 { background: linear-gradient(90deg, rgba(213, 219, 230, .08), transparent 70%); }
.board tr.top3 { background: linear-gradient(90deg, rgba(240, 162, 114, .09), transparent 70%); }
.board tr.is-me { background: linear-gradient(90deg, rgba(37, 244, 238, .2), rgba(254, 44, 85, .08)); box-shadow: inset 3px 0 0 var(--cyan); }
.board tr.flash { animation: rowflash 1.6s ease; }
@keyframes rowflash { 0%, 40% { background-color: rgba(37, 244, 238, .35); } 100% { background-color: transparent; } }
.player { display: flex; align-items: center; gap: 10px; min-width: 0; }
.player-text { display: flex; flex-direction: column; min-width: 0; }
.board .c-player { width: 100%; max-width: 0; }
.player-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-sub { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-extra { color: #8d8da3; font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lbl-short { display: inline; }
.lbl-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.board .c-wide { display: none; }
.board-nomatch { padding: 16px; margin: 0; text-align: center; }

.board-side { min-width: 0; }
.side-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 10px; }
.recent { list-style: none; margin: 0; padding: 6px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.recent-item { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 12px; }
.recent-item + .recent-item { border-top: 1px solid var(--line); border-top-left-radius: 0; border-top-right-radius: 0; }
.recent-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.recent-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-text .muted { font-size: .8rem; }
.recent-trophy { font-size: 1.1rem; }

/* ------------------------------------------------------------------ En live (badge mis à jour par live.js) */
.live-badge { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 10px; font-size: .9rem; }
.live-badge[hidden] { display: none; }
.live-pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  background: rgba(255, 59, 92, .16); border: 1px solid rgba(255, 59, 92, .6); color: #ffd0d8;
  font-weight: 800; font-size: .8rem; letter-spacing: .08em; text-decoration: none;
  animation: livepulse 2s ease-in-out infinite;
}
.live-pill:hover { color: #fff; background: rgba(255, 59, 92, .28); }
@keyframes livepulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 92, .45); } 50% { box-shadow: 0 0 0 6px rgba(255, 59, 92, 0); } }
.live-game { color: #d9d9e5; }
.live-game[hidden] { display: none; }
.live-note { color: var(--muted); font-size: .84rem; width: 100%; }
.board-zone.is-updated .board-wrap { animation: zoneflash 1.4s ease; }
@keyframes zoneflash { 0% { box-shadow: 0 0 0 2px rgba(37, 244, 238, .6); } 100% { box-shadow: 0 0 0 2px rgba(37, 244, 238, 0); } }

/* ------------------------------------------------------------------ Onglets de la page créateur */
/* scroll-margin : après un clic (#onglets), les onglets restent visibles sous la barre du haut collante (≈ 61 px) */
.page-tabs { display: flex; gap: 6px; margin-top: 4px; margin-bottom: 4px; border-bottom: 1px solid var(--line); scroll-margin-top: 72px; }
.page-tab {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; margin-bottom: -1px;
  color: #c9c9d8; text-decoration: none; font-weight: 700; border-bottom: 2px solid transparent;
}
.page-tab:hover { color: var(--text); }
.page-tab[aria-current="page"] { color: var(--text); border-bottom-color: var(--cyan); }
.page-tabs + .board-zone .game-tabs { margin-top: 12px; }

/* ------------------------------------------------------------------ Règles des jeux */
/* Lien « Règles » de la barre du haut : masqué sur petit téléphone pour laisser la place à la recherche (lien aussi dans
   le pied de page et l'onglet de chaque page créateur) ; toujours visible sur l'accueil, qui n'a pas de recherche en haut */
.top-link { display: none; color: #cfcfdc; text-decoration: none; font-weight: 650; font-size: .92rem; padding: 8px 4px; white-space: nowrap; }
.home .top-link { display: inline; }
.top-link:hover, .top-link[aria-current="page"] { color: var(--text); }
@media (min-width: 480px) {
  .top-link { display: inline; }
}
.live-game a { color: inherit; }
.rules-others { margin: 28px 0 12px; font-size: 1.05rem; font-weight: 800; color: #d9d9e5; }
.rules-page { padding-top: 36px; padding-bottom: 48px; }
.rules-h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); font-weight: 850; }
.rules-page .lead { max-width: 46em; }
.rules-intro { max-width: 46em; }
.rules-tab { padding-top: 22px; }
.rules-toc ul { list-style: none; margin: 0 0 16px; padding: 4px 0 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.rules { display: grid; gap: 16px; }
.rule-card {
  min-width: 0; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  border-top: 3px solid var(--game); scroll-margin-top: 80px;
}
.rule-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 6px; }
.rule-emoji { flex: none; width: 52px; height: 52px; display: grid; place-items: center; font-size: 1.8rem; border-radius: 16px; background: color-mix(in srgb, var(--game) 16%, var(--surface-2)); }
.rule-title { font-size: 1.3rem; font-weight: 800; margin: 0 0 .2em; }
.rule-pitch { color: var(--muted); margin: 0; }
.rule-sub { font-size: .8rem; text-transform: uppercase; letter-spacing: .07em; color: var(--game); margin: 18px 0 8px; font-weight: 800; }
.rule-card p, .rule-card li, .rule-card dd { color: #d3d3df; }
.rule-card ul { margin: 0; padding-left: 1.2em; }
.rule-card li { margin-bottom: .35em; }
.rule-gifts { margin: 0; display: grid; gap: 6px; }
.rule-gifts > div { display: grid; gap: 2px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); }
.rule-gifts dt { font-weight: 750; }
.rule-gifts dd { margin: 0; }
.rule-site { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: .92rem; }
.rules-foot { margin-top: 18px; }

/* ------------------------------------------------------------------ Pages de texte */
.prose { max-width: 760px; padding-top: 40px; padding-bottom: 56px; }
.prose h1 { font-size: clamp(1.8rem, 6vw, 2.5rem); font-weight: 850; }
.prose h2 { font-size: 1.2rem; margin-top: 1.8em; }
.prose p, .prose li { color: #d3d3df; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .35em; }
.prose .lead { font-size: 1.1rem; color: var(--muted); }

.message-page { display: grid; place-items: center; min-height: 56vh; text-align: center; }
.message-box { max-width: 460px; }
.message-code { font-size: clamp(4rem, 20vw, 7rem); font-weight: 900; line-height: 1; margin-bottom: .1em; letter-spacing: -.05em; }

/* ------------------------------------------------------------------ Pied de page */
.footer { border-top: 1px solid var(--line); margin-top: 24px; padding: 26px 0 calc(26px + env(safe-area-inset-bottom)); background: var(--bg-2); }
.footer-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; font-size: .9rem; }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 750; }
.footer nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.footer nav a { color: #cfcfdc; text-decoration: none; }
.footer nav a:hover { color: var(--text); text-decoration: underline; }
.footer-note { margin: 0; color: var(--muted); width: 100%; font-size: .82rem; }

/* ------------------------------------------------------------------ Discord (affiché seulement si un lien d'invitation existe) */
/* Blurple officiel #5865F2 pour le bouton (texte blanc : contraste 4,6:1) ; #9ba3ff, plus clair, pour les icônes sur fond sombre */
.discord-icon { flex: none; width: 20px; height: 20px; }
.discord-icon-lg { width: 30px; height: 30px; }
.top-discord {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex: none;
  min-width: 40px; height: 40px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); color: #cfcfdc;
  text-decoration: none; font-weight: 650; font-size: .92rem; white-space: nowrap;
}
.top-discord .discord-icon { color: #9ba3ff; }
.top-discord:hover { color: var(--text); border-color: rgba(88, 101, 242, .7); background: rgba(88, 101, 242, .14); }
.top-discord-txt { display: none; }
.footer-discord { display: inline-flex; align-items: center; gap: 6px; }
.footer-discord .discord-icon { width: 18px; height: 18px; color: #9ba3ff; }

.community {
  display: grid; gap: 18px; padding: 22px 20px; border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(88, 101, 242, .16), rgba(37, 244, 238, .05) 60%, rgba(254, 44, 85, .06)), var(--surface);
  border: 1px solid rgba(88, 101, 242, .35);
}
.community-head { display: flex; align-items: flex-start; gap: 14px; }
.community-head .section-title { margin-bottom: .25em; }
.community-logo { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: #5865f2; color: #fff; }
.community-lead { margin: 0; }
.community-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.community-list li { display: grid; gap: 2px; align-content: start; min-width: 0; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(10, 10, 18, .45); border: 1px solid var(--line); }
.community-list strong { font-weight: 750; }
.community-list span { color: #c9c9d8; font-size: .92rem; }
.community-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0; }
.btn-discord { background: #5865f2; border-color: transparent; color: #fff; }
.btn-discord:hover { background: #4752c4; color: #fff; border-color: transparent; box-shadow: 0 6px 24px rgba(88, 101, 242, .35); }

.discord-hint {
  display: flex; align-items: center; gap: 10px; margin: 22px 0 0; padding: 12px 14px; border-radius: var(--radius-sm);
  background: rgba(88, 101, 242, .08); border: 1px solid rgba(88, 101, 242, .28); color: #c9c9d8; font-size: .92rem;
}
.discord-hint-icon { flex: none; display: grid; place-items: center; color: #9ba3ff; }
.discord-hint a { color: #b9bfff; font-weight: 650; }
.discord-hint a:hover { color: #fff; }
.creator-discord { padding-bottom: 8px; }
/* Petit téléphone, hors accueil : comme « Règles », l'icône Discord de la barre du haut laisse la place à la recherche
   (le lien reste dans le pied de page et dans le rappel en bas des règles et des pages créateur) */
@media (max-width: 429px) {
  body:not(.home) .top-discord { display: none; }
}

@media (min-width: 640px) {
  .top-discord { padding: 0 14px 0 12px; }
  .top-discord-txt { display: inline; }
  .community { padding: 28px; }
  .community-list { grid-template-columns: repeat(2, 1fr); }
  /* 5 cartes : la dernière prend 2 cases (2 + 2 + 1 large à 2 colonnes, 3 + 2 à 3 colonnes), sans case vide */
  .community-list li:last-child { grid-column: span 2; }
}
@media (min-width: 980px) {
  .community-list { grid-template-columns: repeat(3, 1fr); }
}

/* ------------------------------------------------------------------ Écrans plus larges */
@media (min-width: 560px) {
  .creator-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-in { grid-template-columns: auto 1fr auto; }
  .profile-tiktok { grid-column: auto; justify-self: end; }
}
@media (min-width: 680px) {
  .rule-gifts > div { grid-template-columns: minmax(150px, 30%) 1fr; gap: 12px; align-items: baseline; }
  .live-note { width: auto; }
  .board .c-wide { display: table-cell; }
  .player-extra { display: none; }
  .lbl-short { display: none; }
  .lbl-long { position: static; width: auto; height: auto; overflow: visible; clip: auto; }
  .board td { padding: 10px 12px; }
  .board th { padding: 12px; }
}
@media (min-width: 820px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { padding: 22px; }
  .step-num { position: static; margin-bottom: 14px; }
  .hero { padding: 92px 0 70px; }
  .avatar-xl { width: 120px; height: 120px; --s: 120px; }
  .profile { padding: 54px 0 30px; }
  .profile-in { gap: 24px 28px; }
}
@media (min-width: 980px) {
  .rules { grid-template-columns: 1fr 1fr; align-items: start; }
  .creator-grid { grid-template-columns: repeat(3, 1fr); }
  .board-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
  .board-side { position: sticky; top: 80px; padding-top: 6px; }
  .find { max-width: 520px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
