/* Styles du rendu public du shortcode [galerie_photo] */

.gpf-gallery {
	margin: 2em 0;
}

.gpf-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin-bottom: 1.5em;
}

.gpf-tab {
	padding: 0.5em 1.2em;
	border: 1px solid #ccc;
	background: #fff;
	color: #333;
	border-radius: 999px;
	cursor: pointer;
	font-size: 0.95em;
	line-height: 1.4;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.gpf-tab:hover {
	border-color: #999;
}

.gpf-tab.is-active {
	background-color: #1d2327;
	border-color: #1d2327;
	color: #fff;
}

.gpf-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1em;
}

.gpf-item {
	margin: 0;
	overflow: hidden;
	border-radius: 6px;
	background: #f2f2f2;
}

.gpf-item a {
	display: block;
}

.gpf-item img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	height: auto;
	object-fit: cover;
	transition: transform 0.2s ease;
}

.gpf-item a:hover img {
	transform: scale(1.04);
}

@media (max-width: 480px) {
	.gpf-grid {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	}

	.gpf-item img {
		aspect-ratio: 4 / 3;
	}
}


/* ---- Visionneuse (lightbox) ---- */
.gpf-lb {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(0, 0, 0, 0.92);
	display: none;
	align-items: center;
	justify-content: center;
	touch-action: pan-y;
}
.gpf-lb.is-open { display: flex; }
.gpf-lb-img {
	max-width: 92vw;
	max-height: 88vh;
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
	-webkit-user-select: none;
	user-select: none;
}
.gpf-lb button {
	position: absolute;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border: none;
	cursor: pointer;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	padding: 0;
	transition: background-color 0.15s ease;
}
.gpf-lb button:hover { background: rgba(255, 255, 255, 0.28); }
.gpf-lb-close { top: 16px; right: 16px; width: 44px; height: 44px; font-size: 26px; }
.gpf-lb-prev, .gpf-lb-next { top: 50%; transform: translateY(-50%); width: 54px; height: 54px; font-size: 32px; }
.gpf-lb-prev { left: 16px; }
.gpf-lb-next { right: 16px; }
.gpf-lb-counter {
	position: absolute;
	bottom: 18px;
	left: 50%;
	transform: translateX(-50%);
	color: #fff;
	font-size: 14px;
	background: rgba(0, 0, 0, 0.4);
	padding: 4px 12px;
	border-radius: 999px;
}
@media (max-width: 600px) {
	.gpf-lb-prev, .gpf-lb-next { width: 44px; height: 44px; font-size: 26px; }
	.gpf-lb-prev { left: 6px; }
	.gpf-lb-next { right: 6px; }
}
