/*
 * Tết 2027 landing components. Styles what Elementor controls cannot express, keyed on the
 * css_classes set in elementor/sections/*.json. Uses the --tet-* tokens from tokens.css.
 */

/* ---- Shared: section heading with wave ornament (Figma "WF / Section heading") ---- */
.tet-heading .elementor-heading-title::before {
	content: "";
	display: block;
	width: 104.165px;
	height: 27px;
	margin: 0 0 var(--tet-space-12) 0.5px;
	background: url(../img/brand/wave.svg) no-repeat left center / 104.165px 19.795px;
}

/* Elementor text-editor paragraphs: no theme margins; blank line between paragraphs. */
.tet-section .elementor-widget-text-editor p {
	margin: 0;
}
.tet-section .elementor-widget-text-editor p + p {
	margin-top: 1.5em;
}

/* Header: Astra's Site Identity has 1em top/bottom padding and no setting for it; the Figma header is 86px. */
.site-header .ast-site-identity,
.site-header .site-branding {
	padding-top: 0;
	padding-bottom: 0;
}

/* ---- Hero ---- */
.tet-hero__title .elementor-heading-title {
	max-width: 580px;
}
/* Subtle shadow keeps the white text legible over the video's brightest frames (overlay stays 0.35). */
.tet-hero__title .elementor-heading-title,
.tet-hero__subtitle .elementor-heading-title {
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

/* Ticket block: white info panel + yellow CTA panel. */
.tet-ticket {
	max-width: 100%;
}
.tet-ticket__cta {
	min-height: 117px;
}
.tet-ticket__place p {
	white-space: nowrap;
}
.tet-ticket__place .tet-ticket__venue {
	font-weight: 700;
	margin-bottom: -4px;
}
.tet-section .tet-ticket__place p + p {
	margin-top: 0;
}
.tet-ticket__place .tet-ticket__address {
	color: var(--tet-text-tertiary);
}

/* Poster mount: cream frame, 526px image, "Affiche 2027" chip. */
.tet-poster {
	position: relative;
	flex-shrink: 0;
}
.tet-poster .tet-poster__image img {
	display: block;
	width: 100%;
	height: 526px;
	object-fit: cover;
}
.tet-poster .tet-poster__chip {
	position: absolute;
	top: 26px;  /* 14px frame + 12px inset */
	left: 26px;
	width: auto;
	margin: 0;
	z-index: 1;
}
.tet-poster .tet-poster__chip .elementor-heading-title {
	display: block;
	padding: var(--tet-space-4) var(--tet-space-8);
	background: #FEFCF6;
	color: var(--tet-text-secondary);
	font-family: var(--tet-font-body);
	font-weight: 700;
	font-size: 13px;
	line-height: 1.15;
	white-space: nowrap;
}

/* Poster entrance animation (runs once on load). */
@keyframes tet-poster-in {
	from {
		opacity: 0;
		transform: translateY(40px) rotate(-3deg) scale(.96);
	}
	to {
		opacity: 1;
		transform: none;
	}
}
.tet-poster {
	animation: tet-poster-in 900ms cubic-bezier(.2,.7,.2,1) 250ms both;
}

/* ---- Archive carousel: 7.5 posters visible (3.5 on mobile), neighbours overlap ---- */
.tet-archive .tet-archive__carousel {
	overflow: hidden;
}
/* Desktop: 7 posters fill the row. Tablet/mobile: the next poster peeks into the right-hand slot. */
.tet-archive .tet-archive__carousel .elementor-image-carousel-wrapper.swiper {
	width: 100%;  /* 7 unique posters fill the 7 slots; tablet/mobile peek below */
	margin-left: 0;  /* Swiper centres .swiper with auto margins; the peek is on the right only. */
	margin-right: auto;
	overflow: visible;
	padding-bottom: 44px;  /* 24px gap between posters and dots (Figma), plus the dots row */
}
.tet-section.tet-archive.e-con {
	overflow-x: clip;  /* posters overlap past the right edge; never widen the page */
}
@media (max-width: 1024px) and (min-width: 768px) {
	.tet-archive .tet-archive__carousel .elementor-image-carousel-wrapper.swiper {
		width: calc(100% * 5 / 5.5);
	}
}
.tet-archive .elementor-image-carousel .swiper-slide {
	overflow: visible;
}
/* Each poster is wider than its slot so it slides under its right-hand neighbour.
   (Selector outweighs Elementor's .elementor-element .swiper .swiper-image-stretch ... width:100%.) */
.tet-archive .tet-archive__carousel .swiper .swiper-image-stretch .swiper-slide .swiper-slide-image {
	display: block;
	width: calc(100% + 25px);
	max-width: none;
	aspect-ratio: 182 / 257;
	object-fit: cover;
}

@media (max-width: 767px) {
	.tet-archive .tet-archive__carousel .elementor-image-carousel-wrapper.swiper {
		width: calc(100% * 3 / 3.5);
	}
	.tet-archive .tet-archive__carousel .swiper .swiper-image-stretch .swiper-slide .swiper-slide-image {
		width: calc(100% + 16px);
	}
	.tet-poster .tet-poster__image img {
		height: auto;
		aspect-ratio: 422 / 526;
	}
}

/* ---- Reduced motion: static poster, still image instead of the video ---- */
@media (prefers-reduced-motion: reduce) {
	.tet-poster {
		animation: none;
	}
	.tet-hero .elementor-background-video-container {
		display: none;
	}
}

/* ---- Programme: 8 activity tiles, 4-column grid (2 on mobile) ---- */
.tet-programme__head > .elementor-widget {
	flex: 1 1 0;
	min-width: 0;
}
.tet-programme__intro p {
	margin: 0;
}
.tet-tiles.e-con {
	--display: grid;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}
.tet-tile--green { --tet-tile-colour: var(--tet-tile-green); }
.tet-tile--blue { --tet-tile-colour: var(--tet-tile-blue); }
.tet-tile--orange { --tet-tile-colour: var(--tet-tile-orange); }
.tet-tile.e-con {
	border: 1px solid var(--tet-tile-colour);
	overflow: hidden;
}
.tet-tile .tet-tile__image,
.tet-tile .tet-tile__image .elementor-widget-container {
	width: 100%;
}
.tet-tile .tet-tile__image img {
	display: block;
	width: 100%;
	height: 330px;
	object-fit: cover;
}
.tet-tile .tet-tile__bar {
	width: 100%;
	box-sizing: border-box;
	height: 70px;
	padding: 14px var(--tet-space-16);
	background: var(--tet-tile-colour);
	overflow: hidden;
}
.tet-tile .tet-tile__bar .elementor-heading-title {
	margin: 0;
}

/* ---- Spectacle: blurred photo background + slideshow ---- */
.tet-section.tet-stage.e-con {
	position: relative;
	overflow: hidden;
}
.tet-section.tet-stage.e-con::before {
	content: "";
	position: absolute;
	top: -24px;
	left: -24px;
	width: calc(100% + 48px);
	height: calc(100% + 48px);
	opacity: 1;
	/* Static first-slide backdrop (no-JS fallback); stage-bg.js adds cross-fading layers above it. */
	background: url(../img/content/stage/spectacle-live-01.jpg) center / cover no-repeat;
	filter: blur(12px);
	transform: scale(1.05);
}
.tet-section.tet-stage.e-con::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .4);
}
/* Cross-fading backdrop layers created by assets/js/stage-bg.js (above ::before, below the ::after overlay). */
.tet-stage .tet-stage__bg {
	position: absolute;
	inset: -24px;
	pointer-events: none;
}
.tet-stage .tet-stage__bg-layer {
	position: absolute;
	inset: 0;
	background: center / cover no-repeat;
	filter: blur(12px);
	opacity: 0;
	transform: scale(1.12);
	transition: opacity 900ms ease-in-out, transform 1600ms cubic-bezier(.2,.7,.2,1);
	will-change: opacity, transform;
}
.tet-stage .tet-stage__bg-layer.is-active {
	opacity: 1;
	transform: scale(1.05);
}
.tet-stage > .e-con-inner,
.tet-stage > .e-con {
	position: relative;
	z-index: 1;
}
.tet-stage .tet-stage__carousel {
	max-width: 100%;  /* 914px width is a widget setting (_element_custom_width) in 05-stage.json */
}
.tet-stage .tet-stage__carousel .elementor-swiper {
	position: relative;
}
.tet-stage .tet-stage__carousel .swiper-slide-image {
	display: block;
	width: 100%;
	max-width: none;
	aspect-ratio: 914 / 610;
	object-fit: cover;
}
.tet-section.tet-stage .tet-stage__carousel.elementor-widget .elementor-swiper-button {
	/* The SVG canvas (53.8x63.3) pads the 16.6x26.1 chevron with its glow; size the box to the canvas. */
	width: 53.8px;
	height: 63.3px;
	margin-top: 0;
	font-size: 0;
	background: url(../img/content/stage/arrow-next.svg) center / 100% 100% no-repeat;
	transform: translateY(-50%);
}
.tet-section.tet-stage .tet-stage__carousel.elementor-widget .elementor-swiper-button svg,
.tet-section.tet-stage .tet-stage__carousel.elementor-widget .elementor-swiper-button i {
	display: none;
}
.tet-section.tet-stage .tet-stage__carousel.elementor-widget .elementor-swiper-button.elementor-swiper-button-next {
	left: auto;
	right: -121.6px;  /* chevron sits 103px outside the 914px slide */
}
.tet-section.tet-stage .tet-stage__carousel.elementor-widget .elementor-swiper-button.elementor-swiper-button-prev {
	left: -121.6px;
	right: auto;
	background-image: url(../img/content/stage/arrow-prev.svg);
	transform: translateY(-50%) scaleX(-1);
}

