/* LDHML captain area. On top of assets/site.css, admin/admin.css (the tool look) and shared/builder.css. */
.cp-switch { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.cp-switch button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 3px; padding: 4px 10px 4px 4px; cursor: pointer; font: 500 15px/1.2 var(--f-text); }
.cp-switch button[aria-pressed="true"] { border-color: var(--ball); outline: 2px solid var(--ball); outline-offset: -1px; }
.cp-switch button:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (max-width: 600px) { .cp-ask .ta-btn { width: 100%; } }
@media (max-width: 520px) { .cp-team .tcell .crest { display: inline-grid; } }
/* my games: one line each, the next one marked; replacements under a game */
.cp-games { list-style: none; display: grid; gap: 6px; max-width: 760px; margin: 0 0 6px; }
.cp-game { border: 1px solid var(--line); border-radius: 3px; background: var(--surface); padding: 6px 12px; display: grid; gap: 4px; }
.cp-game.cp-has-subs { border-left: 4px solid var(--ball); }
.cp-gl { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.cp-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--ball); color: var(--on-ball); font: 700 12px/1.4 var(--f-text); }
.cp-game .ld-team { border-left: 0; padding-left: 0; }
/* ---------- the dashboard ---------- */
.cp-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin: 10px 0 14px; }
.cp-team { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.cp-team .tcell { font: 600 34px/1 var(--f-display); text-transform: uppercase; letter-spacing: .02em; }
.cp-team .tcell .crest { width: 48px; height: 48px; }
.cp-ask { margin: 0; }
.cp-ask .ta-btn { min-height: 52px; font-size: 22px; padding: 0 26px; }
.cp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.cp-kpi { display: grid; gap: 4px; align-content: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); min-width: 0; }
.cp-kl { font: 500 13px/1 var(--f-display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.cp-kv { font: 600 34px/1 var(--f-display); text-transform: uppercase; font-variant-numeric: tabular-nums; }
.cp-kv small { font-size: 20px; color: var(--muted); }
.cp-ks { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13px; color: var(--muted); }
.cp-k-next { border-top: 3px solid var(--ball); }
.cp-bar { display: block; width: 100%; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.cp-bar i { display: block; height: 100%; background: var(--good, #43a047); }
.cp-bar.cp-over i { background: var(--bad, #e57373); }
.cp-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cp-col { display: grid; gap: 16px; min-width: 0; }
.cp-panel { border: 1px solid var(--line); border-radius: 4px; background: var(--bg); padding: 12px 14px; display: grid; gap: 8px; min-width: 0; }
.cp-ph { font: 600 22px/1 var(--f-display); text-transform: uppercase; letter-spacing: .04em; margin: 0; }
.cp-panel .bd-reqs { margin: 0; }
.cp-panel .ta-add { margin: 4px 0 0; }
.cp-roster .ta-roster { width: 100%; }
@media (max-width: 900px) { .cp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cp-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) { .cp-team .tcell { font-size: 26px; } .cp-kv { font-size: 28px; } .cp-ask { width: 100%; } .cp-ask .ta-btn { width: 100%; } }
.cp-panel .ta-add { padding: 2px 12px; }
.cp-panel .ta-add > summary { font-size: 15px; padding: 6px 0; letter-spacing: .06em; }
/* the timeline: games with their requests */
.cp-tl .cp-game .bd-reqs { margin: 4px 0 0; }
.cp-tl .cp-game .bd-req { background: var(--bg); }
.cp-tl .bd-req-h .bd-game:empty { margin-right: auto; }
.cp-sx { color: var(--muted); }
/* ---------- phones: no box inside a box, a one-line header ---------- */
.ta-short { display: none; }
@media (max-width: 600px) {
  .sec-top { flex-wrap: nowrap; gap: 8px; }
  .sec-top .brand { flex: 1 1 auto; min-width: 0; }
  .ta-tools { gap: 6px; padding: 6px 0; flex: none; }
  .ta-tools .lgbtn { padding: 6px 8px; font-size: 13px; }
  .ta-long { display: none; }
  .ta-short { display: inline; }
  .ta-body { padding-block: 10px 28px; }
  .cp-hero { margin: 4px 0 10px; gap: 10px; }
  .cp-team .tcell .crest { width: 40px; height: 40px; }
  .cp-kpis { gap: 8px; margin-bottom: 12px; }
  .cp-kpi { padding: 10px; }
  .cp-kv { font-size: 26px; }
  .cp-kv small { font-size: 16px; }
  .cp-grid, .cp-col { gap: 12px; }
  .cp-panel { border: 0; padding: 0; background: none; }
  .cp-ph { font-size: 20px; }
  .cp-games { gap: 8px; }
  .cp-tl .cp-game { padding: 6px 8px; }
  .cp-tl .cp-game .bd-req { padding: 8px 10px; }
  .cp-roster .ta-roster td { padding: 6px 4px; }
}
.cp-panel, .cp-kpi, .cp-game { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.cp-roster .ta-roster td:first-child a { white-space: normal; overflow-wrap: anywhere; }
/* two key numbers on every screen */
.cp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
@media (max-width: 340px) { .cp-kpis { grid-template-columns: minmax(0, 1fr) !important; } }
/* the timeline: one line per game, "Déclarer…" on it, its replacements folded under it */
.cp-gl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.cp-gt { flex: 1 1 auto; min-width: 0; }
.cp-gchips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.cp-st { padding: 1px 8px; border-radius: 999px; border: 1px solid currentColor; font: 600 12px/1.5 var(--f-text); white-space: nowrap; }
.cp-st-approved { color: var(--good, #43a047); }
.cp-st-pending { color: var(--warn, #f0a500); }
.cp-st-refused { color: var(--bad, #e57373); }
.cp-ask-g { min-height: 30px; padding: 0 10px; font-size: 14px; }
.cp-game details > summary { cursor: pointer; list-style: none; }
.cp-game details > summary::-webkit-details-marker { display: none; }
.cp-game details > summary .cp-gt::before { content: "▸ "; color: var(--muted); }
.cp-game details[open] > summary .cp-gt::before { content: "▾ "; }
.cp-gsum { margin: 4px 0 0; }
@media (max-width: 600px) { .cp-ask-g { margin-left: auto; } }
/* a folded game: one line per replacement */
.cp-slim { list-style: none; display: grid; gap: 2px; margin: 4px 0 0 18px; font-size: 14px; }
.cp-slim li { display: flex; align-items: baseline; gap: 6px; overflow-wrap: anywhere; }
.cp-slim i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; transform: translateY(-1px); }
.cp-slim b { font-weight: 600; color: var(--ink); }
.cp-slim .cp-sr { font-size: 12px; }
.cp-slim li { color: var(--muted); }
.cp-slim li.cp-st-approved i { background: var(--good, #43a047); }
.cp-slim li.cp-st-pending i { background: var(--warn, #f0a500); }
.cp-slim li.cp-st-refused i { background: var(--bad, #e57373); }
.cp-game details[open] .cp-slim { display: none; }
.cp-slim li { display: block; position: relative; padding-left: 14px; }
.cp-slim i { position: absolute; left: 0; top: .45em; transform: none; }
/* After a request: the link for the admins */
.cp-share { margin: 0 0 14px; border-color: var(--ball); }
.cp-share-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 6px; margin: 8px 0 0; }
.cp-share-row .ctl { min-width: 0; font-size: 13px; }
/* #joueurs: the section's players, compact on every screen */
.cp-pfs { flex-wrap: wrap; gap: 8px; }
.cp-pfs #cp-pq { flex: 1 1 180px; min-width: 0; }
.cp-pf { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.cp-players td { vertical-align: top; padding: 7px 6px; }
.cp-players td.num, .cp-players th.num { text-align: right; white-space: nowrap; }
.cp-pl-sub { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.cp-sort { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.cp-pfs select[data-cplg] { min-width: 150px; }
#cp-filt { margin: 0 0 6px; }
/* The nav: a bottom tab bar on phones (site.css .tabbar), three tabs */
.cp-tabbar { grid-template-columns: repeat(2, 1fr) !important; }
/* A pending request's link: a small box (icon, the address, copy, share); "Annuler" beside it */
.bd-acts .cp-link { display: inline-flex; align-items: center; gap: 6px; flex: 1 1 220px; min-width: 0; max-width: 420px; padding: 3px 4px 3px 8px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); }
.cp-link-url { flex: 1 1 auto; min-width: 0; padding: 4px 2px; border: 0; background: transparent; color: var(--ink); font: 13px var(--f-text); text-overflow: ellipsis; }
.cp-link-url:focus { outline: none; }
.cp-link:focus-within { border-color: var(--ball); }
.cp-link-b { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border: 0; border-radius: 6px; background: none; color: var(--ink); cursor: pointer; }
.cp-link-b:hover, .cp-link-b:focus-visible { background: color-mix(in srgb, var(--ball) 18%, transparent); }
.bd-acts:has(.cp-link) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
/* The filters: the stats site's component (.fbar / .fpanel in site.css); here the salary and the rank start a second line */
.cp-fbar #cp-pq { flex: 1 1 220px; min-width: 0; }
.cp-break { flex-basis: 100%; height: 0; }
@media (max-width: 600px) { .cp-break { display: none; } .cp-fbar #cp-pq { flex: 1 1 auto; } .fp-grp .rk-range .ta-xs { width: 100%; } }
/* teams: a column of their own on a computer (same row as the name); under the name on a phone */
.cp-players .cp-m-only { display: none; }
.cp-players td.cp-pl-teams .lgbs { display: flex; flex-wrap: wrap; gap: 4px; }
.cp-players td { vertical-align: middle; }
@media (max-width: 600px) { .cp-players .cp-m-only { display: flex; } .cp-players .cp-pl-teams { display: none; } .cp-players td { vertical-align: top; } }
