/* Tournoi Manager — feuille de style unique (admin + public + diaporama) */
:root {
  --brand: #1f6feb;
  --navy: #0b1f3a;
  --bg: #f3f5f9;
  --card: #ffffff;
  --text: #15202f;
  --muted: #667085;
  --line: #e4e8ef;
  --ok: #12a150;
  --warn: #d98a00;
  --danger: #d6324a;
  --live: #e5252a;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0 0 .6rem; letter-spacing: -.02em; }
h2 { font-size: 1.15rem; margin: 0 0 .8rem; letter-spacing: -.01em; }
h3 { font-size: 1rem; margin: 1rem 0 .6rem; }
code { background: #eef1f6; padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 1rem; }
.spacer { flex: 1; }
.w60 { width: 60px !important; }
.w80 { width: 80px !important; }
[hidden] { display: none !important; }

/* Formulaires */
label { display: block; font-weight: 500; font-size: .88rem; margin-bottom: .8rem; color: #344054; }
label > input, label > select, label > textarea, label > .input-prefix { margin-top: .3rem; }
input, select, textarea {
  width: 100%; font: inherit; padding: .55rem .7rem; border: 1px solid #cfd6e1; border-radius: 8px; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
input[type=checkbox], input[type=radio] { width: auto; margin-right: .4rem; accent-color: var(--brand); }
input[type=color] { padding: 2px; height: 40px; }
input[type=file] { padding: .4rem; }
label.check { display: flex; align-items: center; font-weight: 500; }
fieldset { border: 0; padding: 0; margin: 0; }
.input-prefix { display: flex; }
.input-prefix span { padding: .55rem .6rem; background: #eef1f6; border: 1px solid #cfd6e1; border-right: 0; border-radius: 8px 0 0 8px; color: var(--muted); }
.input-prefix input { border-radius: 0 8px 8px 0; margin: 0; }
.row2, .row3, .row4 { display: grid; gap: 0 1rem; align-items: end; }
.row2 { grid-template-columns: repeat(2, 1fr); }
.row3 { grid-template-columns: repeat(3, 1fr); }
.row4 { grid-template-columns: repeat(4, 1fr); }
.inline-form { display: flex; gap: .4rem; margin-bottom: .4rem; }
.inline-form form:first-child { flex: 1; }
form.inline { display: inline; }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem; font: inherit; font-weight: 600; font-size: .9rem;
  padding: .55rem .95rem; border-radius: 8px; border: 1px solid #cfd6e1; background: #fff; color: var(--text); cursor: pointer; text-decoration: none !important; white-space: nowrap;
}
.btn:hover { background: #f6f8fb; }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); border-color: #f2c4cb; }
.btn.danger:hover { background: #fff1f3; }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; }
.btn.small { padding: .3rem .55rem; font-size: .8rem; }
.btn.big { padding: .8rem 1.3rem; font-size: 1rem; }
.btn.block { display: flex; width: 100%; margin-top: .4rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-group { display: flex; gap: .5rem; flex-wrap: wrap; }
.btn-group.center { justify-content: center; }
.link { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; padding: 0; }
.link.danger { color: var(--danger); }

.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .15rem .55rem; border-radius: 999px; font-size: .75rem; font-weight: 600; background: #eef1f6; color: #344054; border: 0; }
.pill.ok, .pill.st-accepted { background: #ddf6e6; color: #0b7a3b; }
.pill.warn, .pill.st-pending { background: #fff1d6; color: #8a5a00; }
.pill.danger, .pill.st-rejected { background: #ffe1e5; color: var(--danger); }
.pill.live { background: var(--live); color: #fff; }
.pill.type { background: color-mix(in srgb, var(--brand) 12%, white); color: var(--brand); }
button.pill { cursor: pointer; }

.flash { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-weight: 500; }
.flash-success { background: #ddf6e6; color: #0b6a34; }
.flash-error { background: #ffe1e5; color: #9b1c2f; }
.flash-warning { background: #fff1d6; color: #7a4f00; }

/* Mise en page admin */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .8rem; height: 56px; padding: 0 1rem; background: var(--navy); color: #fff; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; color: inherit; letter-spacing: -.02em; }
.brand img { width: 28px; height: 28px; }
.brand.big { font-size: 1.3rem; justify-content: center; width: 100%; margin-bottom: 1rem; color: var(--navy); }
.brand.big img { width: 40px; height: 40px; }
.crumb { color: #9fb3d1; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-link { color: #cfdbee; font-weight: 500; font-size: .9rem; }
.burger { display: none; background: none; border: 0; color: #fff; font-size: 1.4rem; cursor: pointer; }
.lang-switch { display: inline-flex; gap: 2px; background: rgba(127, 127, 127, .15); border-radius: 8px; padding: 2px; }
.lang-switch a { padding: .15rem .45rem; border-radius: 6px; font-size: .75rem; font-weight: 700; color: inherit; opacity: .7; }
.lang-switch a.on { background: #fff; color: var(--navy); opacity: 1; }
.shell { display: flex; min-height: calc(100vh - 56px); }
.side-nav { width: 230px; flex-shrink: 0; background: #fff; border-right: 1px solid var(--line); padding: 1rem .6rem; position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; }
.side-nav a { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border-radius: 8px; color: #344054; font-weight: 500; text-decoration: none; }
.side-nav a:hover { background: #f3f5f9; }
.side-nav a.active { background: color-mix(in srgb, var(--brand) 12%, white); color: var(--brand); font-weight: 650; }
.side-nav .ic { width: 22px; text-align: center; }
.side-sep { height: 1px; background: var(--line); margin: .8rem .4rem; }
.content { flex: 1; min-width: 0; padding: 1.5rem; max-width: 1400px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem; margin-bottom: 1rem; }
.card.narrow { max-width: 520px; }
details.card > summary { cursor: pointer; }
.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cards { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid > .card { margin-bottom: 0; }
.grid + .card, .grid + .grid, .card + .grid { margin-top: 1rem; }
.empty { text-align: center; padding: 3rem 1rem; }
.empty-ic { font-size: 3rem; }

.tcard { color: inherit; text-decoration: none !important; border-top: 4px solid var(--c); transition: transform .15s; }
.tcard:hover { transform: translateY(-2px); }
.tcard-top { display: flex; justify-content: space-between; align-items: center; }
.tcard-top img { width: 44px; height: 44px; object-fit: contain; }
.tcard-ic { font-size: 2rem; }
.tcard h3 { margin: .6rem 0 .2rem; font-size: 1.1rem; }
.tcard p { margin: .2rem 0; }
.tcard-stats { font-size: .9rem; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.kpi b { display: block; font-size: 1.6rem; letter-spacing: -.02em; }
.kpi span { color: var(--muted); font-size: .85rem; }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; }
.steps li a { display: flex; align-items: center; gap: .7rem; padding: .55rem 0; color: inherit; border-bottom: 1px dashed var(--line); }
.steps .chk { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #cfd6e1; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; color: #fff; }
.steps li.ok .chk { background: var(--ok); border-color: var(--ok); }
.steps li.ok a { color: var(--muted); text-decoration: line-through; }
.copy-row { display: grid; grid-template-columns: 140px 1fr auto auto; gap: .4rem; align-items: center; margin-bottom: .5rem; font-size: .85rem; }
.copy-row input { font-size: .8rem; padding: .35rem .5rem; }

.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: .5rem; border-bottom: 1px solid var(--line); }
.table td { padding: .55rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table input, .table select { padding: .3rem .45rem; }

.team { display: inline-flex; align-items: center; gap: .45rem; font-weight: 550; min-width: 0; }
.tdot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.tlogo { width: 22px; height: 22px; object-fit: contain; border-radius: 4px; }
.thumb { max-height: 50px; border-radius: 6px; border: 1px solid var(--line); }
.thumb-row { display: flex; align-items: center; gap: .8rem; margin-top: .4rem; }
.mrow { display: grid; grid-template-columns: 60px 1fr auto 1fr auto; gap: .5rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.mrow .time { color: var(--muted); font-size: .85rem; }
.mrow .score, .mrow .vs { text-align: center; min-width: 50px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--live); display: inline-block; animation: pulse 1.4s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tab { padding: .5rem .9rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: #344054; font-weight: 600; display: inline-flex; align-items: center; gap: .4rem; text-decoration: none !important; }
.tab.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.tabs.small .tab { padding: .3rem .7rem; font-size: .85rem; }

.tpl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .7rem; margin-bottom: 1rem; }
.tpl input { position: absolute; opacity: 0; }
.tpl span { display: flex; flex-direction: column; gap: .2rem; padding: 1rem; border: 2px solid var(--line); border-radius: 10px; cursor: pointer; height: 100%; }
.tpl input:checked + span { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, white); }
.tpl small { color: var(--muted); font-weight: 400; }
.tpl-ic { font-size: 1.4rem; color: var(--brand); letter-spacing: -.1em; }
.wizard h3 { border-top: 1px solid var(--line); padding-top: 1rem; }
.wizard h3:first-of-type { border: 0; padding: 0; margin-top: 0; }

/* Formats */
.phase-flow { margin-top: 1rem; }
.flow-arrow { text-align: center; font-size: 1.6rem; color: var(--brand); margin: -.4rem 0 .4rem; }
.phase-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.phase-head h2 { margin: 0; }
.phase-head form { margin: 0; }
.pools { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .8rem; margin: 1rem 0; }
.pool { border: 1px solid var(--line); border-radius: 10px; padding: .7rem; background: #fafbfd; }
.pool.add { display: flex; align-items: center; justify-content: center; border-style: dashed; }
.pool-title input { font-weight: 700; border: 0; background: transparent; padding: .2rem; margin: 0 0 .3rem; }
.pool ul { list-style: none; margin: 0 0 .4rem; padding: 0; }
.pool li { padding: .25rem 0; font-size: .9rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.actions form { margin: 0; }
.assign-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .3rem 1rem; margin-top: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .5rem 0 1rem; }
.chip { display: inline-flex; align-items: center; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; margin: 0; background: #fff; }
.ko-gen .check { margin-bottom: .4rem; }

/* Tableau K.O. */
.bracket { display: flex; gap: 1.6rem; overflow-x: auto; padding: 1rem 0 .5rem; }
.b-round { display: flex; flex-direction: column; min-width: 190px; }
.b-title { font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--muted); letter-spacing: .05em; margin-bottom: .6rem; text-align: center; }
.b-col { display: flex; flex-direction: column; justify-content: space-around; flex: 1; gap: .7rem; }
.b-match { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); position: relative; }
.b-match.live { border-color: var(--live); }
.b-match.is-bye { opacity: .55; }
.b-meta { font-size: .7rem; color: var(--muted); padding: .2rem .5rem; background: #f6f8fb; }
.b-team { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .4rem .6rem; font-size: .88rem; }
.b-team + .b-team { border-top: 1px solid var(--line); }
.b-team.win { font-weight: 700; background: color-mix(in srgb, var(--ok) 9%, white); }
.b-team.lose { color: var(--muted); }
.b-team.bye { color: var(--muted); font-style: italic; }

/* Planning drag & drop */
.planner-wrap { display: grid; grid-template-columns: 250px 1fr; gap: 1rem; align-items: start; }
.unsched { position: sticky; top: 70px; max-height: calc(100vh - 90px); overflow-y: auto; min-height: 140px; }
.planner { overflow-x: auto; padding: .8rem; }
.planner-bar { display: flex; align-items: center; gap: .5rem; margin-bottom: .6rem; }
.planner-bar .tabs { margin: 0; }
.pgrid { display: grid; gap: 4px; min-width: max-content; }
.ph { font-weight: 700; font-size: .85rem; text-align: center; padding: .4rem; background: var(--navy); color: #fff; border-radius: 6px; position: sticky; top: 0; z-index: 2; }
.ptime { font-size: .8rem; color: var(--muted); font-weight: 600; padding-top: .5rem; text-align: right; padding-right: .3rem; }
.pcell { min-height: 74px; border: 1px dashed #d3d9e3; border-radius: 8px; padding: 3px; background: #fafbfd; }
.dropzone.over { background: color-mix(in srgb, var(--brand) 12%, white); border-color: var(--brand); }
.mcard { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--dc, var(--brand)); border-radius: 7px; padding: .35rem .5rem; font-size: .78rem; cursor: grab; margin-bottom: 4px; box-shadow: var(--shadow); user-select: none; }
.mcard.dragging { opacity: .4; }
.mcard.picked { outline: 3px solid var(--brand); }
.mcard.conflict { border-color: var(--danger); background: #fff4f5; }
.mcard.st-finished { cursor: default; opacity: .75; }
.mcard.st-live { border-color: var(--live); }
.mc-top { display: flex; justify-content: space-between; color: var(--muted); font-size: .7rem; font-weight: 600; }
.mc-t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.mc-score { font-weight: 800; }
.mc-ref { font-size: .7rem; color: var(--muted); }

/* Saisie des scores */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.filters input, .filters select { width: auto; flex: 1; min-width: 150px; }
.score-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: .8rem; }
.score-form { background: #fff; border: 1px solid var(--line); border-left: 4px solid #cfd6e1; border-radius: var(--radius); padding: .8rem 1rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.score-list .score-form { margin-bottom: 0; }
.score-form.st-live { border-left-color: var(--live); }
.score-form.st-finished { border-left-color: var(--ok); }
.sf-meta { display: flex; gap: .6rem; align-items: center; font-size: .8rem; flex-wrap: wrap; margin-bottom: .6rem; }
.sf-body { display: grid; grid-template-columns: 1fr auto 1fr; gap: .6rem; align-items: center; }
.sf-team.away { text-align: right; justify-self: end; }
.sf-score { display: flex; align-items: center; gap: .3rem; }
.sf-score input { width: 56px; text-align: center; font-size: 1.3rem; font-weight: 800; padding: .3rem; }
.pm { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #cfd6e1; background: #f6f8fb; font-size: 1.1rem; font-weight: 700; cursor: pointer; }
.sf-sets { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; justify-content: center; }
.sf-sets .set { display: inline-flex; flex-direction: column; gap: 2px; }
.sf-sets input { width: 46px; text-align: center; padding: .25rem; font-weight: 700; }
.sf-setscore { font-size: 1.2rem; margin-left: .3rem; }
.sf-pen { display: flex; gap: .4rem; align-items: center; justify-content: center; margin-top: .5rem; }
.sf-pen input { width: 50px; text-align: center; padding: .25rem; }
.sf-actions { display: flex; gap: .5rem; align-items: center; margin-top: .7rem; }
.sf-actions select { width: auto; padding: .3rem .5rem; font-size: .85rem; }
.sf-msg { font-size: .85rem; color: var(--ok); }
.event-form { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.event-form select, .event-form input { width: auto; flex: 1; }
.events { list-style: none; padding: 0; margin: 1rem 0 0; }
.events li { display: flex; gap: .6rem; align-items: center; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.events li.away { flex-direction: row; }
.events .min { width: 34px; color: var(--muted); font-weight: 600; }
.events form { margin-left: auto; }
.ev { font-size: .75rem; font-weight: 700; padding: .1rem .45rem; border-radius: 5px; background: #eef1f6; }
.ev-goal { background: #ddf6e6; color: #0b6a34; }
.ev-yellow { background: #ffe98a; }
.ev-red { background: #ffb3bd; }

.leader { padding: 0; margin: 0; list-style: none; counter-reset: l; }
.leader li { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-bottom: 1px solid var(--line); counter-increment: l; }
.leader li::before { content: counter(l); width: 24px; font-weight: 800; color: var(--muted); }
.leader .lname { flex: 1; }
.leader b { font-size: 1.05rem; }

.sponsor-row { display: grid; grid-template-columns: 60px 1fr 120px 60px auto; gap: .6rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.sponsor-row img, .sp-ph { width: 60px; height: 40px; object-fit: contain; border-radius: 6px; background: #f3f5f9; display: flex; align-items: center; justify-content: center; font-weight: 800; }
.danger-zone { border-color: #f2c4cb; }
.roles-help { padding-left: 1.1rem; }

.modal { position: fixed; inset: 0; background: rgba(10, 20, 40, .55); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-box { background: #fff; border-radius: 14px; padding: 1.5rem; max-width: 92vw; }
#qr-box { display: flex; justify-content: center; margin-bottom: .8rem; }
#qr-text { word-break: break-all; max-width: 300px; }

/* Authentification */
body.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: linear-gradient(135deg, var(--navy), #163a6b); }
.auth-card { background: #fff; border-radius: 16px; padding: 2rem; width: 100%; max-width: 420px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); }
.auth-card.wide { max-width: 620px; }
.auth-card h1 { text-align: center; }
.auth-card .lang-switch { display: flex; justify-content: center; width: max-content; margin: 1rem auto 0; color: var(--navy); }

/* ===== Site public ===== */
body.public { background: #eef1f6; }
.phero { position: relative; color: #fff; background: linear-gradient(120deg, var(--brand), color-mix(in srgb, var(--brand) 40%, #06122a)); overflow: hidden; }
.phero::before { content: ""; position: absolute; inset: 0; background-image: var(--cover); background-size: cover; background-position: center; opacity: .28; }
.phero-in { position: relative; display: flex; align-items: center; gap: 1rem; max-width: 1100px; margin: 0 auto; padding: 2.2rem 1rem 1.6rem; flex-wrap: wrap; }
.phero.slim .phero-in { padding: 1.2rem 1rem; }
.phero h1 { font-size: clamp(1.5rem, 4vw, 2.4rem); margin: 0; font-weight: 800; }
.phero p { margin: .3rem 0 0; opacity: .9; }
.phero .sub { position: relative; max-width: 1100px; margin: -0.8rem auto 0; padding: 0 1rem 1rem; }
.plogo { width: 72px; height: 72px; object-fit: contain; background: #fff; border-radius: 14px; padding: 6px; }
.phero .lang-switch { color: #fff; }
.main-sponsors { position: relative; display: flex; align-items: center; gap: 1rem; max-width: 1100px; margin: 0 auto; padding: 0 1rem 1rem; font-size: .8rem; opacity: .95; flex-wrap: wrap; }
.main-sponsors a { color: #fff; font-weight: 700; }
.main-sponsors img { height: 34px; background: #fff; border-radius: 6px; padding: 3px 8px; }
.ptabs { position: sticky; top: 0; z-index: 10; display: flex; gap: .2rem; overflow-x: auto; background: #fff; border-bottom: 1px solid var(--line); padding: 0 max(1rem, calc((100% - 1100px) / 2)); scrollbar-width: none; }
.ptabs a { padding: .9rem 1rem; font-weight: 650; color: #475467; border-bottom: 3px solid transparent; white-space: nowrap; text-decoration: none !important; }
.ptabs a.on { color: var(--brand); border-color: var(--brand); }
.pmain { max-width: 1100px; margin: 0 auto; padding: 1rem; min-height: 50vh; }
.pmain.narrow { max-width: 720px; }
.pmain.flash-update { animation: fl 1.2s; }
@keyframes fl { from { background: color-mix(in srgb, var(--brand) 10%, transparent); } to { background: transparent; } }
.pcard { display: block; background: #fff; border-radius: 14px; padding: 1.1rem; margin-bottom: 1rem; box-shadow: var(--shadow); color: inherit; }
.pcard h2 { display: flex; align-items: center; gap: .5rem; }
.pgrid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 0 1rem; }
.pgrid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0 1rem; }
.reg-cta { background: var(--brand); color: #fff !important; font-size: 1.05rem; text-decoration: none !important; }
.more { display: inline-block; margin-top: .6rem; font-weight: 600; }
.div-title { display: flex; align-items: center; gap: .5rem; margin: 1.4rem 0 .7rem; }
.pfilters { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pfilters select { flex: 1; min-width: 150px; width: auto; }
.prose { white-space: normal; }

.pmatch { display: grid; grid-template-columns: 62px 1fr auto; gap: .8rem; align-items: center; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.pmatch:last-child { border-bottom: 0; }
.pmatch.mine { background: color-mix(in srgb, #ffc83d 18%, white); border-radius: 8px; padding-left: .4rem; padding-right: .4rem; }
.pmatch.st-live .pm-time b { color: var(--live); }
.pm-time { display: flex; flex-direction: column; line-height: 1.2; }
.pm-time small { color: var(--muted); font-size: .75rem; }
.pm-teams { min-width: 0; }
.pm-team { display: flex; justify-content: space-between; gap: .5rem; padding: .1rem 0; }
.pm-team .team { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pm-team.win { font-weight: 800; }
.pm-sc { min-width: 22px; text-align: right; font-size: 1.05rem; }
.pm-info { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; text-align: right; max-width: 150px; }
.pm-lab { color: var(--muted); font-size: .72rem; border-left: 3px solid var(--dc); padding-left: .35rem; }

.ptable { width: 100%; border-collapse: collapse; font-size: .9rem; }
.ptable th { font-size: .72rem; color: var(--muted); text-transform: uppercase; padding: .4rem .3rem; text-align: center; border-bottom: 1px solid var(--line); }
.ptable td { padding: .5rem .3rem; text-align: center; border-bottom: 1px solid var(--line); }
.ptable .left { text-align: left; }
.ptable .num { width: 28px; font-weight: 700; color: var(--muted); }
.standings tr.qualified td:first-child { box-shadow: inset 3px 0 0 var(--ok); color: var(--ok); }
.standings tr.mine td { background: color-mix(in srgb, #ffc83d 18%, white); }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.team-tile { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 1rem .5rem; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-align: center; text-decoration: none !important; }
.team-tile:hover { border-color: var(--brand); }
.team-tile img { width: 54px; height: 54px; object-fit: contain; }
.tile-dot { width: 54px; height: 54px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 1.4rem; display: flex; align-items: center; justify-content: center; }
.tile-dot.big { width: 72px; height: 72px; font-size: 2rem; }
.team-hero { display: flex; align-items: center; gap: 1rem; border-top: 5px solid var(--tc); flex-wrap: wrap; }
.team-hero img { width: 72px; height: 72px; object-fit: contain; }
.team-hero h2 { margin: 0; }
.follow { margin-left: auto; }
.follow.on { background: #ffc83d; border-color: #ffc83d; }
.sponsor-wall { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; align-items: center; }
.sp-item { display: flex; align-items: center; justify-content: center; padding: .8rem 1.2rem; border: 1px solid var(--line); border-radius: 12px; min-width: 140px; min-height: 80px; color: inherit; }
.sp-item img { max-height: 60px; max-width: 180px; object-fit: contain; }
.sp-item.main { min-width: 220px; min-height: 110px; border-color: #ffc83d; }
.sp-item.main img { max-height: 90px; max-width: 260px; }
.sponsor-ticker { overflow: hidden; background: #fff; border-top: 1px solid var(--line); padding: .6rem 0; }
.ticker-track { display: flex; gap: 3rem; width: max-content; animation: ticker 40s linear infinite; align-items: center; }
.ticker-track img { height: 36px; }
.ticker-track a, .ticker-track span { color: var(--text); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.pfoot { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; padding: 1.4rem 1rem 2rem; font-size: .85rem; color: var(--muted); }
.live-ind { display: inline-flex; align-items: center; gap: .4rem; }
.fee-box { background: #f6f8fb; border-radius: 10px; padding: .8rem 1rem; margin-bottom: 1rem; }
.pay-info { text-align: left; background: #f6f8fb; border-radius: 10px; padding: 1rem; margin: 1rem 0; }
.big-ic { font-size: 3rem; }
.tlist { display: flex; flex-direction: column; gap: .5rem; margin-top: .6rem; }
.titem { display: flex; flex-direction: column; padding: .7rem .9rem; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 10px; color: inherit; text-decoration: none !important; }
.install-help p { font-size: .88rem; margin: .4rem 0; }

/* Landing */
body.landing { background: #fff; }
.l-top { display: flex; align-items: center; gap: .7rem; padding: 1rem max(1rem, calc((100% - 1100px) / 2)); background: var(--navy); color: #fff; flex-wrap: wrap; }
.l-top .btn.ghost { color: #fff; }
.l-hero { text-align: center; padding: 4.5rem 1rem; color: #fff; background: radial-gradient(1200px 400px at 50% -10%, #2b6cd8 0%, var(--navy) 70%); }
.l-hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); font-weight: 800; max-width: 820px; margin: 0 auto 1rem; letter-spacing: -.03em; }
.l-hero p { font-size: 1.15rem; max-width: 640px; margin: 0 auto 2rem; opacity: .85; }
.l-hero .btn.ghost { color: #fff; }
.l-features { max-width: 1100px; margin: 0 auto; padding: 3rem 1rem 1rem; }
.l-features h2 { text-align: center; font-size: 1.8rem; margin-bottom: 1.6rem; }
.l-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.l-feat { border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem; color: inherit; }
.l-feat span { font-size: 1.8rem; }
.l-feat h3 { margin: .5rem 0 .3rem; }
.l-feat p { margin: 0; color: var(--muted); font-size: .92rem; }
.tlink { text-decoration: none !important; }

/* ===== Diaporama ===== */
body.slideshow { background: #071327; color: #fff; height: 100vh; overflow: hidden; display: flex; flex-direction: column; font-size: clamp(16px, 1.35vw, 26px); }
.ss-head { display: flex; align-items: center; gap: 1rem; padding: .8rem 2rem; background: linear-gradient(90deg, var(--brand), #0b1f3a); }
.ss-head img { height: 2.6em; background: #fff; border-radius: 10px; padding: 4px; }
.ss-head h1 { margin: 0; font-size: 1.6em; }
.ss-clock { font-size: 1.6em; font-weight: 800; font-variant-numeric: tabular-nums; }
.ss-fs { background: rgba(255, 255, 255, .15); color: #fff; border: 0; border-radius: 8px; font-size: 1.2em; cursor: pointer; padding: .2em .5em; }
#slides { flex: 1; position: relative; overflow: hidden; }
.slide { position: absolute; inset: 0; padding: 1.5rem 2rem; opacity: 0; transform: translateX(30px); transition: opacity .6s, transform .6s; overflow: hidden; }
.slide.active { opacity: 1; transform: none; }
.slide h2 { font-size: 1.5em; display: flex; align-items: center; gap: .5em; margin-bottom: 1rem; }
.slide h3 { font-size: 1.15em; margin: 0 0 .5rem; }
.slideshow .muted { color: #93a6c4; }
.ss-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 2rem; }
.slideshow .pmatch { border-color: rgba(255, 255, 255, .12); }
.slideshow .pm-time small, .slideshow .pm-lab { color: #93a6c4; }
.ss-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.slideshow .ptable th { color: #93a6c4; border-color: rgba(255, 255, 255, .15); }
.slideshow .ptable td { border-color: rgba(255, 255, 255, .1); }
.slideshow .b-match { background: #102446; border-color: #1d3863; }
.slideshow .b-team + .b-team { border-color: #1d3863; }
.slideshow .b-team.win { background: rgba(18, 161, 80, .25); }
.slideshow .b-meta { background: #0c1d3a; color: #93a6c4; }
.leader.big li { padding: .5em 0; border-color: rgba(255, 255, 255, .12); font-size: 1.1em; }
.sponsor-wall.big .sp-item { background: #fff; color: var(--text); min-width: 260px; min-height: 140px; }
.ss-progress { height: 5px; background: rgba(255, 255, 255, .1); }
.ss-progress span { display: block; height: 100%; width: 0; background: var(--brand); }
.sponsor-ticker.dark { background: #fff; }

/* ===== Impression ===== */
body.print { background: #fff; padding: 1.5rem; }
.print-bar { display: flex; gap: .5rem; margin-bottom: 1rem; }
.print-table td, .print-table th { border: 1px solid #ccc; }
.sheet { border: 2px solid #222; border-radius: 8px; padding: 1rem; margin-bottom: 1rem; page-break-inside: avoid; }
.sheet-head { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #999; padding-bottom: .5rem; flex-wrap: wrap; }
.sheet-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; font-size: 1.3rem; font-weight: 700; padding: 1.2rem 0; text-align: center; }
.sheet-sets { display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.sheet-lines div { border-bottom: 1px solid #bbb; height: 1.8rem; }
.sheet-sign { display: flex; justify-content: space-between; margin-top: 1rem; }
@media print {
  .no-print { display: none !important; }
  body.print { padding: 0; }
  .sheet:nth-of-type(3n) { page-break-after: always; }
}

/* ===== Responsive ===== */
@media (max-width: 1000px) {
  .grid.three { grid-template-columns: 1fr 1fr; }
  .planner-wrap { grid-template-columns: 1fr; }
  .unsched { position: static; max-height: 260px; }
  .row4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .burger { display: block; }
  .crumb, .top-link:first-of-type { display: none; }
  .side-nav { position: fixed; left: 0; top: 56px; z-index: 30; transform: translateX(-100%); transition: transform .2s; box-shadow: 4px 0 20px rgba(0, 0, 0, .15); }
  body.nav-open .side-nav { transform: none; }
  .content { padding: 1rem; }
  .grid.two, .grid.three, .row2, .row3, .row4 { grid-template-columns: 1fr; }
  .copy-row { grid-template-columns: 1fr auto auto; }
  .copy-row span { grid-column: 1 / -1; font-weight: 600; }
  .score-list { grid-template-columns: 1fr; }
  .mrow { grid-template-columns: 46px 1fr auto 1fr; }
  .mrow > :last-child:not(.team) { display: none; }
  .table { display: block; overflow-x: auto; }
  .hide-sm { display: none; }
  .pm-info { max-width: 90px; }
  .ss-list, .ss-cols { grid-template-columns: 1fr; }
  .sponsor-row { grid-template-columns: 50px 1fr auto; }
  .sponsor-row select, .sponsor-row input { display: none; }
}
