/* ========================================
   Tonton Barbu - Custom Styles
   ======================================== */

/* --- Global --- */

html {
	overflow-x: clip;
}

body {
	background-color: #FFFFFF;
}

/* --- Navigation --- */

/* -- Header : une seule source de couleur, tous les enfants en héritent --
   Pour changer la couleur du header au-dessus d'une section, il suffit de
   modifier `color` sur .tb-header (ex: via classe .tb-header--on-dark, ou
   via une variable --tb-nav-color posée dynamiquement au scroll). */
.tb-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	width: 100%;
	z-index: 100;
	background: transparent !important;
	padding: 22px 34px;
	pointer-events: none;
	color: var(--tb-nav-color, var(--wp--preset--color--dark));
	transition: color 0.3s ease;
}

.tb-header > * {
	pointer-events: auto;
}

/* --- Logo : inversion via filter (monochrome noir ↔ blanc) --- */
.tb-logo {
	width: 201px;
	height: 31px;
}

.tb-logo a {
	display: block;
	width: 100%;
	height: 100%;
}

.tb-logo img {
	display: block;
	width: 100%;
	height: auto;
	transition: filter 0.3s ease;
}

/* Quand le header est sur une section sombre : logo en blanc */
.tb-header--on-dark .tb-logo img {
	filter: invert(1);
}

