/* RGB Agenda Sport — charte « Citron frais » RGB 99.2 */
.rgb-sport {
	--rgb-jaune: #F9E54E;
	--rgb-orange: #F8981D;
	--rgb-grenade: #E12E4B;
	--rgb-turquoise: #5BBDC8;
	--rgb-encre: #1d1d1b;
	--rgb-gris: #6b6b66;
	--rgb-ligne: #ecebe4;
	--rgb-fond: #ffffff;
	--rgb-fond-2: #faf9f3;
	--rgb-titre: 'Fredoka', 'Lato', system-ui, sans-serif;
	--rgb-texte: 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif;

	font-family: var(--rgb-texte);
	color: var(--rgb-encre);
	background: var(--rgb-fond);
	border-radius: 22px;
	padding: 28px;
	box-shadow: 0 1px 0 var(--rgb-ligne), 0 12px 40px rgba(29, 29, 27, .06);
	line-height: 1.4;
	box-sizing: border-box;
}
.rgb-sport *, .rgb-sport *::before, .rgb-sport *::after { box-sizing: border-box; }
.rgb-sport button, .rgb-sport select { font-family: inherit; }
.rgb-sport [hidden] { display: none !important; }

/* En-tête */
.rgb-sport__head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.rgb-sport__title { font-family: var(--rgb-titre); font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0; line-height: 1.05; color: var(--rgb-encre); }
.rgb-sport__subtitle { margin: 4px 0 0; color: var(--rgb-gris); font-size: .98rem; }
.rgb-sport__ball {
	flex: 0 0 52px; height: 52px; border-radius: 50%;
	background:
		radial-gradient(circle at 50% 50%, transparent 0 46%, var(--rgb-encre) 46% 50%, transparent 50%) -26px 0 / 100% 100% no-repeat,
		radial-gradient(circle at 50% 50%, transparent 0 46%, var(--rgb-encre) 46% 50%, transparent 50%) 26px 0 / 100% 100% no-repeat,
		linear-gradient(90deg, transparent 48%, var(--rgb-encre) 48% 52%, transparent 52%),
		linear-gradient(0deg, transparent 48%, var(--rgb-encre) 48% 52%, transparent 52%),
		var(--rgb-orange);
	box-shadow: inset 0 0 0 2px var(--rgb-encre), 4px 4px 0 var(--rgb-jaune);
}

/* Prochain match */
.rgb-sport-hero {
	position: relative; overflow: hidden;
	background: var(--rgb-jaune);
	border-radius: 18px; padding: 22px 24px; margin-bottom: 22px;
}
.rgb-sport-hero::after {
	content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%;
	border: 22px solid rgba(248, 152, 29, .35); pointer-events: none;
}
.rgb-sport-hero__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: relative; z-index: 1; }
.rgb-sport-hero__eyebrow { font-weight: 900; text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; }
.rgb-sport-hero__count { font-family: var(--rgb-titre); font-weight: 700; background: var(--rgb-encre); color: var(--rgb-jaune); padding: 4px 12px; border-radius: 999px; font-size: .9rem; }
.rgb-sport-hero__team { margin: 12px 0 2px; font-weight: 700; font-size: .95rem; position: relative; z-index: 1; }
.rgb-sport-hero__vs { font-family: var(--rgb-titre); font-weight: 700; font-size: clamp(1.25rem, 3.2vw, 1.9rem); margin: 0 0 12px; line-height: 1.15; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; position: relative; z-index: 1; }
.rgb-sport-hero__vs .is-nous { color: var(--rgb-grenade); }
.rgb-sport-hero__x { font-family: var(--rgb-texte); font-weight: 900; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; opacity: .6; }
.rgb-sport-hero__info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; font-size: 1.05rem; position: relative; z-index: 1; }
.rgb-sport-hero__comp { margin: 8px 0 0; font-size: .88rem; color: rgba(29, 29, 27, .72); position: relative; z-index: 1; }

