/*
 * "40 ans" page (templates/template-40-ans.php): section links, programme (event rows of
 * events.css), editorial, media library and partners & sponsors.
 */

.y40-container {
	width: min(var(--content), 100% - 2 * var(--gutter));
	margin-inline: auto;
}

.y40-section {
	padding: 96px 0;
	/* html already leaves the header height; the section top padding clears the links bar. */
	scroll-margin-top: 0;
}

.y40-head {
	max-width: 720px;
}

.y40-head .section-title {
	margin-top: 12px;
}

.y40-head__text {
	margin-top: 14px;
	color: var(--grey-500);
	font-size: 17px;
	line-height: 26px;
}

.y40-head--center {
	margin-inline: auto;
	text-align: center;
}

.y40-head--row {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px;
	max-width: none;
}

.y40-head--row > div:first-child {
	max-width: 720px;
}

.y40-empty {
	margin-top: 40px;
	padding: 32px 24px;
	border: 1px dashed var(--grey-300);
	border-radius: 12px;
	color: var(--grey-500);
	font-size: 15px;
	line-height: 22px;
	text-align: center;
}

/* Section links ------------------------------------------------------------ */

.y40-nav {
	position: sticky;
	top: var(--header-height);
	z-index: 10;
	border-bottom: 1px solid var(--grey-200);
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(6px);
}

.y40-nav__list {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 12px var(--gutter);
	overflow-x: auto;
	list-style: none;
	scrollbar-width: none;
}

.y40-nav__link {
	display: block;
	padding: 8px 16px;
	border-radius: 9999px;
	color: var(--ink);
	font-size: 13px;
	font-weight: 600;
	line-height: 18px;
	white-space: nowrap;
	transition: background-color 0.2s, color 0.2s;
}

.y40-nav__link:hover {
	background: var(--grey-100);
}

.y40-nav__link.is-active {
	background: var(--red-bright);
	color: var(--white);
}

/* Programme ---------------------------------------------------------------- */

.y40-programme {
	background: var(--bg-soft);
}

.y40-programme__list {
	margin-top: 48px;
}

.y40-past {
	margin-top: 64px;
}

.y40-past__title {
	color: var(--ink);
	font-family: var(--font-serif);
	font-size: 24px;
	font-weight: 700;
	line-height: 32px;
}

.y40-past__list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

.y40-past__item {
	display: flex;
	align-items: center;
	gap: 16px;
	height: 100%;
	padding: 12px;
	border: 1px solid #dbdbd6;
	border-radius: 12px;
	background: var(--white);
	color: var(--ink);
	transition: border-color 0.2s, box-shadow 0.2s;
}

.y40-past__item:hover {
	border-color: var(--red-bright);
	box-shadow: 0 8px 20px rgba(11, 20, 33, 0.08);
}

.y40-past__media {
	flex: none;
	width: 88px;
	height: 66px;
	overflow: hidden;
	border-radius: 8px;
	background: var(--grey-100);
}

.y40-past__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.y40-past__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.y40-past__date {
	color: var(--red-bright);
	font-size: 12px;
	font-weight: 700;
	line-height: 16px;
}

.y40-past__name {
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
}

.y40-past__arrow {
	flex: none;
	color: var(--red-bright);
}

/* Editorial ---------------------------------------------------------------- */

.y40-edito__grid {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
	gap: 72px;
	align-items: start;
}

.y40-edito__aside {
	margin: 0;
}

.y40-edito__photo {
	position: relative;
	aspect-ratio: 4 / 5;
	border-radius: 16px;
	background: #0b1421;
}

.y40-edito__image {
	width: 100%;
	height: 100%;
	border-radius: 16px;
	object-fit: cover;
}

.y40-edito__badge {
	position: absolute;
	right: -20px;
	bottom: -20px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 104px;
	height: 104px;
	border: 6px solid var(--white);
	border-radius: 50%;
	background: var(--red-bright);
	color: var(--white);
	font-family: var(--font-serif);
	font-size: 40px;
	font-weight: 700;
	line-height: 1;
}

.y40-edito__signature {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 28px;
	padding-left: 16px;
	border-left: 3px solid var(--red-bright);
}

.y40-edito__name {
	color: var(--ink);
	font-size: 16px;
	font-weight: 700;
	line-height: 22px;
}

.y40-edito__role {
	color: var(--grey-500);
	font-size: 14px;
	line-height: 20px;
}

.y40-edito__text {
	margin-top: 24px;
	color: #374151;
	font-size: 17px;
	line-height: 28px;
}

