/*
 * Banners, cards and motion.
 *
 * Direction taken from the association's own Wix site: a coloured gradient
 * band with a centred title, large centred section headings, and photographs
 * given real room. Colours stay those of the badge.
 */

/*
 * WordPress does not apply border-box globally, so any padded full-width
 * element of ours has to say so itself — otherwise its padding is added to
 * 100% and the whole page scrolls sideways.
 */
.aaeir-hero,
.aaeir-hero *,
.aaeir-cards,
.aaeir-cards * {
	box-sizing: border-box;
}

/* ---------- banner ---------- */

.aaeir-hero {
	position: relative;
	display: flex;
	align-items: flex-end;
	min-height: clamp(190px, 30vw, 340px);
	margin-bottom: clamp(2rem, 5vw, 3.5rem);
	padding: clamp(1.6rem, 4vw, 3rem) clamp(1.2rem, 5vw, 3rem);
	background-size: cover;
	background-position: center;
	background-color: var(--wp--preset--color--contrast);
	isolation: isolate;
	overflow: hidden;
}

.aaeir-hero--home {
	min-height: clamp(300px, 46vw, 520px);
	align-items: center;
	text-align: center;
	justify-content: center;
	margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}

/*
 * Just enough veil for white type to hold, and no more: these photographs are
 * the point of the banner, so the top of the image stays almost untouched and
 * the scrim gathers where the text actually sits.
 */
.aaeir-hero__veil {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(
		180deg,
		rgba(14, 27, 61, .10) 0%,
		rgba(14, 27, 61, .26) 42%,
		rgba(14, 27, 61, .74) 100%
	);
}

/* Centred type needs its contrast in the middle, not at the foot. */
.aaeir-hero--home .aaeir-hero__veil {
	background:
		radial-gradient(72% 66% at 50% 52%, rgba(14, 27, 61, .62) 0%, rgba(14, 27, 61, 0) 100%),
		linear-gradient(180deg, rgba(14, 27, 61, .16) 0%, rgba(14, 27, 61, .34) 100%);
}

/* Without a photograph the band carries the palette on its own. */
.aaeir-hero.is-plain {
	background-image: linear-gradient(115deg, #0A3396 0%, #14245C 52%, #7A1220 100%);
}

.aaeir-hero.is-plain .aaeir-hero__veil {
	background: radial-gradient(120% 140% at 15% 0%, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 60%);
}

.aaeir-hero__inner {
	position: relative;
	width: 100%;
	max-width: var(--wp--style--global--wide-size, 1180px);
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: .55rem;
}

.aaeir-hero--home .aaeir-hero__inner {
	align-items: center;
	gap: 1.1rem;
}

.aaeir-hero__eyebrow {
	margin: 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: clamp(.66rem, 1.4vw, .76rem);
	letter-spacing: .16em;
	text-transform: uppercase;
	color: #F0A8AE;
}

.aaeir-hero__title {
	margin: 0;
	color: #FFFFFF;
	font-family: var(--wp--preset--font-family--display);
	font-weight: 500;
	line-height: 1.06;
	letter-spacing: -.015em;
	font-size: clamp(1.9rem, 5.4vw, 3.6rem);
	text-wrap: balance;
	text-shadow: 0 2px 24px rgba(0, 0, 0, .3);
}

.aaeir-hero--home .aaeir-hero__title {
	font-size: clamp(2.2rem, 6.4vw, 4.4rem);
	letter-spacing: .01em;
	max-width: 16ch;
}

/* The next meeting, sitting inside the front-page banner. */
.aaeir-hero__next {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: .3rem;
	margin-top: .4rem;
	padding: 1rem 1.8rem 1.15rem;
	border-radius: 4px;
	text-decoration: none;
	background: rgba(255, 255, 255, .1);
	border: 1px solid rgba(255, 255, 255, .28);
	backdrop-filter: blur(6px);
	transition: background .25s ease, transform .25s ease;
}

.aaeir-hero__next:hover {
	background: rgba(255, 255, 255, .18);
	transform: translateY(-2px);
}

.aaeir-hero__next-when {
	font-family: var(--wp--preset--font-family--mono);
	font-size: .68rem;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #F0A8AE;
	/* "Septembre 2026 · date à confirmer" is longer than a plain date and
	   must stay readable on a narrow screen rather than overflow the card. */
	text-align: center;
	text-wrap: balance;
}

.aaeir-hero__next-what {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1.15rem, 2.6vw, 1.6rem);
	font-weight: 600;
	color: #FFFFFF;
	line-height: 1.15;
}

