/* HVO HandStats — styles publics.
   Les couleurs de fond / texte héritent du thème : le plugin fonctionne en clair comme en sombre. */

.hvo-hs {
	--hvo-primary: #cc2424;
	--hvo-line: rgba(127, 127, 127, 0.28);
	--hvo-soft: rgba(127, 127, 127, 0.09);
	--hvo-win: #1b8a4b;
	--hvo-draw: #7b8190;
	--hvo-loss: #c0392b;
	--hvo-radius: 10px;
	color: inherit;
	font-size: 1rem;
	line-height: 1.4;
	margin: 1.5em 0;
}
.hvo-hs *,
.hvo-hs *::before,
.hvo-hs *::after {
	box-sizing: border-box;
}

/* Blocs ------------------------------------------------------------------ */
.hvo-block {
	margin: 0 0 2em;
}
.hvo-block__title {
	margin: 0 0 0.6em;
	padding-left: 0.6em;
	border-left: 4px solid var(--hvo-primary);
}
.hvo-footer,
.hvo-note {
	margin: 0.8em 0 0;
	font-size: 0.8rem;
	opacity: 0.7;
}
.hvo-footer a {
	color: inherit;
	text-decoration: underline;
}
.hvo-empty,
.hvo-notice {
	margin: 0.5em 0;
	padding: 0.9em 1em;
	border: 1px dashed var(--hvo-line);
	border-radius: var(--hvo-radius);
	background: var(--hvo-soft);
}
.hvo-notice {
	border-style: solid;
	border-left: 4px solid var(--hvo-primary);
}

/* Onglets ---------------------------------------------------------------- */
.hvo-tablist {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4em;
	margin: 0 0 1em;
	padding-bottom: 0.6em;
	border-bottom: 2px solid var(--hvo-line);
}
.hvo-tab {
	appearance: none;
	margin: 0;
	padding: 0.5em 1em;
	border: 1px solid var(--hvo-line);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.hvo-tab:hover {
	background: var(--hvo-soft);
}
.hvo-tab:focus-visible {
	outline: 2px solid var(--hvo-primary);
	outline-offset: 2px;
}
.hvo-tab[aria-selected="true"] {
	background: var(--hvo-primary);
	border-color: var(--hvo-primary);
	color: #fff;
}
.hvo-tabs--categories > .hvo-tablist .hvo-tab {
	border-radius: var(--hvo-radius);
}
.hvo-tabs.is-ready .hvo-panel[hidden] {
	display: none;
}
/* Onglets imbriqués : un peu d'air. */
.hvo-tabs .hvo-tabs {
	margin-top: 0.4em;
}

/* Matchs ----------------------------------------------------------------- */
.hvo-matches {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.7em;
}
.hvo-match {
	margin: 0;
	padding: 0.8em 1em;
	border: 1px solid var(--hvo-line);
	border-left-width: 5px;
	border-radius: var(--hvo-radius);
	background: var(--hvo-soft);
}
.hvo-match--win {
	border-left-color: var(--hvo-win);
}
.hvo-match--draw {
	border-left-color: var(--hvo-draw);
}
.hvo-match--loss {
	border-left-color: var(--hvo-loss);
}
.hvo-match--upcoming {
	border-left-color: var(--hvo-primary);
}
.hvo-match__head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 0.4em 1em;
	font-size: 0.85rem;
}
.hvo-date {
	font-weight: 600;
	text-transform: capitalize;
}
.hvo-tbc {
	font-style: italic;
	opacity: 0.75;
}
.hvo-match__meta {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35em;
}
.hvo-chip {
	padding: 0.1em 0.55em;
	border: 1px solid var(--hvo-line);
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	white-space: nowrap;
}
.hvo-chip--soft {
	font-weight: 500;
	opacity: 0.85;
}
.hvo-chip--warn {
	border-color: #d98e04;
	color: #a86a00;
}
.hvo-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.7em;
	height: 1.7em;
	border-radius: 50%;
	color: #fff;
	font-size: 0.78rem;
	font-weight: 700;
}
.hvo-badge--win {
	background: var(--hvo-win);
}
.hvo-badge--draw {
	background: var(--hvo-draw);
}
.hvo-badge--loss {
	background: var(--hvo-loss);
}

