/**
 * Liverpool Xtra — Page Stats : classements de l'effectif et comparateur.
 */

.stat-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.stat-tabs button { min-height: 42px; padding: 0 18px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper-2); font-weight: 700; color: var(--ink-2); }
.stat-tabs button:hover { border-color: var(--accent); }
.stat-tabs [aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.rank-list { display: none; max-width: 820px; }
.rank-list.is-active { display: grid; gap: 6px; }
html:not(.js) .rank-list { display: grid; gap: 6px; margin-bottom: 28px; }
.rank-row { display: grid; grid-template-columns: 32px 52px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 14px; border: 1px solid var(--rule); border-radius: 16px; background: var(--paper); transition: border-color .15s; }
:root[data-theme="dark"] .rank-row { background: var(--paper-2); }
.rank-row:hover { border-color: var(--accent); }
li:first-child > .rank-row { border-color: color-mix(in srgb, var(--accent) 40%, var(--rule)); }
.rank-row__pos { font-family: var(--font-display); font-stretch: 72%; font-size: 24px; font-weight: 900; color: var(--accent-ink); text-align: center; }
.rank-row__avatar { width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 50%; background: var(--paper-3); font-weight: 800; color: var(--ink-3); }
.rank-row__avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.rank-row__who { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rank-row__name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row__meta { font-size: 13px; color: var(--ink-3); }
.rank-row__bar { height: 6px; border-radius: 999px; background: var(--paper-3); overflow: hidden; }
.rank-row__bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.rank-row__value { font-family: var(--font-display); font-stretch: 70%; font-size: 30px; font-weight: 900; font-variant-numeric: tabular-nums; }
.rank-row__value .rating { font-size: inherit; }

.compare__pickers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 820px; }
.compare__picker select { width: 100%; min-height: 52px; padding: 0 40px 0 16px; border: 1px solid var(--rule-strong); border-radius: 14px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; font-size: 16px; font-weight: 700; -webkit-appearance: none; appearance: none; }
.compare__table { max-width: 820px; margin-top: 18px; }
.compare__heads { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 10px; }
.compare__head { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.compare__head img, .compare__head .compare__initials { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; object-position: top; background: var(--paper-3); border: 3px solid var(--accent); }
.compare__head:last-child img, .compare__head:last-child .compare__initials { border-color: #1d2430; }
.compare__initials { display: inline-flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; color: var(--ink-3); }
.compare__head a { font-family: var(--font-display); font-stretch: 76%; font-size: 22px; font-weight: 800; }
.compare__head span { font-size: 13px; color: var(--ink-3); }
.compare__row { display: grid; grid-template-columns: 1fr minmax(110px, auto) 1fr; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); font-variant-numeric: tabular-nums; }
.compare__row > span:first-child { text-align: right; }
.compare__label { text-align: center; font-size: 13px; color: var(--ink-3); }
.compare__val { font-weight: 700; }
.compare__val.is-best { font-weight: 900; color: var(--accent-ink); }
.stats-page__text { max-width: var(--read-w); margin: 32px auto 0; }
@media (max-width: 560px) {
	.rank-row { grid-template-columns: 26px 44px minmax(0, 1fr) auto; gap: 10px; padding: 8px 10px; }
	.rank-row__avatar { width: 44px; height: 44px; }
	.rank-row__value { font-size: 24px; }
	.compare__head img, .compare__head .compare__initials { width: 64px; height: 64px; }
	.compare__head a { font-size: 18px; }
	.compare__row { grid-template-columns: 1fr minmax(90px, auto) 1fr; gap: 8px; font-size: 14px; }
}
