/* ==========================================================================
   "Les dernières tendances déco" (template-parts/home-original.php): one large ambiance and the
   four original pictures beside it to switch; the large picture opens the original lightbox
   (assets/js/original.js). Behaviour: assets/js/trends.js.
   ========================================================================== */

.tr {
	--tr-ink: #12110f;
	--tr-gold: #c99a3f;
	--tr-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--tr-gap: clamp(10px, 1.2vw, 16px);
	padding: clamp(56px, 7vw, 104px) 0 clamp(56px, 7vw, 96px);
	background: #fff;
}
.tr__inner {
	max-width: 1320px;
	margin: 0 auto;
	padding: 0 clamp(16px, 4vw, 56px);
}
.tr__head {
	margin-bottom: clamp(24px, 3vw, 40px);
}
.tr__head .o-headline {
	margin: 0;
	font-size: clamp(1.9rem, 1.3rem + 1.9vw, 2.9rem);
	line-height: 1.08;
	letter-spacing: -0.03em;
}

/* ------------------------------------------------------------ Viewer */
.tr__viewer {
	display: grid;
	grid-template-columns: minmax(0, 1fr) clamp(150px, 19%, 250px);
	gap: var(--tr-gap);
}
.tr__stage {
	position: relative;
	overflow: hidden;
	aspect-ratio: 1.57;
	border-radius: 6px;
	background: #ece9e3;
}
.tr__shot {
	position: absolute;
	inset: 0;
	display: block;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.7s var(--tr-ease), visibility 0s linear 0.7s;
	cursor: zoom-in;
}
.tr__shot.is-active {
	visibility: visible;
	opacity: 1;
	transition: opacity 0.7s var(--tr-ease), visibility 0s;
}
.tr__shot img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.06);
	transition: transform 1.6s var(--tr-ease);
}
.tr__shot.is-active img {
	transform: none;
}
.tr__shot:focus-visible {
	outline: none;
}
.tr__stage:has(.tr__shot:focus-visible) {
	outline: 2px solid var(--tr-gold);
	outline-offset: 3px;
}
.tr__zoom {
	position: absolute;
	right: 16px;
	bottom: 16px;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(18, 17, 15, 0.62);
	backdrop-filter: blur(6px);
	color: #fff;
	pointer-events: none;
	transition: background-color 0.3s, transform 0.4s var(--tr-ease);
}
.tr__zoom svg {
	width: 18px;
	height: 18px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
@media (hover: hover) and (pointer: fine) {
	.tr__stage:hover .tr__zoom {
		background: var(--tr-gold);
		transform: scale(1.08);
	}
}

/* Thumbnails: a column beside the large picture; the active one carries a gold joint. */
.tr__thumbs {
	display: grid;
	grid-template-rows: repeat(4, minmax(0, 1fr));
	gap: var(--tr-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}
.tr__thumbs li {
	min-height: 0;
}
.tr__thumb {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 4px;
	background: #ece9e3;
	cursor: pointer;
}
.tr__thumb img {
	position: absolute; /* the large picture alone sets the height of the viewer */
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: saturate(0.55) brightness(0.92);
	transition: filter 0.4s, transform 0.8s var(--tr-ease);
}
.tr__thumb::after {
	content: "";
	position: absolute;
	inset: 0;
	border: 2px solid transparent;
	border-radius: inherit;
	transition: border-color 0.3s;
}
.tr__thumb.is-active img,
.tr__thumb:hover img {
	filter: none;
}
.tr__thumb.is-active::after {
	border-color: var(--tr-gold);
}
.tr__thumb:focus-visible {
	outline: 2px solid var(--tr-ink);
	outline-offset: 2px;
}
@media (hover: hover) and (pointer: fine) {
	.tr__thumb:hover img {
		transform: scale(1.05);
	}
}

/* ------------------------------------------------------------ Responsive */
@media (max-width: 767px) {
	.tr__viewer {
		grid-template-columns: minmax(0, 1fr);
	}
	.tr__thumbs {
		grid-template-rows: none;
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
	.tr__thumb {
		aspect-ratio: 1.57;
		height: auto;
	}
	.tr__zoom {
		right: 10px;
		bottom: 10px;
	}
}
@media (prefers-reduced-motion: reduce) {
	.tr__shot,
	.tr__shot.is-active,
	.tr__shot img,
	.tr__thumb img {
		transition: none;
	}
	.tr__shot img {
		transform: none;
	}
}
