/* Tokens : miroir de src/index.css (@theme). Les presets WP (--wp--preset--*) viennent de theme.json. */
:root {
	--color-mv-navy: #003a62;
	--color-mv-navy-light: #1a5278;
	--color-mv-navy-soft: #2d6a96;
	--color-mv-cream: #e8e8e8;
	--color-mv-cream-dark: #d6d6d6;
	--color-mv-cream-soft: #efefef;
	--color-mv-nude: #e5e5e5;
	--color-mv-nude-deep: #cfcfcf;
	--color-mv-engraving: #d9d9d9;
	--color-mv-engraving-on-dark: #efefef;
	--color-mv-hero: color-mix(in srgb, var(--color-mv-cream-soft) 55%, var(--color-mv-nude) 45%);
	--color-mv-race-marathon: #b91154;
	--color-mv-brand: var(--color-mv-race-marathon);
	--color-mv-brand-dark: #961046;
	--color-mv-race-semi: #3e9c05;
	--color-mv-race-10km: #face28;
	--color-mv-race-marathon-soft: color-mix(in srgb, var(--color-mv-race-marathon) 12%, white);
	--color-mv-race-semi-soft: color-mix(in srgb, var(--color-mv-race-semi) 12%, white);
	--color-mv-race-10km-soft: color-mix(in srgb, var(--color-mv-race-10km) 18%, white);
	--color-mv-muted: #3a5569;
	--color-mv-logo-bordeaux: #95115a;
	--color-mv-logo-gold: #fbc81e;
	--color-mv-gold: #f9cb31;

	--font-display: "Cormorant Garamond", "Cormorant Fallback", Georgia, serif;
	--font-body: "DM Sans", "DM Sans Fallback", system-ui, sans-serif;
	--font-ui: "DM Sans", "DM Sans Fallback", system-ui, sans-serif;

	--header-height: 5.75rem;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	overflow-x: clip;
	/* Ancres sous le header sticky */
	scroll-padding-top: calc(var(--header-height, 5.75rem) + 1.25rem);
}

body {
	overflow-x: clip;
	background: var(--color-mv-cream);
	color: var(--color-mv-navy);
	font-family: var(--font-body);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
	font-family: var(--font-display);
	font-weight: 500;
	letter-spacing: normal;
}

.font-ui {
	font-family: var(--font-ui);
}

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

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

:focus {
	outline: none;
}

:focus-visible {
	outline: 2px solid var(--color-mv-brand);
	outline-offset: 2px;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

.sr-only:focus,
.sr-only:focus-visible {
	position: fixed;
	top: 0.5rem;
	left: 0.5rem;
	z-index: 100;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	margin: 0;
	overflow: visible;
	clip: auto;
	white-space: normal;
	background: var(--color-mv-brand);
	color: var(--color-mv-cream);
	font-weight: 600;
}

/* Header sticky : le template part <header> reste collé en haut. */
.wp-block-template-part:has(> .amvb-header) {
	position: sticky;
	top: 0;
	z-index: 50;
}

/* Filet sous H2 (h-1 w-12 bg-mv-cream-dark) */
.amvb-rule {
	width: 3rem;
	height: 0.25rem;
	margin-top: 0.75rem;
	background: var(--color-mv-cream-dark);
}

/* H1 hero : 3xl jusqu'à lg, 5xl ensuite (le H1 intérieur passe à 5xl dès md) */
@media (max-width: 63.9375rem) {
	.wp-block-heading.is-style-hero {
		font-size: var(--wp--preset--font-size--3xl);
		line-height: calc(2.25 / 1.875);
	}
}

@media (min-width: 48rem) {
	.amvb-hero {
		min-height: max(30rem, 70vh);
	}
}

/* Spécimen */
.amvb-specimen__swatches > .wp-block-group {
	flex: 1 1 11rem;
}

/* Home courses (front-page) — miroir BentoSection cols=3 : 2 col. mobile, 3 dès lg */
.amvb-home-courses {
	padding: 3rem 1rem;
	color: var(--color-mv-navy);
}
@media (min-width: 48rem) {
	.amvb-home-courses {
		padding-block: 4rem;
	}
}
.amvb-home-courses > * {
	max-width: 80rem;
	margin-inline: auto;
}
.amvb-home-courses__grid {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.25rem;
}
@media (min-width: 64rem) {
	.amvb-home-courses__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
/* SectionHeading : filet avant le titre (pas ::after), mb-6 */
.amvb-section-heading {
	margin-bottom: 1.5rem;
}
@media (min-width: 48rem) {
	.amvb-section-heading {
		margin-bottom: 2rem;
	}
}
.amvb-section-heading__title {
	font-family: var(--font-display);
	font-weight: 500;
	font-size: 1.5rem;
	margin: 0;
}
@media (min-width: 48rem) {
	.amvb-section-heading__title {
		font-size: 1.875rem;
	}
}
.amvb-section-heading__subtitle {
	margin: 0.5rem 0 0;
	color: var(--color-mv-muted);
	max-width: 42rem;
	font-size: 0.875rem;
	line-height: 1.5;
}
@media (min-width: 48rem) {
	.amvb-section-heading__subtitle {
		font-size: 1rem;
	}
}
.amvb-section-heading::before {
	content: "";
	display: block;
	width: 3rem;
	height: 0.25rem;
	margin-bottom: 0.75rem;
	background: var(--color-mv-cream-dark);
}
