/* TR Accueil Timeline */

@font-face {
	font-family: "TRAT Barlow";
	font-weight: 400;
	font-style: normal;
	font-display: swap;
	src: url("fonts/barlow-400.woff2") format("woff2");
}

@font-face {
	font-family: "TRAT Barlow";
	font-weight: 500;
	font-style: normal;
	font-display: swap;
	src: url("fonts/barlow-500.woff2") format("woff2");
}

@font-face {
	font-family: "TRAT Barlow Condensed";
	font-weight: 600;
	font-style: normal;
	font-display: swap;
	src: url("fonts/barlow-condensed-600.woff2") format("woff2");
}

@font-face {
	font-family: "TRAT Inter";
	font-weight: 400;
	font-style: normal;
	font-display: swap;
	src: url("fonts/inter-400.woff2") format("woff2");
}

body.trat-body {
	margin: 0;
	padding: 0;
	background: #000;
	color: #fff;
	overflow: hidden;
	overscroll-behavior: none;
	font-family: "TRAT Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 16px;
	line-height: 1.3;
	-webkit-font-smoothing: antialiased;
	--trat-pad: clamp(20px, 2.8vw, 40px);
}

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

.trat {
	position: fixed;
	inset: var(--wp-admin--admin-bar--height, 0px) 0 0 0;
	overflow: hidden;
	background: #000;
	touch-action: pan-y;
}

.trat .trat-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Neutralisation des styles globaux du thème ---------------------------- */

.trat .trat-header,
.trat .trat-nav,
.trat .trat-bottom,
.trat .trat-info,
.trat .trat-timeline,
.trat .trat-stage,
.trat .trat-slide {
	margin: 0;
	border: 0;
	background: none;
	box-shadow: none;
}

.trat .trat-title,
.trat .trat-agency,
.trat .trat-count,
.trat .trat-sr {
	padding: 0;
	border: 0;
	background: none;
	color: #fff;
	font-style: normal;
	text-shadow: none;
}

.trat .trat-agency,
.trat .trat-count {
	font-family: inherit;
	letter-spacing: normal;
	text-transform: none;
}

.trat a,
.trat button {
	margin: 0;
	box-shadow: none;
	text-shadow: none;
	text-decoration: none;
	width: auto;
	min-width: 0;
}

.trat a {
	border: 0;
	background: none;
}

/* Vidéos ---------------------------------------------------------------- */

.trat .trat-stage,
.trat .trat-slide,
.trat .trat-poster,
.trat .trat-video,
.trat .trat-shade {
	position: absolute;
	inset: 0;
}

.trat .trat-slide {
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.5s ease, visibility 0s linear 0.5s;
}

.trat .trat-slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.5s ease;
}

.trat .trat-poster {
	background: #000 center / cover no-repeat;
}

.trat .trat-video {
	overflow: hidden;
	opacity: 0;
	transition: opacity 0.6s ease;
}

.trat .trat-slide.is-playing .trat-video {
	opacity: 1;
}

.trat .trat-video iframe {
	position: absolute;
	top: 50%;
	left: 50%;
	width: max(100vw, 177.78vh);
	height: max(100vh, 56.25vw);
	max-width: none;
	border: 0;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.trat .trat-shade {
	background:
		linear-gradient(to top, rgba(0, 0, 0, 0.74) 0%, rgba(0, 0, 0, 0.28) 38%, rgba(0, 0, 0, 0) 64%),
		linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 24%);
	pointer-events: none;
}

/* En-tête --------------------------------------------------------------- */

.trat .trat-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 5;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 16px;
	min-height: 100px;
	padding: 0 var(--trat-pad);
}

.trat a {
	color: #fff;
	text-decoration: none;
}

.trat .trat-logo {
	justify-self: start;
	display: flex;
	align-items: center;
	min-height: 44px;
	transform: translate(var(--trat-logo-x, 0px), var(--trat-logo-y, 0px));
	font-size: 22px;
	font-weight: 500;
}