.aaeir-hero__next-cta {
	margin-top: .45rem;
	background: var(--wp--preset--color--primary);
	color: #FFFFFF;
	font-weight: 700;
	font-size: .88rem;
	border-radius: 3px;
	padding: .5rem 1.2rem;
}

/* ---------- centred section headings ---------- */

.aaeir-section-title {
	text-align: center;
	font-size: clamp(1.8rem, 4.4vw, 2.9rem);
	font-weight: 600;
	letter-spacing: -.015em;
	margin-bottom: .35rem;
}

.aaeir-section-intro {
	text-align: center;
	max-width: 46ch;
	margin: 0 auto clamp(1.6rem, 4vw, 2.6rem);
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1.02rem, 2vw, 1.2rem);
	line-height: 1.5;
}

/* ---------- meeting cards ---------- */

.aaeir-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: clamp(1rem, 2.4vw, 1.6rem);
}

.aaeir-card {
	margin: 0;
}

.aaeir-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none;
	color: inherit;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 5px;
	overflow: hidden;
	transition: transform .3s cubic-bezier(.2, .7, .3, 1), box-shadow .3s ease;
}

.aaeir-card__link:hover {
	transform: translateY(-4px);
	box-shadow: 0 14px 34px -18px rgba(14, 27, 61, .5);
}

.aaeir-card__media {
	display: block;
	aspect-ratio: 3 / 2;
	background-size: cover;
	background-position: center;
	background-color: var(--wp--preset--color--tint);
	transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}

.aaeir-card__link:hover .aaeir-card__media {
	transform: scale(1.04);
}

.aaeir-card.is-plain .aaeir-card__media {
	background-image: linear-gradient(125deg, #0A3396 0%, #14245C 55%, #7A1220 100%);
}

.aaeir-card__body {
	display: flex;
	flex-direction: column;
	gap: .38rem;
	padding: 1.1rem 1.25rem 1.3rem;
	flex: 1;
}

.aaeir-card__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.28rem;
	font-weight: 600;
	line-height: 1.18;
	color: var(--wp--preset--color--contrast);
}

.aaeir-card__text {
	font-size: .92rem;
	line-height: 1.5;
	color: var(--wp--preset--color--muted);
	flex: 1;
}

.aaeir-card__when {
	margin-top: .35rem;
	font-family: var(--wp--preset--font-family--mono);
	font-size: .7rem;
	letter-spacing: .09em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--wp--preset--color--primary);
}

.aaeir-card__when.is-quiet {
	color: var(--wp--preset--color--muted);
	font-weight: 400;
}

/* ---------- news cards get the same lift ---------- */

.aaeir-news .wp-block-post-featured-image {
	overflow: hidden;
	border-radius: 4px;
}

.aaeir-news .wp-block-post-featured-image img {
	transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}

.aaeir-news .wp-block-post:hover .wp-block-post-featured-image img {
	transform: scale(1.04);
}

/* ---------- entrance motion ---------- */

@media (prefers-reduced-motion: no-preference) {
	.aaeir-reveal {
		opacity: 0;
		transform: translateY(18px);
		transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .3, 1);
	}

	.aaeir-reveal.is-in {
		opacity: 1;
		transform: none;
	}

	.aaeir-hero__inner > * {
		animation: aaeir-rise .8s cubic-bezier(.2, .7, .3, 1) both;
	}

	.aaeir-hero__inner > *:nth-child(2) { animation-delay: .1s; }
	.aaeir-hero__inner > *:nth-child(3) { animation-delay: .2s; }

	@keyframes aaeir-rise {
		from { opacity: 0; transform: translateY(16px); }
		to   { opacity: 1; transform: none; }
	}
}

/*
 * The banner sits directly inside <main>, which is already full width, so it
 * needs no negative margins. The old 100vw trick counted the scrollbar and
 * pushed the page sideways.
 */
main > .aaeir-hero {
	width: auto;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
}
