/* ==========================================================
   AS Brecey – styles du thème
   Les couleurs viennent de theme.json (variables --wp--preset--color--*)
   ========================================================== */

:root {
	--asb-rouge: var(--wp--preset--color--rouge);
	--asb-rouge-fonce: var(--wp--preset--color--rouge-fonce);
	/* Rouge éclairci pour le texte sur fond noir : #DD0106 n'y atteint que 4,1:1 (AA = 4,5:1) */
	--asb-rouge-vif: var(--wp--preset--color--rouge-vif);
	--asb-noir: var(--wp--preset--color--noir);
	--asb-blanc: var(--wp--preset--color--blanc);
	--asb-brume: var(--wp--preset--color--brume);
	--asb-anthracite: var(--wp--preset--color--anthracite);
}

body {
	-webkit-font-smoothing: antialiased;
}

/* Titres : Archivo resserré, en capitales, comme un maillot ou un tableau d'affichage */
h1, h2, h3,
.wp-block-site-title {
	font-stretch: 72%;
	text-transform: uppercase;
	letter-spacing: 0.01em;
}

h4, h5, h6 {
	font-stretch: 85%;
}

:where(a, button, input, .wp-element-button):focus-visible {
	outline: 3px solid var(--asb-rouge);
	outline-offset: 3px;
}

/* Texte lu par les lecteurs d'écran, invisible à l'écran */
.asb-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.asb-meta {
	color: var(--asb-anthracite);
	font-size: var(--wp--preset--font-size--small);
}

/* ---------- En-tête ---------- */
.asb-header {
	background: var(--asb-noir);
	color: var(--asb-blanc);
	padding-top: var(--wp--preset--spacing--30);
	padding-bottom: var(--wp--preset--spacing--30);
	border-bottom: 6px solid var(--asb-rouge);
}

.asb-header a {
	color: inherit;
	text-decoration: none;
}

.asb-brand {
	gap: 0.875rem;
}

.asb-brand .wp-block-site-title {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 800;
	line-height: 1;
}

.asb-brand .wp-block-site-tagline {
	margin: 0.25rem 0 0;
	font-size: var(--wp--preset--font-size--small);
	opacity: 0.8;
}

.asb-nav {
	font-weight: 600;
	font-stretch: 88%;
}

.asb-nav a:hover,
.asb-nav .current-menu-item > a {
	color: var(--asb-rouge-vif);
}

/* Boutons-icônes (Apparence › Options du thème), bulle d'aide (facultative) au survol et au clavier */
.asb-icones {
	display: flex;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.asb-header .asb-icone {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: var(--asb-rouge);
	color: var(--asb-blanc);
	transition: background-color 0.15s;
}

.asb-header .asb-icone:hover {
	background: var(--asb-rouge-fonce);
}

.asb-icone svg {
	fill: currentColor;
}

.asb-icone[data-aide]::after {
	content: attr(data-aide);
	position: absolute;
	top: calc(100% + 0.5rem);
	left: 50%;
	z-index: 10;
	padding: 0.3em 0.6em;
	border-radius: 4px;
	background: var(--asb-blanc);
	color: var(--asb-noir);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translateX(-50%);
	transition: opacity 0.15s, visibility 0.15s;
}

/* La bulle du dernier bouton s'aligne à droite pour ne pas sortir de l'écran */
.asb-icones li:last-child .asb-icone[data-aide]::after {
	left: auto;
	right: 0;
	transform: none;
}

.asb-icone[data-aide]:hover::after,
.asb-icone[data-aide]:focus-visible::after {
	opacity: 1;
	visibility: visible;
}

.asb-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--asb-noir);
	color: var(--asb-blanc);
}

/* ---------- Sections ---------- */
.asb-section {
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--60);
}

.asb-section--brume {
	background: var(--asb-brume);
}