.hvo-match__body {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 0.8em;
	margin-top: 0.6em;
}
.hvo-team {
	display: inline-flex;
	align-items: center;
	gap: 0.55em;
	min-width: 0;
}
.hvo-team--home {
	justify-content: flex-end;
	text-align: right;
}
.hvo-team--away {
	justify-content: flex-start;
	text-align: left;
}
.hvo-team--home .hvo-logo {
	order: 2;
}
.hvo-team__name {
	min-width: 0;
	overflow-wrap: anywhere;
	font-size: 0.95rem;
}
.hvo-team--us .hvo-team__name {
	font-weight: 700;
}
.hvo-logo {
	flex: 0 0 auto;
	width: 28px;
	height: 28px;
	object-fit: contain;
	background: transparent;
	border-radius: 4px;
}
.hvo-logo--sm {
	width: 22px;
	height: 22px;
}
.hvo-score {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	padding: 0.2em 0.7em;
	border-radius: 8px;
	background: var(--hvo-primary);
	color: #fff;
	font-size: 1.15rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.hvo-score--vs {
	background: transparent;
	color: inherit;
	border: 1px solid var(--hvo-line);
	font-size: 0.85rem;
	font-weight: 600;
	text-transform: uppercase;
	opacity: 0.8;
}
.hvo-match__foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.3em 1em;
	margin-top: 0.6em;
	font-size: 0.8rem;
	opacity: 0.8;
}
.hvo-fdm {
	color: inherit;
	text-decoration: underline;
}

/* Classement ------------------------------------------------------------- */
.hvo-table-wrap {
	overflow-x: auto;
	border: 1px solid var(--hvo-line);
	border-radius: var(--hvo-radius);
}
.hvo-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: 0.9rem;
	font-variant-numeric: tabular-nums;
}
.hvo-table th,
.hvo-table td {
	padding: 0.55em 0.6em;
	border: 0;
	border-bottom: 1px solid var(--hvo-line);
	text-align: center;
	background: transparent;
}
.hvo-table thead th {
	background: var(--hvo-soft);
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.hvo-table abbr {
	text-decoration: none;
	cursor: help;
}
.hvo-table tbody tr:last-child th,
.hvo-table tbody tr:last-child td {
	border-bottom: 0;
}
.hvo-table .hvo-c-team {
	text-align: left;
	font-weight: 500;
}
.hvo-table .hvo-c-rank {
	width: 2.4em;
	font-weight: 700;
}
.hvo-table .hvo-team {
	justify-content: flex-start;
}
.hvo-row--us th,
.hvo-row--us td {
	background: rgba(204, 36, 36, 0.12);
	background: color-mix(in srgb, var(--hvo-primary) 14%, transparent);
	font-weight: 700;
}
.hvo-row--us .hvo-c-rank {
	box-shadow: inset 4px 0 0 var(--hvo-primary);
}
.hvo-star {
	margin-left: 2px;
	color: var(--hvo-primary);
	cursor: help;
}

/* Petits écrans ---------------------------------------------------------- */
@media (max-width: 600px) {
	.hvo-hide-sm {
		display: none;
	}
	.hvo-match__body {
		grid-template-columns: 1fr;
		justify-items: center;
		gap: 0.5em;
	}
	.hvo-team--home,
	.hvo-team--away {
		justify-content: center;
		text-align: center;
	}
	.hvo-team--home .hvo-logo {
		order: 0;
	}
	.hvo-tab {
		padding: 0.45em 0.8em;
		font-size: 0.85rem;
	}
	.hvo-table th,
	.hvo-table td {
		padding: 0.5em 0.4em;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hvo-tab {
		transition: none;
	}
}