.y40-edito__text > * + * {
	margin-top: 16px;
}

.y40-edito__text strong {
	color: var(--ink);
}

.y40-edito__text blockquote {
	margin: 24px 0;
	padding: 4px 0 4px 20px;
	border-left: 3px solid var(--red-bright);
	color: var(--ink);
	font-family: var(--font-serif);
	font-size: 22px;
	font-style: italic;
	line-height: 32px;
}

.y40-highlights {
	margin-top: 80px;
}

.y40-highlights__title {
	color: var(--ink);
	font-family: var(--font-serif);
	font-size: 26px;
	font-weight: 700;
	line-height: 34px;
}

.y40-highlights__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
}

.y40-highlight {
	padding: 28px 24px;
	border-top: 3px solid var(--red-bright);
	border-radius: 4px 4px 12px 12px;
	background: var(--bg-alt);
}

.y40-highlight__number {
	color: var(--red-bright);
	font-family: var(--font-serif);
	font-size: 32px;
	font-weight: 700;
	line-height: 1;
}

.y40-highlight__title {
	margin-top: 16px;
	color: var(--ink);
	font-size: 17px;
	font-weight: 700;
	line-height: 24px;
}

.y40-highlight__text {
	margin-top: 8px;
	color: var(--grey-500);
	font-size: 14px;
	line-height: 22px;
}

/* Media library -------------------------------------------------------------- */

.y40-media {
	background: #0b1421;
	color: var(--white);
}

.y40-media .section-title {
	color: var(--white);
}

.y40-media .y40-head__text {
	color: rgba(255, 255, 255, 0.7);
}

.y40-media .y40-empty {
	border-color: rgba(255, 255, 255, 0.25);
	color: rgba(255, 255, 255, 0.7);
}

.y40-tabs {
	display: flex;
	gap: 6px;
	padding: 4px;
	border-radius: 9999px;
	background: rgba(255, 255, 255, 0.08);
}

.y40-tabs__tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 18px;
	border: 0;
	border-radius: 9999px;
	background: transparent;
	color: rgba(255, 255, 255, 0.8);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 18px;
	cursor: pointer;
}

.y40-tabs__tab[aria-selected="true"] {
	background: var(--white);
	color: #0b1421;
}

.y40-tabs__count {
	min-width: 20px;
	padding: 1px 6px;
	border-radius: 9999px;
	background: var(--red-bright);
	color: var(--white);
	font-size: 11px;
	line-height: 16px;
	text-align: center;
}

.y40-media__panel {
	margin-top: 40px;
}

.y40-media__panel + .y40-media__panel:not([hidden]) {
	margin-top: 48px;
}

.y40-photos {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: 200px;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.y40-photos__item:first-child {
	grid-row: span 2;
	grid-column: span 2;
}

.y40-photos__link {
	display: block;
	height: 100%;
	overflow: hidden;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.06);
}

.y40-photos__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s, opacity 0.2s;
}

.y40-photos__link:hover .y40-photos__image {
	transform: scale(1.04);
}

.y40-videos {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.y40-video__player {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 12px;
	background: #000;
}

.y40-video__play {
	position: absolute;
	inset: 0;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}

.y40-video__poster {
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0.85;
	transition: opacity 0.2s;
}

.y40-video__play:hover .y40-video__poster {
	opacity: 1;
}

.y40-video__icon {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--red-bright);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
	transform: translate(-50%, -50%);
	transition: transform 0.2s;
}

.y40-video__icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 54%;
	border-width: 11px 0 11px 18px;
	border-style: solid;
	border-color: transparent transparent transparent var(--white);
	transform: translate(-50%, -50%);
}

.y40-video__play:hover .y40-video__icon {
	transform: translate(-50%, -50%) scale(1.08);
}

.y40-video__player iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.y40-video__title {
	margin-top: 14px;
	font-size: 16px;
	font-weight: 600;
	line-height: 22px;
}

.y40-lightbox {
	width: 100vw;
	max-width: none;
	height: 100vh;
	max-height: none;
	margin: 0;
	padding: 56px 72px;
	border: 0;
	background: transparent;
}

.y40-lightbox[open] {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
}

.y40-lightbox::backdrop {
	background: rgba(8, 13, 20, 0.92);
}

.y40-lightbox__figure {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	margin: 0;
	min-width: 0;
}

.y40-lightbox__image {
	max-width: 100%;
	max-height: calc(100vh - 160px);
	border-radius: 8px;
	object-fit: contain;
}