.asb-section-title {
	margin-top: 0;
	margin-bottom: var(--wp--preset--spacing--40);
	padding-left: 0.45em;
	border-left: 0.18em solid var(--asb-rouge);
	/* --asb-titre-section : Options du thème › Tailles sur ordinateur */
	font-size: var(--asb-titre-section, var(--wp--preset--font-size--xx-large));
	line-height: 0.95;
}

/* ---------- Grilles d'articles ---------- */
.asb-news .wp-block-post-template {
	gap: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40);
}

.asb-news .wp-block-post {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.asb-news .wp-block-post-featured-image {
	margin: 0 0 0.5rem;
	background: var(--asb-noir);
}

.asb-news .wp-block-post-title {
	margin: 0;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.05;
}

.asb-news .wp-block-post-title a {
	color: var(--asb-noir);
	text-decoration: none;
}

.asb-news .wp-block-post-title a:hover {
	color: var(--asb-rouge);
}

.asb-news .wp-block-post-excerpt__excerpt {
	margin: 0;
}

.asb-news .wp-block-post-excerpt__more-text {
	display: none;
}

.asb-pagination {
	margin-top: var(--wp--preset--spacing--50);
	font-weight: 700;
}

/* ---------- Équipes : la liste se lit comme une feuille de match ---------- */
.asb-equipes {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 2rem;
}

.asb-equipes a {
	font-size: var(--asb-titre-section, var(--wp--preset--font-size--xx-large));
	font-weight: 900;
	font-stretch: 66%;
	text-transform: uppercase;
	line-height: 1.1;
	color: var(--asb-noir);
	text-decoration: none;
}

.asb-equipes a:hover {
	color: var(--asb-rouge);
}

/* ---------- Article seul ---------- */
.asb-article__cat a {
	display: inline-block;
	padding: 0.2em 0.6em;
	background: var(--asb-rouge);
	color: var(--asb-blanc);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 700;
	text-decoration: none;
	border-radius: 3px;
}

.asb-article__nav {
	margin-top: var(--wp--preset--spacing--50);
	padding-top: var(--wp--preset--spacing--40);
	border-top: 1px solid var(--asb-brume);
}

/* ---------- Pied de page ---------- */
.asb-footer {
	background: var(--asb-noir);
	color: var(--asb-blanc);
	padding-top: var(--wp--preset--spacing--60);
	padding-bottom: var(--wp--preset--spacing--40);
	border-top: 6px solid var(--asb-rouge);
}

.asb-footer a {
	color: inherit;
	text-decoration-color: var(--asb-rouge);
}

.asb-footer a:hover {
	color: var(--asb-rouge-vif);
}

.asb-footer h3 {
	font-size: var(--wp--preset--font-size--medium);
	color: var(--asb-rouge-vif);
}

.asb-footer .wp-block-site-title {
	margin: 0.75rem 0 0;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 800;
}

.asb-footer .wp-block-site-tagline {
	margin: 0.25rem 0 0;
	opacity: 0.8;
}

.asb-footer .wp-block-list {
	list-style: none;
	padding: 0;
}

.asb-footer__bas {
	margin-top: var(--wp--preset--spacing--50);
	padding-top: var(--wp--preset--spacing--30);
	border-top: 1px solid rgba(255, 255, 255, 0.2);
	font-size: var(--wp--preset--font-size--small);
	opacity: 0.8;
}

/* ---------- Option « foot » (Apparence › Options du thème) ----------
   Les traits des titres du bloc Programme du week-end (extension Matchs) deviennent
   un trait courbé en gant de gardien avec un ballon qui fonce dessus. */
.asb-foot .asbm-we__titre {
	display: flex;
	align-items: center;
	gap: 0.25em;
	padding-left: 0;
	border-left: 0;
}

.asb-foot .asbm-we__titre::before {
	content: "";
	flex: none;
	width: 1.1em;
	height: 1em;
	background: url(../img/foot-programme.svg) center / contain no-repeat;
}

.asb-foot .asbm-we__resultats .asbm-we__titre::before {
	background-image: url(../img/foot-resultats.svg);
}
