/* TeamKit — 🏆 Tournois publics (17 oct. 2026 ; maquette validée par Kevin, onglet « Tournois »). Préfixe to-.
   Chargée par tournois.php et classements.php (bloc « 📅 Prochains tournois »), après css/classements.css (briques cl-).
   Grammaire de la maquette : cartes sombres, pastilles, places restantes en gros chiffre, tableau en colonnes, champion.
   Rien ne bouge sous prefers-reduced-motion ; rien ne dépasse à 360 px (le tableau défile dans son cadre). */

.to [hidden] { display: none !important; }
.to-muet { color: var(--text-muted); }
.to-petit { font-size: .9rem; }
.to-fil { font-size: .92rem; color: var(--text-muted); margin: 0 0 14px; overflow-wrap: anywhere; }
.to-fil a { text-decoration: none; }
.to-fil span { color: var(--text-secondary); }

/* ── Pastilles ── */
.to-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.to-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-weight: 700; font-size: .82rem; border: 1px solid var(--border-color); background: var(--bg-tertiary); color: var(--text-secondary); white-space: nowrap; }
.to-pill.to-live { color: #fff; background: rgba(255, 68, 68, .18); border-color: rgba(255, 68, 68, .5); }
.to-pill.to-cyan { color: var(--accent-primary); border-color: rgba(0, 240, 255, .4); background: rgba(0, 240, 255, .08); }
.to-pill.to-vio { color: #c99bff; border-color: rgba(123, 44, 191, .6); background: rgba(123, 44, 191, .15); }
.to-pill.to-gris { opacity: .75; }
.to-point { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-danger); animation: cl-pouls 1.6s infinite; }

/* ── Héros de la liste ── */
.to-heros { padding: 28px; border-radius: 20px; border: 1px solid rgba(0, 240, 255, .25); background: linear-gradient(160deg, rgba(0, 240, 255, .07), rgba(123, 44, 191, .12) 60%, rgba(10, 10, 15, .6)); position: relative; overflow: hidden; }
.to-heros h1 { font-size: clamp(1.5rem, 3.4vw, 2.3rem); margin: 12px 0 14px; line-height: 1.15; }
.to-heros-p { color: var(--text-secondary); max-width: 70ch; margin: 14px 0 0; font-size: 1.05rem; }
.to-puces { display: flex; gap: 6px; flex-wrap: wrap; margin: 22px 0 14px; }
.to-puce { border: 1px solid var(--border-color); background: var(--bg-secondary); color: var(--text-secondary); border-radius: 999px; padding: 6px 14px; font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; transition: .2s; }
.to-puce.on { color: var(--accent-primary); border-color: var(--accent-primary); background: rgba(0, 240, 255, .08); }

/* ── Cartes ── */
.to-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 14px; }
.to-carte { display: flex; flex-direction: column; gap: 9px; text-decoration: none !important; color: var(--text-primary) !important; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 14px; padding: 16px; transition: border-color .2s, transform .2s; min-width: 0; }
.to-carte:hover, .to-carte:focus-visible { border-color: rgba(0, 240, 255, .5); transform: translateY(-2px); }
.to-carte-tete { display: flex; gap: 12px; align-items: center; min-width: 0; }
.to-gros-ic { font-size: 30px; width: 54px; height: 54px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-tertiary); flex: 0 0 auto; }
.to-carte-t { display: grid; min-width: 0; }
.to-carte-t b { font-family: var(--font-display); font-size: .95rem; line-height: 1.25; overflow-wrap: anywhere; }
.to-carte-t small { color: var(--text-secondary); }
.to-info { font-size: .95rem; color: var(--text-secondary); }
.to-jauge-l { display: grid; gap: 4px; }
.to-jauge { height: 7px; border-radius: 4px; background: var(--bg-tertiary); overflow: hidden; }
.to-jauge i { display: block; height: 100%; background: var(--gradient-primary); border-radius: 4px; }
.to-rec { font-size: .9rem; color: #ffd23f; }

/* ── Fiche ── */
.to-fiche { border-radius: 20px; border: 1px solid rgba(0, 240, 255, .3); background: var(--bg-card); overflow: hidden; }
.to-fiche-banniere { padding: 24px; background: linear-gradient(120deg, rgba(0, 240, 255, .16), rgba(123, 44, 191, .32)); display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.to-ic-xl { font-size: 48px; width: 84px; height: 84px; border-radius: 18px; background: rgba(10, 10, 15, .55); border: 1px solid rgba(255, 255, 255, .12); }
.to-fb-c { flex: 1; min-width: 0; }
.to-fb-c h1 { font-size: clamp(1.25rem, 2.6vw, 1.8rem); margin: 8px 0 4px; overflow-wrap: anywhere; }
.to-fiche-corps { display: grid; grid-template-columns: 1fr 1.5fr; gap: 24px; padding: 22px; }
.to-col { min-width: 0; }
.to-infos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.to-infos div { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 10px; padding: 8px 12px; min-width: 0; }
.to-infos span { display: block; font-size: .82rem; color: var(--text-muted); }
.to-infos b { font-size: .95rem; overflow-wrap: anywhere; }
.to-restant { display: flex; align-items: baseline; gap: 10px; margin: 14px 0 4px; flex-wrap: wrap; }
.to-restant-n { font-family: var(--font-display); font-weight: 900; font-size: 2.9rem; line-height: 1; background: var(--gradient-primary); -webkit-background-clip: text; background-clip: text; color: transparent; }
.to-restant-n.to-orange { background: none; color: var(--accent-warning); }
.to-restant span:last-child { font-weight: 700; font-size: 1.1rem; color: var(--text-secondary); }
.to-h3 { font-family: var(--font-display); font-size: .95rem !important; margin: 22px 0 10px !important; color: var(--text-primary); }
.to-h3 small { color: var(--text-muted); font-family: inherit; }
.to-h3-0 { margin-top: 0 !important; }
.to-inscrits { display: flex; flex-wrap: wrap; gap: 6px; }
.to-av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: #fff;
  background: linear-gradient(135deg, hsl(var(--h, 190) 70% 45%), hsl(calc(var(--h, 190) + 40) 60% 30%)); border: 1px solid rgba(255, 255, 255, .18); }
.to-av-libre { background: transparent; border: 1px dashed #44445a; color: #55556a; }
.to-av-moi { border-color: var(--accent-success); box-shadow: 0 0 12px rgba(0, 255, 136, .5); }
.to-av-forfait { opacity: .4; }
.to-liste { margin-top: 8px; color: var(--text-secondary); }
.to-liste summary { cursor: pointer; font-weight: 700; color: var(--accent-primary); }
.to-noms { margin: 8px 0 0; padding-left: 1.2em; columns: 2; column-gap: 18px; }
.to-noms li { break-inside: avoid; overflow-wrap: anywhere; }
.to-noms small { color: var(--text-muted); }
.to-moi { color: var(--accent-success); font-weight: 700; }
.to-action { margin-top: 18px; display: grid; gap: 10px; justify-items: start; }
.to-action .cl-btn { justify-content: center; }
.to-inscrire, .to-large, .to-jouer { width: 100%; font-size: 1.1rem; padding: 14px 18px; justify-content: center; }
.to-petit.cl-btn { padding: 8px 14px; font-size: .95rem; }
.to-boite { width: 100%; padding: 14px; border-radius: 12px; background: var(--bg-secondary); border: 1px solid var(--border-color); font-weight: 600; display: grid; gap: 6px; color: var(--text-primary); }
.to-boite small { color: var(--text-secondary); font-weight: 500; }
.to-boite-ok { background: rgba(0, 255, 136, .08); border-color: rgba(0, 255, 136, .45); }
.to-boite-or { background: rgba(255, 210, 63, .08); border-color: rgba(255, 210, 63, .5); }
.to-boite-cyan { background: rgba(0, 240, 255, .07); border-color: rgba(0, 240, 255, .45); }
.to-boite-o { background: rgba(255, 170, 0, .08); border-color: rgba(255, 170, 0, .5); }
.to-boite-gris { opacity: .85; }
.to-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; width: 100%; }
.to-checks li { padding: 8px 12px; border-radius: 10px; background: var(--bg-secondary); border: 1px solid var(--border-color); opacity: 0; transform: translateY(4px); transition: .35s; }
.to-checks li.to-vu { opacity: 1; transform: none; }
.to-checks li.to-ok { border-color: rgba(0, 255, 136, .45); }
.to-regles { margin: 0; padding-left: 1.2em; color: var(--text-secondary); display: grid; gap: 4px; }
.to-texte { color: var(--text-secondary); margin: 10px 0 0; }
.to-recomp { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.to-recomp > div { text-align: center; border-radius: 12px; padding: 10px 6px; background: var(--bg-secondary); border: 1px solid var(--border-color); display: grid; gap: 2px; }
.to-recomp > div:first-child { border-color: rgba(255, 210, 63, .5); }
.to-med { font-size: 28px; }
.to-recomp b { font-family: var(--font-display); font-size: .9rem; color: #ffd23f; }
.to-recomp small { color: var(--text-secondary); font-size: .82rem; line-height: 1.2; overflow-wrap: anywhere; }

/* ── Podium et tableau ── */
.to-podium { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.to-podium > div { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--bg-secondary); border: 1px solid var(--border-color); min-width: 0; }
.to-podium > div span { font-size: 26px; }
.to-podium > div b { overflow-wrap: anywhere; }
.to-podium-1 { border-color: rgba(255, 210, 63, .6) !important; background: rgba(255, 210, 63, .08) !important; }
.to-glisse { display: none; font-size: .82rem; color: var(--text-muted); margin: 0 0 6px; }
.to-tableau-scroll { overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.to-bracket { display: flex; gap: 22px; min-width: min-content; align-items: stretch; }
.to-tour { flex: 1 0 168px; display: flex; flex-direction: column; gap: 4px; }
.to-tour-m { flex: 1; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; }
.to-tour-champion { flex: 0 0 132px; }   /* 17 oct. 2026 : « VAINQUEUR » était coupé au bord du tableau */
.to-tour-champion h4 { letter-spacing: .02em; }
.to-tour h4 { font-size: .7rem; color: var(--text-muted); letter-spacing: .14em; text-transform: uppercase; text-align: center; margin: 0 0 4px; font-family: var(--font-display); }
.to-match { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; position: relative; transition: border-color .3s; }
.to-encours { border-color: rgba(255, 68, 68, .6); box-shadow: 0 0 16px rgba(255, 68, 68, .18); }
.to-litige { border-color: rgba(255, 170, 0, .6); }
.to-j { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-weight: 600; font-size: .95rem; min-height: 34px; }
.to-j + .to-j { border-top: 1px solid var(--border-color); }
.to-j-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.to-sc { margin-left: auto; font-family: var(--font-display); font-size: .8rem; color: var(--accent-success); }
.to-gagne { color: var(--accent-success); background: rgba(0, 255, 136, .06); }
.to-perd { color: var(--text-muted); text-decoration: line-through; text-decoration-color: rgba(138, 138, 154, .5); }
.to-j.to-moi { box-shadow: inset 3px 0 0 var(--accent-primary); }
.to-j-vide { color: #55556a; font-style: italic; font-weight: 500; }
.to-etat { position: absolute; right: 6px; top: -1px; font-size: .62rem; font-weight: 800; background: var(--accent-danger); color: #fff; border-radius: 0 0 6px 6px; padding: 1px 6px; letter-spacing: .06em; }
.to-etat-o { background: var(--accent-warning); color: #1a1000; }
.to-m-pied { display: block; padding: 3px 10px; font-size: .8rem; color: var(--text-muted); border-top: 1px dashed var(--border-color); text-decoration: none; }
.to-regarder { color: var(--accent-primary) !important; font-weight: 700; }
.to-champion { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
.to-trophee { font-size: 40px; }
.to-champion-n { font-family: var(--font-display); font-weight: 700; font-size: .95rem; overflow-wrap: anywhere; }
.to-champion small { color: var(--text-muted); }
.to-sacre { animation: to-sacre 1.6s ease; }
@keyframes to-sacre { 0% { transform: scale(.9); opacity: .4; } 40% { transform: scale(1.06); } 100% { transform: none; opacity: 1; } }
.to-flash { animation: to-flash 1.4s ease; }
@keyframes to-flash { 0% { background: rgba(0, 255, 136, .35); } 100% { background: rgba(0, 255, 136, .06); } }

/* ── Vide, toasts, confettis ── */
.to-vide { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 22px; margin-top: 18px; border: 1px dashed var(--border-color); border-radius: 14px; background: var(--bg-card); font-style: normal; color: var(--text-secondary); }
.to-vide b { font-family: var(--font-display); color: var(--text-primary); }
.to-toasts { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(18px + var(--tk-dock-bas, 0px)); z-index: 60; display: grid; gap: 8px; width: min(92vw, 460px); pointer-events: none; }
.to-toast { background: var(--bg-card); border: 1px solid rgba(0, 240, 255, .45); color: var(--text-primary); border-radius: 12px; padding: 12px 14px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .45); transition: opacity .5s; }
.to-toast-ko { border-color: rgba(255, 170, 0, .6); }
.to-toast-fin { opacity: 0; }
.to-confetti { position: fixed; top: -12px; width: 8px; height: 14px; border-radius: 2px; z-index: 70; pointer-events: none; animation: to-tombe 2.4s ease-in forwards; }
@keyframes to-tombe { to { top: 105vh; opacity: .6; } }

@media (max-width: 900px) { .to-fiche-corps { grid-template-columns: 1fr; } .to-glisse { display: block; } }
@media (max-width: 520px) {
  .to-heros { padding: 20px; }
  .to-fiche-banniere { padding: 18px; }
  .to-fiche-corps { padding: 16px; }
  .to-ic-xl { width: 64px; height: 64px; font-size: 36px; }
  .to-noms { columns: 1; }
  .to-tour { flex-basis: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .to-point, .to-sacre, .to-flash, .to-confetti { animation: none !important; }
  .to-carte, .to-checks li { transition: none; }
}
.to-tous { margin-left: auto; font-weight: 700; text-decoration: none; white-space: nowrap; }
.to-frise { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.to-frise li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--bg-secondary); border: 1px solid var(--border-color); }
.to-frise li > span { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; background: rgba(0, 240, 255, .08); border: 1px solid rgba(0, 240, 255, .35); }
.to-frise b { display: block; } .to-frise small { color: var(--text-secondary); }
