/* =========================================================================
   Versus : page salon de la party
   ========================================================================= */
.vs-section { padding-top: 40px; }
.vs-box { padding: 18px 20px; }
.vs-box h2 { font-size: 1.4rem; margin: 0 0 .5em; }
.vs-home { display: grid; gap: 8px 24px; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); align-items: start; margin-top: 24px; }
.vs-home .vs-catalog { grid-column: 1 / -1; }
.vs-grid { display: grid; gap: 8px 24px; grid-template-columns: minmax(260px, 340px) 1fr; align-items: start; margin-top: 24px; }
@media (max-width: 820px) { .vs-grid { grid-template-columns: 1fr; } }
.vs-side, .vs-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }

.vs-field { display: flex; flex-direction: column; gap: 4px; font-weight: 700; margin-bottom: 10px; }
.vs-field span { font-size: .9rem; color: var(--ink-soft); }
.vs-field input, .vs-field select {
  font: inherit; font-weight: 700; padding: 8px 10px; border: 3px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--ink); min-width: 0;
}
.vs-field select:disabled { opacity: .7; }
.vs-join { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-top: 12px; }
.vs-join .vs-field { margin: 0; flex: 1 1 120px; }
.vs-join input { text-transform: uppercase; letter-spacing: .3em; font-size: 1.2rem; }
.vs-err { color: var(--berry); font-weight: 800; }
.vs-pick { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.vs-av { font-size: 22px; width: 38px; height: 38px; border-radius: 10px; border: 3px solid transparent; background: var(--panel-2); cursor: pointer; }
.vs-col { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--panel); background: var(--pc); cursor: pointer; box-shadow: 0 0 0 2px var(--line); }
.vs-av.is-on { border-color: var(--orange); }
.vs-col.is-on { box-shadow: 0 0 0 3px var(--ink); transform: scale(1.12); }
.vs-how ol { padding-left: 1.2em; margin: 0; }
.vs-how li + li { margin-top: .4em; }

.vs-code { text-align: center; }
.vs-kicker { margin: 0; text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 800; color: var(--orange-dk); }
:root[data-theme="dark"] .vs-kicker { color: var(--orange-2); }
.vs-big { font: 900 3rem/1.1 "Londrina", "Nunito", sans-serif; letter-spacing: .15em; margin: .1em 0 .2em; }
.vs-code .btn-row { justify-content: center; }
.vs-status { font-weight: 700; color: var(--ink-soft); }
.vs-note { font-size: .9rem; color: var(--ink-soft); margin: .4em 0; }
.vs-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 800; color: var(--focus); text-decoration: underline; cursor: pointer; }