@media (max-width: 767px) {
	.tet-stage .tet-stage__carousel .swiper-slide-image {
		aspect-ratio: 290 / 328;  /* Figma mobile crops the photo to a portrait 290x328 */
	}
}
/* Below 1200px the 103px-outside arrows (914px slide + 2x121.6px) no longer fit: pull them inside the slide. */
@media (max-width: 1199px) {
	.tet-section.tet-stage .tet-stage__carousel.elementor-widget .elementor-swiper-button.elementor-swiper-button-next {
		right: 0;
	}
	.tet-section.tet-stage .tet-stage__carousel.elementor-widget .elementor-swiper-button.elementor-swiper-button-prev {
		left: 0;
	}
}

/* ---- Billetterie: centred heading + 3 ticket cards ---- */
.tet-heading--center .elementor-heading-title::before {
	margin-left: auto;
	margin-right: auto;
	background-position: center;
}
.tet-tickets > .tet-ticket-card {
	flex: 1 1 0;
	min-width: 0;
}
.tet-ticket-card--or { --tet-ticket-colour: var(--tet-ticket-or); }
.tet-ticket-card--cat1 { --tet-ticket-colour: var(--tet-ticket-cat1); }
.tet-ticket-card--cat2 { --tet-ticket-colour: var(--tet-ticket-cat2); }
.tet-ticket-card.e-con {
	background: var(--tet-white);
	border: 1px solid var(--tet-ticket-colour);
	overflow: hidden;
}
.tet-ticket-card .tet-ticket-card__head {
	width: 100%;
	box-sizing: border-box;
	padding: 18px;
	background: var(--tet-ticket-colour);
}
.tet-ticket-card .tet-ticket-card__head .elementor-heading-title {
	margin: 0;
}
.tet-ticket-card .tet-ticket-card__body {
	width: 100%;
	box-sizing: border-box;
	padding: 20px;
}
.tet-section .tet-ticket-card__body p + p {
	margin-top: 0;
}

