/* BVPB — Résultats de tournoi : styles du HTML produit par assets/js/resultats.js.
   Chargé par tournois.html (modale) et par /admin/ (aperçu) : même rendu partout.
   Jetons avec repli, pour fonctionner avec ou sans bvpb.css. */

.res-empty { color: var(--bvpb-muted, #847E76); margin: 0; }
.res-muted { color: var(--bvpb-muted, #847E76); font-weight: 600; }
.res-title {
  font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--bvpb-muted, #847E76); margin: 18px 0 8px;
}
.res-title:first-child { margin-top: 0; }

/* Récapitulatif */
.res-recap {
  background: var(--bvpb-sand, #F7F4EF); border-radius: 14px; padding: 14px 16px; margin-bottom: 4px;
}
.res-recap__stats { display: flex; gap: 8px; }
.res-stat {
  flex: 1; background: #fff; border-radius: 10px; padding: 10px 8px; text-align: center; min-width: 0;
  box-shadow: 0 1px 2px rgba(46, 43, 40, 0.05);
}
.res-stat b { display: block; font-size: 1.4rem; line-height: 1.1; color: var(--bvpb-ink, #2E2B28); }
.res-stat span { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--bvpb-muted, #847E76); }
.res-recap__format { margin-top: 10px; font-weight: 800; color: var(--bvpb-ink, #2E2B28); font-size: 0.92rem; }
.res-teams { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.res-chip {
  display: inline-block; padding: 3px 10px; border-radius: 999px; background: #fff;
  border: 1px solid rgba(46, 43, 40, 0.12); font-size: 0.8rem; font-weight: 700; color: var(--bvpb-body, #4B4742);
}

/* Tableaux */
.res-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; border: 1px solid rgba(46, 43, 40, 0.1); background: #fff; }
.res-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; color: var(--bvpb-body, #4B4742); margin: 0; }
.res-table th, .res-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid rgba(46, 43, 40, 0.08); vertical-align: middle; }
.res-table thead th {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--bvpb-muted, #847E76);
  background: var(--bvpb-sand, #F7F4EF); border-bottom: 2px solid rgba(46, 43, 40, 0.1); white-space: nowrap;
}
.res-table tbody tr:last-child td { border-bottom: 0; }
.res-table tbody tr:hover td { background: rgba(242, 123, 53, 0.05); }
.res-col-rank { width: 52px; text-align: center !important; }
.res-col-num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.res-team b { color: var(--bvpb-ink, #2E2B28); }
.res-team small { display: block; color: var(--bvpb-muted, #847E76); font-size: 0.75rem; }
.res-row--podium td { background: rgba(242, 123, 53, 0.04); }
.res-rank {
  display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px;
  background: #ECE7DE; color: var(--bvpb-ink, #2E2B28); font-weight: 800; font-size: 0.85rem;
}
.res-rank--1 { background: linear-gradient(135deg, #F7D774, #E0B12E); color: #4d3800; box-shadow: 0 2px 6px rgba(224, 177, 46, 0.4); }
.res-rank--2 { background: linear-gradient(135deg, #E6E6E6, #B9B9B9); color: #333; }
.res-rank--3 { background: linear-gradient(135deg, #E3A876, #B8703A); color: #fff; }

/* Matchs par tour */
.res-matches { display: grid; gap: 12px; }
.res-stage { background: #fff; border: 1px solid rgba(46, 43, 40, 0.1); border-radius: 12px; padding: 10px 12px 4px; }
.res-stage__name { font-weight: 800; color: var(--bvpb-ink, #2E2B28); margin-bottom: 6px; }
.res-round__name {
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--bvpb-flame-deep, #DD5F17); margin: 8px 0 4px;
}
.res-match {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  padding: 7px 0; border-top: 1px solid rgba(46, 43, 40, 0.06); font-size: 0.92rem;
}
.res-match__team { min-width: 0; overflow-wrap: anywhere; color: var(--bvpb-body, #4B4742); }
.res-match__team--right { text-align: right; }
.res-match__team.is-winner { font-weight: 800; color: var(--bvpb-ink, #2E2B28); }
.res-match__team.is-winner::before { content: "🏆 "; font-size: 0.8em; }
.res-match__team--right.is-winner::before { content: ""; }
.res-match__team--right.is-winner::after { content: " 🏆"; font-size: 0.8em; }
.res-match__score {
  font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; padding: 2px 10px;
  border-radius: 999px; background: var(--bvpb-sand, #F7F4EF); color: var(--bvpb-ink, #2E2B28); font-size: 0.9rem;
}
.res-match__score i { font-style: normal; color: var(--bvpb-muted, #847E76); font-weight: 600; }

/* Bracket (brackets-viewer) */
.res-bracket {
  min-height: 320px; border: 1px solid rgba(46, 43, 40, 0.1); border-radius: 12px;
  padding: 12px; background: #fff; overflow: auto;
}
