/* Appariements de tournoi */
.page-tool main { background: var(--color-studio-mist); min-height: calc(100vh - 44px); }
.tool { max-width: 1180px; margin: 0 auto; padding: clamp(40px, 7vh, 80px) var(--pad-x) 90px; }
.tool__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.tool__head h1 { font-family: var(--font-display); font-size: clamp(34px, 5vw, 56px); font-weight: 600; letter-spacing: -0.015em; line-height: 1.05; margin: 4px 0 12px; }
.tool__sub { max-width: 640px; margin: 0; font-size: 17px; line-height: 1.45; }
.tool__tbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tool__tbar select { min-width: 200px; }
.hsec__k { margin: 0; font-size: 13px; font-weight: 600; color: var(--color-link, #0066cc); text-transform: uppercase; letter-spacing: .05em; }
.tinfo { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.tinfo .tag { font-size: 12px; }
.board-row td { vertical-align: middle; }
.board-row select { min-width: 90px; }
.res-btns { display: inline-flex; gap: 4px; }
.res-btns button { border: 0; background: var(--color-studio-mist); border-radius: 8px; padding: 6px 9px; font: inherit; font-size: 13px; cursor: pointer; }
.res-btns button.is-on { background: var(--color-apple-blue, #0071e3); color: #fff; }
.res-btns button:hover:not(.is-on) { background: #e2e2e7; }
.cross { border-collapse: collapse; font-size: 13px; }
.cross th, .cross td { border: 1px solid var(--color-hairline-silver, #d2d2d7); padding: 5px 7px; text-align: center; white-space: nowrap; }
.cross td.self { background: #1d1d1f; }
.cross td.name, .cross th.name { text-align: left; }
.tool-empty { background: #fff; border-radius: var(--radius-cards); padding: 48px 32px; text-align: center; }
.tool-empty h2 { font-family: var(--font-display); font-size: 28px; margin: 0 0 10px; }
.wd { opacity: .5; text-decoration: line-through; }
@media print {
  .gnav, .footer, .tool__tbar, .tool__sub, .no-print, .erp__menu-btn, .chips { display: none !important; }
  .page-tool main { background: #fff; }
  .panel { box-shadow: none !important; border: 0 !important; padding: 0 !important; }
}
.print-only { display: none; }
@media print { .print-only { display: inline; } }

/* inscription */
.ins-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 28px; align-items: start; margin-top: 12px; }
.ins-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ins-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.ins-ok { background: #eef8f0; border-radius: 18px; padding: 20px; }
.ins-ok h3 { margin: 0 0 8px; color: #188038; }
@media (max-width: 800px) { .ins-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- pairing UI: icons, tabs, teams, knock-out, room display, exports ---------- */
.ti { width: 18px; height: 18px; fill: currentColor; flex: none; vertical-align: -3px; }
.ti--s { width: 14px; height: 14px; vertical-align: -2px; }
.pill .ti { margin-right: 4px; }
.tbtn { display: inline-flex; align-items: center; gap: 5px; }
.tbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.panel__head h2 { display: flex; align-items: center; gap: 8px; }
.ttabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.ttab { display: inline-flex; align-items: center; gap: 7px; padding: 9px 14px; border-radius: 12px; border: 0; background: #fff; color: #1d1d1f; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; box-shadow: 0 0 0 1px rgba(0, 0, 0, .06); }
.ttab .ti { color: #0071e3; }
.ttab:hover { background: rgba(0, 113, 227, .06); }
.ttab.is-on { background: #0071e3; color: #fff; box-shadow: none; } .ttab.is-on .ti { color: #fff; }
.tbl .c { text-align: center; }
.teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.teamcard { border-radius: 16px; padding: 14px 16px; box-shadow: inset 0 0 0 1px rgba(128, 128, 128, .25); }
.teamcard h3 { margin: 0 0 2px; font-size: 17px; display: flex; justify-content: space-between; }
.teamcard ol { margin: 8px 0 0; padding-left: 20px; font-size: 14px; line-height: 1.6; }
.tmatch { margin-bottom: 18px; } .tmatch h3 { font-size: 16px; margin: 0 0 8px; }
.tscore { display: inline-block; min-width: 64px; text-align: center; padding: 2px 10px; border-radius: 8px; background: rgba(0, 113, 227, .1); color: #0066cc; margin: 0 6px; }
.kobracket { display: flex; gap: 18px; overflow-x: auto; padding-bottom: 6px; }
.kocol { min-width: 200px; display: flex; flex-direction: column; justify-content: space-around; gap: 10px; }
.kocol h3 { font-size: 14px; color: #6e6e73; margin: 0 0 4px; }
.kogame { border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(128, 128, 128, .3); overflow: hidden; }
.kogame span { display: block; padding: 6px 10px; font-size: 14px; } .kogame span + span { border-top: 1px solid rgba(128, 128, 128, .2); }
.kow { font-weight: 700; background: rgba(24, 128, 56, .1); }
.exp { display: grid; grid-template-columns: auto 1fr; gap: 12px 16px; align-items: center; }
.troom { position: fixed; inset: 0; z-index: 9999; background: #0b0b0f; color: #f5f5f7; overflow: auto; padding: 24px 32px; font-family: var(--font-display, Inter, sans-serif); outline: none; }
.troom header { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; font-size: 28px; }
.troom header span { color: #6cb4ff; } .troom header button { margin-left: auto; background: none; border: 0; color: #fff; font-size: 40px; cursor: pointer; line-height: 1; }
.troom__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 12px; }
.troom__b { display: grid; grid-template-columns: 60px 1fr 70px 1fr; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; border: 0; background: #1c1c1e; color: inherit; font: inherit; font-size: 22px; text-align: left; cursor: pointer; }
.troom__b[disabled] { cursor: default; } .troom__b .n { font-size: 26px; font-weight: 700; color: #6cb4ff; } .troom__b .res { text-align: center; font-weight: 700; }
.troom__b .b { text-align: right; } .troom__b.is-done { background: #14301f; }
.troom__st { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 32px; font-size: 24px; }
.troom__st li { display: grid; grid-template-columns: 56px 1fr 70px; padding: 8px 12px; border-radius: 10px; break-inside: avoid; } .troom__st li:nth-child(odd) { background: #1c1c1e; }
.troom__st span { color: #6cb4ff; font-weight: 700; } .troom__st em { font-style: normal; text-align: right; font-weight: 700; }
@media (max-width: 800px) { .troom__grid { grid-template-columns: 1fr; } .troom__b { font-size: 17px; grid-template-columns: 40px 1fr 50px 1fr; } .troom__st { columns: 1; } }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .ttab:not(.is-on) { background: #1c1c1e; color: #f5f5f7; } }
html[data-theme="dark"] .ttab:not(.is-on) { background: #1c1c1e; color: #f5f5f7; }