/*
Theme Name: Combourg Athlétisme
Description: Thème du club Combourg Athlétisme (membre de l'ACB 35), aux couleurs du logo.
Version: 1.2.0
Requires at least: 6.4
Requires PHP: 7.4
Author: Combourg Athlétisme
Text Domain: combourg-athletisme
License: GNU General Public License v2 or later
*/

/* ---------- En-tête ---------- */
.entete {
	background: var(--wp--preset--color--marine);
	color: #fff;
	position: sticky;
	top: 0;
	z-index: 50;
	box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
}
.entete::after {
	content: "";
	display: block;
	height: 5px;
	background: repeating-linear-gradient(90deg, var(--wp--preset--color--jaune) 0 40px, var(--wp--preset--color--ciel) 40px 80px);
}
.entete-inner { padding-top: 10px; padding-bottom: 10px; }
.entete .marque { gap: 12px; text-decoration: none; }
.entete .marque img { width: 58px; height: 58px; border-radius: 50%; display: block; }
.entete .marque-texte p { margin: 0; color: #fff; line-height: 1.1; }
.entete .marque-nom {
	font-family: var(--wp--preset--font-family--titres);
	font-weight: 800;
	font-size: 1.3rem;
	text-transform: uppercase;
	letter-spacing: .02em;
}
.entete .marque-nom a { color: #fff; text-decoration: none; }
.entete .marque-sous { font-size: .8rem; color: var(--wp--preset--color--jaune) !important; }
.entete .wp-block-navigation { font-weight: 600; font-size: .98rem; }
.entete .wp-block-navigation a { color: #fff; text-decoration: none; }
.entete .wp-block-navigation a:hover { color: var(--wp--preset--color--jaune); }
.entete .wp-block-navigation .nav-cta a {
	background: var(--wp--preset--color--jaune);
	color: var(--wp--preset--color--marine-fonce);
	padding: .45em 1.1em;
	border-radius: 999px;
}
.entete .wp-block-navigation .nav-cta a:hover { background: #fff; color: var(--wp--preset--color--marine); }
.entete .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--marine-fonce) !important;
	color: #fff !important;
	padding: 24px;
	font-size: 1.2rem;
}
.entete .wp-block-navigation__responsive-container-open svg,
.entete .wp-block-navigation__responsive-container-close svg { fill: #fff; }

/* ---------- Héros de l'accueil ---------- */
.hero {
	position: relative;
	overflow: hidden;
	background: var(--wp--preset--color--marine-fonce);
	color: #fff;
	padding-top: clamp(56px, 9vw, 110px) !important;
	padding-bottom: clamp(56px, 9vw, 110px) !important;
	margin-top: 0 !important;
}
.hero::before {
	/* bandes diagonales comme sur le logo */
	content: "";
	position: absolute;
	top: -20%;
	right: -10%;
	width: 55%;
	height: 140%;
	background:
		linear-gradient(115deg,
			transparent 0 38%,
			var(--wp--preset--color--jaune) 38% 40%,
			transparent 40% 42%,
			var(--wp--preset--color--jaune) 42% 44%,
			var(--wp--preset--color--ciel) 44% 100%);
	opacity: .9;
	pointer-events: none;
}
.hero > * { position: relative; }
.hero h1 { color: #fff; margin-top: .2em; }
.hero h1 em { font-style: normal; color: var(--wp--preset--color--jaune); }
.hero .surtitre {
	color: var(--wp--preset--color--jaune);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .12em;
	font-size: .85rem;
}
.hero .hero-texte { font-size: 1.12rem; color: #dbe6f5; }
.hero .hero-essai { font-size: .9rem; color: #a9bfdc; }
@media (max-width: 781px) {
	.hero::before { width: 90%; right: -55%; opacity: .5; }
}

/* ---------- Boutons ---------- */
.bouton-jaune .wp-block-button__link {
	background: var(--wp--preset--color--jaune) !important;
	color: var(--wp--preset--color--marine-fonce) !important;
}
.bouton-contour .wp-block-button__link {
	background: transparent !important;
	color: #fff !important;
	box-shadow: inset 0 0 0 2px #fff;
}
.wp-block-button__link:hover { filter: brightness(1.08); }

/* ---------- Bandeau chiffres ---------- */
.chiffres {
	background: var(--wp--preset--color--ciel);
	margin-top: 0 !important;
	padding-top: 26px !important;
	padding-bottom: 26px !important;
}
.chiffres p { margin: 0; color: var(--wp--preset--color--marine-fonce); text-align: center; line-height: 1.2; }
.chiffres .chiffre {
	font-family: var(--wp--preset--font-family--titres);
	font-weight: 800;
	font-size: clamp(2rem, 5vw, 2.8rem);
}

/* ---------- Sections ---------- */
.section { padding-top: clamp(40px, 7vw, 80px) !important; padding-bottom: clamp(40px, 7vw, 80px) !important; margin-top: 0 !important; }
.section-claire { background: var(--wp--preset--color--fond); }
.titre-souligne::after {
	content: "";
	display: block;
	width: 64px;
	height: 5px;
	margin-top: 12px;
	background: var(--wp--preset--color--jaune);
	border-radius: 3px;
}

/* Cartes (entraînements, etc.) */
.carte {
	background: #fff;
	border-radius: 14px;
	padding: 22px !important;
	border-top: 5px solid var(--wp--preset--color--ciel);
	box-shadow: 0 4px 18px rgba(23, 51, 106, .08);
	height: 100%;
}
.carte h3 { font-size: 1.15rem; margin-top: 0; }
.carte ul { padding-left: 1.1em; margin: 0; }
.carte li { margin-bottom: .3em; }
.carte-trail { border-top-color: var(--wp--preset--color--jaune); }

/* Actualités (boucle d'articles) */
.actus .wp-block-post {
	background: #fff;
	border: 1px solid #e1e8f2;
	border-radius: 14px;
	padding: 20px 22px;
	border-left: 5px solid var(--wp--preset--color--ciel);
}
.actus .wp-block-post-date { font-size: .85rem; color: #5b6b85; text-transform: uppercase; letter-spacing: .05em; }
.actus .wp-block-post-title { font-size: 1.2rem; margin: .3em 0; }
.actus .wp-block-post-title a { text-decoration: none; }
.actus .wp-block-post-excerpt { font-size: .95rem; margin: 0; }
.actus .wp-block-post-excerpt__more-link { font-weight: 600; }

/* Encart adhésion */
.adhesion { background: var(--wp--preset--color--marine); color: #fff; }
.adhesion h2, .adhesion h3 { color: #fff; }
.adhesion a:not(.wp-block-button__link) { color: var(--wp--preset--color--jaune); }
.tarifs { list-style: none; padding: 0 !important; margin: 0; }
.tarifs li {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid rgba(255, 255, 255, .18);
}
.tarifs li strong { color: var(--wp--preset--color--jaune); }

/* Tableaux */
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table th { background: var(--wp--preset--color--marine); color: #fff; text-align: left; }
.wp-block-table td, .wp-block-table th { padding: 10px 12px; border: 1px solid #d8e1ee; }
.wp-block-table tbody tr:nth-child(even) { background: var(--wp--preset--color--fond); }

/* Encadré « à mettre à jour » */
.a-verifier {
	background: #fff8d6;
	border-left: 5px solid var(--wp--preset--color--jaune);
	padding: 12px 16px !important;
	border-radius: 6px;
	font-size: .95rem;
}

/* ---------- Titre des pages ---------- */
.titre-page {
	background: var(--wp--preset--color--marine-fonce);
	margin-top: 0 !important;
	padding-top: 44px !important;
	padding-bottom: 44px !important;
}
.titre-page h1 { color: #fff; margin: 0; font-size: clamp(2rem, 5vw, 3rem); }
.titre-page .wp-block-post-date { color: var(--wp--preset--color--jaune); }

/* ---------- Pied de page ---------- */
.pied { background: var(--wp--preset--color--marine-fonce); color: #c9d6ea; font-size: .95rem; margin-top: 0 !important; }
.pied h2 { color: #fff; font-size: 1.1rem; }
.pied a { color: #fff; }
.pied a:hover { color: var(--wp--preset--color--jaune); }
.pied .copyright { border-top: 1px solid rgba(255, 255, 255, .15); padding-top: 18px; font-size: .85rem; }

/* Pas d'espace blanc entre en-tête, contenu et pied de page */
.wp-site-blocks > * + * { margin-block-start: 0; }
main.wp-block-group { margin-top: 0; }
.entry-content > .alignfull:last-child, .wp-block-post-content > .alignfull:last-child { margin-bottom: 0; }

/* Menu « ☰ » jusqu'à 1000 px de large (au lieu de 600 px), pour éviter un menu sur deux lignes */
@media (min-width: 600px) and (max-width: 1000px) {
	.entete .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.entete .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
.entete .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { gap: 1.1rem; }

/* ---------- 1.2.0 : tableaux lisibles sur mobile ---------- */
@media (max-width: 600px) {
	.wp-block-table td, .wp-block-table th { padding: 8px 6px; font-size: .86rem; line-height: 1.35; hyphens: auto; }
	.wp-block-table th { font-size: .8rem; }
	.wp-block-table table { table-layout: auto; }
}
/* Recherche de la page 404 */
.wp-block-search { margin-top: 2rem; max-width: 520px; }
.wp-block-search__button { background: var(--wp--preset--color--marine); color: #fff; border: 0; border-radius: 999px; padding: .6em 1.2em; font-weight: 700; }
