.bp-pis-wrapper {
	--bp-pis-h: 35vh;
	max-width: 100%;
	width: 100%;
	box-sizing: border-box;
}

.bp-pis-wrapper * {
	box-sizing: border-box;
}

/* Reset agressif : neutralise les styles globaux de bouton du thème/Elementor
   (bordures, contours colorés, ombres) qui viennent polluer notre widget. */
.bp-pis-wrapper button {
	background: none;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	-webkit-appearance: none;
	appearance: none;
	padding: 0;
	margin: 0;
	font: inherit;
	color: inherit;
	cursor: pointer;
}

.bp-pis-main {
	position: relative;
	width: 100%;
	height: var(--bp-pis-h);
	min-height: 220px;
	overflow: hidden;
	border-radius: 8px;
	background: #f5f5f5;
}

.bp-pis-main:focus,
.bp-pis-main:focus-visible {
	outline: none;
}

.bp-pis-track {
	display: flex;
	width: 100%;
	height: 100%;
	transition: transform 0.35s ease;
	touch-action: pan-y;
	cursor: zoom-in;
}

.bp-pis-slide {
	flex: 0 0 100%;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bp-pis-slide-img {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	object-fit: contain !important;
	display: block;
	pointer-events: none;
	user-select: none;
}

.bp-pis-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	background: rgba(255, 255, 255, 0.85) !important;
	width: 40px;
	height: 40px;
	border-radius: 50% !important;
	font-size: 16px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
}

.bp-pis-arrow:hover,
.bp-pis-arrow:focus {
	background: #fff !important;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
}

.bp-pis-prev {
	left: 12px;
}

.bp-pis-next {
	right: 12px;
}

.bp-pis-thumbs {
	display: flex;
	gap: 8px;
	margin-top: 10px;
	overflow-x: auto;
	padding-bottom: 4px;
}

.bp-pis-thumb {
	flex: 0 0 auto;
	width: 64px;
	height: 64px;
	border-radius: 6px !important;
	overflow: hidden;
	background: #f5f5f5;
	opacity: 0.55;
	transition: opacity 0.2s ease;
}

.bp-pis-thumb.bp-pis-active,
.bp-pis-thumb:hover,
.bp-pis-thumb:focus {
	opacity: 1;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
}

.bp-pis-thumb-img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	display: block;
	pointer-events: none;
}

@media (max-width: 600px) {
	.bp-pis-arrow {
		width: 32px;
		height: 32px;
		font-size: 13px;
	}

	.bp-pis-thumb {
		width: 48px;
		height: 48px;
	}
}

/* ==========================================================================
   LIGHTBOX (zoom au clic)
   Ajouté au <body> par le JS : on le sort ainsi des conteneurs Elementor
   (overflow / transform) qui pourraient le rogner ou le masquer.
   ========================================================================== */
html.bp-pis-lb-lock {
	overflow: hidden !important;
}

.bp-pis-lb {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: none;
	background: rgba(0, 0, 0, 0.92);
	box-sizing: border-box;
}

.bp-pis-lb * {
	box-sizing: border-box;
}

.bp-pis-lb.bp-pis-lb-open {
	display: block;
}

/* Même reset anti-thème que le slider : pas de bordure/contour/ombre colorés. */
.bp-pis-lb button {
	background: none;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	-webkit-appearance: none;
	appearance: none;
	padding: 0;
	margin: 0;
	font: inherit;
	color: #fff;
	cursor: pointer;
	text-transform: none;
}

.bp-pis-lb-stage {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	padding: 56px 16px 24px;
}

.bp-pis-lb-img {
	display: block;
	max-width: 100% !important;
	max-height: 100% !important;
	width: auto !important;
	height: auto !important;
	object-fit: contain;
	cursor: zoom-in;
	user-select: none;
	-webkit-user-drag: none;
	touch-action: none;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.bp-pis-lb-img.bp-pis-lb-loading {
	opacity: 0.6;
}

.bp-pis-lb.bp-pis-lb-zoomed .bp-pis-lb-img {
	cursor: zoom-out;
}

.bp-pis-lb .bp-pis-lb-btn {
	position: absolute;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.14) !important;
	line-height: 1;
	transition: background 0.2s ease;
}

.bp-pis-lb .bp-pis-lb-btn:hover,
.bp-pis-lb .bp-pis-lb-btn:focus {
	background: rgba(255, 255, 255, 0.28) !important;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
}

.bp-pis-lb .bp-pis-lb-close {
	top: 10px;
	right: 12px;
	font-size: 30px;
}

.bp-pis-lb .bp-pis-lb-arrow {
	top: 50%;
	transform: translateY(-50%);
	font-size: 18px;
}

.bp-pis-lb .bp-pis-lb-prev {
	left: 12px;
}

.bp-pis-lb .bp-pis-lb-next {
	right: 12px;
}

/* Quand on est zoomé : on masque les flèches pour ne pas gêner. */
.bp-pis-lb.bp-pis-lb-zoomed .bp-pis-lb-arrow {
	display: none;
}

/* Une seule image : pas de flèches. */
.bp-pis-lb.bp-pis-lb-single .bp-pis-lb-arrow {
	display: none;
}

@media (max-width: 600px) {
	.bp-pis-lb-stage {
		padding: 56px 0 16px;
	}

	.bp-pis-lb .bp-pis-lb-btn {
		width: 38px;
		height: 38px;
	}

	.bp-pis-lb .bp-pis-lb-arrow {
		font-size: 15px;
	}
}