.y40-lightbox__caption {
	color: rgba(255, 255, 255, 0.85);
	font-size: 14px;
	line-height: 20px;
	text-align: center;
}

.y40-lightbox__close,
.y40-lightbox__nav {
	flex: none;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: var(--white);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.y40-lightbox__close:hover,
.y40-lightbox__nav:hover {
	background: var(--red-bright);
}

.y40-lightbox__close {
	position: absolute;
	top: 16px;
	right: 16px;
	font-size: 28px;
}

/* Partners & sponsors ---------------------------------------------------------- */

.y40-level {
	margin-top: 56px;
}

.y40-level__title {
	display: flex;
	align-items: center;
	gap: 16px;
	color: var(--grey-500);
	font-size: 12px;
	font-weight: 700;
	line-height: 16px;
	letter-spacing: 1.6px;
	text-transform: uppercase;
}

.y40-level__title::before,
.y40-level__title::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--grey-200);
}

.y40-level__logos {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
}

.y40-level__box {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 180px;
	height: 92px;
	padding: 16px;
	border: 1px solid var(--grey-200);
	border-radius: 12px;
	background: var(--white);
	transition: border-color 0.2s, box-shadow 0.2s;
}

a.y40-level__box:hover {
	border-color: var(--red-bright);
	box-shadow: 0 8px 20px rgba(11, 20, 33, 0.08);
}

.y40-level__logo {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.y40-level--main .y40-level__title {
	color: var(--red-bright);
}

.y40-level--main .y40-level__box {
	width: 300px;
	height: 150px;
	padding: 28px;
	border-color: rgba(227, 6, 19, 0.35);
}

.y40-level--gold .y40-level__box {
	width: 230px;
	height: 116px;
	padding: 22px;
}

.y40-level--partner .y40-level__box {
	width: 150px;
	height: 76px;
	padding: 14px;
}

.y40-sponsor-cta {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	margin-top: 72px;
	padding: 40px 48px;
	overflow: hidden;
	border-radius: 16px;
	background: #0b1421;
	color: var(--white);
}

.y40-sponsor-cta::before {
	content: "";
	position: absolute;
	top: -120px;
	right: -80px;
	width: 220px;
	height: 220px;
	border-radius: 50%;
	background: var(--red-bright);
	opacity: 0.9;
}

.y40-sponsor-cta > * {
	position: relative;
}

.y40-sponsor-cta__title {
	font-family: var(--font-serif);
	font-size: 26px;
	font-weight: 700;
	line-height: 34px;
}

.y40-sponsor-cta__text {
	max-width: 620px;
	margin-top: 8px;
	color: rgba(255, 255, 255, 0.75);
	font-size: 15px;
	line-height: 24px;
}

.y40-sponsor-cta__button {
	flex: none;
}

/* Tablet and mobile -------------------------------------------------------------- */

@media (max-width: 1023px) {
	.y40-edito__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 56px;
	}

	.y40-edito__aside {
		width: min(100%, 420px);
	}

	.y40-highlights__list,
	.y40-past__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.y40-photos {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.y40-videos {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.y40-nav__list {
		justify-content: flex-start;
	}
}

@media (max-width: 767px) {
	.y40-section {
		padding: 64px 0;
	}

	.y40-nav__list {
		padding: 10px var(--gutter);
	}

	.y40-highlights__list,
	.y40-past__list,
	.y40-videos {
		grid-template-columns: minmax(0, 1fr);
	}

	.y40-photos {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-auto-rows: 140px;
	}

	.y40-edito__badge {
		right: 12px;
		bottom: -24px;
		width: 80px;
		height: 80px;
		font-size: 30px;
	}

	.y40-level__logos {
		gap: 12px;
	}

	.y40-level__box,
	.y40-level--gold .y40-level__box,
	.y40-level--partner .y40-level__box {
		width: calc(50% - 6px);
		height: 80px;
		padding: 14px;
	}

	.y40-level--main .y40-level__box {
		width: 100%;
		height: 120px;
	}

	.y40-sponsor-cta {
		flex-direction: column;
		align-items: flex-start;
		padding: 32px 24px;
	}

	.y40-sponsor-cta::before {
		top: -100px;
		right: -100px;
		width: 160px;
		height: 160px;
	}

	.y40-lightbox {
		padding: 64px 8px 16px;
	}

	.y40-lightbox[open] {
		flex-wrap: wrap;
		align-content: center;
	}

	.y40-lightbox__figure {
		order: -1;
		flex-basis: 100%;
	}
}
