/* Classement général (board.js) : fenêtre à la charte de l'accueil, podium des trois premiers, liste, verrou des invités. */
html.bd-lock-scroll, html.bd-lock-scroll body { overflow: hidden; }
.bd-back { position: fixed; inset: 0; z-index: 85; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(4,4,6,.78); -webkit-backdrop-filter: blur(8px) saturate(.8); backdrop-filter: blur(8px) saturate(.8); animation: bdFade .2s ease-out; }
@keyframes bdFade { from { opacity: 0; } to { opacity: 1; } }
.bd-box { position: relative; width: min(560px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; border-radius: 24px; color: #fff; border: 1px solid transparent;
  background: linear-gradient(180deg, #1d1d24, #111115) padding-box, linear-gradient(160deg, rgba(255,212,94,.9), rgba(255,255,255,.08) 35%, rgba(255,255,255,.06) 65%, rgba(255,77,109,.6)) border-box;
  box-shadow: 0 40px 100px rgba(0,0,0,.8), 0 0 0 1px rgba(0,0,0,.4), 0 0 80px rgba(255,196,70,.12); animation: bdPop .42s cubic-bezier(.2,1.25,.3,1); }
@keyframes bdPop { from { transform: translateY(26px) scale(.94); opacity: 0; } to { transform: none; opacity: 1; } }
.bd-x { position: absolute; top: 10px; right: 10px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; display: inline-flex; align-items: center; justify-content: center; transition: background .15s; }
.bd-x:hover { background: rgba(0,0,0,.75); }
.bd-head { flex: 0 0 auto; padding: 18px 20px 12px; background: radial-gradient(120% 140% at 50% 0%, rgba(255,196,70,.16), rgba(255,196,70,0) 70%); border-radius: 23px 23px 0 0; }
.bd-head small { display: block; font-size: 11px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: #ffd45e; margin-bottom: 4px; }
.bd-head h3 { margin: 0 0 12px; font-size: 24px; font-weight: 900; letter-spacing: -.4px; line-height: 1.08; }
.bd-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 14px; background: #0c0c10; border: 1px solid #26262e; }
.bd-tabs button { height: 38px; border-radius: 10px; font-size: 13px; font-weight: 800; color: #a1a1ad; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; transition: background .15s, color .15s; }
.bd-tabs button:hover { color: #fff; }
.bd-tabs button.active { color: #2b1a00; background: linear-gradient(180deg, #fff0b4, #ffc93c 55%, #d6960f); box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.bd-body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 6px 16px 16px; }

/* avatars : même anneau (cadre de niveau ou couleur du rang) que dans les jeux */
.bd-ava { position: relative; flex: 0 0 auto; display: block; width: 40px; height: 40px; padding: 3px; border-radius: 50%; background: var(--jz-rank, #ffd45e); }
.bd-ava[data-frame]:not([data-frame="rank"]) { background: var(--jz-fr); }
.bd-ava img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid #141418; }
.bd-ava.big { width: 68px; height: 68px; padding: 4px; }
.bd-ava.empty { background: #26262e; }

/* podium : deuxième, premier, troisième ; les marches montent à l'ouverture */
.bd-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 8px; padding: 26px 0 0; }
.bd-pod { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; animation: bdRise .5s cubic-bezier(.2,1.2,.3,1) both; }
.bd-pod.p1 { animation-delay: .12s; } .bd-pod.p2 { animation-delay: .04s; } .bd-pod.p3 { animation-delay: .2s; }
@keyframes bdRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.bd-pod.p1 .bd-ava.big { width: 84px; height: 84px; box-shadow: 0 0 0 4px rgba(255,212,94,.16), 0 0 34px rgba(255,212,94,.45); }
.bd-crown { position: absolute; top: -24px; left: 50%; width: 40px; height: 26px; margin-left: -20px; filter: drop-shadow(0 3px 6px rgba(0,0,0,.6)); animation: bdCrown 3s ease-in-out infinite; }
@keyframes bdCrown { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-3px) rotate(3deg); } }
.bd-medal { margin-top: -12px; z-index: 1; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 900; color: #2b1a00; border: 2px solid #141418; }
.bd-pod.p1 .bd-medal { background: linear-gradient(180deg, #fff2a8, #e0a100); } .bd-pod.p2 .bd-medal { background: linear-gradient(180deg, #f4f4f8, #9a9aa6); } .bd-pod.p3 .bd-medal { background: linear-gradient(180deg, #f0b98a, #b9692c); }
.bd-pod b { display: block; max-width: 100%; margin-top: 6px; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-pod small { display: block; max-width: 100%; font-size: 11px; font-weight: 700; color: #8a8a96; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-pod strong { display: block; margin-top: 4px; font-size: 16px; font-weight: 900; color: #ffd45e; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bd-pod em { display: block; font-style: normal; font-size: 11px; font-weight: 700; color: #b9b9c4; font-variant-numeric: tabular-nums; }
.bd-step { display: block; align-self: stretch; margin-top: 8px; border-radius: 12px 12px 0 0; background: linear-gradient(180deg, #2a2a33, #17171c); border: 1px solid #34343f; border-bottom: 0; }
.bd-pod.p1 .bd-step { height: 46px; background: linear-gradient(180deg, #4a3a10, #1c1808); border-color: rgba(255,212,94,.55); } .bd-pod.p2 .bd-step { height: 30px; } .bd-pod.p3 .bd-step { height: 18px; }
.bd-pod.me b { color: #ffe9a8; }
.bd-pod.free { opacity: .5; } .bd-pod.free strong { color: #6d6d7a; }
.bd-count { margin: 0; padding: 9px 0 10px; border-top: 1px solid #34343f; text-align: center; color: #8a8a96; font-size: 12px; font-weight: 700; }

/* liste */
.bd-list, .bd-ghosts { display: flex; flex-direction: column; gap: 6px; }
.bd-row { display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 7px 12px 7px 8px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.07); }
.bd-pos { flex: 0 0 26px; text-align: center; font-style: normal; font-size: 14px; font-weight: 900; color: #8a8a96; font-variant-numeric: tabular-nums; }
.bd-who { flex: 1 1 auto; min-width: 0; }
.bd-who b { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-who small { display: block; font-size: 11.5px; font-weight: 600; color: #8a8a96; }
.bd-you { flex: 0 0 auto; padding: 2px 7px; border-radius: 999px; background: linear-gradient(180deg, #ff2f55, #c40030); font-size: 10px; font-weight: 900; letter-spacing: .4px; }
.bd-val { flex: 0 0 auto; text-align: right; }
.bd-val strong { display: block; font-size: 14.5px; font-weight: 900; color: #ffd45e; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bd-val em { display: block; font-style: normal; font-size: 11px; font-weight: 700; color: #b9b9c4; font-variant-numeric: tabular-nums; }
.bd-row.me { border-color: rgba(255,77,109,.6); background: rgba(229,5,57,.1); }
.bd-mine { position: sticky; bottom: -16px; z-index: 2; display: flex; align-items: center; gap: 10px; margin: 10px -16px -16px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, #2a1016, #1a0a0e); border-top: 1px solid rgba(255,77,109,.6); border-radius: 0 0 23px 23px; }
.bd-mine span { font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: #ff9bb0; }
.bd-mine b { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.bd-mine em { margin-left: auto; font-style: normal; font-size: 12.5px; font-weight: 700; color: #ffd45e; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bd-note, .bd-fine { margin: 10px 0 0; text-align: center; color: #74747f; font-size: 11.5px; line-height: 1.45; }
.bd-mine + .bd-fine { display: none; }

/* invités : lignes factices floutées (de simples barres grises) sous un verrou */
.bd-locked { position: relative; border-radius: 16px; overflow: hidden; }
.bd-ghosts { filter: blur(4px); opacity: .9; pointer-events: none; user-select: none; -webkit-user-select: none; }
.bd-row.ghost .bd-who b, .bd-row.ghost .bd-who small, .bd-row.ghost .bd-val strong { display: block; height: 11px; border-radius: 6px; background: #4a4a57; }
.bd-row.ghost .bd-who small { height: 8px; margin-top: 6px; background: #34343f; }
.bd-row.ghost .bd-val strong { background: #8a6a1c; margin-left: auto; }
.bd-lock { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; text-align: center; background: radial-gradient(90% 70% at 50% 50%, rgba(17,17,21,.88), rgba(17,17,21,.42) 100%); }
.bd-lock-ico { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #2b1a00; background: linear-gradient(180deg, #fff2a8, #e0a100); box-shadow: 0 8px 22px rgba(255,196,70,.35); }
.bd-lock b { font-size: 17px; font-weight: 900; }
.bd-lock p { margin: 0; max-width: 330px; color: #c9c9d2; font-size: 13px; line-height: 1.45; }
.bd-lock small { color: #ffd45e; font-size: 12px; font-weight: 800; }
.bd-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.bd-btn { min-height: 44px; padding: 0 16px; border-radius: 13px; border: 1px solid #3a3a46; background: rgba(255,255,255,.06); color: #fff; font-weight: 800; font-size: 13.5px; transition: transform .12s, filter .15s, border-color .15s; }
.bd-btn:hover { border-color: #6a6a78; } .bd-btn:active { transform: scale(.98); }
.bd-btn.primary { background: linear-gradient(180deg, #ff2f55, #c40030); border-color: #ff5c7a; box-shadow: 0 10px 24px rgba(229,5,57,.4), inset 0 1px 0 rgba(255,255,255,.35); }
.bd-btn.primary:hover { filter: brightness(1.08); }
.bd-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 240px; text-align: center; color: #b9b9c4; }
.bd-state p { margin: 0; max-width: 320px; font-size: 14px; line-height: 1.5; }
.bd-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.14); border-top-color: #ffd45e; animation: bdSpin .8s linear infinite; }
@keyframes bdSpin { to { transform: rotate(360deg); } }

@media (max-width: 560px) {
  .bd-back { padding: 0; align-items: flex-end; }
  .bd-box { width: 100%; max-height: 94dvh; border-radius: 24px 24px 0 0; animation-name: bdSheet; }
  .bd-head { padding: 16px 16px 10px; } .bd-head h3 { font-size: 21px; }
  .bd-body { padding: 4px 12px calc(14px + env(safe-area-inset-bottom)); }
  .bd-ava.big { width: 58px; height: 58px; } .bd-pod.p1 .bd-ava.big { width: 72px; height: 72px; }
  .bd-pod b { font-size: 13px; } .bd-pod strong { font-size: 14.5px; }
  .bd-mine { margin: 10px -12px calc(-14px - env(safe-area-inset-bottom)); border-radius: 0; bottom: calc(-14px - env(safe-area-inset-bottom)); }
}
@keyframes bdSheet { from { transform: translateY(100%); } to { transform: none; } }
@media (orientation: landscape) and (max-height: 520px) {
  .bd-back { padding: 8px; align-items: center; }
  .bd-box { width: min(760px, 100%); max-height: calc(100dvh - 16px); border-radius: 20px; animation-name: bdPop; }
  .bd-head { display: flex; align-items: center; gap: 14px; padding: 10px 56px 8px 16px; } .bd-head small { display: none; } .bd-head h3 { margin: 0; font-size: 18px; white-space: nowrap; }
  .bd-tabs { flex: 1 1 auto; } .bd-tabs button { height: 34px; }
  .bd-podium { padding-top: 22px; } .bd-ava.big { width: 50px; height: 50px; } .bd-pod.p1 .bd-ava.big { width: 60px; height: 60px; }
  .bd-pod.p1 .bd-step { height: 26px; } .bd-pod.p2 .bd-step { height: 18px; } .bd-pod.p3 .bd-step { height: 10px; }
  .bd-mine { border-radius: 0 0 19px 19px; }
}
@media (prefers-reduced-motion: reduce) { .bd-back, .bd-box, .bd-pod, .bd-crown, .bd-spin { animation: none !important; } }