/* Barre de filtres */
.rgb-sport__bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 20px; }
.rgb-sport-field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 170px; min-width: 0; }
.rgb-sport-field__label { font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--rgb-gris); }
.rgb-sport-field__select {
	appearance: none; -webkit-appearance: none; width: 100%;
	border: 2px solid var(--rgb-ligne); border-radius: 12px; background-color: var(--rgb-fond);
	padding: 10px 36px 10px 12px; font-size: .95rem; color: var(--rgb-encre); cursor: pointer;
	background-image: linear-gradient(45deg, transparent 50%, var(--rgb-encre) 50%), linear-gradient(135deg, var(--rgb-encre) 50%, transparent 50%);
	background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.rgb-sport-field__select:focus { outline: none; border-color: var(--rgb-orange); }
.rgb-sport-tabs { display: inline-flex; background: var(--rgb-fond-2); border: 2px solid var(--rgb-ligne); border-radius: 12px; padding: 3px; flex: 0 0 auto; }
.rgb-sport-tab { border: 0; background: transparent; padding: 8px 16px; border-radius: 9px; font-weight: 700; font-size: .92rem; cursor: pointer; color: var(--rgb-gris); }
.rgb-sport-tab[aria-pressed="true"] { background: var(--rgb-encre); color: var(--rgb-jaune); }
.rgb-sport-tab:focus-visible, .rgb-sport-more:focus-visible, .rgb-sport-cal__btn:focus-visible, .rgb-sport-cal__cell:focus-visible { outline: 3px solid var(--rgb-orange); outline-offset: 2px; }

/* Jours et cartes */
.rgb-sport-day { margin-bottom: 18px; }
.rgb-sport-day__title { font-family: var(--rgb-titre); font-weight: 600; font-size: 1.05rem; margin: 0 0 8px; display: flex; align-items: center; gap: 10px; color: var(--rgb-encre); }
.rgb-sport-day__today { font-family: var(--rgb-texte); font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; background: var(--rgb-orange); color: #fff; padding: 2px 8px; border-radius: 999px; }

.rgb-sport-match {
	display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 14px; align-items: center;
	background: var(--rgb-fond); border: 2px solid var(--rgb-ligne); border-left: 6px solid var(--rgb-turquoise);
	border-radius: 14px; padding: 12px 16px; margin-bottom: 8px;
}
.rgb-sport-match.is-dom { border-left-color: var(--rgb-grenade); }
.rgb-sport-match.is-off { opacity: .55; }
.rgb-sport-match__heure { display: flex; flex-direction: column; gap: 2px; }
.rgb-sport-match__h { font-family: var(--rgb-titre); font-weight: 700; font-size: 1.15rem; }
.rgb-sport-match__jour { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--rgb-gris); }
.rgb-sport-match__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 6px; }
.rgb-sport-match__comp { font-size: .8rem; color: var(--rgb-gris); }
.rgb-sport-match__h.is-small { font-size: .85rem; line-height: 1.2; }
.rgb-sport-match__lieu { margin: 6px 0 0; font-size: .8rem; color: var(--rgb-gris); }
.rgb-sport-match__lieu::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid var(--rgb-orange); margin-right: 6px; vertical-align: 1px; }
.rgb-sport-sport { display: inline-block; font-size: .7rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; background: var(--rgb-encre); color: #fff; white-space: nowrap; }
.rgb-sport-sport.is-basket { background: var(--rgb-orange); color: var(--rgb-encre); }
.rgb-sport-sport.is-hockey { background: var(--rgb-turquoise); color: var(--rgb-encre); }
.rgb-sport-sport.is-pingpong { background: var(--rgb-grenade); color: #fff; }
.rgb-sport-sport.is-football { background: var(--rgb-jaune); color: var(--rgb-encre); }
.rgb-sport-pill {display: inline-block; background: rgba(248, 152, 29, .16); color: #8a4d00; font-weight: 900; font-size: .74rem; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }

.rgb-sport-duel { display: grid; gap: 3px; }
.rgb-sport-duel__team { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .92rem; letter-spacing: .01em; }
.rgb-sport-duel__nom { overflow-wrap: anywhere; }
.rgb-sport-duel__team.is-nous .rgb-sport-duel__nom { font-weight: 900; }
.rgb-sport-duel__score { font-family: var(--rgb-titre); font-weight: 600; font-size: 1.05rem; min-width: 2.2ch; text-align: right; color: var(--rgb-gris); font-variant-numeric: tabular-nums; }
.rgb-sport-duel__score.is-win { color: var(--rgb-encre); font-weight: 700; }

.rgb-sport-match__side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.rgb-sport-badge { display: inline-block; font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.rgb-sport-badge.is-dom { background: var(--rgb-grenade); color: #fff; }
.rgb-sport-badge.is-ext { background: var(--rgb-turquoise); color: var(--rgb-encre); }
.rgb-sport-res { font-size: .78rem; font-weight: 900; padding: 3px 10px; border-radius: 8px; white-space: nowrap; }
.rgb-sport-res.is-V { background: var(--rgb-encre); color: var(--rgb-jaune); }
.rgb-sport-res.is-D { border: 2px solid var(--rgb-ligne); color: var(--rgb-gris); }
.rgb-sport-res.is-N, .rgb-sport-res.is-wait { background: var(--rgb-fond-2); color: var(--rgb-gris); }
.rgb-sport-link { font-size: .8rem; font-weight: 700; color: var(--rgb-encre); text-decoration: underline; text-decoration-color: var(--rgb-orange); text-underline-offset: 3px; }
.rgb-sport-link:hover { color: var(--rgb-grenade); }

.rgb-sport-more { display: block; width: 100%; border: 2px dashed var(--rgb-ligne); background: var(--rgb-fond-2); border-radius: 12px; padding: 12px; font-weight: 700; cursor: pointer; color: var(--rgb-encre); }
.rgb-sport-more:hover { border-color: var(--rgb-orange); }
.rgb-sport-empty { color: var(--rgb-gris); text-align: center; padding: 18px 8px; margin: 0; }

/* Calendrier */
.rgb-sport-cal__nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.rgb-sport-cal__month { font-family: var(--rgb-titre); font-weight: 700; font-size: 1.3rem; margin: 0; }
.rgb-sport-cal__btn { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--rgb-ligne); background: var(--rgb-fond); font-size: 1.4rem; line-height: 1; cursor: pointer; color: var(--rgb-encre); }
.rgb-sport-cal__btn:hover { background: var(--rgb-jaune); border-color: var(--rgb-jaune); }
.rgb-sport-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.rgb-sport-cal__dow { text-align: center; font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--rgb-gris); padding-bottom: 4px; }
.rgb-sport-cal__cell {
	min-height: 86px; border: 2px solid var(--rgb-ligne); border-radius: 12px; background: var(--rgb-fond);
	padding: 6px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; text-align: left; font: inherit; color: inherit;
}
.rgb-sport-cal__cell.is-blank { border-color: transparent; background: transparent; }
.rgb-sport-cal__cell.has-match { cursor: pointer; background: var(--rgb-fond-2); }
.rgb-sport-cal__cell.has-match:hover { border-color: var(--rgb-orange); }
.rgb-sport-cal__cell.is-today .rgb-sport-cal__num { background: var(--rgb-orange); color: #fff; }
.rgb-sport-cal__cell.is-selected { border-color: var(--rgb-encre); box-shadow: 3px 3px 0 var(--rgb-jaune); }
.rgb-sport-cal__num { font-weight: 900; font-size: .85rem; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.rgb-sport-cal__chips { display: flex; flex-direction: column; gap: 3px; }
.rgb-sport-chip { display: inline-block; font-size: .68rem; font-weight: 700; padding: 2px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rgb-sport-chip.is-dom { background: var(--rgb-grenade); color: #fff; }
.rgb-sport-chip.is-ext { background: var(--rgb-turquoise); color: var(--rgb-encre); }
.rgb-sport-chip.is-more { background: var(--rgb-encre); color: var(--rgb-jaune); align-self: flex-start; }
.rgb-sport-cal__dots { display: none; gap: 3px; justify-content: center; }
.rgb-sport-cal__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--rgb-turquoise); }
.rgb-sport-cal__dots i.is-dom { background: var(--rgb-grenade); }
.rgb-sport-cal__legend { display: flex; gap: 8px; margin: 12px 0 18px; }

/* Pied */
.rgb-sport__foot { margin-top: 18px; padding-top: 14px; border-top: 2px solid var(--rgb-ligne); font-size: .8rem; color: var(--rgb-gris); }
.rgb-sport__foot a { color: inherit; text-decoration: underline; text-decoration-color: var(--rgb-orange); }

/* Mode compact « prochains » */
.rgb-sport--prochains { padding: 20px; }
.rgb-sport-mini__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 12px; }
.rgb-sport-mini__title { font-family: var(--rgb-titre); font-weight: 700; font-size: 1.35rem; margin: 0; }
.rgb-sport--prochains .rgb-sport-match { grid-template-columns: 78px minmax(0, 1fr) auto; padding: 10px 12px; }
.rgb-sport--prochains .rgb-sport-match__comp { display: none; }
.rgb-sport-mini__more { display: inline-block; margin-top: 6px; font-weight: 900; color: var(--rgb-encre); text-decoration: none; border-bottom: 3px solid var(--rgb-jaune); }
.rgb-sport-mini__more:hover { border-color: var(--rgb-orange); }

/* Mobile */
@media (max-width: 640px) {
	.rgb-sport { padding: 18px 16px; border-radius: 18px; }
	.rgb-sport__ball { flex-basis: 42px; height: 42px; }
	.rgb-sport-hero { padding: 18px; }
	.rgb-sport-tabs { width: 100%; }
	.rgb-sport-tab { flex: 1; }
	.rgb-sport-match, .rgb-sport--prochains .rgb-sport-match { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 12px; }
	.rgb-sport-match__heure { grid-column: 1; flex-direction: row; gap: 8px; align-items: baseline; }
	.rgb-sport-match__main { grid-column: 1 / -1; grid-row: 2; }
	.rgb-sport-match__side { grid-column: 2; grid-row: 1; flex-direction: row; align-items: center; }
	.rgb-sport-match__side .rgb-sport-link { display: none; }
	.rgb-sport-cal { gap: 3px; }
	.rgb-sport-cal__cell { min-height: 52px; padding: 4px 2px; align-items: center; border-radius: 9px; }
	.rgb-sport-cal__chips { display: none; }
	.rgb-sport-cal__dots { display: flex; }
	.rgb-sport-cal__num { width: 24px; height: 24px; font-size: .8rem; }
}

/* Encart « À ne pas oublier » */
.rgb-sport-bloc { display: flex; flex-direction: column; gap: 18px; }
.rgb-anpo {
	--anpo-bg: #1d1d1b; --anpo-title: #F9E54E; --anpo-text: #ffffff; --anpo-sub: rgba(255,255,255,.72); --anpo-accent: #F9E54E; --anpo-line: rgba(255,255,255,.12);
	font-family: 'Lato', system-ui, -apple-system, 'Segoe UI', sans-serif;
	background: var(--anpo-bg); color: var(--anpo-text);
	border-radius: 22px; padding: 22px 26px; box-sizing: border-box;
	box-shadow: 0 12px 40px rgba(29, 29, 27, .08);
}
.rgb-anpo--clair {
	--anpo-bg: #ffffff; --anpo-title: #1d1d1b; --anpo-text: #1d1d1b; --anpo-sub: #6b6b66; --anpo-accent: #F8981D; --anpo-line: #ecebe4;
	border: 2px solid #1d1d1b;
}
.rgb-anpo__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.rgb-anpo__pin { position: relative; width: 18px; height: 26px; flex: 0 0 18px; }
.rgb-anpo__pin::before { content: ""; position: absolute; left: 1px; top: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--anpo-accent); }
.rgb-anpo__pin::after { content: ""; position: absolute; left: 8px; top: 14px; width: 3px; height: 11px; border-radius: 2px; background: var(--anpo-accent); }
.rgb-anpo__title { margin: 0; font-family: 'Lato', sans-serif; font-weight: 900; font-size: .95rem; letter-spacing: .14em; text-transform: uppercase; color: var(--anpo-title); line-height: 1.2; }
.rgb-anpo__list { list-style: none; margin: 0; padding: 0; }
.rgb-anpo__item { position: relative; padding: 10px 0 10px 22px; border-top: 1px solid var(--anpo-line); display: flex; flex-direction: column; gap: 2px; }
.rgb-anpo__item:first-child { border-top: 0; }
.rgb-anpo__item::before { content: ""; position: absolute; left: 2px; top: 17px; width: 9px; height: 9px; border-radius: 50%; background: var(--anpo-accent); }
.rgb-anpo__item-title { font-weight: 900; font-size: 1.02rem; line-height: 1.3; color: var(--anpo-text); }
.rgb-anpo__meta { font-size: .88rem; font-weight: 700; color: var(--anpo-sub); }
.rgb-anpo__text { font-size: .88rem; color: var(--anpo-sub); }
.rgb-anpo__empty { margin: 0; color: var(--anpo-sub); }
@media (max-width: 640px) { .rgb-anpo { padding: 18px 16px; border-radius: 18px; } }
