/**
 * Mediapilote — Galerie de variations
 * Frontend styles (mp-variation-gallery)
 *
 * Clean, theme-agnostic gallery. Neutral so it inherits the theme;
 * accent only the active thumb in brand pink #FF164C.
 */

/* ==========================================================================
   Gallery
   ========================================================================== */

.mpvg-gallery {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 0;
}

.mpvg-gallery figure {
	margin: 0;
	padding: 0;
}

.mpvg-gallery figure img,
.mpvg-gallery .mpvg-main img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
	cursor: zoom-in;
}

/* ==========================================================================
   Thumbnails
   ========================================================================== */

.mpvg-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mpvg-thumb {
	width: 72px;
	height: 72px;
	margin: 0;
	padding: 0;
	border: 2px solid transparent;
	border-radius: 4px;
	overflow: hidden;
	cursor: pointer;
	background: transparent;
	appearance: none;
	-webkit-appearance: none;
	font: inherit;
	display: block;
	transition: border-color 0.15s ease, opacity 0.15s ease;
}

.mpvg-thumb:hover,
.mpvg-thumb:focus-within {
	border-color: rgba(255, 22, 76, 0.45);
}

.mpvg-thumb.is-active {
	border-color: #FF164C;
}

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

/* ==========================================================================
   Lightbox
   ========================================================================== */

.mpvg-lightbox {
	position: fixed;
	inset: 0;
	display: none;
	place-items: center;
	background: rgba(0, 0, 0, 0.85);
	z-index: 99999;
	padding: 16px;
	box-sizing: border-box;
}

.mpvg-lightbox.is-open {
	display: grid;
}

.mpvg-lightbox img {
	display: block;
	max-width: 90vw;
	max-height: 90vh;
	width: auto;
	height: auto;
	object-fit: contain;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.mpvg-lightbox-close {
	position: absolute;
	top: 16px;
	right: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #FF164C;
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}

.mpvg-lightbox-close:hover,
.mpvg-lightbox-close:focus {
	background: #940830;
	transform: scale(1.06);
	outline: none;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
	.mpvg-thumbs {
		gap: 6px;
	}

	.mpvg-thumb {
		width: 56px;
		height: 56px;
	}

	.mpvg-lightbox img {
		max-width: 94vw;
		max-height: 86vh;
	}

	.mpvg-lightbox-close {
		top: 10px;
		right: 10px;
		width: 32px;
		height: 32px;
	}
}
