/**
 * Liverpool Xtra — Pages de match, Prochain match et Calendrier.
 */

.match-page__eyebrow { margin-top: 24px; font-size: 13px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); }
h2.match-page__title a:hover { color: var(--accent-ink); }
.scorecard__goals--time { font-size: clamp(44px, 8vw, 64px); }
.scorecard__facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule); font-size: 14px; color: var(--ink-2); }
.scorecard__facts li { display: inline-flex; align-items: center; gap: 6px; }

.match-section { margin-top: 40px; }
.match-section__title { font-family: var(--font-display); font-stretch: 70%; font-size: clamp(28px, 3.6vw, 38px); font-weight: 800; line-height: 1; margin-bottom: 14px; }
.match-section__intro { margin: -6px 0 14px; font-size: 14px; color: var(--ink-3); }

.odds { display: flex; gap: 6px; max-width: 760px; }
.odds__item { min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--paper-3); }
.odds__item--home { background: color-mix(in srgb, var(--accent) 14%, var(--paper)); }
.odds__pct { font-family: var(--font-display); font-stretch: 70%; font-size: 30px; font-weight: 900; line-height: 1; }
.odds__label { font-size: 13px; font-weight: 700; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.form-duo { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.form-duo__team { padding: 16px; border: 1px solid var(--rule); border-radius: 18px; background: var(--paper); }
:root[data-theme="dark"] .form-duo__team { background: var(--paper-2); }
.form-duo__name { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.form-duo__name .crest { width: 24px; height: 24px; object-fit: contain; }
.form-duo__list { display: grid; gap: 6px; margin-top: 12px; }
.form-duo__list li { display: grid; grid-template-columns: 24px 44px minmax(0, 1fr); align-items: center; gap: 10px; font-size: 14px; }
.form-duo__score { font-weight: 800; font-variant-numeric: tabular-nums; }
.form-duo__opp { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-dot { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px; font-size: 11px; font-weight: 800; color: #fff; }
.st-dot--win { background: #2f9e44; }
.st-dot--draw { background: #868e96; }
.st-dot--loss { background: #c92a2a; }

.h2h { display: grid; border-top: 1px solid var(--rule); max-width: 820px; }
.h2h__row { display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.h2h__date, .h2h__comp { font-size: 13px; color: var(--ink-3); }
.h2h__teams strong { padding: 0 6px; font-variant-numeric: tabular-nums; }
.absent-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.absent-card { display: flex; align-items: center; gap: 12px; height: 100%; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 18px; background: var(--paper); transition: border-color .15s; }
:root[data-theme="dark"] .absent-card { background: var(--paper-2); }
a.absent-card:hover { border-color: var(--accent); }
.absent-card__photo { width: 52px; height: 52px; flex: none; 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); }
.absent-card__photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.absent-card__text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.absent-card__name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.absent-card__reason { font-size: 13px; color: var(--ink-3); }
.absent-card__state { flex: none; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.absent-card__state--out { background: color-mix(in srgb, #e03131 13%, transparent); color: #c92a2a; }
.absent-card__state--doubt { background: color-mix(in srgb, #f08c00 16%, transparent); color: #c76a00; }

.mstats { max-width: 820px; padding: 20px clamp(14px, 3vw, 26px); border: 1px solid var(--rule); border-radius: 24px; background: var(--paper); }
:root[data-theme="dark"] .mstats { background: var(--paper-2); }
.mstats__teams { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; font-weight: 800; }
.mstats__teams > span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mstats__teams > span:last-child { justify-content: flex-end; }
.mstats__teams .crest { width: 28px; height: 28px; object-fit: contain; }
.mstats__vs { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.mstats__poss { margin-top: 18px; padding: 16px; border: 1px solid var(--rule); border-radius: 18px; text-align: center; }
.mstats__poss-title { font-weight: 700; margin-bottom: 10px; }
.mstats__poss-bar { display: flex; height: 44px; border-radius: 999px; overflow: hidden; background: #1d2430; font-weight: 800; }
:root[data-theme="dark"] .mstats__poss-bar { background: #3b4352; }
.mstats__poss-home { display: flex; align-items: center; padding-left: 16px; background: var(--accent); color: #fff; }
.mstats__poss-away { display: flex; align-items: center; justify-content: flex-end; flex: 1; padding-right: 16px; color: #fff; }
.mstats__list { display: grid; margin-top: 10px; }
.mstats__row { display: grid; grid-template-columns: minmax(70px, auto) 1fr minmax(70px, auto); align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.mstats__row:last-child { border-bottom: 0; }
.mstats__label { text-align: center; font-size: 15px; color: var(--ink-2); }
.mstats__val { justify-self: start; padding: 4px 12px; border-radius: 999px; font-weight: 800; font-variant-numeric: tabular-nums; }
.mstats__val--away { justify-self: end; }
.mstats__val.is-best { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-ink); }

.match-live { margin-top: 32px; padding: 18px; border: 1px solid var(--bad); border-radius: 18px; }

/* Calendrier */
.cal-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.cal-filters button { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 18px 0 12px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper-2); font-weight: 700; color: var(--ink-2); }
.cal-filters { margin-bottom: 8px; }
.cal-filters [aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.cal-list { display: grid; gap: 8px; }
.cal-row[hidden] { display: none; }
.cal-row__link { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 12px 16px; border: 1px solid var(--rule); border-radius: 16px; background: var(--paper); }
:root[data-theme="dark"] .cal-row__link { background: var(--paper-2); }
a.cal-row__link:hover { border-color: var(--accent); }
.cal-row__date { display: flex; flex-direction: column; font-size: 14px; line-height: 1.25; }
.cal-row__date span { color: var(--ink-3); }
.cal-row__match { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cal-row__match .crest { width: 28px; height: 28px; object-fit: contain; flex: none; }
.cal-row__opp { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-row__venue { flex: none; padding: 2px 8px; border-radius: 999px; background: var(--paper-3); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.cal-row__comp { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.cal-row__end { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 90px; }
.cal-row__score { font-family: var(--font-display); font-stretch: 72%; font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
@media (max-width: 680px) {
	.cal-row__link { grid-template-columns: 76px minmax(0, 1fr) auto; gap: 10px; padding: 10px 12px; }
	.cal-row__comp { display: none; }
	.cal-row__venue { display: none; }
	.h2h__row { grid-template-columns: 1fr; gap: 2px; }
}

/* Onglets de la page de match */
.match-tabs { margin-top: 28px; }
.seg--sub { margin: 18px 0; border-radius: 999px; background: var(--paper); box-shadow: 0 8px 24px rgba(0, 0, 0, .05); }
.seg--sub button { min-height: 46px; border-radius: 999px; font-size: 15px; }
.seg--sub [aria-selected="true"] { background: var(--accent); color: #fff; box-shadow: none; }
#panel-notes .motm-block { margin-top: 18px; }
@media (max-width: 560px) {
	.seg button { min-height: 46px; font-size: 15px; }
	.seg--sub { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); border-radius: 18px; }
	.seg--sub button { border-radius: 12px; }
}

/* Film du match : chronologie centrale, équipe à domicile à gauche, extérieur à droite */
.film { max-width: 820px; padding: 20px clamp(14px, 3vw, 26px); border: 1px solid var(--rule); border-radius: 24px; background: var(--paper); }
:root[data-theme="dark"] .film { background: var(--paper-2); }
.film__head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--rule); font-weight: 800; }
.film__head > span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.film__head > span:last-child { justify-content: flex-end; }
.film__head .crest { width: 28px; height: 28px; object-fit: contain; }
.film__list { position: relative; display: grid; gap: 4px; padding: 14px 0 4px; }
.film__list::before { content: ""; position: absolute; top: 14px; bottom: 4px; left: 50%; width: 2px; margin-left: -1px; background: var(--rule); }
.film__row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 48px; }
.film__min { z-index: 1; justify-self: center; min-width: 46px; padding: 3px 8px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--paper); font-size: 13px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
:root[data-theme="dark"] .film__min { background: var(--paper-2); }
.film__row--goal .film__min, .film__row--pen .film__min, .film__row--own .film__min { border-color: var(--accent); background: var(--accent); color: #fff; }
.film__side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.film__side--home { justify-content: flex-end; text-align: right; }
.film__side--away { justify-content: flex-start; }
.film__side--home .film__ico { order: 2; }
.film__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.film__name { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.film__detail { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.film__ico { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--paper-2); color: var(--ink); }
:root[data-theme="dark"] .film__ico { background: var(--paper-3); }
.film__row--goal .film__ico, .film__row--pen .film__ico { background: color-mix(in srgb, var(--accent) 14%, var(--paper)); color: var(--accent-ink); }
.film__row--own .film__ico { color: var(--bad); }
.film__card { display: block; width: 12px; height: 16px; border-radius: 2px; transform: rotate(8deg); }
.film__card--yellow { background: #f5c518; }
.film__card--red { background: #e03131; }
.film__sub-in { color: #2f9e44; }
.film__sub-out { color: #e03131; }
.film__score { margin-left: 6px; padding: 1px 7px; border-radius: 6px; background: var(--paper-3); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.film__sep { position: relative; z-index: 1; justify-self: center; margin: 8px 0; padding: 5px 14px; border-radius: 999px; background: var(--paper-3); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.film__sep--end { background: var(--ink); color: var(--paper); }
@media (max-width: 560px) {
	.film__row { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); gap: 6px; }
	.film__ico { width: 26px; height: 26px; }
	.film__name { font-size: 14px; }
	.film__detail { font-size: 12px; }
}

/* Blocs centrés comme la compo */
.match-page .mstats, .match-page .film, .match-page .h2h, .match-page .odds, .match-page .absent-list, .match-page .form-duo { margin-inline: auto; }
.match-page .form-duo, .match-page .absent-list { max-width: 820px; }
.match-page .match-section__title, .match-page .match-section__intro { max-width: 820px; margin-inline: auto; }
.film__ico .sport-icon--yellow, .film__ico .sport-icon--red { width: 20px; height: 20px; }
.cal-row__notes { padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--accent) 12%, transparent); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-ink); }

.cal-filters__logo { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 6px; background: #fff; }
.cal-filters__logo img { width: 18px; height: 18px; object-fit: contain; }

.scorecard__facts .icon, .scorecard__facts .sport-icon { color: var(--accent-ink); }

/* Dernières confrontations */
.h2h-cards { display: grid; gap: 10px; max-width: 820px; margin-inline: auto; }
.h2h-card { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--rule); border-radius: 18px; background: var(--paper); transition: border-color .15s; }
:root[data-theme="dark"] .h2h-card { background: var(--paper-2); }
a.h2h-card:hover { border-color: var(--accent); }
.h2h-card__meta { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.h2h-card__comp { width: 18px; height: 18px; object-fit: contain; }
.h2h-card__row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; }
.h2h-card__team { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; font-weight: 800; }
.h2h-card__team--away { justify-content: flex-start; }
.h2h-card__team .crest { width: 26px; height: 26px; object-fit: contain; flex: none; }
.h2h-card__score { min-width: 64px; padding: 4px 12px; border-radius: 999px; font-family: var(--font-display); font-stretch: 72%; font-size: 22px; font-weight: 900; text-align: center; color: #fff; background: #6b7280; }
.h2h-card__score--w { background: #2f9e44; }
.h2h-card__score--l { background: #c92a2a; }
@media (max-width: 560px) { .h2h-card__team { font-size: 14px; } .h2h-card__score { min-width: 56px; font-size: 20px; } }