@media (max-width: 767px) {
	.tet-tiles.e-con {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}
	.tet-tile .tet-tile__image img {
		height: 116px;
	}
	.tet-tile .tet-tile__bar {
		height: auto;
		min-height: 68px;
	}
}

/* ---- Réservations: bullet options + Billetweb frame ---- */
.tet-reservations__row > .e-con,
.tet-reservations__row > .elementor-element {
	flex: 1 1 0;
	min-width: 0;
}
.tet-option .tet-option__title .elementor-heading-title {
	display: flex;
	align-items: center;
	gap: var(--tet-space-8);
	margin: 0;
}
.tet-option .tet-option__title .elementor-heading-title::before {
	content: "";
	flex: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--tet-yellow);
}
.tet-option .tet-option__text {
	padding: 0 19px;
}
.tet-section .tet-option__text p + p {
	margin-top: 0;
}
.tet-billetweb.e-con {
	box-sizing: border-box;
	padding: 20px;
	background: #FAFAFA;
	border: 1px solid #999999;
}
.tet-billetweb .tet-billetweb__head {
	width: 100%;
}
.tet-billetweb .tet-billetweb__title .elementor-heading-title,
.tet-billetweb .tet-billetweb__tag .elementor-heading-title {
	margin: 0;
}
.tet-billetweb .tet-billetweb__tag .elementor-heading-title {
	letter-spacing: .02em;
}
.tet-billetweb .tet-billetweb__embed {
	width: 100%;
}

