/* Thème HBCBWL — compléments de mise en page.
   Couleurs et polices : voir theme.json. */

/* Pas d'espace parasite entre en-tête, contenu et pied de page. */
.wp-site-blocks > * + * { margin-block-start: 0; }
.hb-main > * + * { margin-block-start: 0; }

/* Focus clavier bien visible partout. */
:where(a, button, input, select, textarea, .wp-element-button):focus-visible {
	outline: 3px solid var(--wp--preset--color--jaune);
	outline-offset: 3px;
	border-radius: 4px;
}

/* ---------- En-tête ---------- */
.hb-entete {
	padding-block: 0.875rem;
	padding-inline: clamp(1.25rem, 5vw, 5rem) !important;
	border-bottom: 1px solid var(--wp--preset--color--trait);
	background: var(--wp--preset--color--papier);
}
.hb-marque { gap: 0.75rem; }
.hb-entete .wp-block-navigation a { color: var(--wp--preset--color--encre); }
.hb-entete .wp-block-navigation a:hover { color: var(--wp--preset--color--bordeaux); }
.hb-bouton-appli .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--bordeaux);
	border: 2px solid var(--wp--preset--color--bordeaux);
	border-radius: 999px;
	padding: 0.6rem 1.1rem;
	font-size: 0.9375rem;
}
.hb-bouton-appli .wp-block-button__link:hover {
	background: var(--wp--preset--color--bordeaux);
	color: var(--wp--preset--color--blanc);
}
.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--papier);
	color: var(--wp--preset--color--encre);
}
@media (max-width: 781px) {
	.hb-entete .wp-block-buttons.hb-bouton-appli { display: none !important; }
	.hb-hero .hb-photo { min-height: 240px !important; }
	.hb-marque .wp-block-site-title { font-size: 1.125rem; }
}

/* ---------- Sections ---------- */
.hb-section { padding-block: clamp(3rem, 6vw, 4.5rem); }
.hb-section-titre { gap: 1rem; align-items: flex-end; }
.hb-section-titre h2 { margin: 0; }
.hb-intro { color: var(--wp--preset--color--gris); font-size: var(--wp--preset--font-size--large); margin-top: 0.5rem; }
.hb-note { color: var(--wp--preset--color--gris); font-size: var(--wp--preset--font-size--small); }

/* Liens et boutons sur fonds sombres. */
.has-bordeaux-background-color a:not(.wp-element-button),
.has-encre-background-color a:not(.wp-element-button),
.has-bordeaux-fonce-background-color a:not(.wp-element-button) { color: var(--wp--preset--color--creme); }
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: inherit;
	border: 2px solid currentColor;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.12);
}

