/* data.footy-fanager.fr (docs/plans/033-player-pages.md).
   Same palette and type as the landing (client web/index.html) and the support
   pages (support.footy-fanager.fr): keep them in step. The score colours are the
   app's ScoreThemeData ones, lightened in dark mode. */
:root {
  --bg: #ddf2d3;
  --surface: #f6faf2;
  --surface-line: #c9e3bf;
  --ink: #143d22;
  --accent: #2e7d32;
  --body: #3c5e43;
  --muted: #5d7a62;
  --button: #2e6b35;
  --button-ink: #ffffff;
  --chip: #c8e6bd;
  --join: #2e6b35;
  --join-ink: #ffffff;
  --join-muted: #d4ecc9;
  --positive: #0072b2;        /* positiveScoreColor */
  --neutral: #7d9580;         /* neutralScoreColor, on green */
  --negative: #d55e00;        /* negativeScoreColor */
  --negative-text: #a34700;
  --radius: 16px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #133021;
    --surface: #1b3d2b;
    --surface-line: #2b5440;
    --ink: #ffffff;
    --accent: #8fd88a;
    --body: #c4e3c0;
    --muted: #9cc49a;
    --button: #8fd88a;
    --button-ink: #10291b;
    --chip: #24503a;
    --join: #24503a;
    --join-ink: #ffffff;
    --join-muted: #c4e3c0;
    --positive: #56b4e9;
    --neutral: #6f9474;
    --negative: #e69f00;
    --negative-text: #f0b84d;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--body);
  font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); overflow-wrap: anywhere; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { color: var(--ink); margin: 0; }
h1, h2 { font-family: "Lilita One", "DM Sans", sans-serif; font-weight: 400; }
h1 { font-size: clamp(38px, 8vw, 56px); line-height: 1.05; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: 24px; line-height: 1.15; }
h3 { font-size: 16px; line-height: 1.3; }

