/* =========================================================================
   Galerie photos — grille masonry (CSS columns) + lightbox maison
   Chargé uniquement sur la page Galerie (cf. functions.php).
   ========================================================================= */

.mqp-gal {
	columns: 4 240px;
	column-gap: 14px;
	margin-top: 2rem;
}

.mqp-gal__item {
	display: block;
	margin: 0 0 14px;
	break-inside: avoid;
	position: relative;
	border-radius: 12px;
	overflow: hidden;
	background: #eef2f6;
	box-shadow: 0 4px 14px rgba(20, 40, 80, .08);
	cursor: zoom-in;
}

.mqp-gal__item img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform .45s ease;
}

.mqp-gal__item::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 55%, rgba(20, 34, 62, .45));
	opacity: 0;
	transition: opacity .3s ease;
}

.mqp-gal__item:hover img { transform: scale(1.06); }
.mqp-gal__item:hover::after { opacity: 1; }

.mqp-gal__item:focus-visible {
	outline: 3px solid var(--blue, #38B6FF);
	outline-offset: 2px;
}

@media (max-width: 600px) {
	.mqp-gal { columns: 2 150px; column-gap: 10px; }
	.mqp-gal__item { margin-bottom: 10px; }
}

/* -------------------------------- Lightbox -------------------------------- */
.mqp-lb {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4vh 2vw;
	background: rgba(13, 16, 38, .93);
	backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity .25s ease;
}

.mqp-lb.is-open { opacity: 1; }
.mqp-lb[hidden] { display: none; }

.mqp-lb__stage {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 94vw;
	max-height: 90vh;
}

.mqp-lb__img {
	max-width: 94vw;
	max-height: 80vh;
	width: auto;
	height: auto;
	border-radius: 8px;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
	background: #1d2150;
}

.mqp-lb__cap {
	color: rgba(255, 255, 255, .9);
	font-family: var(--mq-font-sub, inherit);
	font-size: .95rem;
	margin-top: .9rem;
	text-align: center;
}

.mqp-lb__close,
.mqp-lb__nav {
	position: absolute;
	display: grid;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, .35);
	background: rgba(255, 255, 255, .12);
	color: #fff;
	cursor: pointer;
	border-radius: 50%;
	transition: background .2s ease;
	-webkit-tap-highlight-color: transparent;
}

.mqp-lb__close:hover,
.mqp-lb__nav:hover { background: var(--orange, #f39200); border-color: var(--orange, #f39200); }

.mqp-lb__close {
	top: 1.1rem;
	right: 1.2rem;
	width: 46px;
	height: 46px;
	font-size: 1.7rem;
	line-height: 1;
}

.mqp-lb__nav {
	top: 50%;
	transform: translateY(-50%);
	width: 52px;
	height: 52px;
	font-size: 2rem;
	line-height: 1;
}

.mqp-lb__prev { left: clamp(.5rem, 2vw, 1.6rem); }
.mqp-lb__next { right: clamp(.5rem, 2vw, 1.6rem); }

@media (max-width: 600px) {
	.mqp-lb__nav { width: 44px; height: 44px; font-size: 1.6rem; }
	.mqp-lb__img { max-height: 74vh; }
}
