/**
 * Liverpool Xtra — Compo officielle sur terrain (accueil le jour du match, articles avec [compo], pages de notes).
 */

/* Compo officielle --------------------------------------------- */
.lineup { max-width: 560px; margin-inline: auto; }
.lineup__team-head { display: none; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; font-family: var(--font-display); font-stretch: 76%; font-size: 24px; font-weight: 800; }
.lineup__team-head .crest { width: 26px; height: 26px; object-fit: contain; }
html:not(.js) .lineup__team-head { display: flex; }
@media (min-width: 1000px) {
	.lineup--duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; max-width: 1100px; }
	.lineup--duo .lineup__tabs { display: none; }
	.lineup--duo .lineup__team { display: block; }
	.lineup--duo .lineup__team-head { display: flex; }
	.lineup--duo .lineup__team:only-of-type { grid-column: 1 / -1; width: 100%; max-width: 560px; justify-self: center; }
}
.home-lineup .section-head { max-width: 1100px; margin-inline: auto; }
.lineup__tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 4px; margin-bottom: 12px; border: 1px solid var(--rule); border-radius: 14px; background: var(--paper-2); }
.lineup__tabs button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 10px; border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--ink-2); min-width: 0; }
.lineup__tabs button > span:not(.lineup__formation-sm) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lineup__tabs button .crest { width: 20px; height: 20px; object-fit: contain; flex: none; }
.lineup__tabs [aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.lineup__formation-sm { font-size: 12px; color: var(--ink-3); }
.lineup__team { display: none; }
.lineup__team.is-active { display: block; }
html:not(.js) .lineup__team { display: block; margin-bottom: 20px; }
.pitch {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 6px;
	aspect-ratio: 3 / 4;
	padding: 34px 8px 20px;
	overflow: hidden;
	border-radius: 18px;
	background:
		linear-gradient(rgba(255, 255, 255, .55), rgba(255, 255, 255, .55)) center 50% / 100% 2px no-repeat,
		radial-gradient(circle at 50% 50%, transparent 52px, rgba(255, 255, 255, .55) 53px, rgba(255, 255, 255, .55) 54px, transparent 55px),
		repeating-linear-gradient(180deg, #2f8a3e 0 12.5%, #2a7f38 12.5% 25%);
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55);
}
.pitch::before,
.pitch::after {
	content: "";
	position: absolute;
	left: 25%; right: 25%;
	height: 14%;
	border: 2px solid rgba(255, 255, 255, .55);
	pointer-events: none;
}
.pitch::before { top: -2px; border-top: 0; }
.pitch::after { bottom: -2px; border-bottom: 0; }
.pitch__formation { position: absolute; top: 8px; left: 12px; z-index: 1; padding: 3px 8px; border-radius: 6px; background: rgba(0, 0, 0, .35); color: #fff; font-family: var(--font-display); font-stretch: 76%; font-size: 15px; font-weight: 800; }
.pitch__row { position: relative; z-index: 1; display: flex; justify-content: space-around; align-items: flex-start; }
.pitch__player { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 22%; min-width: 0; text-align: center; color: #fff; }
.pitch__shirt {
	position: relative;
	width: 48px; height: 48px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%;
	border: 2px solid #fff;
	background: var(--accent);
	box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
}
.pitch--them .pitch__shirt { background: #1d2430; }
.pitch__shirt img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: top; background: #fff; }
.pitch__number {
	position: absolute; right: -6px; bottom: -4px;
	min-width: 20px; height: 20px;
	display: inline-flex; align-items: center; justify-content: center;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	border: 1.5px solid #fff;
}
.pitch__num-only { font-family: var(--font-display); font-stretch: 76%; font-size: 20px; font-weight: 900; color: #fff; }
.pitch__name {
	max-width: 100%;
	padding: 1px 6px;
	border-radius: 6px;
	background: rgba(0, 0, 0, .45);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
a.pitch__player:hover .pitch__name { background: var(--accent); }
.lineup__bench { margin-top: 16px; }
.lineup__bench-title { font-size: 13px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent-ink); }
.lineup__subs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 16px; margin-top: 10px; font-size: 14px; }
.lineup__subs li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lineup__sub-num { min-width: 26px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; background: var(--paper-3); font-size: 12px; font-weight: 800; }
.lineup__subs a:hover { color: var(--accent-ink); }
.lineup__coach { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.lineup__coach a { font-weight: 800; color: var(--accent-ink); }
.match-lineup { margin-top: 28px; border: 1px solid var(--rule); border-radius: 16px; padding: 4px 18px; background: var(--paper); }
:root[data-theme="dark"] .match-lineup { background: var(--paper-2); }
.match-lineup summary { min-height: 50px; display: flex; align-items: center; font-weight: 800; cursor: pointer; }
.match-lineup[open] { padding-bottom: 18px; }
.entry-content .lineup { margin-block: 1.5em; }
@media (max-width: 420px) {
	.pitch { padding: 32px 4px 16px; }
	.pitch__shirt { width: 42px; height: 42px; }
	.pitch__name { font-size: 11px; padding: 1px 4px; }
}

/* Notes, buts, passes et remplacements sur le terrain */
.pitch__rating { position: absolute; right: -10px; bottom: -6px; min-width: 32px; padding: 2px 5px; border-radius: 6px; font-size: 12px; font-weight: 800; line-height: 1.3; text-align: center; color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); }
.pitch__shirt .pitch__number { left: -6px; right: auto; }
.rating-bg--elite { background: #4f46e5; }
.rating-bg--top { background: #0e8fa3; }
.rating-bg--good { background: #2f9e44; }
.rating-bg--meh { background: #d9730d; }
.rating-bg--low { background: #c92a2a; }
.rating-bg--none { background: #6b7280; }
.pitch__icons { position: absolute; top: -8px; right: -12px; display: flex; gap: 1px; }
.pitch__icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #fff; font-size: 11px; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.pitch__sub--out { position: absolute; top: -8px; left: -10px; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #e03131; color: #fff; font-size: 13px; font-weight: 900; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.pitch__captain { position: absolute; top: 50%; left: -16px; transform: translateY(-50%); width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #fff; color: #111; font-size: 10px; font-weight: 900; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.lineup__subs li { position: relative; }
.lineup__subs .pitch__rating { position: static; margin-left: auto; box-shadow: none; }
.lineup__subs .pitch__icons { position: static; }
.lineup__in { color: #2f9e44; font-weight: 900; }
.rating-switch { display: inline-flex; gap: 4px; margin-bottom: 14px; padding: 4px; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper); }
.rating-switch button { min-height: 38px; padding: 0 16px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.rating-switch [aria-pressed="true"] { background: var(--accent); color: #fff; }