/* ---------- Bannière ---------- */
.hb-hero { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.hb-hero h1 { margin-block: 0.5rem 1.25rem; max-width: 14ch; }
.hb-hero .wp-block-button__link { padding: 0.9rem 1.4rem; }
.hb-saison { color: var(--wp--preset--color--jaune); font-weight: 700; font-size: var(--wp--preset--font-size--small); letter-spacing: 0.02em; margin: 0; }
.hb-hero .hb-lead { font-size: var(--wp--preset--font-size--large); color: #f3e6da; max-width: 36ch; }

/* ---------- Emplacements photo (bloc Couverture) ---------- */
.hb-photo { border-radius: 22px; overflow: hidden; }
.hb-photo .wp-block-cover__inner-container p { font-size: var(--wp--preset--font-size--small); font-weight: 600; color: #f3e6da; margin: 0; }
.hb-photo-vide { outline: 2px dashed #a8605a; outline-offset: -2px; }

/* ---------- Cartes ---------- */
.hb-carte {
	background: var(--wp--preset--color--blanc);
	border: 1px solid var(--wp--preset--color--trait);
	border-radius: 18px;
	padding: 1.5rem;
}
.hb-carte > * { margin-block: 0; }
.hb-carte > * + * { margin-block-start: 0.5rem; }
.hb-match-jour { color: var(--wp--preset--color--bordeaux); font-weight: 700; font-size: var(--wp--preset--font-size--small); }
.hb-match-equipes { font-family: var(--wp--preset--font-family--titres); font-weight: 800; font-size: var(--wp--preset--font-size--x-large); line-height: 1.1; }
.hb-match-lieu { color: var(--wp--preset--color--gris); }

.hb-badge {
	display: inline-block;
	padding: 0.3em 0.8em;
	border-radius: 999px;
	background: var(--wp--preset--color--creme);
	color: var(--wp--preset--color--bordeaux);
	font-weight: 700;
	font-size: 0.875rem;
}

/* Chiffres clés */
.hb-chiffre { background: var(--wp--preset--color--creme); border-radius: 18px; padding: 1.75rem; }
.hb-chiffre > * { margin: 0; }
.hb-nombre { font-family: var(--wp--preset--font-family--titres); font-weight: 800; font-size: clamp(2.25rem, 4vw, 3rem); line-height: 1; color: var(--wp--preset--color--bordeaux); }
.hb-nombre-legende { font-weight: 600; margin-top: 0.35rem !important; }

/* Équipes */
.hb-equipe {
	background: var(--wp--preset--color--blanc);
	border: 2px solid var(--wp--preset--color--trait);
	border-radius: 18px;
	overflow: hidden;
}
.hb-equipe > * { margin-block: 0; }
.hb-equipe .hb-photo { border-radius: 0; }
.hb-equipe-infos { padding: 1.1rem 1.25rem 1.25rem; }
.hb-equipe-infos > * { margin-block: 0; }
.hb-equipe-infos > * + * { margin-block-start: 0.5rem; }
.hb-equipe-nom { font-size: var(--wp--preset--font-size--x-large); }
.hb-equipe-nom a { color: var(--wp--preset--color--encre); text-decoration: none; }
.hb-equipe-nom a:hover { color: var(--wp--preset--color--bordeaux); text-decoration: underline; }
.hb-equipe-public { color: var(--wp--preset--color--gris); font-size: var(--wp--preset--font-size--small); }

/* Vie du club (derniers articles) */
.hb-actu { background: var(--wp--preset--color--blanc); border-radius: 18px; overflow: hidden; height: 100%; }
.hb-actu > * { margin-block: 0; }
.hb-actu .wp-block-post-featured-image { margin: 0; }
.hb-actu-texte { padding: 1.1rem 1.4rem 1.5rem; }
.hb-actu-texte > * { margin-block: 0; }
.hb-actu-texte > * + * { margin-block-start: 0.5rem; }
.hb-actu .wp-block-post-terms a { color: var(--wp--preset--color--bordeaux); font-weight: 700; font-size: var(--wp--preset--font-size--small); text-decoration: none; }
.hb-actu .wp-block-post-title { font-size: 1.5rem; line-height: 1.15; }

/* Encadré « Envie d'essayer ? » */
.hb-cta { border-radius: 28px; padding: clamp(2rem, 5vw, 3.25rem); }
.hb-cta h2 { margin-top: 0; }
.hb-cta p { color: #e6d8cc; max-width: 52ch; }

/* Partenaires */
.hb-partenaire {
	min-height: 110px;
	border: 2px dashed #d8cbbb;
	border-radius: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 0.75rem;
}
.hb-partenaire p { margin: 0; color: var(--wp--preset--color--gris); font-weight: 600; font-size: var(--wp--preset--font-size--small); }

/* Pied de page */
.hb-pied { padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.hb-pied h3 { font-family: var(--wp--preset--font-family--texte); font-size: 1.0625rem; font-weight: 700; color: var(--wp--preset--color--blanc); margin-bottom: 0.5rem; }
.hb-pied p { margin-block: 0.25rem; color: #f3e6da; }
.hb-pied .hb-bas { border-top: 1px solid rgba(243, 230, 218, 0.2); padding-top: 1.25rem; margin-top: 2rem; font-size: var(--wp--preset--font-size--small); }

/* Articles */
.hb-article .wp-block-post-featured-image img { border-radius: 18px; }

@media (prefers-reduced-motion: reduce) {
	* { scroll-behavior: auto !important; }
}

/* Grilles : les cartes occupent toute la largeur disponible. */
.hb-grille-17 { grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)) !important; }
.hb-grille-13 { grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr)) !important; }
.hb-grille-9 { grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr)) !important; }
.hb-grille-15 { grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)) !important; }

/* ---------- Équipes (extension « Équipes HBCBWL ») ---------- */
.hb-titre-bloc > * { margin-block: 0; }
.hb-titre-bloc > * + * { margin-block-start: 0.5rem; }
.hb-section .hb-titre-bloc + .wp-block-query { margin-block-start: 2rem; }
.hb-equipe .wp-block-post-featured-image { margin: 0; }
.hb-equipe .wp-block-post-featured-image img { object-fit: cover; }
.hb-equipe:not(:has(.wp-block-post-featured-image))::before {
	content: "Photo d’équipe à ajouter";
	display: flex;
	align-items: flex-end;
	height: 170px;
	box-sizing: border-box;
	padding: 0.875rem 1.1rem;
	background: var(--wp--preset--color--photo);
	color: #f3e6da;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
}
.hb-equipe-nom { margin: 0; }
.hb-equipe .wp-block-read-more { font-weight: 700; color: var(--wp--preset--color--bordeaux); }
.hb-badge:empty, .hb-equipe-public:empty { display: none; }
.hb-retour { font-weight: 700; font-size: var(--wp--preset--font-size--small); }
.hb-article .hb-badge { margin-top: 0.25rem; }
.hb-equipe-photo img { border-radius: 18px; }
.hb-fiche { margin-block: 2rem; }
.hb-champ { background: var(--wp--preset--color--creme); border-radius: 16px; padding: 1.25rem 1.4rem; }
.hb-champ > * { margin: 0; }
.hb-champ h3 { font-family: var(--wp--preset--font-family--texte); font-size: var(--wp--preset--font-size--small); font-weight: 700; color: var(--wp--preset--color--bordeaux); margin-bottom: 0.35rem; }
.hb-champ:has(.hb-champ-valeur:empty) { display: none; }
