/* Galerie (bloc amvb/gallery-albums) : entrées et micro-interactions. */
@keyframes gallery-albums-in {
	from {
		opacity: 0;
		transform: translateY(14px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes gallery-tile-in {
	from {
		opacity: 0;
		transform: translateY(18px) scale(0.985);
	}

	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes gallery-heading-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.gallery-albums {
	animation: gallery-albums-in 0.55s var(--wp--custom--motion--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1)) both;
}

.gallery-albums .gallery-year-block {
	animation: gallery-heading-in 0.6s var(--wp--custom--motion--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1)) both;
	animation-delay: var(--gallery-section-delay, 0ms);
}

.gallery-albums .gallery-year-heading,
.gallery-albums .gallery-group-heading {
	animation: gallery-heading-in 0.5s var(--wp--custom--motion--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1)) both;
	animation-delay: var(--gallery-group-delay, 0ms);
}

.gallery-albums .gallery-album-tile {
	animation: gallery-tile-in 0.65s var(--wp--custom--motion--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1)) backwards;
	animation-delay: calc(var(--gallery-group-delay, 0ms) + var(--gallery-delay, 0ms));
	transition:
		transform 0.45s var(--wp--custom--motion--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1)),
		box-shadow 0.45s var(--wp--custom--motion--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1));
}

.gallery-albums .gallery-album-tile:hover,
.gallery-albums .gallery-album-tile:focus-visible {
	transform: translateY(-4px);
	box-shadow:
		inset 0 0 0 1px color-mix(in srgb, var(--color-mv-navy) 12%, transparent),
		0 14px 28px -18px color-mix(in srgb, var(--color-mv-navy) 40%, transparent);
}

.gallery-albums .gallery-album-icon {
	transition:
		background-color 0.4s var(--wp--custom--motion--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1)),
		color 0.4s var(--wp--custom--motion--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1)),
		transform 0.45s var(--wp--custom--motion--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1));
}

.gallery-albums .gallery-album-tile:hover .gallery-album-icon,
.gallery-albums .gallery-album-tile:focus-visible .gallery-album-icon {
	background-color: var(--color-mv-brand);
	color: var(--color-mv-cream);
	transform: scale(1.08) rotate(-5deg);
}

.gallery-albums .gallery-album-cta {
	transition: transform 0.45s var(--wp--custom--motion--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1));
}

.gallery-albums .gallery-album-tile:hover .gallery-album-cta,
.gallery-albums .gallery-album-tile:focus-visible .gallery-album-cta {
	transform: translateX(3px);
}

.gallery-summary {
	transition: opacity 0.35s var(--wp--custom--motion--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1));
}

.gallery-year-chip {
	transition: transform 0.35s var(--wp--custom--motion--ease-out-expo, cubic-bezier(0.16, 1, 0.3, 1));
}

.gallery-year-chip:hover {
	transform: translateY(-2px);
}

.gallery-year-chip[aria-pressed="true"] {
	transform: translateY(0) scale(1.02);
}

@media (prefers-reduced-motion: reduce) {
	.gallery-albums,
	.gallery-albums .gallery-year-block,
	.gallery-albums .gallery-year-heading,
	.gallery-albums .gallery-group-heading,
	.gallery-albums .gallery-album-tile {
		animation: none;
	}

	.gallery-albums .gallery-album-tile:hover,
	.gallery-albums .gallery-album-tile:focus-visible {
		transform: none;
		box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--color-mv-navy) 12%, transparent);
	}

	.gallery-albums .gallery-album-icon,
	.gallery-albums .gallery-album-tile:hover .gallery-album-icon,
	.gallery-albums .gallery-album-tile:focus-visible .gallery-album-icon,
	.gallery-albums .gallery-album-cta,
	.gallery-albums .gallery-album-tile:hover .gallery-album-cta,
	.gallery-year-chip,
	.gallery-year-chip:hover,
	.gallery-year-chip[aria-pressed="true"] {
		transition: none;
		transform: none;
	}
}
