/* EWD MultiFilter Gallery — CSS */

.nova-gallery-widget {
	width: 100%;
	position: relative;
	box-sizing: border-box;
}

/* ── Filtres ─────────────────────────────────────────────────────── */
.nova-gallery-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin-bottom: 30px;
}

.nova-gallery-filter-item {
	display: inline-block;
	padding: 10px 20px;
	background-color: #f5f5f5;
	color: #333;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s ease;
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
}

.nova-gallery-filter-item:hover { background-color: #e0e0e0; }
.nova-gallery-filter-item.active { background-color: #0073aa; color: #fff; }

.nova-gallery-filter-label {
	font-weight: 600;
	margin-bottom: 10px;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.nova-gallery-filters-wrapper {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
}

.nova-gallery-filter-wrap { display: inline-block; }
.nova-gallery-filter-name { display: inline-block; }

/* ── Multi-filters container ─────────────────────────────────────── */
.nova-gallery-multi-filters-container {
	display: flex;
	flex-direction: column;
	gap: 0;
	margin-bottom: 30px;
}

.nova-gallery-filter-group {
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
}

/* ── Slider (Owl) ────────────────────────────────────────────────── */
.nova-gallery-filters.owl-carousel { width: 100%; }
.nova-gallery-filters.owl-carousel .owl-stage { align-items: center; }
.nova-gallery-filters.owl-carousel.owl-autowidth .owl-item { width: auto !important; flex-shrink: 0; }

.nova-gallery-filters-slider { width: 100%; overflow: hidden; }
.nova-gallery-filters-slider .owl-stage-outer { overflow: hidden; }

.nova-gallery-filters-slider.nova-scroll-native {
	scrollbar-width: none;
	-ms-overflow-style: none;
}
.nova-gallery-filters-slider.nova-scroll-native::-webkit-scrollbar { display: none; }

.nova-gallery-filters-slider:not(.owl-loaded) {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	gap: 8px;
}

/* ── Grille ──────────────────────────────────────────────────────── */
.nova-gallery-grid {
	display: grid;
	gap: 20px;
	width: 100%;
}

/* ── Item ────────────────────────────────────────────────────────── */
.nova-gallery-item {
	position: relative;
	width: 100%;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	transition: opacity .5s cubic-bezier(.4,0,.2,1),
	            transform .5s cubic-bezier(.4,0,.2,1),
	            visibility .5s ease,
	            max-height .5s cubic-bezier(.4,0,.2,1),
	            margin .5s cubic-bezier(.4,0,.2,1),
	            padding .5s cubic-bezier(.4,0,.2,1);
	opacity: 1;
	transform: scale(1) translateY(0);
	visibility: visible;
	max-height: 5000px;
}

.nova-gallery-item.has-background-image { position: relative; min-height: 300px; }

.nova-gallery-item.hidden {
	opacity: 0;
	transform: scale(.9) translateY(-10px);
	visibility: hidden;
	pointer-events: none;
	max-height: 0;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

.nova-gallery-item[data-popup-image] { cursor: pointer; }

/* ── Image ───────────────────────────────────────────────────────── */
.nova-gallery-item-image { position: relative; width: 100%; overflow: hidden; }
.nova-gallery-item-image img { width: 100%; height: auto; display: block; object-fit: cover; }

/* ── Titre ───────────────────────────────────────────────────────── */
.nova-gallery-item-title {
	margin: 15px;
	padding: 0;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
	color: #333;
	position: relative;
	z-index: 3;
}

/* ── Lien ────────────────────────────────────────────────────────── */
.nova-gallery-item-link {
	position: absolute;
	inset: 0;
	z-index: 10;
	text-decoration: none;
	cursor: pointer;
}

/* ── Pagination ──────────────────────────────────────────────────── */
.nova-gallery-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 32px;
	flex-wrap: wrap;
}

.nova-gallery-load-more {
	display: inline-block;
	padding: 10px 28px;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	transition: opacity .2s;
}
.nova-gallery-load-more:hover { opacity: .7; }

.nova-gallery-pages { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }

.nova-gallery-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 8px;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	opacity: .6;
	transition: opacity .2s;
}
.nova-gallery-page-btn:hover,
.nova-gallery-page-btn.active { opacity: 1; }
.nova-gallery-page-btn.active { font-weight: 600; }

/* ── Popup ───────────────────────────────────────────────────────── */
.nova-gallery-popup { position: fixed; inset: 0; z-index: 999999; display: none; }
.nova-gallery-popup-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.9); cursor: pointer; }
.nova-gallery-popup-content {
	position: relative; width: 100%; height: 100%;
	display: flex; align-items: center; justify-content: center;
	padding: 40px; box-sizing: border-box;
}
.nova-gallery-popup-image-wrapper {
	position: relative; max-width: 90%; max-height: 90%;
	display: flex; flex-direction: column; align-items: center;
}
.nova-gallery-popup-image {
	max-width: 100%; max-height: 80vh; object-fit: contain;
	border-radius: 4px; box-shadow: 0 4px 20px rgba(0,0,0,.5);
}
.nova-gallery-popup-title  { color: #fff; font-size: 18px; margin-top: 20px; text-align: center; }
.nova-gallery-popup-counter { color: #fff; font-size: 14px; margin-top: 10px; opacity: .8; }

.nova-gallery-popup-close {
	position: absolute; top: 20px; right: 20px;
	width: 36px; height: 36px;
	background: rgba(255,255,255,.2) !important; border: none;
	border-radius: 50% !important; color: #fff !important;
	font-size: 28px !important; line-height: 1; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	transition: background .3s; z-index: 1000000; padding: 0 !important;
}
.nova-gallery-popup-close:hover { background: rgba(255,255,255,.35) !important; }

.nova-gallery-popup-prev,
.nova-gallery-popup-next {
	position: absolute; top: 50%; transform: translateY(-50%);
	width: 50px; height: 50px;
	background: rgba(255,255,255,.2) !important; border: none;
	border-radius: 50% !important; color: #fff !important;
	font-size: 30px !important; line-height: 1; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	transition: background .3s; z-index: 1000000; padding: 0 !important;
}
.nova-gallery-popup-prev { left: 20px; }
.nova-gallery-popup-next { right: 20px; }
.nova-gallery-popup-prev:hover,
.nova-gallery-popup-next:hover { background: rgba(255,255,255,.35) !important; }

@media (max-width: 768px) {
	.nova-gallery-popup-content { padding: 20px; }
	.nova-gallery-popup-image   { max-height: 70vh; }
	.nova-gallery-popup-close   { top: 10px; right: 10px; }
	.nova-gallery-popup-prev    { left: 10px; }
	.nova-gallery-popup-next    { right: 10px; }
}