.trat .trat-logo img {
	display: block;
	width: auto;
	height: var(--trat-logo-h, 44px);
	max-width: min(60vw, 480px);
	object-fit: contain;
	object-position: left center;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

/* Menu : mêmes police, tailles et sous-menu que l'en-tête du thème. */
.trat .trat-nav {
	justify-self: center;
	font-family: "TRAT Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.trat .trat-menu,
.trat .trat-submenu,
.trat .trat-menu li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.trat .trat-menu {
	display: flex;
	align-items: center;
}

.trat .trat-menu > li {
	position: relative;
}

.trat .trat-menu a {
	font-family: inherit;
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
	white-space: nowrap;
}

.trat .trat-menu > li > a {
	position: relative;
	display: flex;
	align-items: center;
	height: 60px;
	padding: 0 17px;
	font-size: 18px;
	line-height: 1.5;
	color: #fff;
}

.trat .trat-submenu a {
	display: flex;
	align-items: center;
	padding: 8px 11px;
	border-radius: 5px;
	font-size: 16px;
	line-height: 1.4;
	color: #fffafa;
	transition: color 0.15s ease;
}

.trat .trat-submenu a:hover,
.trat .trat-submenu a:focus-visible {
	color: var(--trat-accent);
}

@media (min-width: 821px) {
	/* Point de couleur à gauche de l'entrée survolée. */
	.trat .trat-menu > li > a::before {
		content: "";
		position: absolute;
		top: 50%;
		left: 3px;
		width: 7px;
		height: 7px;
		margin-top: -3px;
		border-radius: 50%;
		background: var(--trat-accent);
		transform: scale(0);
		transition: transform 0.25s cubic-bezier(0.6, 0, 0.1, 1);
	}

	.trat .trat-menu > li:hover > a::before,
	.trat .trat-menu > li:focus-within > a::before,
	.trat .trat-menu > li.is-open > a::before {
		transform: scale(1);
	}

	.trat .trat-submenu {
		position: absolute;
		top: 100%;
		left: 50%;
		z-index: 5;
		width: max-content;
		min-width: 128px;
		padding: 5px 16px;
		border-radius: 24px;
		background: #262626;
		visibility: hidden;
		opacity: 0;
		transform: translateX(-50%) scale3d(0.8, 1, 1) translateY(5%);
		transition: visibility 0.3s cubic-bezier(0.6, 0, 0.1, 1), opacity 0.3s cubic-bezier(0.6, 0, 0.1, 1), transform 0.3s cubic-bezier(0.6, 0, 0.1, 1);
	}

	.trat .trat-submenu::after {
		content: "";
		position: absolute;
		top: -5px;
		left: 0;
		right: 0;
		z-index: -1;
		width: 14px;
		height: 14px;
		margin: auto;
		border-radius: 4px;
		background: #262626;
		transform: rotate(45deg);
	}

	.trat .trat-menu > li:hover > .trat-submenu,
	.trat .trat-menu > li:focus-within > .trat-submenu,
	.trat .trat-menu > li.is-open > .trat-submenu {
		visibility: visible;
		opacity: 1;
		transform: translateX(-50%) scale3d(1, 1, 1) translateY(0);
	}

	.trat .trat-submenu li:first-child > a {
		margin-top: 8px;
	}

	.trat .trat-submenu li:last-child > a {
		margin-bottom: 8px;
	}
}

.trat .trat-tools {
	justify-self: end;
	grid-column: 3;
	display: flex;
	align-items: center;
	gap: 10px;
}

/* Bouton jour / nuit : lune en mode sombre, soleil en mode clair. */
.trat .trat-theme {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #1b1c1b;
	cursor: pointer;
}

.trat .trat-theme::after {
	content: "";
	position: absolute;
	inset: -5px;
}

.trat .trat-theme svg {
	display: block;
	width: 18px;
	height: 18px;
}

.trat .trat-theme .trat-ico-sun,
.trat[data-theme-mode="light"] .trat-theme .trat-ico-moon {
	display: none;
}

.trat[data-theme-mode="light"] .trat-theme .trat-ico-sun {
	display: block;
}

.trat .trat-menu-btn {
	display: none;
	min-height: 44px;
	padding: 0 18px;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 999px;
	background: none;
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: none;
	cursor: pointer;
}

.trat :focus-visible {
	outline: 2px solid var(--trat-accent);
	outline-offset: 3px;
}

/* Titre et timeline ----------------------------------------------------- */

.trat .trat-bottom {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 3;
	padding: 0 var(--trat-pad) max(24px, env(safe-area-inset-bottom));
}

.trat .trat-info {
	padding-bottom: clamp(18px, 2.4vw, 34px);
}

.trat .trat-agency {
	margin: 0 0 10px;
	line-height: 1.3;
	font-size: clamp(15px, 1.3vw, 18px);
	font-weight: 500;
}

.trat .trat-title {
	margin: 0;
	font-family: "TRAT Barlow Condensed", "TRAT Barlow", sans-serif;
	font-weight: 600;
	font-size: clamp(54px, 12.5vw, 190px);
	line-height: 0.88;
	letter-spacing: -0.01em;
	text-transform: uppercase;
	text-wrap: balance;
	color: #fff;
}

.trat .trat-timeline {
	display: flex;
	align-items: flex-end;
	gap: 18px;
}

.trat .trat-count {
	margin: 0;
	font-size: 14px;
	font-weight: 500;
	line-height: 34px;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

.trat .trat-clips {
	position: relative;
	flex: 1;
	min-width: 0;
	display: flex;
	gap: 3px;
	margin: 0 -7px;
	padding: 12px 7px 0;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
	touch-action: pan-x;
}

.trat .trat-clips::-webkit-scrollbar {
	display: none;
}

.trat .trat-clips > li {
	flex: var(--g, 2) 0 88px;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Clips fins et discrets : un voile clair, un liseré, le nom en petit. */
.trat .trat-clips .trat-clip {
	display: block;
	width: 100%;
	height: 34px;
	margin: 0;
	padding: 0 10px;
	border: 0;
	border-radius: 3px;
	background: rgba(255, 255, 255, 0.12);
	color: rgba(255, 255, 255, 0.8);
	font-family: inherit;
	font-size: 12px;
	font-weight: 400;
	line-height: 34px;
	letter-spacing: normal;
	text-transform: none;
	text-align: left;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.trat .trat-clips .trat-clip:hover {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.trat .trat-clips .trat-clip.is-active {
	background: rgba(255, 255, 255, 0.26);
	color: #fff;
	font-weight: 500;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.trat .trat-clips > .trat-playhead {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	flex: none;
	width: 2px;
	background: var(--trat-accent);
	transform: translateX(var(--x, 0px));
	transition: transform 0.3s linear;
	pointer-events: none;
}

.trat .trat-playhead::before {
	content: "";
	position: absolute;
	top: 0;
	left: -5px;
	width: 12px;
	height: 9px;
	border-radius: 2px 2px 6px 6px;
	background: var(--trat-accent);
}

.trat .trat-playhead.is-jump {
	transition: none;
}

.trat .trat-empty {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 24px;
	text-align: center;
}

.trat .trat-empty a {
	text-decoration: underline;
}

/* Téléphone ------------------------------------------------------------- */

@media (max-width: 820px) {
	.trat .trat-header {
		grid-template-columns: 1fr auto;
		min-height: 76px;
	}

	.trat .trat-tools {
		grid-column: 2;
		position: relative;
		z-index: 7;
	}

	.trat .trat-menu-btn {
		display: block;
	}

	/* Le menu devient un panneau plein écran, avec les sous-menus dépliés sous leur entrée. */
	.trat .trat-nav {
		position: fixed;
		inset: 0;
		/* Sans ceci, l'alignement centré de la grille réduirait le panneau à la largeur de son contenu. */
		justify-self: stretch;
		align-self: stretch;
		width: 100%;
		height: 100%;
		box-sizing: border-box;
		z-index: 6;
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 90px 20px 40px;
		overflow-y: auto;
		background: rgba(0, 0, 0, 0.94);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.2s ease, visibility 0s linear 0.2s;
	}

	.trat.is-nav-open .trat-nav {
		opacity: 1;
		visibility: visible;
		transition: opacity 0.2s ease;
	}

	.trat .trat-menu {
		flex-direction: column;
		gap: 6px;
	}

	.trat .trat-menu > li {
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.trat .trat-menu > li > a {
		height: auto;
		min-height: 52px;
		padding: 0 24px;
		font-family: "TRAT Barlow Condensed", "TRAT Barlow", sans-serif;
		font-weight: 600;
		font-size: 38px;
		line-height: 1.1;
		text-transform: uppercase;
	}

	.trat .trat-submenu {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
		padding-bottom: 10px;
	}

	.trat .trat-submenu a {
		min-height: 44px;
		padding: 0 12px;
		font-size: 17px;
		color: #d6d6d6;
	}

	.trat .trat-title {
		font-size: clamp(56px, 19vw, 120px);
	}

	.trat .trat-timeline {
		flex-direction: column;
		align-items: stretch;
		gap: 2px;
	}

	.trat .trat-count {
		line-height: 1.4;
	}

	.trat .trat-clips {
		margin: 0 calc(var(--trat-pad) * -1);
		padding-left: var(--trat-pad);
		padding-right: var(--trat-pad);
		scroll-padding: 0 var(--trat-pad);	}

	.trat .trat-logo img {
		height: calc(var(--trat-logo-h, 44px) * 0.8);
	}

	.trat .trat-logo {
		transform: translate(calc(var(--trat-logo-x, 0px) * 0.8), calc(var(--trat-logo-y, 0px) * 0.8));
	}

	.trat .trat-clips > li {
		flex: 0 0 auto;
		width: 128px;
	}

	.trat .trat-clips .trat-clip {
		height: 40px;
		line-height: 40px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.trat .trat-slide,
	.trat .trat-slide.is-active,
	.trat .trat-video,
	.trat .trat-nav,
	.trat .trat-submenu,
	.trat .trat-menu > li > a::before,
	.trat .trat-clips .trat-clip,
	.trat .trat-clips > .trat-playhead {
		transition: none;
	}
}