/* --- Nav links + Contact : héritent de la color du .tb-header --- */
/* !important pour battre les classes auto has-*-color de Gutenberg */
.tb-header .tb-nav a,
.tb-header .tb-nav-contact,
.tb-header .tb-nav-contact a,
.tb-header .wp-block-navigation-item__content {
	color: inherit !important;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.tb-nav-contact,
.tb-nav-contact a {
	font-size: clamp(18px, 2.4vw, 34px);
	line-height: 1;
	margin: 0;
}

.tb-nav a:hover,
.tb-nav-contact a:hover {
	opacity: 0.6;
}

/* --- Variantes prêtes pour quand on fera l'inversion au scroll --- */
.tb-header--on-dark {
	color: #FFFFFF;
}
.tb-header--on-accent {
	color: #C8421F;
}

/* --- Hero --- */

.tb-hero {
	position: relative;
	min-height: 100vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: flex-end;
}

.tb-hero .tb-hero-video {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.tb-hero .tb-hero-video video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tb-hero-title {
	position: relative;
	z-index: 2;
	max-width: 984px;
}

.tb-hero-title em {
	font-family: var(--wp--preset--font-family--editorial-new);
	font-weight: 200;
	font-style: italic;
}

/* --- Section Labels (sticky H2) --- */

.tb-section-label--sticky {
	position: sticky;
	top: 0;
	z-index: 10;
	padding-top: 15px;
}

.tb-section-label p {
	display: flex;
	gap: 5px;
	align-items: baseline;
}

/* --- Projets --- */

.tb-projets {
	position: relative;
}

.tb-projet-item {
	display: flex;
	align-items: center;
	gap: 151px;
	min-height: 800px;
}

.tb-projet-content {
	flex-shrink: 0;
	width: 802px;
}

.tb-projet-image {
	flex: 1 0 0;
	min-width: 0;
	height: 800px;
}

.tb-projet-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tb-separator {
	border: none;
	height: 1px;
	background: #272934;
	opacity: 0.2;
}

/* --- Menu Item (CTA link with reveal) --- */

.tb-menu-item {
	position: relative;
	overflow: hidden;
	height: 20px;
}

.tb-menu-item a {
	display: block;
	font-family: var(--wp--preset--font-family--neue-haas);
	font-weight: 700;
	font-size: 18px;
	text-transform: uppercase;
	text-decoration: none;
	transition: transform 0.3s ease;
}

.tb-menu-item:hover a {
	transform: translateY(-100%);
}

/* --- Showreel --- */

.tb-showreel {
	position: relative;
}

.tb-showreel-player {
	position: relative;
	flex: 1;
	overflow: hidden;
	cursor: pointer;
}

.tb-showreel-video video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tb-play-label {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	pointer-events: none;
	opacity: 0.5;
	z-index: 3;
}

/* --- Manifesto --- */

.tb-manifesto {
	position: relative;
	display: flex;
	gap: 151px;
}

.tb-manifesto-content {
	max-width: 803px;
}

.tb-manifesto-video video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* --- Footer / Contact --- */

.tb-footer {
	position: relative;
	overflow: hidden;
}

.tb-cta h2 em {
	font-family: var(--wp--preset--font-family--editorial-new);
	font-weight: 200;
	font-style: italic;
}

.tb-footer-columns {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 30px;
}

.tb-footer-col p {
	line-height: 1.6;
}

/* --- Pixelated Scroll Transition --- */

.pixelated-scroll__section {
	color: #f2f2f2;
	justify-content: center;
	align-items: center;
	min-height: 100svh;
	display: flex;
	position: relative;
	overflow: hidden;
}

.pixelated-scroll__bg {
	z-index: 0;
	background-color: #000;
	position: absolute;
	inset: 0%;
}

.pixelated-scroll__bg .wp-block-image {
	margin: 0;
	height: 100%;
}

.pixelated-scroll__bg-img,
.pixelated-scroll__bg-img img {
	opacity: 0.8;
	object-fit: cover;
	width: 100%;
	height: 100%;
}

.pixelated-scroll__content {
	z-index: 1;
	position: relative;
}

.pixelated-scroll__h {
	text-align: center;
	letter-spacing: -0.04em;
	max-width: 8em;
	margin-top: 0;
	margin-bottom: 0;
	font-family: var(--wp--preset--font-family--neue-haas);
	font-size: 6em;
	font-weight: 400;
	line-height: 0.95;
	color: #f2f2f2;
}

.pixelated-scroll-transition {
	z-index: 10;
	pointer-events: none;
	color: #FFFFFF;
	position: absolute;
	inset: auto 0% 0%;
}

/* Dans le Hero, les pixels prennent la couleur de la section suivante (fond blanc) */
.tb-hero .pixelated-scroll-transition {
	color: #FFFFFF;
}

[data-pixelated-scroll-transition][data-mode="reveal"] {
	inset: 0% 0% auto;
}

[data-pixelated-scroll-transition][data-pixel-ratio="2.5/1"] [data-pixelated-scroll-pixel] {
	aspect-ratio: 2.5 / 1;
}

[data-pixelated-scroll-panel] {
	display: flex;
	flex-direction: row;
	width: 100%;
}

[data-pixelated-scroll-column] {
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	align-items: stretch;
	flex: 1 1 0%;
	min-width: 0;
}

[data-pixelated-scroll-pixel] {
	aspect-ratio: 1;
	width: 100%;
	background-color: currentColor;
	backface-visibility: hidden;
	will-change: opacity;
}

/* --- Responsive --- */

@media (max-width: 1200px) {
	.tb-projet-item {
		flex-direction: column;
		gap: 50px;
		min-height: auto;
	}

	.tb-projet-content {
		width: 100%;
	}

	.tb-projet-image {
		width: 100%;
		height: 500px;
	}

	.tb-manifesto {
		flex-direction: column;
		gap: 50px;
		padding-left: 15px !important;
	}

	.tb-projets {
		padding-left: 15px !important;
	}

	.tb-cta {
		padding-left: 15px !important;
	}
}

@media (max-width: 768px) {
	.tb-header {
		padding: 15px 15px 0;
	}

	.tb-projet-image {
		height: 300px;
	}

	.tb-footer-columns {
		flex-direction: column;
	}
}

/* ============================================================
   Page Maintenance (template maintenance)
   ============================================================ */

.tb-maintenance-wrapper {
	min-height: 100vh;
}

.tb-maintenance {
	text-align: center;
}

.tb-maintenance-logo img {
	display: block;
	margin: 0 auto;
	max-width: 260px;
	width: 100%;
	height: auto;
}

.tb-maintenance-title {
	max-width: 14ch;
	margin-left: auto !important;
	margin-right: auto !important;
}

.tb-maintenance-tag {
	opacity: 0.6;
}

.tb-maintenance-contact a {
	color: currentColor;
	text-decoration: underline;
	text-underline-offset: 4px;
	transition: opacity 0.2s ease;
}
.tb-maintenance-contact a:hover {
	opacity: 0.6;
}

/* Mobile : réduit le H1 et l'espacement de la tagline pour éviter les débordements */
@media (max-width: 640px) {
	.tb-maintenance-title {
		font-size: clamp(36px, 10vw, 64px) !important;
		max-width: 12ch;
		word-wrap: break-word;
	}
	.tb-maintenance-tag {
		letter-spacing: 0.08em;
		font-size: 14px !important;
		line-height: 1.4;
	}
	.tb-maintenance-contact {
		font-size: 18px !important;
		line-height: 1.4;
	}
	.tb-maintenance-logo img {
		max-width: 200px;
	}
}

@media (max-width: 380px) {
	.tb-maintenance-title {
		font-size: clamp(30px, 9vw, 48px) !important;
	}
	.tb-maintenance-tag {
		font-size: 12px !important;
		letter-spacing: 0.06em;
	}
}

/* ============================================================
   v2 — Accueil optimisée (nouvelle page)
   ============================================================ */

/* --- Hero v2 (100vh, "Le design qui se mesure en résultats" right-aligned + TB outline + services strip) --- */

.tb-hero--compact {
	min-height: 100vh !important;
	padding-bottom: 0 !important;
}

/* Big TB outline full width — respecte le padding général du hero, en haut */
.tb-hero-tb {
	position: absolute;
	top: 0;
	left: var(--wp--preset--spacing--30);
	right: var(--wp--preset--spacing--30);
	z-index: 2; /* au-dessus de la vidéo (z-index:0), sous le texte (z-index:3) */
	pointer-events: none;
}
.tb-hero-tb img {
	display: block;
	width: 100%;
	height: auto;
}

/* Title — chaque ligne prend une ligne complète, aligné à droite */
.tb-hero--compact .tb-hero-title {
	position: relative;
	z-index: 3;
	margin: 0;
	padding: 0 var(--wp--preset--spacing--15);
	max-width: 100%;
}
.tb-hero-line {
	display: block;
	text-align: right;
}
.tb-hero-em {
	font-family: var(--wp--preset--font-family--editorial-new);
	font-weight: 200;
	font-style: italic;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.12em;
}

/* Globe monde inline, aligné à hauteur du x-height */
.tb-hero-globe {
	display: inline-block;
	width: 0.65em;
	height: 0.4em;
	margin-left: 0.15em;
	vertical-align: 0.1em;
}
.tb-hero-globe img {
	width: 100%;
	height: 100%;
	display: block;
}

/* Strip services en bas du hero — 4 colonnes, séparateur haut */
.tb-hero-services {
	position: relative;
	z-index: 20; /* au-dessus des pixels (z-index:10) */
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	padding: 18px var(--wp--preset--spacing--15);
	border-top: 1px solid rgba(255, 255, 255, 0.25);
	margin-top: var(--wp--preset--spacing--50);
	background: transparent;
}
.tb-hero-service {
	font-family: var(--wp--preset--font-family--neue-haas);
	font-weight: 300;
	font-size: clamp(12px, 1vw, 16px);
	color: #fff;
	text-transform: none;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

@media (max-width: 768px) {
	.tb-hero-services {
		flex-wrap: wrap;
		gap: 8px 16px;
		justify-content: flex-start;
		padding: 12px 15px;
	}
	.tb-hero-service {
		font-size: 11px;
	}
	.tb-hero-tb {
		left: 15px;
		right: 15px;
	}
}

.tb-scroll-hint {
	position: relative;
	z-index: 2;
	opacity: 0.6;
	animation: tb-bounce 2s ease-in-out infinite;
}

@keyframes tb-bounce {
	0%, 100% { transform: translateY(0); opacity: 0.6; }
	50%      { transform: translateY(6px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.tb-scroll-hint { animation: none; }
}

/* --- Marquee clients --- */

.tb-clients-marquee {
	border-top: 1px solid rgba(39, 41, 52, 0.12);
	border-bottom: 1px solid rgba(39, 41, 52, 0.12);
}

.tb-clients-intro {
	opacity: 0.6;
}

.tb-marquee {
	overflow: hidden;
	white-space: nowrap;
	mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 10%, #000 90%, transparent 100%);
}

.tb-marquee__track {
	display: inline-flex;
	gap: 40px;
	animation: tb-marquee-scroll 40s linear infinite;
	padding-left: 40px;
}

.tb-marquee__item,
.tb-marquee__sep {
	font-family: var(--wp--preset--font-family--editorial-new);
	font-weight: 200;
	font-style: italic;
	font-size: clamp(40px, 5vw, 80px);
	color: var(--wp--preset--color--dark);
	letter-spacing: -0.02em;
	line-height: 1;
}

.tb-marquee__sep {
	opacity: 0.4;
}

.tb-marquee:hover .tb-marquee__track {
	animation-play-state: paused;
}

@keyframes tb-marquee-scroll {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	.tb-marquee__track {
		animation: none;
		flex-wrap: wrap;
		justify-content: center;
	}
}

/* --- Manifesto v2 (fond blanc, texte dark) --- */

.tb-manifesto--v2 {
	gap: var(--wp--preset--spacing--75);
}

.tb-manifesto--v2 .tb-manifesto-content {
	max-width: 900px;
}

/* --- Projets v2 (alterné) --- */

.tb-projets--v2 .tb-projet-item {
	min-height: auto;
}

.tb-projets--v2 .tb-projet-content {
	width: 100%;
	max-width: 540px;
	flex: 1 1 40%;
}

.tb-projets--v2 .tb-projet-image {
	flex: 1 1 55%;
	height: 500px;
}

.tb-projet-item--right {
	flex-direction: row-reverse !important;
}

/* --- Services 2x2 --- */

.tb-services-grid {
	display: grid !important;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--wp--preset--spacing--75);
}

.tb-service-card {
	padding-top: var(--wp--preset--spacing--30);
	border-top: 1px solid rgba(39, 41, 52, 0.15);
}

.tb-service-card p:first-child {
	opacity: 0.5;
	letter-spacing: 0.15em;
	margin-bottom: var(--wp--preset--spacing--15);
}

@media (max-width: 768px) {
	.tb-services-grid {
		grid-template-columns: 1fr;
	}
}

/* --- Chiffres clés (stats) --- */

.tb-stats {
	border-top: 1px solid rgba(39, 41, 52, 0.12);
	border-bottom: 1px solid rgba(39, 41, 52, 0.12);
}

.tb-stat {
	flex: 1 1 180px;
	text-align: left;
}

.tb-stat p:first-child {
	line-height: 1;
	margin-bottom: var(--wp--preset--spacing--10);
}

.tb-stat p:last-child {
	opacity: 0.7;
	max-width: 160px;
}

@media (max-width: 768px) {
	.tb-stats {
		justify-content: flex-start !important;
	}
	.tb-stat {
		flex-basis: 48%;
	}
}

/* --- CTA final --- */

.tb-cta-final {
	text-align: center;
}

.tb-cta-final h2 {
	max-width: 18ch;
	margin-left: auto !important;
	margin-right: auto !important;
}

.tb-cta-button a {
	padding: 20px 40px !important;
	transition: transform 0.2s ease;
}

.tb-cta-button a:hover {
	transform: translateY(-2px);
}
