/**
 * Liverpool Xtra — Pages de notes des lecteurs et liste des matchs notés (chargé seulement sur ces pages).
 */

/* Notes des lecteurs --------------------------------------------- */
.motm-badge {
	display: inline-flex; align-items: center; gap: 5px;
	padding: 3px 9px 3px 6px;
	border-radius: 999px;
	background: var(--accent);
	color: #fff;
	font-family: var(--font-ui);
	font-stretch: 100%;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .08em;
	text-transform: uppercase;
	vertical-align: middle;
	white-space: nowrap;
}
.motm-badge .icon { color: var(--yellow); }
.mcards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.mcard { border: 1px solid var(--rule); border-radius: 16px; background: var(--paper); transition: border-color .15s, box-shadow .15s; }
:root[data-theme="dark"] .mcard { background: var(--paper-2); }
.mcard:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--rule)); box-shadow: 0 12px 30px rgba(0, 0, 0, .07); }
.mcard__link { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.mcard__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mcard__status { font-size: 12px; font-weight: 700; color: var(--ink-3); }
.mcard__status.is-open { color: var(--ok); }
.mcard__score { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; font-size: 14px; font-weight: 700; }
.mcard__score > span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mcard__score > span:last-child { justify-content: flex-end; text-align: right; }
.mcard__score .crest { width: 32px; height: 32px; object-fit: contain; flex: none; }
.mcard__score strong { font-family: var(--font-display); font-stretch: 70%; font-size: 30px; font-weight: 900; }
.mcard__motm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; border-top: 1px solid var(--rule); }
.mcard__motm-name { font-weight: 800; }
.mcard__motm .rating { margin-left: auto; font-size: 22px; font-stretch: 72%; }
.back-pill {
	display: inline-flex; align-items: center; gap: 10px;
	margin-top: 24px;
	min-height: 44px;
	padding: 0 20px;
	border: 1px solid var(--rule-strong);
	border-radius: 999px;
	font-size: 15px;
	font-weight: 700;
	transition: border-color .15s;
}
.back-pill:hover { border-color: var(--ink); }
.match-page__title {
	margin-top: 24px;
	font-family: var(--font-display);
	font-stretch: 70%;
	font-size: clamp(36px, 5vw, 60px);
	font-weight: 800;
	line-height: 1;
	text-wrap: balance;
}
.scorecard {
	margin-top: 20px;
	padding: 24px clamp(16px, 4vw, 40px) 28px;
	text-align: center;
	background: var(--paper);
	border: 1px solid var(--rule);
	border-radius: 24px;
}
:root[data-theme="dark"] .scorecard { background: var(--paper-2); }
.scorecard__comp { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-3); }
.scorecard__comp .crest { width: 22px; height: 22px; object-fit: contain; }
.scorecard__row { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 12px; margin-top: 18px; }
.scorecard__team { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; font-family: var(--font-display); font-stretch: 76%; font-size: clamp(20px, 3vw, 28px); font-weight: 800; line-height: 1.05; }
.scorecard__team .crest { width: clamp(52px, 9vw, 72px); height: clamp(52px, 9vw, 72px); object-fit: contain; }
.scorecard__score { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 4px; }
.scorecard__goals { font-family: var(--font-display); font-stretch: 66%; font-size: clamp(56px, 10vw, 88px); font-weight: 900; line-height: .9; white-space: nowrap; }
.scorecard__dash { margin: 0 .12em; color: var(--rule-strong); }
.scorecard__state { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.motm-block { margin-top: 24px; padding: 0 clamp(4px, 2vw, 24px); }
.motm-block[hidden] { display: none; }
.motm-block__label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink-3); }
.motm-block__label .icon { color: var(--accent); }
.motm-block__who { display: flex; align-items: center; gap: 16px; margin-top: 12px; }
.motm-block__avatar {
	width: 64px; height: 64px;
	flex: none;
	display: inline-flex; align-items: center; justify-content: center;
	overflow: hidden;
	border-radius: 50%;
	border: 2px solid var(--accent);
	background: var(--paper-2);
	font-weight: 800;
	color: var(--ink-3);
}
.motm-block__avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.motm-block__name { font-family: var(--font-display); font-stretch: 72%; font-size: 32px; font-weight: 800; line-height: 1; }
.motm-block__meta { margin-top: 12px; font-size: 14px; color: var(--ink-3); }
.match-page__intro { max-width: var(--read-w); margin-top: 28px; }
.rate-section { margin-top: 44px; }
.rate-section__title { font-family: var(--font-display); font-stretch: 70%; font-size: clamp(34px, 4.4vw, 48px); font-weight: 800; line-height: 1; }
.rate-section__intro { max-width: 62ch; margin-top: 10px; font-size: 16px; color: var(--ink-2); }
.share-btn { margin-top: 18px; }
.vote-notice { margin-top: 18px; padding: 14px 18px; border-left: 4px solid var(--warn); background: var(--paper-2); font-weight: 600; }
.vote-notice.is-ok { border-left-color: var(--ok); }
.rate-form { margin-top: 28px; }
.rate-group {
	margin-top: 40px;
	padding-bottom: 12px;
	border-bottom: 3px solid var(--ink);
	font-size: 14px;
	font-weight: 800;
	letter-spacing: .2em;
	text-transform: uppercase;
}
.rate-card { padding: 26px 0; border-bottom: 1px solid var(--rule); }
.rate-card--coach {
	padding: 24px clamp(16px, 3vw, 28px);
	border: 1px solid var(--rule);
	border-radius: 24px;
	background: var(--paper);
}
:root[data-theme="dark"] .rate-card--coach { background: var(--paper-2); }
.rate-card__head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; }
.rate-card__avatar {
	width: 72px; height: 72px;
	display: inline-flex; align-items: center; justify-content: center;
	overflow: hidden;
	border-radius: 50%;
	background: var(--paper-2);
	font-size: 20px;
	font-weight: 800;
	color: var(--ink-3);
}
.rate-card__avatar img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.rate-card__role { font-size: 13px; font-weight: 800; }
.rate-card__name { margin-top: 2px; font-family: var(--font-display); font-stretch: 72%; font-size: clamp(26px, 3vw, 32px); font-weight: 800; line-height: 1.05; }
.rate-card__name a:hover { color: var(--accent-ink); }
.rate-card__meta { margin-top: 4px; font-size: 14px; color: var(--ink-3); }
.rate-card__avg { display: flex; flex-direction: column; align-items: center; min-width: 96px; text-align: center; }
.rate-card__avg-label { font-size: 12px; color: var(--ink-3); }
.rate-card__avg-value .rating { font-size: 46px; font-stretch: 66%; line-height: 1.05; }
.rate-card__count { font-size: 13px; color: var(--ink-3); }
.rate-card__hint { display: none; max-width: 110px; font-size: 12px; font-weight: 600; line-height: 1.3; color: var(--ink-3); }
.rate-card__your { margin-top: 18px; font-size: 14px; color: var(--ink-3); }
.rate-scale { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.rate-btn {
	--c: var(--ink-3);
	height: 46px;
	border: 1px solid var(--rule-strong);
	border-bottom: 4px solid var(--c);
	border-radius: 8px;
	background: var(--paper);
	font-size: 17px;
	font-weight: 700;
	color: var(--ink-2);
	transition: background-color .12s, color .12s, transform .12s;
}
:root[data-theme="dark"] .rate-btn { background: var(--paper-2); }
.rate-btn--low { --c: #e0645f; }
.rate-btn--meh { --c: #e8a54b; }
.rate-btn--good { --c: #59c26b; }
.rate-btn--top { --c: #4fb5c8; }
.rate-btn--elite { --c: #7178e6; }
.rate-btn:not([disabled]):hover { color: var(--ink); transform: translateY(-1px); }
.rate-btn[aria-pressed="true"] { background: var(--c); border-color: var(--c); color: #fff; }
.rate-btn[disabled] { cursor: default; }
.rate-btn[disabled]:not([aria-pressed="true"]) { opacity: .75; }
.rate-card__motm { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 14px; }
.motm-btn {
	display: inline-flex; align-items: center; gap: 10px;
	min-height: 48px;
	padding: 0 18px;
	border: 1px solid var(--rule-strong);
	border-radius: 8px;
	font-size: 16px;
	font-weight: 700;
	transition: border-color .12s, background-color .12s, color .12s;
}
.motm-btn__star { fill: none; }
.motm-btn:not([disabled]):hover { border-color: var(--accent); }
.motm-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.motm-btn[aria-pressed="true"] .motm-btn__star { fill: var(--yellow); stroke: var(--yellow); }
.motm-btn[disabled] { cursor: default; }
.rate-card__motm-count { font-size: 15px; color: var(--ink-3); }
.rate-card__msg { margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--bad); }
.rate-card__msg:empty { display: none; }
.js .rate-form[data-open="1"] .rate-card:not(.is-revealed) [data-avg],
.js .rate-form[data-open="1"] .rate-card:not(.is-revealed) [data-count],
.js .rate-form[data-open="1"] .rate-card:not(.is-revealed) .rate-card__avg-label,
.js .rate-form[data-open="1"] .rate-card:not(.is-revealed) [data-motm],
.js .rate-form[data-open="1"] .rate-card:not(.is-revealed) .rate-card__refs,
.js .rate-form[data-open="1"] .rate-card:not(.is-revealed) .rate-card__editor { display: none; }
.js .rate-form[data-open="1"] .rate-card:not(.is-revealed) .rate-card__hint { display: block; }
@media (max-width: 560px) {
	.rate-card__head { grid-template-columns: auto minmax(0, 1fr); }
	.rate-card__avg { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; gap: 10px; align-items: baseline; min-width: 0; text-align: left; }
	.rate-card__avg-value .rating { font-size: 38px; }
	.rate-card__hint { max-width: none; }
	.rate-card__avatar { width: 60px; height: 60px; }
	.rate-scale { gap: 4px; }
	.rate-btn { height: 42px; font-size: 15px; border-radius: 6px; }
	.motm-btn { width: 100%; justify-content: center; }
}
.more-matches { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--rule); }
.more-matches__title { font-family: var(--font-display); font-stretch: 70%; font-size: clamp(30px, 4vw, 44px); font-weight: 800; line-height: 1.05; }
.more-matches .btn { margin-top: 20px; }
.scorecard__state.is-live { color: var(--bad); }
.scorecard__state.is-live::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: currentColor; vertical-align: 1px; }

/* Bilan des pronostics */
.prono-recap { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--rule); }
.prono-recap__title { font-family: var(--font-display); font-stretch: 70%; font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; line-height: 1; margin-bottom: 16px; }

/* Notes de référence : stats (API) et rédaction */
.rate-card__refs { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; margin-top: 6px; }
.rate-card__ref { display: inline-flex; align-items: baseline; gap: 4px; padding: 2px 8px; border: 1px solid var(--rule); border-radius: 999px; font-size: 12px; font-weight: 700; color: var(--ink-3); white-space: nowrap; }
.rate-card__ref .rating { font-size: 14px; font-weight: 800; }
.rate-card__editor { margin-top: 12px; padding: 10px 14px; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: var(--paper-2); font-family: var(--font-serif); font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.rate-card__editor span { font-family: var(--font-ui); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); }
@media (max-width: 560px) { .rate-card__refs { justify-content: flex-start; } }
