/* Raso Stats — styles. Couleurs : uniquement les variables de /themes.css (thèmes communs Raso Flag).
   Mise en page en propriétés logiques (inline/block) : l'arabe (dir="rtl") s'affiche en miroir sans règle spéciale. */
@font-face {
  font-family: 'League Spartan';
  src: url('/league-spartan.ttf') format('truetype');
  font-weight: 100 900;
  font-display: block;
}
:root {
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-ar: 'Noto Naskh Arabic', 'Noto Sans Arabic', 'Geeza Pro', 'Segoe UI', Tahoma, 'Arial', sans-serif;
  --radius: 14px;
  --bar-h: 40px;
  --tap: 48px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 var(--font); min-height: 100vh; }
html[dir='rtl'] body { font-family: var(--font-ar); line-height: 1.6; }
a { color: var(--accent-text); }
h1, h2, h3, h4 { line-height: 1.15; margin-block: 0 .5em; }
h1 { font-size: clamp(1.5rem, 5vw, 2.2rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
h4 { font-size: .95rem; color: var(--muted); }
.r-mark { font-family: 'League Spartan', var(--font); font-weight: 800; letter-spacing: -.02em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 99; }
.skip:focus { inset-inline-start: 8px; }
:focus-visible { outline: 3px solid var(--hl); outline-offset: 2px; }
.num, bdi.num { font-variant-numeric: tabular-nums; unicode-bidi: isolate; }

/* ---- Barres */
.raso-bar { height: var(--bar-h); display: flex; align-items: center; gap: 2px; padding-inline: 10px; background: var(--head); color: var(--head-ink); border-block-end: 1px solid var(--line); font-size: 13px; font-weight: 600; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.raso-bar a { color: var(--head-ink); text-decoration: none; padding: 5px 9px; border-radius: 8px; opacity: .85; }
.raso-bar a.on, .raso-bar a:hover { opacity: 1; background: color-mix(in srgb, var(--head-ink) 12%, transparent); }
.raso-bar .rb-brand { opacity: 1; font-weight: 700; }
.raso-bar .rb-brand .r-mark { color: var(--head-accent); font-size: 20px; }
.rb-space { flex: 1; }
.rb-app { background: transparent; color: var(--head-ink); border: 1px solid color-mix(in srgb, var(--head-ink) 30%, transparent); min-height: 30px; padding: 2px 10px; font-size: 13px; }
.rb-upgear { display: inline-flex; padding-inline: 8px; }
svg.upgear { fill: currentColor; }
.app-nav { display: flex; gap: 4px; padding: 6px 10px; background: var(--bg-2); border-block-end: 1px solid var(--line); overflow-x: auto; white-space: nowrap; position: sticky; top: 0; z-index: 10; }
.app-nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 14px; }
.app-nav a.on { background: var(--accent); color: var(--accent-ink); }

/* ---- Mise en page */
main { max-width: 1100px; margin: 0 auto; padding: 14px 12px 80px; }
.page > * + * { margin-block-start: 14px; }
.page-head, .dash-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.page-head h1, .page-head h2 { margin: 0; flex: 1; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.card.error { border-color: var(--danger); }
details.card > summary { cursor: pointer; list-style: none; }
details.card > summary h2, details.card > summary h3 { display: inline; }
details > summary::-webkit-details-marker { display: none; }
details > summary { cursor: pointer; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap, .wrap { flex-wrap: wrap; }
.two-col { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid2 { display: grid; gap: 10px 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.wide { grid-column: 1 / -1; }
.hint { color: var(--muted); font-size: .9rem; }
.good { color: var(--good); }
.warn { color: var(--warn); }
.boot { display: grid; place-items: center; min-height: 60vh; font-size: 64px; color: var(--accent-text); }

/* ---- Boutons et champs */
button, .btn { font: inherit; font-weight: 600; min-height: 44px; padding: 8px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--card-2); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; touch-action: manipulation; }
button:hover, .btn:hover { border-color: var(--muted); }
button:disabled { opacity: .45; cursor: not-allowed; }
.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.good.big, button.good { background: var(--good); color: var(--bg); border-color: var(--good); }
.danger { color: var(--danger); }
.primary.danger { background: var(--danger); color: var(--bg); border-color: var(--danger); }
.ghost { background: transparent; }
.big { min-height: 56px; font-size: 1.05rem; padding-inline: 18px; }
.small { min-height: 36px; padding: 4px 10px; font-size: .9rem; }
.icon { min-width: 44px; padding: 0; font-size: 1.4rem; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; min-height: 44px; padding: 8px 10px; width: 100%; }
input[type='checkbox'] { width: 22px; height: 22px; min-height: 0; accent-color: var(--accent); }
input[type='color'] { padding: 2px; height: 44px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-weight: 600; font-size: .9rem; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form-error { color: var(--danger); min-height: 1em; margin: 0; font-weight: 600; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.chip.live { background: var(--live); color: var(--live-ink); border-color: var(--live); }
.chip.good { color: var(--good); }
.chip.warn { color: var(--warn); border-color: var(--warn); }
.chip.strong { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters select { width: auto; flex: 1 1 150px; }
.tabs { display: flex; gap: 4px; margin-block-end: 12px; }
.tab { flex: 1; background: transparent; }
.tab.on { background: var(--accent); color: var(--accent-ink); }
.seg { background: var(--card-2); }
.seg.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu-list { position: absolute; inset-inline-end: 0; z-index: 20; display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px; min-width: 220px; box-shadow: 0 8px 30px rgba(0,0,0,.35); }

/* ---- Badges, listes */
.badge { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--team, var(--accent)); color: var(--team2, #000); font: 800 11px 'League Spartan', var(--font); flex: none; overflow: hidden; }
img.badge { object-fit: contain; background: transparent; }
.match-list, .team-list, .items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.match-row { display: grid; grid-template-columns: 58px 1fr auto 1fr auto; align-items: center; gap: 8px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.match-row.live { border-color: var(--live); }
.mr-date { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); }
.mr-team { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mr-team b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-team:last-of-type { justify-content: flex-end; }
.mr-score { font: 800 1.2rem 'League Spartan', var(--font); }
.team-row, .item-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.team-row span, .item-row > span:first-child { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.row-btns { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row-btns select { width: auto; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.quick > * { flex: 1 1 160px; }

/* ---- Accueil */
.hero { text-align: center; padding-block: 18px 4px; }
.brand-big { font-size: 3.2rem; margin: 0; font-weight: 700; }
.brand-big .r-mark { color: var(--accent-text); font-size: 4.2rem; }
.lead { color: var(--muted); max-width: 640px; margin-inline: auto; }
.features { list-style: none; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.features li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.features li span { color: var(--muted); font-size: .9rem; }
.auth { max-width: 520px; margin-inline: auto; width: 100%; }
.code { font: 800 1.4rem 'League Spartan', monospace; letter-spacing: .08em; background: var(--bg-2); padding: 10px; border-radius: 10px; text-align: center; user-select: all; }
.privacy { text-align: center; }

/* ---- Apparence (langue + thème) */
.appearance h3 { margin-block: 12px 6px; }
.lang-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.lang-pick .seg { flex: 1 1 110px; }
.theme-area { display: grid; gap: 12px; grid-template-columns: minmax(200px, 260px) 1fr; align-items: start; }
@media (max-width: 640px) { .theme-area { grid-template-columns: 1fr; } }
.theme-group h4 { margin: 8px 0 4px; }
.theme-list { display: flex; flex-wrap: wrap; gap: 6px; }
.theme-btn { min-height: 40px; padding: 4px 10px; font-size: .88rem; }
.theme-btn.on { outline: 3px solid var(--accent); }
.swatch { display: inline-flex; border-radius: 999px; overflow: hidden; border: 1px solid var(--line); }
.swatch i { width: 10px; height: 18px; display: block; }
.preview-card { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); position: sticky; top: 60px; }
.pv-head { background: var(--head); color: var(--head-ink); padding: 8px 12px; font-weight: 700; }
.pv-head .r-mark { color: var(--head-accent); font-size: 1.3rem; }
.pv-score { display: flex; justify-content: center; align-items: center; gap: 8px; padding: 14px; background: var(--card); color: var(--ink); font-size: 1.1rem; }
.pv-score strong { font: 800 2rem 'League Spartan', var(--font); }
.pv-row { display: flex; gap: 8px; padding: 10px; justify-content: center; background: var(--card-2); }
.pv-btn { background: var(--accent); color: var(--accent-ink); padding: 6px 12px; border-radius: 10px; font-weight: 700; }
.pv-chip { border: 1px solid var(--line); color: var(--muted); padding: 6px 10px; border-radius: 999px; }

/* ---- Installer l'app */
.install-card { border-color: var(--accent); }
.install-head { display: flex; gap: 12px; align-items: flex-start; }
.install-head > div { flex: 1; }
.install-head h2 { margin: 0; }
.app-ico { width: 52px; height: 52px; border-radius: 12px; background: #07110d; color: #d7ff3f; display: grid; place-items: center; font-size: 30px; flex: none; }
.steps { padding-inline-start: 22px; display: flex; flex-direction: column; gap: 8px; }
.steps li span { margin-inline-start: 6px; }
.ios-ico { vertical-align: middle; color: var(--accent-text); }
.ios-add { color: var(--accent-text); }

/* ---- Dialogues, messages */
.backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 50; padding: 12px; }
.modal { background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 16px; width: min(520px, 100%); max-height: 92vh; overflow: auto; }
.modal.wide { width: min(860px, 100%); }
.modal header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-block-end: 1px solid var(--line); position: sticky; top: 0; background: var(--card); }
.modal header h2 { margin: 0; }
.modal-body { padding: 14px; }
.modal footer { display: flex; gap: 8px; justify-content: flex-end; padding: 10px 14px; border-block-start: 1px solid var(--line); flex-wrap: wrap; }
#toast { position: fixed; inset-inline: 12px; bottom: 16px; margin-inline: auto; max-width: 480px; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-weight: 600; opacity: 0; transform: translateY(20px); transition: .2s; pointer-events: none; z-index: 60; text-align: center; }
#toast.show { opacity: 1; transform: none; }
#toast.bad { background: var(--danger); color: var(--bg); }
.share { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.qr svg { width: 220px; height: 220px; }
.url { word-break: break-all; text-align: center; }

/* ---- Tableaux */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.stats, table.roster-t { border-collapse: collapse; width: 100%; font-size: .9rem; font-variant-numeric: tabular-nums; }
table.stats caption { text-align: start; font-weight: 700; padding-block: 6px; color: var(--muted); }
table.stats th, table.stats td, table.roster-t th, table.roster-t td { padding: 6px 8px; border-block-end: 1px solid var(--line); text-align: end; white-space: nowrap; }
table.stats th[scope='row'], table.stats thead th:first-child { text-align: start; position: sticky; inset-inline-start: 0; background: var(--card); }
table.stats td.sorted { font-weight: 700; color: var(--accent-text); }
.th-btn { min-height: 30px; padding: 2px 4px; background: transparent; border: 0; font-size: .85rem; }
table.roster-t td { text-align: start; }
.roster-t input, .roster-t select { min-height: 40px; }
.n-in { width: 58px; }

/* ---- Fiche de match */
.match-head { display: flex; flex-direction: column; gap: 10px; }
.mh-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--muted); font-size: .9rem; }
.mh-score { direction: ltr; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; text-align: center; }
.mh-team { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mh-team .badge { width: 44px; height: 44px; font-size: 15px; }
.mh-num { font: 800 clamp(2.4rem, 11vw, 4rem) 'League Spartan', var(--font); display: flex; gap: 10px; align-items: center; }
.issues { padding-inline-start: 20px; }
.plays { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.plays li { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: 10px; background: var(--card-2); }
.plays li .desc { flex: 1; }
.plays li.deleted .desc { text-decoration: line-through; color: var(--muted); }
.plays li.imported { border-inline-start: 3px solid var(--warn); }
.plays .half-sep { background: transparent; font-weight: 700; color: var(--muted); justify-content: center; }
.plays .dot .badge { width: 18px; height: 18px; font-size: 7px; border-radius: 5px; }
.down { color: var(--muted); }
.moments { padding-inline-start: 22px; }
.wp-now { font-size: 1.1rem; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; }
.lg { display: inline-flex; gap: 6px; align-items: center; }
.sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.sw.complete { background: var(--good); }
.sw.incomplete { background: var(--muted); }
.sw.int { background: var(--danger); }
.sw.muted { background: var(--muted); }
.big-stats { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.big-stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.big-stat strong { font: 800 1.8rem 'League Spartan', var(--font); color: var(--accent-text); }
.big-stat span { color: var(--muted); font-size: .8rem; }
.leaders { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.leader-card { background: var(--card-2); border-radius: 12px; padding: 10px; }
.leader-card ol { margin: 0; padding-inline-start: 20px; }
.leader-card li { display: flex; justify-content: space-between; gap: 6px; padding-block: 2px; }
.leader-card li.first { font-weight: 700; }
.tendencies li { margin-block: 4px; }
pre.format { white-space: pre-wrap; font-size: .8rem; background: var(--bg-2); padding: 10px; border-radius: 10px; }
.card-preview canvas { width: 100%; max-width: 420px; height: auto; display: block; margin-inline: auto; border-radius: 12px; }

/* ---- Graphiques (orientation réelle, dir="ltr") */
.chart { margin: 0; }
.chart svg, svg.field, svg.line-chart, svg.drive-chart, svg.heat { width: 100%; height: auto; display: block; }
.line-chart .grid, .drive-chart .grid { stroke: var(--line); stroke-width: 1; }
.line-chart .axis, .drive-chart .axis, .heat .axis { fill: var(--muted); font-size: 10px; }
.line-chart .ln { stroke-width: 2.5; stroke-linejoin: round; }
.line-chart .half, .drive-chart .mid { stroke: var(--muted); stroke-dasharray: 4 4; }
.drive-chart .goal { stroke: var(--ink); }
.drive-chart .drive-t { fill: var(--ink); font-size: 9px; }
.marker { fill: var(--hl); stroke: var(--bg); stroke-width: 2; }
.marker-t { fill: var(--ink); font-size: 10px; font-weight: 700; }
.f-grass { fill: #1f6b3a; }
.f-ez { fill: #17552e; }
.f-ez-opp { fill: #185a31; }
.f-norun { fill: rgba(255,255,255,.08); }
.f-line { stroke: rgba(255,255,255,.35); stroke-width: 1; }
.f-mid { stroke: #fff; stroke-width: 2; stroke-dasharray: 6 4; }
.f-goal { stroke: #fff; stroke-width: 3; }
.f-num { fill: rgba(255,255,255,.7); font-size: 11px; }
.f-los { stroke: #4fc3ff; stroke-width: 3; }
.f-target { stroke: #ffe14d; stroke-width: 2; stroke-dasharray: 3 3; }
.f-mark { fill: #ffe14d; stroke: #000; stroke-width: 1.5; }
.f-mark.int, .f-pass.int { fill: #ff5f7e; }
.f-mark.incomplete, .f-pass.incomplete { fill: #cfd8dc; }
.f-pass.complete { fill: #d7ff3f; stroke: #000; stroke-width: 1; }
.f-pass.td { stroke: #fff; stroke-width: 3; }
.f-trail { stroke: #ffe14d; stroke-width: 3; }
svg.field.tappable { cursor: crosshair; touch-action: manipulation; }
.heat .cell { fill: var(--accent); }
.heat .cell-t { fill: var(--ink); font-size: 11px; font-weight: 700; }
.compare { display: flex; flex-direction: column; gap: 4px; font-size: .88rem; }
.cmp-head { display: flex; justify-content: space-between; }
.cmp-row { display: grid; grid-template-columns: 70px 1fr minmax(90px, 140px) 1fr 70px; align-items: center; gap: 6px; }
.cmp-l { text-align: center; color: var(--muted); font-size: .8rem; }
.cmp-v { font-variant-numeric: tabular-nums; }
.cmp-v:last-child { text-align: end; }
.cmp-v.best { font-weight: 800; color: var(--accent-text); }
.cmp-track { height: 10px; background: var(--card-2); border-radius: 6px; display: flex; overflow: hidden; }
.cmp-track.a { justify-content: flex-end; }
.cmp-bar { height: 100%; display: block; border-radius: 6px; }
@media (max-width: 520px) { .cmp-row { grid-template-columns: 56px 1fr 80px 1fr 56px; font-size: .8rem; } }

/* ---- Saisie en direct (téléphone, une main) */
.entry { max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.entry-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; position: sticky; top: 0; z-index: 12; background: var(--bg); padding-block: 6px; border-block-end: 1px solid var(--line); }
.back { font-size: 1.8rem; text-decoration: none; color: var(--ink); min-width: 40px; text-align: center; }
html[dir='rtl'] .back { transform: scaleX(-1); }
.sb { display: flex; align-items: center; gap: 6px; flex: 1; justify-content: center; font-size: .9rem; direction: ltr; }
.sb .sc { font: 800 1.8rem 'League Spartan', var(--font); }
.meta { display: flex; gap: 6px; flex-wrap: wrap; width: 100%; justify-content: center; }
.sync.ok { color: var(--good); font-size: .85rem; }
.sync.wait { color: var(--warn); font-size: .85rem; font-weight: 700; }
.sync.off { color: var(--danger); font-size: .85rem; font-weight: 700; }
.sit { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.poss { border-inline-start: 6px solid var(--team); }
.suggest { background: var(--card); border: 2px solid var(--accent); border-radius: var(--radius); padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.suggest:empty { display: none; }
.sg-text { display: flex; flex-direction: column; }
.sg-text small { color: var(--muted); }
.sg-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid-actions:empty { display: none; }
.act { min-height: 72px; font-size: 1.1rem; border-radius: 16px; }
.act.pass { background: var(--good); color: var(--bg); border-color: var(--good); }
.act.int, .act.sack { background: var(--danger); color: var(--bg); border-color: var(--danger); }
.act.pen { background: var(--warn); color: var(--bg); border-color: var(--warn); }
.act.small { min-height: 52px; font-size: .95rem; }
.try-pick { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.try-pick .seg { min-height: 56px; }
.more { grid-column: 1 / -1; }
.more summary { padding: 10px; color: var(--muted); font-weight: 600; }
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.side-pick { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.form-sheet { background: var(--card); border: 2px solid var(--accent); border-radius: var(--radius); padding: 12px; display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 90px; }
.fs-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fs-head h2 { margin: 0; }
.fs-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; position: sticky; bottom: 0; background: var(--card); padding-block: 8px; margin-block-end: -12px; }
.seg-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.seg-row .seg { flex: 1; min-height: 48px; }
.seg-row.small .seg { min-height: 40px; flex: 0 1 auto; }
.pick { display: flex; flex-direction: column; gap: 6px; }
.pick-l { font-weight: 700; font-size: .9rem; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pchip { min-height: 48px; min-width: 56px; padding: 6px 10px; border-radius: 12px; }
.pchip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.num-in { width: 70px; min-height: 48px; text-align: center; }
.yards { display: flex; flex-direction: column; gap: 6px; }
.yd-row { display: flex; gap: 6px; align-items: center; }
.yd { flex: 1; min-height: 52px; font-size: 1.05rem; }
.yd.on { background: var(--accent); color: var(--accent-ink); }
.yd-val { min-width: 70px; text-align: center; font: 800 2rem 'League Spartan', var(--font); }
.togs { display: flex; flex-wrap: wrap; gap: 6px; }
.tog { min-height: 48px; flex: 1 1 120px; }
.tog.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.mini-field { display: flex; flex-direction: column; gap: 4px; }
.mini-field svg { max-height: 320px; }
.inline { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.small-in { max-width: 120px; }
.big-select { min-height: 52px; }
.preview { background: var(--bg-2); padding: 8px 10px; border-radius: 10px; margin: 0; font-weight: 600; }
.extras summary { color: var(--muted); font-weight: 600; padding-block: 4px; }
.extras[open] { display: flex; flex-direction: column; gap: 8px; }
.journal .j-head { display: flex; justify-content: space-between; align-items: center; }
.journal h2 { margin: 0; }
.row-btns .small { min-width: 40px; }

/* ---- Écran TV */
html.tv-mode #app-nav, html.tv-mode .raso-bar { display: none; }
html.tv-mode main { max-width: none; padding: 2vw; }
.tv { display: flex; flex-direction: column; gap: 2vh; min-height: 96vh; }
.tv-brand { font-size: 3vw; font-weight: 700; display: flex; align-items: center; gap: 1vw; }
.tv-brand .r-mark { color: var(--accent-text); font-size: 4vw; }
.tv .mh-meta { font-size: 1.6vw; justify-content: center; }
.tv .mh-num { font-size: 16vw; }
.tv .mh-team b { font-size: 3vw; }
.tv .mh-team .badge { width: 10vw; height: 10vw; font-size: 3vw; }
.tv-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 2vw; font-size: 1.7vw; }
.tv-grid h2 { font-size: 2vw; }
.tv-leaders ul { list-style: none; padding: 0; margin: 0; }
.tv-leaders li { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 1vw; padding: .6vw 0; border-block-end: 1px solid var(--line); }

/* ---- Impression (feuille de stats, stats de saison) */
@media print {
  .raso-bar, .app-nav, .no-print, #toast, .install-card, .appearance-card, details.settings, button { display: none !important; }
  body { background: #fff; color: #000; font-size: 11px; }
  main { max-width: none; padding: 0; }
  .card { border: 1px solid #999; break-inside: avoid; background: #fff; }
  table.stats th[scope='row'] { background: #fff; }
  .mh-num { font-size: 2.4rem; }
  a { color: #000; text-decoration: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
@media (max-width: 480px) { .match-row { grid-template-columns: 44px 1fr auto 1fr; } .match-row > .chip { display: none; } }

/* Pied de page (Confidentialité et mentions légales) et page légale */
.site-foot { text-align: center; font-size: 13px; color: var(--muted); padding: 18px 14px 28px; }
.site-foot a { color: var(--muted); }
.legal h2 { font-size: 17px; margin-block-start: 22px; }
.legal p { max-inline-size: 70ch; }
.legal a { overflow-wrap: anywhere; }
