/* Teambooking : style commun des jeux. Tout est préfixé .tbj pour ne rien casser dans le thème. */
.tbj {
  --tbj-green: #0a3621;
  --tbj-green-2: #14532d;
  --tbj-lime: #b3f97b;
  --tbj-lime-soft: #eafcd9;
  --tbj-cream: #fbfdf6;
  --tbj-ink: #1f2522;
  --tbj-ink-2: #56605b;
  --tbj-line: #dfe6e1;
  --tbj-red: #c92a2a;
  --tbj-red-soft: #fff0f0;
  --tbj-radius: 14px;
  box-sizing: border-box;
  margin: 28px 0 36px;
  padding: 24px;
  background: var(--tbj-cream);
  border: 1px solid var(--tbj-line);
  border-radius: var(--tbj-radius);
  color: var(--tbj-ink);
  font-size: 16px;
  line-height: 1.5;
}
.tbj *, .tbj *::before, .tbj *::after { box-sizing: border-box; }
.tbj [hidden], .tbj[hidden] { display: none !important; }
.tbj-badge, .tbj-timer { justify-self: start; width: fit-content; }
.tbj h2, .tbj h3 { margin: 0 0 8px; line-height: 1.2; color: var(--tbj-green); text-wrap: balance; }
.tbj h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); }
.tbj h3 { font-size: 1.1rem; }
.tbj p { margin: 0 0 12px; }
.tbj-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 16px; }
.tbj-lead { color: var(--tbj-ink-2); margin: 0; }
.tbj-badge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--tbj-lime); color: var(--tbj-green); padding: 3px 9px; border-radius: 999px; }
.tbj-stack { display: grid; gap: 14px; }
.tbj-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tbj-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.tbj-label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 6px; color: var(--tbj-ink); }
.tbj-hint { font-size: .86rem; color: var(--tbj-ink-2); margin: 4px 0 0; }
.tbj-input, .tbj-select, .tbj-textarea {
  width: 100%; min-width: 0; padding: 10px 12px; font: inherit; color: var(--tbj-ink);
  background: #fff; border: 1.5px solid var(--tbj-line); border-radius: 10px;
}
.tbj-textarea { min-height: 120px; resize: vertical; }
.tbj-input:focus, .tbj-select:focus, .tbj-textarea:focus { outline: none; border-color: var(--tbj-green); box-shadow: 0 0 0 3px rgba(10, 54, 33, .15); }
.tbj-input.is-invalid, .tbj-select.is-invalid, .tbj-textarea.is-invalid { border-color: var(--tbj-red); box-shadow: 0 0 0 3px rgba(201, 42, 42, .15); }
.tbj-error { color: var(--tbj-red); background: var(--tbj-red-soft); border-radius: 10px; padding: 10px 12px; font-weight: 600; margin: 8px 0 0; }
.tbj-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; min-height: 44px;
  font: inherit; font-weight: 700; line-height: 1.1; text-decoration: none; cursor: pointer;
  color: #fff; background: var(--tbj-green); border: 2px solid var(--tbj-green); border-radius: 999px;
  transition: transform .08s ease, background .15s ease;
}
.tbj-btn:hover { background: var(--tbj-green-2); color: #fff; }
.tbj-btn:active { transform: translateY(1px); }
.tbj-btn:focus-visible, .tbj-chip:focus-visible, .tbj-icon-btn:focus-visible { outline: 3px solid var(--tbj-lime); outline-offset: 2px; }
.tbj-btn[disabled] { opacity: .5; cursor: not-allowed; }
.tbj-btn--lime { background: var(--tbj-lime); border-color: var(--tbj-lime); color: var(--tbj-green); }
.tbj-btn--lime:hover { background: #a2ef66; color: var(--tbj-green); }
.tbj-btn--ghost { background: transparent; color: var(--tbj-green); border-color: var(--tbj-line); }
.tbj-btn--ghost:hover { background: #fff; color: var(--tbj-green); border-color: var(--tbj-green); }
.tbj-btn--big { font-size: 1.1rem; padding: 14px 26px; min-height: 54px; }
.tbj-btn--small { padding: 6px 12px; min-height: 34px; font-size: .88rem; }
.tbj-icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0; width: 36px; height: 36px; flex: none; border-radius: 50%; border: 1.5px solid var(--tbj-line); background: #fff; color: var(--tbj-ink-2); font-size: 1.2rem; line-height: 1; cursor: pointer; }
.tbj-icon-btn[disabled] { opacity: .35; cursor: not-allowed; }
.tbj-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tbj-chip { padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--tbj-line); background: #fff; color: var(--tbj-ink); font: inherit; font-size: .92rem; font-weight: 600; cursor: pointer; }
.tbj-chip[aria-pressed="true"] { background: var(--tbj-green); border-color: var(--tbj-green); color: #fff; }
.tbj-card { background: #fff; border: 1px solid var(--tbj-line); border-radius: 12px; padding: 16px; }
.tbj-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.tbj-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid var(--tbj-line); border-radius: 10px; padding: 10px 12px; }
.tbj-list .tbj-name { font-weight: 700; overflow-wrap: anywhere; }
.tbj-teams { display: grid; gap: 8px; }
.tbj-team-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tbj-team-row .tbj-input { flex: 1 1 150px; width: auto; }
.tbj-team-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.tbj-divider { height: 1px; background: var(--tbj-line); margin: 18px 0; border: 0; }
.tbj-note { font-size: .86rem; color: var(--tbj-ink-2); }

/* Scène de jeu : grand affichage, partage d'écran, plein écran */
.tbj-stage { position: relative; background: var(--tbj-green); color: #fff; border-radius: var(--tbj-radius); padding: clamp(18px, 4vw, 40px); min-height: 320px; display: grid; gap: 18px; align-content: start; }
.tbj-stage h2, .tbj-stage h3 { color: #fff; }
.tbj-stage:focus { outline: none; }
.tbj-stage:focus-visible { outline: 3px solid var(--tbj-lime); outline-offset: 3px; }
.tbj-stage .tbj-btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.tbj-stage .tbj-btn--ghost:hover { background: rgba(255, 255, 255, .1); color: #fff; border-color: #fff; }
.tbj-stage-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; font-size: .9rem; opacity: .9; }
.tbj-big { font-size: clamp(1.5rem, 4.2vw, 2.8rem); font-weight: 800; line-height: 1.2; text-wrap: balance; }
.tbj-stage .tbj-hint { color: rgba(255, 255, 255, .75); }
.tbj-stage:fullscreen, .tbj-stage:-webkit-full-screen { border-radius: 0; min-height: 100vh; align-content: center; padding: 6vw; }
.tbj-stage:fullscreen .tbj-big { font-size: clamp(2rem, 5.5vw, 4.5rem); }
.tbj-pseudo-fs { position: fixed !important; inset: 0; z-index: 99999; border-radius: 0 !important; overflow: auto; }
.tbj-timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.4rem; background: rgba(255, 255, 255, .12); padding: 6px 14px; border-radius: 999px; }
.tbj-timer.is-low { background: #ffe066; color: var(--tbj-green); }
.tbj-scoreboard { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.tbj-score { background: rgba(255, 255, 255, .08); border: 2px solid rgba(255, 255, 255, .15); border-radius: 12px; padding: 10px 12px; display: grid; gap: 4px; }
.tbj-score .tbj-score-name { font-weight: 700; overflow-wrap: anywhere; }
.tbj-score .tbj-score-val { font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.tbj-score.is-buzzed { border-color: var(--tbj-lime); background: rgba(179, 249, 123, .18); }
.tbj-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.tbj-choice { background: rgba(255, 255, 255, .1); border: 2px solid rgba(255, 255, 255, .2); border-radius: 12px; padding: 12px 14px; font-size: clamp(1rem, 2.2vw, 1.4rem); font-weight: 700; }
.tbj-choice.is-good { background: var(--tbj-lime); color: var(--tbj-green); border-color: var(--tbj-lime); }
.tbj-choice.is-dim { opacity: .45; }
.tbj-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--tbj-green, #0a3621); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; opacity: 0; pointer-events: none; transition: all .2s ease; z-index: 100000; }
.tbj-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 600px) {
  .tbj { padding: 16px; margin: 20px 0 28px; }
  .tbj-btn { width: 100%; }
  .tbj-row .tbj-btn--small, .tbj-list .tbj-btn { width: auto; }
}
@media (prefers-reduced-motion: reduce) { .tbj *, .tbj-toast { transition: none !important; animation: none !important; } }
@media print {
  .tbj { border: 0; background: #fff; padding: 0; }
  .tbj-noprint, .tbj-toast { display: none !important; }
  .tbj-stage { background: #fff; color: #000; }
}
