/* Chevaliers – Calendrier Matchs : affichage public (cartes compactes) */

@font-face {
	font-family: "Chev Barlow Condensed";
	src: url("fonts/barlow-condensed-latin-600-normal.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Chev Barlow Condensed";
	src: url("fonts/barlow-condensed-latin-700-normal.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

.chev-module {
	--chev-text: #ffffff;
	--chev-muted: rgba(255, 255, 255, .6);
	--chev-line: rgba(255, 255, 255, .9);
	--chev-btn-line: rgba(255, 255, 255, .28);
	--chev-surface: #1c1c1f;
	--chev-surface-line: rgba(255, 255, 255, .09);
	--chev-dim: rgba(255, 255, 255, .5);
	--chev-gap: 10px;
	--chev-radius: 10px;
	--chev-visible-d: 5;
	--chev-visible-t: 3;
	--chev-visible-m: 1.5;
	--chev-card-max: 290px;
	--chev-visible: var(--chev-visible-d);
	--chev-display: inherit;
	color: var(--chev-text);
	width: 100%;
	box-sizing: border-box;
}
.chev-module--light {
	--chev-text: #141414;
	--chev-muted: rgba(20, 20, 20, .62);
	--chev-line: #141414;
	--chev-btn-line: rgba(20, 20, 20, .3);
	--chev-surface: #ffffff;
	--chev-surface-line: rgba(20, 20, 20, .12);
	--chev-dim: rgba(20, 20, 20, .5);
}
.chev-module--font { --chev-display: "Chev Barlow Condensed", "Barlow Condensed", "Arial Narrow", sans-serif; }
.chev-module *, .chev-module *::before, .chev-module *::after { box-sizing: border-box; }

/* Séparateurs */
.chev-module .chev-sep { border: 0; height: 1px; background: var(--chev-line); margin: 18px 0; opacity: 1; width: 100%; }

/* Légende / filtre */
.chev-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chev-legend__label { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--chev-muted); }
.chev-legend__label .chev-icon { width: 14px; height: 14px; }
.chev-module .chev-legend__item {
	appearance: none; margin: 0; padding: 0 14px; min-height: 34px; border-radius: 999px;
	border: 1px solid var(--chev-btn-line); background: transparent; color: var(--chev-text);
	display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
	font: inherit; font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: none; line-height: 1;
	transition: background .15s, border-color .15s, color .15s;
}
.chev-module .chev-legend__item:hover { border-color: var(--chev-text); background: transparent; color: var(--chev-text); }
.chev-module .chev-legend__item[aria-pressed="true"],
.chev-module .chev-legend__item[aria-pressed="true"]:hover { background: var(--chev-text); border-color: var(--chev-text); color: var(--chev-surface); }
.chev-legend__dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; box-shadow: 0 0 0 1.5px var(--chev-btn-line); }
.chev-module .chev-legend__item:focus-visible, .chev-module .chev-nav__btn:focus-visible, .chev-track:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* En-tête de bloc */
.chev-block { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.chev-block__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.chev-module .chev-block__title { margin: 0; padding: 0; font-family: inherit; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--chev-muted); line-height: 1.2; }
.chev-nav { display: flex; gap: 6px; }
.chev-module .chev-nav__btn {
	appearance: none; width: 34px; height: 34px; padding: 0; margin: 0; border-radius: 50%;
	border: 1px solid var(--chev-btn-line); background: transparent; color: var(--chev-text);
	display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: opacity .2s, background .2s;
}
.chev-module .chev-nav__btn:hover:not(:disabled) { background: rgba(127, 127, 127, .15); color: var(--chev-text); }
.chev-module .chev-nav__btn:disabled { opacity: .3; cursor: default; }
.chev-nav__btn .chev-icon { width: 15px; height: 15px; }
.chev-block.is-static .chev-nav { visibility: hidden; }

/* Piste défilante */
.chev-track {
	display: flex; align-items: stretch; gap: var(--chev-gap); overflow-x: auto; overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 2px; margin: -2px;
}
.chev-track::-webkit-scrollbar { display: none; }
.chev-track.is-marquee { overflow: hidden; scroll-snap-type: none; touch-action: pan-y; cursor: grab; }
.chev-track.is-marquee:active { cursor: grabbing; }
.chev-track__inner { display: flex; align-items: stretch; gap: var(--chev-gap); width: 100%; flex: 0 0 100%; will-change: transform; user-select: none; -webkit-user-select: none; }
.chev-track__inner .chev-card { scroll-snap-align: none; }
.chev-empty { margin: 0; padding: 12px 0; font-size: 13px; color: var(--chev-muted); }

/* Carte compacte */
.chev-card {
	--chev-card-w: calc((100% - (var(--chev-visible) - 1) * var(--chev-gap)) / var(--chev-visible));
	flex: 0 0 min(var(--chev-card-w), var(--chev-card-max)); width: min(var(--chev-card-w), var(--chev-card-max)); min-width: 150px; overflow: hidden; scroll-snap-align: start;
	display: flex; flex-direction: column; gap: 6px; padding: 9px 12px 9px;
	background: var(--chev-surface); color: var(--chev-text);
	border: 1px solid var(--chev-surface-line); border-top: 3px solid var(--chev-accent);
	border-radius: var(--chev-radius); line-height: 1.2;
}
.chev-card[hidden] { display: none; }
.chev-module--dark .chev-card[data-accent-dark] { border-top-color: color-mix(in srgb, var(--chev-accent) 70%, #ffffff); }
.chev-module--light .chev-card[data-accent-light] { border-top-color: color-mix(in srgb, var(--chev-accent) 45%, #141414); }

.chev-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; min-width: 0; }
.chev-card__left { display: flex; flex-direction: column; gap: 3px; flex: 0 0 auto; }
.chev-card__right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 0; flex: 1 1 auto; }
.chev-card__date { font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.chev-card__time { font-size: 11px; font-weight: 500; line-height: 1.2; color: var(--chev-muted); white-space: nowrap; }
.chev-card__comp { max-width: 100%; font-size: 11px; font-weight: 500; line-height: 1.2; color: var(--chev-muted); text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev-card__section { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.chev-card__phase { flex: 0 1 auto; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 9px; font-weight: 700; letter-spacing: .08em; padding: 3px 6px; border-radius: 999px; border: 1px solid var(--chev-btn-line); line-height: 1; white-space: nowrap; }

/* Lignes d'équipes */
.chev-module .chev-rows { list-style: none; margin: 2px 0 0; padding: 6px 0; flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; gap: 4px; border-top: 1px solid var(--chev-surface-line); border-bottom: 1px solid var(--chev-surface-line); }
.chev-module .chev-row { position: relative; display: flex; align-items: center; gap: 8px; min-width: 0; margin: 0; padding: 0; min-height: 22px; }
.chev-card.is-tournament .chev-row { min-height: 15px; gap: 6px; }
.chev-card.is-tournament .chev-rows { gap: 2px; }
.chev-row__abbr { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: clip; white-space: nowrap; font-family: var(--chev-display); font-size: 17px; font-weight: 700; letter-spacing: .03em; line-height: 1; }
.chev-row__score { flex: 0 0 auto; font-family: var(--chev-display); font-size: 18px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chev-card.is-tournament .chev-row__abbr { font-size: 14px; }
.chev-card.is-tournament .chev-row__score { font-size: 14px; word-spacing: 1px; }
.chev-row__score--none { color: var(--chev-dim); font-weight: 600; }
.chev-row.is-loss .chev-row__abbr, .chev-row.is-loss .chev-row__score { color: var(--chev-dim); }
.chev-row__res { flex: 0 0 15px; height: 15px; border-radius: 4px; font-size: 9px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.chev-row__res abbr { text-decoration: none; border: 0; cursor: help; }
.chev-row__res--v { background: var(--chev-text); color: var(--chev-surface); }
.chev-row__res--d, .chev-row__res--n { border: 1px solid var(--chev-btn-line); color: var(--chev-dim); }

/* Logos : sans pastille, comme un bandeau de scores */
.chev-logo { position: relative; flex: 0 0 22px; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; color: var(--chev-dim); }
.chev-card.is-tournament .chev-logo { flex-basis: 16px; width: 16px; height: 16px; }
.chev-logo img { width: 100% !important; height: 100% !important; max-width: none; object-fit: contain; margin: 0; border: 0; box-shadow: none; border-radius: 0; }
.chev-logo .chev-icon { width: 80%; height: 80%; }
.chev-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Pied de carte */
.chev-card__foot { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 11px; font-weight: 500; color: var(--chev-muted); }
.chev-card__foot .chev-icon { width: 12px; height: 12px; flex: 0 0 12px; }
.chev-card__foot .chev-icon:last-child { width: 14px; height: 14px; flex-basis: 14px; color: var(--chev-text); }
.chev-card__place { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1024px) {
	.chev-module { --chev-visible: var(--chev-visible-t); --chev-card-max: 220px; }
}
@media (max-width: 767px) {
	.chev-module { --chev-visible: var(--chev-visible-m); --chev-card-max: 190px; }
}
@media (max-width: 520px) {
	.chev-legend { gap: 6px; }
	.chev-module .chev-legend__item { padding: 0 11px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
	.chev-track { scroll-behavior: auto; }
}
