/* Board Wipe — retouches propres à la version publique (chargé après platform.css).
   Les fichiers de base (game.css, lobby.css…) ne sont pas modifiés. */

/* Pages Profil / Mes decks / Temps de jeu… : laisse la place à la pastille du
   compte (en haut à gauche) pour qu'elle ne colle pas au bouton « Retour ». */
.platform-screen { padding-top: 4.6rem; }

/* Interrupteur (remplace la case à cocher native) */
.bw-switch-row { display: flex; align-items: flex-start; gap: .8rem; cursor: pointer; padding: .5rem 0; color: var(--text-dim); }
.bw-switch { position: relative; flex: 0 0 auto; width: 38px; height: 22px; margin-top: 2px; }
.bw-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.bw-switch-track { position: absolute; inset: 0; border-radius: 22px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); transition: background .15s, border-color .15s; }
.bw-switch-track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #cfc8e6; transition: transform .15s, background .15s; }
.bw-switch input:checked + .bw-switch-track { background: rgba(226,192,105,.28); border-color: rgba(226,192,105,.7); }
.bw-switch input:checked + .bw-switch-track::after { transform: translateX(16px); background: #e2c069; }
.bw-switch input:focus-visible + .bw-switch-track { outline: 2px solid rgba(226,192,105,.7); outline-offset: 2px; }
.bw-switch-text { font-size: .85rem; line-height: 1.35; }
.bw-switch-text small { display: block; margin-top: 2px; font-size: .72rem; opacity: .6; }

/* ═══ Fenêtre « Nouvelle table » ═══════════════════════════════════════ */
.bw-modal { position: fixed; inset: 0; z-index: 9999; background: rgba(5,4,12,.72); backdrop-filter: blur(3px); align-items: center; justify-content: center; }
.bw-modal-box { width: min(460px, 92vw); padding: 1.8rem 1.8rem 1.5rem; background: #0f0c1d; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; box-shadow: 0 24px 60px rgba(0,0,0,.55); }
.bw-modal-box h2 { margin: 0 0 .35rem; font-family: 'Cinzel', serif; font-size: 1.25rem; font-weight: 600; letter-spacing: .04em; color: #e7e3f3; }
.bw-modal-sub { margin: 0 0 1.3rem; font-size: .85rem; color: #9a94b8; line-height: 1.45; }
.bw-seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin-bottom: 1.5rem; }
.bw-seg button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: .7rem .9rem; background: transparent; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; color: #cfc8e6; cursor: pointer; font-family: inherit; text-align: left; transition: border-color .15s, background .15s; }
.bw-seg button b { font-size: .95rem; font-weight: 600; letter-spacing: .02em; }
.bw-seg button span { font-size: .74rem; color: #8a84a8; }
.bw-seg button:hover { border-color: rgba(255,255,255,.3); }
.bw-seg button.on { border-color: #e2c069; background: rgba(226,192,105,.08); color: #fff; }
.bw-seg button.on span { color: #c9b27a; }
.bw-modal-actions { display: flex; justify-content: flex-end; gap: .6rem; }
.bw-btn-ghost, .bw-btn-main { font-family: inherit; font-size: .88rem; font-weight: 600; border-radius: 7px; padding: .6rem 1.1rem; cursor: pointer; }
.bw-btn-ghost { background: transparent; border: 1px solid rgba(255,255,255,.16); color: #cfc8e6; }
.bw-btn-ghost:hover { border-color: rgba(255,255,255,.35); color: #fff; }
.bw-btn-main { background: #e2c069; border: 1px solid #e2c069; color: #1a1405; }
.bw-btn-main:hover { background: #ecd07f; }
.bw-btn-sm { padding: .4rem .8rem; font-size: .78rem; font-weight: 500; }

/* ═══ Salle (écran d'attente) ═══════════════════════════════════════════
   Même esprit que l'accueil : pas de cadres dorés, séparateurs fins. */
@media (min-width: 769px) {
  #screen-lobby .lobby-layout { grid-template-columns: 340px minmax(0, 1fr) !important; gap: 2.5rem; max-width: 1080px; }
}
#screen-lobby { padding-top: 4.6rem; }
#screen-lobby .room-header,
#screen-lobby #game-mode-panel,
#screen-lobby .deck-panel,
#screen-lobby #my-decks-panel {
  background: transparent; border: 0; box-shadow: none; border-radius: 0;
}
#screen-lobby .room-header { justify-content: flex-start !important; padding: 0 0 1.1rem; border-bottom: 1px solid rgba(255,255,255,.09); flex-wrap: wrap; gap: .6rem; }
#screen-lobby .room-label { font-size: .68rem; }
#screen-lobby .room-code { font-size: 2rem; letter-spacing: .28em; text-shadow: none; }
#screen-lobby .room-header .btn-copy { font-family: 'Inter', sans-serif; font-size: .78rem; padding: .4rem .75rem; white-space: nowrap; background: transparent; border: 1px solid rgba(255,255,255,.16); border-radius: 6px; color: #cfc8e6; }
#screen-lobby .room-header .btn-copy:hover { border-color: rgba(226,192,105,.7); color: #e2c069; }
#screen-lobby #btn-delete-lobby { color: #e58a8a; border-color: rgba(229,138,138,.35); }
#screen-lobby #btn-delete-lobby:hover { border-color: #e58a8a; color: #ff9d9d; }

#screen-lobby #game-mode-panel { padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,.09); }
#screen-lobby #game-mode-panel > div:first-child,
#screen-lobby #turn-timer-panel > div:first-child { font-family: 'Inter', sans-serif; font-size: .68rem !important; font-weight: 600; letter-spacing: .1em; color: #8a84a8 !important; }
#screen-lobby .game-mode-btn.active { background: rgba(226,192,105,.08) !important; border-color: rgba(226,192,105,.55) !important; }
#screen-lobby .game-mode-btn small, #screen-lobby .game-mode-btn span { display: none; } /* « 99 cartes · Singleton · Légendaire » : règle de base du format, pas un choix */
#screen-lobby .timer-btn { background: transparent !important; border: 1px solid rgba(255,255,255,.14) !important; color: #9a94b8 !important; }
#screen-lobby .timer-btn.active { background: rgba(226,192,105,.08) !important; border-color: rgba(226,192,105,.55) !important; color: #e2c069 !important; }

#screen-lobby .player-count { text-align: left; margin: 1rem 0 .2rem; font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: #8a84a8; }
#screen-lobby .players-list { gap: 0; }
#screen-lobby .player-card { background: transparent; border: 0; border-bottom: 1px solid rgba(255,255,255,.07); border-radius: 0; box-shadow: none; min-height: 64px; }
#screen-lobby .player-card.is-ready { box-shadow: none; }
#screen-lobby .player-card.is-ready .player-name::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #5fd08a; }
#screen-lobby .player-art { width: 44px; min-width: 44px; height: 44px; align-self: center; border-radius: 50%; overflow: hidden; background: rgba(255,255,255,.06); }
#screen-lobby .player-art-placeholder { font-size: 1rem; opacity: .6; font-family: 'Inter', sans-serif; font-weight: 600; }
#screen-lobby .player-info { padding: .6rem .9rem; }
#screen-lobby .badge-host, #screen-lobby .badge-me { border: 0; background: rgba(255,255,255,.07); color: #b8b2d0; border-radius: 3px; }
#screen-lobby .badge-host { color: #e2c069; background: rgba(226,192,105,.1); }
/* Places libres : une simple ligne en retrait, pas une grosse carte */
#screen-lobby .player-card.empty, #screen-lobby .player-slot-empty, #screen-lobby .slot-empty { min-height: 52px; opacity: .45; }
#screen-lobby .lobby-hint { text-align: left; margin-top: 1.2rem; }

/* Onglets Mon deck / Cartes bannies */
.room-tabs { display: flex; gap: 1.6rem; border-bottom: 1px solid rgba(255,255,255,.09); }
.room-tab { background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: .3rem 0 .75rem; font-family: 'Inter', sans-serif; font-size: .9rem; font-weight: 500; color: #8a84a8; cursor: pointer; letter-spacing: .01em; }
.room-tab:hover { color: #e7e3f3; }
.room-tab.active { color: #e2c069; border-bottom-color: #e2c069; }
.room-tab-count { font-weight: 400; opacity: .8; }
#screen-lobby .deck-panel { padding: 1.2rem 0 0; }
#screen-lobby .deck-panel .panel-title { display: none; }
#screen-lobby #my-decks-panel { padding: 0 0 .5rem; }
#screen-lobby #my-decks-panel > div:first-child > div:first-child { color: #8a84a8 !important; }

/* Cartes bannies */
.bans-panel[hidden] { display: none !important; }
.bans-intro { margin: 0 0 1.2rem; font-size: .84rem; color: #9a94b8; line-height: 1.5; }
.bans-block { margin-bottom: 1.3rem; display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.bans-label { font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #8a84a8; }
.bans-panel input[type="search"], .bans-panel input[type="text"], .bans-panel select, .bans-panel textarea {
  width: 100%; box-sizing: border-box; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.14); border-radius: 6px; color: #e7e3f3; padding: .6rem .75rem; font-family: inherit; font-size: .86rem; outline: none;
}
.bans-panel textarea { resize: vertical; min-height: 84px; }
.bans-panel input:focus, .bans-panel select:focus, .bans-panel textarea:focus { border-color: rgba(226,192,105,.6); }
.bans-panel select option { background: #14110c; }
.bans-profile-row { display: flex; gap: .5rem; width: 100%; align-items: center; flex-wrap: wrap; }
.bans-profile-row select, .bans-profile-row input { flex: 1 1 180px; width: auto; }
.bans-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: .6rem; width: 100%; }
.bans-hint { grid-column: 1 / -1; font-size: .8rem; color: #8a84a8; padding: .3rem 0; }
.ban-result { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 0; background: none; border: 0; cursor: pointer; color: #cfc8e6; font-family: inherit; text-align: left; }
.ban-result img { width: 100%; aspect-ratio: 488 / 680; object-fit: cover; border-radius: 6px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); transition: transform .12s, border-color .12s; }
.ban-result:hover img { transform: translateY(-2px); border-color: rgba(226,192,105,.7); }
.ban-result span { font-size: .72rem; line-height: 1.2; }
.ban-result em { position: absolute; top: 6px; left: 6px; font-style: normal; font-size: .66rem; font-weight: 600; background: rgba(0,0,0,.75); color: #e58a8a; padding: 2px 6px; border-radius: 3px; }
.ban-result.is-banned { cursor: default; } .ban-result.is-banned img { opacity: .4; filter: grayscale(.7); }
.bans-list-head { display: flex; align-items: baseline; justify-content: space-between; margin: .4rem 0 .6rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.09); font-size: .9rem; font-weight: 600; color: #e7e3f3; }
.bans-clear { background: none; border: 0; color: #9a94b8; font-size: .78rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-family: inherit; }
.bans-clear:hover { color: #e58a8a; }
.bans-list { display: flex; flex-wrap: wrap; gap: .45rem; }
.ban-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .35rem .3rem .65rem; font-size: .8rem; color: #e7e3f3; background: rgba(229,138,138,.09); border: 1px solid rgba(229,138,138,.28); border-radius: 999px; }
#bans-host-tools[style*="display: none"] ~ .bans-list-head { border-top: 0; padding-top: 0; }
.ban-chip:not(:has(.ban-chip-x)) { padding-right: .65rem; }
.ban-chip-x { background: none; border: 0; color: #e58a8a; font-size: 1rem; line-height: 1; cursor: pointer; padding: 0 .3rem; border-radius: 50%; }
.ban-chip-x:hover { color: #fff; background: rgba(229,138,138,.35); }
.bans-msg { min-height: 1.2em; margin: .8rem 0 0; font-size: .8rem; }
.bans-msg.ok { color: #8fd9a8; } .bans-msg.err { color: #ff8a80; }

/* Correctifs */
.deck-panel[hidden] { display: none !important; }
.bw-switch-row, .bw-switch-row * { text-transform: none; letter-spacing: normal; font-family: 'Inter', sans-serif; }
.bw-switch-row { font-size: .86rem; color: #cfc8e6; font-weight: 500; }
#screen-lobby .room-header > div:first-child { flex: 1 1 100%; }
#screen-lobby .room-header .btn-copy { flex: 0 0 auto; }
#screen-lobby #game-mode-panel, #screen-lobby #my-decks-panel { background: transparent !important; border: 0 !important; border-radius: 0 !important; }
#screen-lobby #game-mode-panel { border-bottom: 1px solid rgba(255,255,255,.09) !important; padding-left: 0 !important; padding-right: 0 !important; }
#screen-lobby #my-decks-panel { padding-left: 0 !important; padding-right: 0 !important; }
#screen-lobby #game-mode-panel .game-mode-btn { background: transparent; }

/* Éditeur : « Commandants similaires » réductible, note sous le budget */
.de-card-toggle { width: auto !important; height: auto !important; padding: .2rem .6rem !important; font-size: .72rem !important; border: 1px solid rgba(255,255,255,.14) !important; border-radius: 5px; letter-spacing: 0; }
#de-similar-commanders-card.is-collapsed #de-similar-commanders { display: none; }
#de-similar-commanders-card.is-collapsed .de-mini-title-row { margin-bottom: 0; }
.de-stats-note { margin-top: .35rem; font-size: .7rem; color: #8a84a8; text-align: right; }

/* Pastille « Bêta » à côté du nom du site */
.logo-title { position: relative; display: inline-block; }
.beta-tag { position: absolute; left: 100%; top: 0; margin-left: .55rem; font-family: 'Inter', sans-serif; font-size: .58rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: #e2c069; border: 1px solid rgba(226,192,105,.5); border-radius: 4px; padding: .12rem .4rem; line-height: 1.3; -webkit-text-fill-color: #e2c069; text-shadow: none; }

/* ═══ Champ de la fenêtre « Nouvelle table » ═══════════════════════════ */
.bw-field-label { display: block; margin: 1.2rem 0 .4rem; font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #8a84a8; }
.bw-field-label span { text-transform: none; letter-spacing: 0; font-weight: 400; opacity: .8; }
.bw-field { width: 100%; box-sizing: border-box; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.14); border-radius: 6px; color: #e7e3f3; padding: .6rem .75rem; font-family: inherit; font-size: .9rem; outline: none; }
.bw-modal-actions { margin-top: 1.4rem; }
.bw-field:focus { border-color: rgba(226,192,105,.7); }

/* ═══ Cases à cocher : fini les carrés blancs ═════════════════════════ */
input[type="checkbox"]:not(.bw-switch input) {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; margin: 0; flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.28); border-radius: 4px; background: rgba(255,255,255,.05);
  display: inline-grid; place-content: center; cursor: pointer; vertical-align: middle; transition: background .12s, border-color .12s;
}
input[type="checkbox"]:not(.bw-switch input):hover { border-color: rgba(226,192,105,.7); }
input[type="checkbox"]:not(.bw-switch input):checked { background: #e2c069; border-color: #e2c069; }
input[type="checkbox"]:not(.bw-switch input):checked::after { content: ''; width: 4px; height: 8px; border: solid #14101f; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px,-1px); }
input[type="checkbox"]:not(.bw-switch input):focus-visible { outline: 2px solid rgba(226,192,105,.7); outline-offset: 2px; }
/* Places libres de la salle : discrètes, sans cadre clair */
#screen-lobby .player-card[style*="opacity: 0.3"] .player-art { background: rgba(255,255,255,.04); }
#screen-lobby .player-art-placeholder { color: #8a84a8; background: transparent !important; }