.top-inner, .page { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.top-inner { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; padding-top: 20px; padding-bottom: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: "Lilita One", "DM Sans", sans-serif; font-size: 22px; color: var(--ink); text-decoration: none; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.nav { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-weight: 700; font-size: 15px; }
.nav a { color: var(--ink); text-decoration: none; }
.nav a:hover { text-decoration: underline; }
.button {
  display: inline-block; background: var(--button); color: var(--button-ink) !important;
  font-weight: 700; text-decoration: none; text-align: center;
  border-radius: 999px; padding: 12px 24px; min-height: 44px;
}
.button:hover { filter: brightness(1.08); text-decoration: none !important; }
.nav .button { padding: 8px 18px; min-height: 0; }

.page { display: flex; flex-direction: column; gap: 20px; padding-top: 4px; }
.breadcrumb { font-size: 14px; color: var(--muted); }
.breadcrumb a { color: var(--muted); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; }

.kicker { font-weight: 700; font-size: 14px; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); margin: 0; }
.card { background: var(--surface); border: 1px solid var(--surface-line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 620px) { .card { padding: 24px 28px; } }

.hero-head { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
/* Jerseys sit on a tinted tile: white ones (Auxerre, Marseille) vanish on a pale card. */
.hero-head img { width: 112px; height: 112px; object-fit: contain; padding: 12px; background: var(--chip); border-radius: 20px; }
.hero-text { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.subtitle { color: var(--muted); font-size: 16px; margin: 0; }
.verdict { margin: 4px 0 0; font-size: 18px; max-width: 640px; }
.homonyms { margin: 0; font-size: 14px; color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.tile { background: var(--bg); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; }
.tile-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.tile-value { font-family: "Lilita One", "DM Sans", sans-serif; font-size: 34px; line-height: 1.15; color: var(--ink); }
.tile-note { font-size: 13px; color: var(--muted); }

.columns { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

.chart { display: flex; gap: 4px; }
.bar { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.bar-up { height: 116px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; border-bottom: 1px solid var(--surface-line); }
.bar-down { height: 40px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.bar-fill { width: 70%; max-width: 32px; }
.bar-up .bar-fill { border-radius: 4px 4px 0 0; }
.bar-down .bar-fill { border-radius: 0 0 4px 4px; }
.bar-value { font-size: 11px; font-weight: 700; color: var(--muted); white-space: nowrap; }
/* A label wider than its bar overflows evenly on both sides, centred under it. */
.bar-label { font-size: 11px; color: var(--muted); display: flex; justify-content: center; white-space: nowrap; min-height: 1.5em; }
.bar.best .bar-fill { background: var(--positive); }
.bar.played .bar-fill { background: var(--neutral); }
.bar.negative .bar-fill { background: var(--negative); }
.bar.best .bar-value { color: var(--positive); }
.bar.negative .bar-value { color: var(--negative-text); }
.bar.none .bar-value { color: var(--neutral); }
.chart.dense .bar-fill { width: 80%; }
@media (max-width: 600px) { .chart.dense { gap: 2px; } }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.swatch.best { background: var(--positive); }
.swatch.negative { background: var(--negative); }

.muted { margin: 0; font-size: 14px; color: var(--muted); }
.strength { display: flex; flex-direction: column; gap: 8px; }
.strength-head { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; font-size: 15px; }
.strength-head strong { color: var(--ink); }
.strength-head span { color: var(--positive); font-weight: 700; }
.track { height: 10px; background: var(--chip); border-radius: 5px; overflow: hidden; }
.track div { height: 10px; background: var(--positive); border-radius: 5px; }

.games { list-style: none; margin: 0; padding: 0; }
.game { display: flex; gap: 16px; align-items: center; padding: 12px 0; border-top: 1px solid var(--surface-line); }
.game-gw { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 12px; background: var(--chip); color: var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.game-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.game-text strong { color: var(--ink); }
.game-text span { font-size: 14px; color: var(--muted); }
.game-points { flex: 0 0 auto; font-family: "Lilita One", "DM Sans", sans-serif; font-size: 24px; color: var(--positive); white-space: nowrap; }

.faq { display: flex; flex-direction: column; gap: 4px; }
.faq p { margin: 0; font-size: 15px; }

.join { background: var(--join); color: var(--join-ink); border: none; }
.join h2 { color: var(--join-ink); }
.join .eyebrow { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--join-muted); }
.join p { margin: 0; color: var(--join-muted); font-size: 15px; }
.join .fixture { font-size: 15px; font-weight: 700; color: var(--join-ink); }
.join .button { background: #ffffff; color: #143d22 !important; }

.facts { display: flex; flex-direction: column; gap: 10px; font-size: 15px; border-top: 1px solid var(--surface-line); padding-top: 14px; }
.facts strong { color: var(--ink); }
.ownership-line { color: var(--positive); }
.links { list-style: none; margin: 0; padding: 0; }
.links a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--surface-line); color: var(--body); text-decoration: none; font-size: 15px; min-height: 44px; }
.links a:hover strong { text-decoration: underline; }
.links a strong { color: var(--ink); }
.links a em { font-style: normal; font-weight: 700; color: var(--accent); white-space: nowrap; }

.club-head { text-align: center; }
.club-head a { display: inline-flex; align-items: center; justify-content: center; gap: 12px; color: var(--ink); text-decoration: none; }
.club-head a:hover span { text-decoration: underline; }
.club-head img { width: 44px; height: 44px; object-fit: contain; flex: 0 0 auto; padding: 5px; background: var(--chip); border-radius: 10px; }
.clubs { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.hero { text-align: center; padding: 8px 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.club-jersey { width: 112px; height: 112px; object-fit: contain; padding: 12px; background: var(--chip); border-radius: 20px; }
.tile-value a { color: inherit; text-decoration: none; }
.tile-value a:hover { text-decoration: underline; }
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { text-decoration: underline; }
.links small { font-size: 13px; color: var(--muted); }
.tile-note a { color: inherit; }
.tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.tab { font-weight: 700; font-size: 15px; color: var(--ink); text-decoration: none; background: var(--chip); border-radius: 999px; padding: 8px 16px; }
.tab:hover { text-decoration: underline; }
.tab[aria-current="page"] { background: var(--button); color: var(--button-ink); }

.ranking-card { padding: 8px 12px; }
@media (min-width: 620px) { .ranking-card { padding: 12px 24px; } }
.ranking { width: 100%; border-collapse: collapse; font-size: 15px; }
.ranking th { text-align: left; font-size: 13px; font-weight: 700; color: var(--muted); padding: 10px 8px; }
.ranking td { padding: 8px; border-top: 1px solid var(--surface-line); vertical-align: middle; }
.ranking .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ranking .rank { color: var(--muted); font-weight: 700; width: 3.5em; }
.ranking .points { font-family: "Lilita One", "DM Sans", sans-serif; font-size: 20px; color: var(--positive); }
.ranking .who { display: flex; align-items: center; gap: 10px; }
.ranking .who img { width: 32px; height: 32px; object-fit: contain; padding: 3px; background: var(--chip); border-radius: 8px; flex: 0 0 auto; }
.ranking .who a { color: var(--ink); text-decoration: none; }
.ranking .who a:hover { text-decoration: underline; }
.ranking small { font-size: 13px; }
.ranking small a { color: var(--muted) !important; }
/* The player's row when reached from his page ("4e sur 29 gardiens"). */
.ranking tr:target td { background: var(--chip); }
.ranking tr { scroll-margin-top: 80px; }
@media (max-width: 520px) { .ranking .wide { display: none; } }
.hero .lead { font-size: 18px; margin: 4px auto 0; max-width: 560px; }

.footer { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: center; text-align: center; padding: 32px 0 40px; font-size: 14px; color: var(--muted); }
.footer a { color: inherit; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
