/* Novatrix Galerie Pro — front */

/* Mosaïque */
.nxg--mosaic .nxg-grid {
	display: grid;
	grid-template-columns: repeat(var(--nxg-cur-cols), minmax(0, 1fr));
	grid-auto-rows: calc((100cqi - (var(--nxg-cur-cols) - 1) * var(--nxg-gap)) / var(--nxg-cur-cols));
	grid-auto-flow: dense;
	gap: var(--nxg-gap);
}
.nxg--mosaic .nxg-media { aspect-ratio: auto; height: 100%; }
.nxg--mosaic .nxg-item:nth-child(10n + 1) { grid-column: span 2; grid-row: span 2; }
.nxg--mosaic .nxg-item:nth-child(10n + 4) { grid-row: span 2; }
.nxg--mosaic .nxg-item:nth-child(10n + 7) { grid-column: span 2; }
@media (max-width: 767px) {
	.nxg--mosaic .nxg-item:nth-child(n) { grid-column: auto; grid-row: auto; }
	.nxg--mosaic .nxg-item:nth-child(5n + 1) { grid-column: 1 / -1; }
}

/* Carrousel */
.nxg-car { position: relative; }
.nxg--carousel .nxg-grid {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - (var(--nxg-cur-cols) - 1) * var(--nxg-gap)) / var(--nxg-cur-cols));
	gap: var(--nxg-gap);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.nxg--carousel .nxg-grid::-webkit-scrollbar { display: none; }
.nxg--carousel .nxg-item { scroll-snap-align: start; }
.nxg--carousel .nxg-grid:focus-visible { outline: 2px solid var(--nxg-accent); outline-offset: 4px; }

.nxg-car__arrow {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .92);
	color: #111;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
	cursor: pointer;
	display: grid;
	place-items: center;
	transition: transform .2s ease, opacity .2s ease;
}
.nxg-car__arrow:hover { transform: scale(1.08); }
.nxg-car__arrow:disabled { opacity: .35; cursor: default; transform: none; }
.nxg-car__arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.nxg-car__arrow--prev { left: 10px; }
.nxg-car__arrow--next { right: 10px; }

.nxg-car__dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.nxg-car__dot {
	width: 9px; height: 9px; padding: 0; border: 0; border-radius: 9px;
	background: currentColor; opacity: .25; cursor: pointer;
	transition: width .25s ease, opacity .25s ease;
}
.nxg-car__dot.is-active { width: 26px; opacity: .85; }

/* ---------------------------------------------------------------------
 * Filtres & voir plus
 * ------------------------------------------------------------------- */
.nxg-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0 0 18px;
}
.nxg-filter {
	appearance: none;
	margin: 0;
	padding: .5em 1.1em;
	border: 1px solid rgba(127, 127, 127, .35);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: .9em;
	line-height: 1.2;
	cursor: pointer;
	transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.nxg-filter:hover { border-color: var(--nxg-accent); }
.nxg-filter.is-active { background: var(--nxg-accent); border-color: var(--nxg-accent); color: #fff; }

.nxg-more-wrap { text-align: center; margin-top: 22px; }
.nxg-more {
	appearance: none;
	padding: .8em 1.8em;
	border: 0;
	border-radius: 999px;
	background: var(--nxg-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: transform .2s ease, filter .2s ease;
}
.nxg-more:hover { transform: translateY(-2px); filter: brightness(1.08); }

/* ---------------------------------------------------------------------
 * Visionneuse : diaporama
 * ------------------------------------------------------------------- */
.nxg-lb .nxg-i-pause { display: none; }
.nxg-lb.is-playing .nxg-i-play { display: none; }
.nxg-lb.is-playing .nxg-i-pause { display: inline; }
.nxg-lb.is-playing [data-tool="play"] { background: var(--lb-soft); }
.nxg-lb__progress { height: 2px; flex: 0 0 auto; }
.nxg-lb__progress span { display: block; height: 100%; width: 0; background: currentColor; opacity: 0; }
.nxg-lb.is-playing .nxg-lb__progress span { opacity: .6; }
