/*
 * Gabarit CSS : Lightbox Multimédia Globale
 * 
 * Thème immersif sombre (Z-index 11000) au-dessus de toutes les modals.
 */

body.saasbuilder-lightbox-open,
html.saasbuilder-lightbox-open {
	overflow: hidden !important;
}

.saasbuilder-lightbox-overlay {
	position: fixed;
	inset: 0;
	z-index: 11000;
	background: rgba(15, 23, 42, 0.95);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	display: flex;
	flex-direction: column;
	animation: saasbuilder-lightbox-fadein 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes saasbuilder-lightbox-fadein {
	from {
		opacity: 0;
		transform: scale(0.98);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.saasbuilder-lightbox-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 24px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	background: rgba(15, 23, 42, 0.6);
	z-index: 2;
}

.saasbuilder-lightbox-title-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.saasbuilder-lightbox-title {
	font-size: 15px;
	font-weight: 600;
	color: #f8fafc;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 320px;
}

.saasbuilder-lightbox-counter {
	font-size: 12px;
	font-weight: 600;
	color: #94a3b8;
	background: rgba(255, 255, 255, 0.08);
	padding: 3px 10px;
	border-radius: 20px;
	flex-shrink: 0;
}

.saasbuilder-lightbox-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.saasbuilder-lightbox-btn {
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
	color: #f1f5f9;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
}

.saasbuilder-lightbox-btn:hover {
	background: rgba(255, 255, 255, 0.18);
	color: #ffffff;
	transform: translateY(-1px);
}

.saasbuilder-lightbox-delete-btn:hover {
	background: rgba(239, 68, 68, 0.25) !important;
	border-color: rgba(239, 68, 68, 0.5) !important;
	color: #ef4444 !important;
}

.saasbuilder-lightbox-close-btn {
	background: rgba(239, 68, 68, 0.15);
	border-color: rgba(239, 68, 68, 0.3);
	color: #f87171;
}

.saasbuilder-lightbox-close-btn:hover {
	background: #ef4444;
	color: #ffffff;
}

.saasbuilder-lightbox-body {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	position: relative;
	overflow: hidden;
	padding: 20px;
}

.saasbuilder-lightbox-media-wrap {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	width: 100%;
	position: relative;
}

.saasbuilder-lightbox-media-wrap img {
	max-width: 90%;
	max-height: 82vh;
	object-fit: contain;
	border-radius: 12px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
	transition: transform 0.2s ease;
}

.saasbuilder-lightbox-media-wrap video {
	max-width: 90%;
	max-height: 82vh;
	border-radius: 12px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
	outline: none;
}

.saasbuilder-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	background: rgba(15, 23, 42, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #ffffff;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
	backdrop-filter: blur(8px);
}

.saasbuilder-lightbox-prev {
	left: 24px;
}

.saasbuilder-lightbox-next {
	right: 24px;
}

.saasbuilder-lightbox-nav:hover {
	background: rgba(255, 0, 122, 0.85);
	border-color: #ff007a;
	transform: translateY(-50%) scale(1.08);
	box-shadow: 0 6px 20px rgba(255, 0, 122, 0.4);
}

.saasbuilder-lightbox-nav:disabled {
	opacity: 0.2;
	cursor: not-allowed;
	pointer-events: none;
}

@media (max-width: 768px) {
	.saasbuilder-lightbox-header {
		padding: 12px 16px;
	}

	.saasbuilder-lightbox-title {
		max-width: 180px;
		font-size: 13.5px;
	}

	.saasbuilder-lightbox-btn {
		width: 34px;
		height: 34px;
	}

	.saasbuilder-lightbox-nav {
		width: 40px;
		height: 40px;
	}

	.saasbuilder-lightbox-prev {
		left: 10px;
	}

	.saasbuilder-lightbox-next {
		right: 10px;
	}

	.saasbuilder-lightbox-media-wrap img,
	.saasbuilder-lightbox-media-wrap video {
		max-width: 95%;
		max-height: 75vh;
	}
}
