/* YT Pods Gallery — Front-end */

.yt-pg-wrapper {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Image principale */
.yt-pg-main {
	position: relative;
	width: 100%;
	aspect-ratio: 3/2;
	overflow: hidden;
	border-radius: 8px;
	cursor: zoom-in;
	background: #e9ecef;
}

.yt-pg-main img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: opacity 0.25s ease;
}

.yt-pg-main:hover img {
	opacity: 0.92;
}

.yt-pg-main:focus-visible {
	outline: 3px solid #0073aa;
	outline-offset: 2px;
}

/* Miniatures */
.yt-pg-thumbs {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 6px;
}

.yt-pg-thumb {
	aspect-ratio: 1/1;
	overflow: hidden;
	border-radius: 4px;
	cursor: pointer;
	border: 3px solid transparent;
	box-sizing: border-box;
	background: #e9ecef;
	transition: border-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease;
	opacity: 0.7;
}

.yt-pg-thumb:hover {
	opacity: 1;
	transform: scale(1.04);
}

.yt-pg-thumb.is-active {
	border-color: #0073aa;
	opacity: 1;
	transform: none;
}

.yt-pg-thumb:focus-visible {
	outline: 2px solid #0073aa;
	outline-offset: 1px;
}

.yt-pg-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Lightbox */
.yt-pg-lightbox {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(0, 0, 0, 0.94);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	-webkit-backdrop-filter: blur(4px);
	backdrop-filter: blur(4px);
}

.yt-pg-lightbox.is-open {
	opacity: 1;
	visibility: visible;
}

.yt-pg-lightbox img {
	max-width: 92vw;
	max-height: 90vh;
	object-fit: contain;
	border-radius: 4px;
	user-select: none;
	-webkit-user-drag: none;
	transition: opacity 0.2s ease;
}

.yt-pg-lb-close,
.yt-pg-lb-prev,
.yt-pg-lb-next {
	position: absolute;
	background: rgba(255, 255, 255, 0.12);
	border: none;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.15s ease;
	z-index: 2;
	padding: 0;
}

.yt-pg-lb-close:hover,
.yt-pg-lb-prev:hover,
.yt-pg-lb-next:hover {
	background: rgba(255, 255, 255, 0.28);
	transform: scale(1.08);
}

.yt-pg-lb-close:focus-visible,
.yt-pg-lb-prev:focus-visible,
.yt-pg-lb-next:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.yt-pg-lb-close {
	top: 16px;
	right: 16px;
	font-size: 26px;
}

.yt-pg-lb-prev {
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 28px;
}

.yt-pg-lb-next {
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 28px;
}

.yt-pg-lb-prev:hover,
.yt-pg-lb-next:hover {
	transform: translateY(-50%) scale(1.08);
}

.yt-pg-lb-counter {
	position: absolute;
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	color: rgba(255, 255, 255, 0.6);
	font-size: 13px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	letter-spacing: 0.04em;
	user-select: none;
}

/* Responsive fallbacks */
@media (max-width: 768px) {
	.yt-pg-thumbs {
		grid-template-columns: repeat(5, 1fr);
	}
	.yt-pg-lb-prev,
	.yt-pg-lb-next {
		width: 40px;
		height: 40px;
		font-size: 22px;
	}
}

@media (max-width: 480px) {
	.yt-pg-thumbs {
		grid-template-columns: repeat(4, 1fr);
	}
	.yt-pg-lb-close {
		top: 10px;
		right: 10px;
		width: 40px;
		height: 40px;
	}
}