/* ---- Informations pratiques ---- */
.tet-infos__row.e-con > .tet-infos__side.e-con {
	flex: 0 0 320px;
	width: 320px;
}
.tet-infos__row > .tet-infos__main {
	flex: 1 1 0;
	min-width: 0;
}
.tet-infos__sub .elementor-heading-title {
	margin: 0;
}
.tet-infos__cols > .tet-info-col {
	flex: 1 1 0;
	min-width: 0;
}
.tet-info-col.e-con {
	position: relative;
	box-sizing: border-box;
}
.tet-info-col.e-con::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: var(--tet-text-secondary);
}
.tet-info-col .tet-info-col__title .elementor-heading-title {
	margin: 0;
}
.tet-section .tet-info-col__text p + p {
	margin-top: 0;
}

/* ---- A propos: white section, centred, outline button ---- */
.tet-about .tet-about__text p + p {
	margin-top: 1.5em;
}
.tet-btn--outline .elementor-button {
	border-radius: var(--tet-btn-radius);
}

/* ---- Sponsors ---- */
.tet-sponsors__row > .tet-sponsor {
	flex: 0 0 auto;
	width: auto;
}
.tet-about__stack.e-con {
	max-width: 100%;
}
.tet-sponsor .tet-sponsor__logo img {
	display: block;
	width: 168px;
	height: 100px;
	object-fit: contain;
}
.tet-sponsor .tet-sponsor__caption .elementor-heading-title {
	margin: 0;
	white-space: nowrap;
}

@media (max-width: 767px) {
	.tet-infos__row.e-con > .tet-infos__side.e-con {
		flex: 1 1 auto;
		width: 100%;
	}
	.tet-sponsors__row.e-con {
		gap: 40px;
	}
	.tet-sponsor .tet-sponsor__caption .elementor-heading-title {
		white-space: normal;
		text-align: center;
	}
}

/* ---- Side gutter between mobile and the 1180px boxed width (1180 + 2x30 = 1240) ----
   Boxed sections have 0 side padding on desktop and 20px on mobile; Elementor's tablet
   breakpoint stops at 1024px, so cover 768-1239px here. !important beats Elementor's per-element rules. */
@media (min-width: 768px) and (max-width: 1239px) {
	.tet-section.e-con {
		padding-left: var(--tet-gutter-tablet) !important;
		padding-right: var(--tet-gutter-tablet) !important;
	}
}

/* ---- Desktop: header + hero fill exactly one screen (>=1025px) ----
   100vh fallback first, then 100svh; the header height is a token (measured). Content is centred;
   the poster scales down on short viewports so it is never clipped. Tablet/mobile keep content height. */
@media (min-width: 1025px) {
	.tet-hero.e-con {
		min-height: calc(100vh - var(--tet-header-h));
		min-height: calc(100svh - var(--tet-header-h));
		padding-top: 0;
		padding-bottom: 0;
		justify-content: center;
		--tet-poster-h: min(526px, calc(100svh - var(--tet-header-h) - 94px));
	}
	.tet-hero.e-con > .e-con-inner {
		box-sizing: border-box;
		min-height: calc(100svh - var(--tet-header-h));
		padding-top: var(--tet-space-32) !important;  /* Elementor puts the section padding on the inner box */
		padding-bottom: var(--tet-space-32) !important;
		align-items: center;
	}
	.tet-hero.e-con .tet-poster.e-con {
		width: calc(var(--tet-poster-h) * 0.7985 + 30px);
	}
	.tet-hero.e-con .tet-poster .tet-poster__image img {
		height: var(--tet-poster-h);
		max-height: calc(100svh - var(--tet-header-h) - 94px);
	}
}

/* Spectacle background swap: no cross-fade for reduced-motion visitors (after the main rule so it wins). */
@media (prefers-reduced-motion: reduce) {
	.tet-stage .tet-stage__bg-layer {
		transition: none;
		transform: scale(1.05);
	}
}

/* ---- Footer (Elementor section 11-footer.json) ---- */
/* Instagram in its brand gradient, as in the Figma footer (Elementor's "official" colour is flat dark grey). */
.tet-footer .tet-footer__social .elementor-social-icon-instagram {
	background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}