.vs-players { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.vs-player { position: relative; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: var(--panel-2); border-left: 6px solid var(--pc); }
.vs-player.is-off { opacity: .55; }
.vs-pav { font-size: 24px; }
.vs-pname { flex: 1; font-weight: 800; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.vs-pname small { font-weight: 600; color: var(--ink-soft); }
.vs-pts { font: 900 1.4rem "Londrina", "Nunito", sans-serif; }
.vs-pts small { font-size: .8rem; color: var(--ink-soft); }
.vs-pact { display: flex; gap: 2px; }
.vs-mini { border: 0; background: transparent; cursor: pointer; font-size: 14px; padding: 2px 4px; opacity: .6; }
.vs-mini:hover { opacity: 1; }
.vs-bubble { position: absolute; right: -6px; top: -14px; font-size: 28px; opacity: 0; pointer-events: none; }
.vs-bubble.is-on { animation: vs-bub 2.6s ease-out; }
@keyframes vs-bub { 0% { opacity: 0; transform: scale(.4) translateY(10px); } 12% { opacity: 1; transform: scale(1.2); } 20% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }

.vs-formats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.vs-chipbtn { font: inherit; font-weight: 800; padding: 6px 12px; border-radius: 999px; border: 3px solid var(--line); background: var(--panel-2); color: var(--ink); cursor: pointer; }
.vs-chipbtn.is-on { background: var(--orange); color: #2b1709; }
.vs-chipbtn:disabled { cursor: default; }
.vs-chipbtn:disabled:not(.is-on) { opacity: .6; }
.vs-teamedit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.vs-team { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 6px; border-radius: 10px; background: var(--panel-2); }
.vs-team small { width: 100%; font-weight: 800; color: var(--ink-soft); font-size: .75rem; text-transform: uppercase; }
.vs-tchip { cursor: pointer; font-family: inherit; }
.vs-tchip:disabled { cursor: default; }
.vs-roulette { margin-top: 12px; padding: 14px; text-align: center; border-radius: 12px; background: var(--forest); color: #f6e7c8; font: 900 1.6rem "Londrina", "Nunito", sans-serif; }
.vs-roulette[hidden] { display: none; }
.vs-roulette.is-final { background: var(--orange); color: #2b1709; animation: pt-ban .5s; }

.vs-catalog { margin-top: 8px; }
.vs-cat-title { font-size: 1.5rem; margin: .4em 0 .3em; }
/* (anciennes cartes de modes remplacées par la liste compacte plus bas) */

.vs-live h2 { margin-bottom: .2em; }
.vs-livelist { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 4px; }
.vs-livelist li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 10px; border-left: 5px solid var(--pc); background: var(--panel-2); border-radius: 6px; font-weight: 700; }
.vs-champ { text-align: center; }
.vs-trophy { font-size: 64px; margin: 0; line-height: 1; }
.vs-hist { margin: 0; padding-left: 1.4em; }
.vs-hist li + li { margin-top: .3em; }

.vs-launch {
  position: fixed; inset: 0; z-index: 9600; display: grid; place-items: center; text-align: center;
  background: rgba(10, 8, 6, .75); color: #fdf3de; animation: pt-pop .3s;
}
.vs-launch p:first-child { font-size: 80px; margin: 0; }
.vs-launch h2 { font: 900 clamp(32px, 8vw, 64px) "Londrina", "Nunito", sans-serif; color: #ffd257; margin: 0; }
.vs-launch p { font-weight: 800; font-size: 1.2rem; }
.vs-bots { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; font-weight: 800; }
.vs-bots span { margin-right: 4px; }
.vs-bots .vs-chipbtn { padding: 4px 10px; font-size: .9rem; }

/* mobile : la prochaine manche juste après le code et les joueurs */
@media (max-width: 820px) {
  .vs-grid { display: flex; flex-direction: column; gap: 8px; }
  .vs-side, .vs-main { display: contents; }
  .vs-code { order: 1; } .vs-players-box { order: 2; } .vs-main > * { order: 3; } .vs-side > * { order: 4; }
}

/* ---------- champs : jamais plus larges que leur cadre ---------- */
.vs-box, .vs-side, .vs-main, .vs-home > * { min-width: 0; }
.vs-field input, .vs-field select { width: 100%; max-width: 100%; box-sizing: border-box; }
.vs-join .vs-field { min-width: 0; flex: 1 1 140px; }
.vs-join input { letter-spacing: .25em; }
.vs-field input::placeholder { color: var(--ink-soft); opacity: .8; }

/* ---------- liste des modes, compacte ---------- */
.vs-cat-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.vs-cat-n { color: var(--ink-soft); font-weight: 800; font-size: .9rem; }
.vs-empty { margin: 4px 0 16px; }
.vs-catalog .vs-game { margin: 0 0 14px; }
.vs-catalog .vs-game > summary { cursor: pointer; font-weight: 900; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; padding: 4px 0; list-style: none; }
.vs-catalog .vs-game > summary::-webkit-details-marker { display: none; }
.vs-catalog .vs-game > summary::after { content: "▾"; margin-left: auto; color: var(--ink-soft); }
.vs-catalog .vs-game:not([open]) > summary::after { content: "▸"; }
.vs-catalog .vs-game > summary small { color: var(--ink-soft); font-weight: 700; font-size: .8rem; }
.vs-catalog .vs-modes { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); }
.vs-catalog .vs-mode {
  display: flex; flex-direction: row; align-items: center; gap: 8px 12px; padding: 8px 12px; background: var(--panel);
  border: 2px solid var(--line); border-left: 6px solid var(--gc, var(--line)); border-radius: 8px; margin: 0;
}
.vs-mode-txt { flex: 1 1 auto; min-width: 0; }
.vs-catalog .vs-mode h4 { margin: 0; font-size: 1rem; }
.vs-catalog .vs-mode p { margin: 2px 0 0; font-size: .9rem; color: var(--ink-soft); }
.vs-badges { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; }
.vs-badges li { font-size: .78rem; font-weight: 800; padding: 1px 7px; background: var(--panel-2); border-radius: 999px; white-space: nowrap; }
.vs-rules { margin-top: 4px; font-size: .88rem; }
.vs-rules > summary { cursor: pointer; font-weight: 800; color: var(--ink-soft); width: max-content; }
.vs-tip { font-style: italic; }
.vs-catalog .vs-mode .btn { flex: none; align-self: center; margin: 0; }
.vs-catalog .vs-mode.is-off { opacity: .55; }
@media (max-width: 520px) {
  .vs-catalog .vs-mode { flex-wrap: wrap; }
  .vs-catalog .vs-mode .btn { width: 100%; justify-content: center; }
}
