/* Glory Réalisations — galerie, filtres et comparatifs avant/après. */
.glory-reals-wrap {
	--glory-red: var(--global-palette1, #e30613);
	--glory-red-dark: var(--global-palette2, #b8050f);
	--glory-ink: var(--global-palette3, #0b0d12);
}

/* Filtres */
.glory-reals-wrap .glory-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin: 0 0 16px;
}
.glory-reals-wrap .glory-filters button {
	height: 40px;
	padding: 0 32px;
	border: 1px solid rgba(11, 13, 18, 0.32);
	border-radius: 2px;
	background: #fff;
	color: var(--glory-ink);
	font: inherit;
	font-size: 15px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.glory-reals-wrap .glory-filters button:hover {
	border-color: var(--glory-ink);
	transform: translateY(-1px);
}
.glory-reals-wrap .glory-filters button.is-active {
	background: var(--glory-ink);
	border-color: var(--glory-ink);
	box-shadow: inset 4px 0 0 var(--glory-red);
	color: #fff;
	font-weight: 700;
}
.glory-reals-wrap .glory-filters button:focus-visible {
	outline: 2px solid var(--glory-red);
	outline-offset: 3px;
}

/* Grille : 3 grandes cartes puis 4 petites */
.glory-reals-wrap .glory-reals {
	display: grid;
	grid-template-columns: repeat(12, 1fr);
	gap: 16px 22px;
}
.glory-reals-wrap .glory-real {
	grid-column: span 3;
	margin: 0;
}
.glory-reals-wrap .glory-real--wide {
	grid-column: span 4;
}
.glory-reals-wrap .glory-real[hidden] {
	display: none;
}
.glory-reals-wrap .glory-real.is-in {
	animation: glory-real-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.glory-reals-wrap .glory-real__media {
	position: relative;
	overflow: hidden;
	border-radius: 4px;
	aspect-ratio: 2.27 / 1;
	background: #efefed;
}
.glory-reals-wrap .glory-real--wide .glory-real__media {
	aspect-ratio: 1.94 / 1;
}
.glory-reals-wrap .glory-real__media > img,
.glory-reals-wrap .glory-ba__img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.glory-reals-wrap .glory-real:hover .glory-real__media > img {
	transform: scale(1.07);
}
.glory-reals-wrap .glory-real figcaption {
	margin-top: 9px;
	font-size: 16px;
	line-height: 1.3;
	color: var(--glory-ink);
	transition: color 0.25s ease;
}
.glory-reals-wrap .glory-real:hover figcaption {
	color: var(--glory-red);
}
.glory-reals-wrap .glory-reals-empty {
	margin: 30px 0 0;
	text-align: center;
}

/* Signature : coup de raclette qui révèle la photo */
.glory-reals-wrap .glory-wipe::after {
	content: "";
	position: absolute;
	z-index: 5;
	top: -6%;
	bottom: -6%;
	left: 0;
	width: 5px;
	border-radius: 3px;
	background: linear-gradient(180deg, #ff2b36, var(--glory-red) 40%, #a8040e);
	box-shadow: -1px 0 0 rgba(255, 255, 255, 0.5), 8px 0 22px rgba(255, 255, 255, 0.6);
	opacity: 0;
	pointer-events: none;
}
/* Joué une seule fois à l'entrée dans l'écran (classe posée par le script) ; sans script, tout reste visible. */
.glory-reals-wrap.is-js .glory-wipe:not(.is-revealed) {
	clip-path: inset(0 100% 0 0);
}
.glory-reals-wrap.is-js .glory-wipe.is-revealed {
	animation: glory-real-wipe 1.15s cubic-bezier(0.65, 0.05, 0.3, 1) both;
}
.glory-reals-wrap.is-js .glory-wipe.is-revealed::after {
	animation: glory-real-blade 1.15s cubic-bezier(0.65, 0.05, 0.3, 1) both;
}
@keyframes glory-real-wipe {
	from { clip-path: inset(0 100% 0 0); }
	to { clip-path: inset(0 0 0 0); }
}
@keyframes glory-real-blade {
	0% { left: 0; opacity: 1; }
	90% { left: calc(100% - 5px); opacity: 1; }
	100% { left: calc(100% - 5px); opacity: 0; }
}
@keyframes glory-real-in {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: none; }
}

/* Comparatif avant/après */
.glory-reals-wrap .glory-ba {
	--glory-pos: 50%;
	position: absolute;
	inset: 0;
	touch-action: pan-y;
}
.glory-reals-wrap .glory-ba__before {
	position: absolute;
	inset: 0;
	clip-path: inset(0 calc(100% - var(--glory-pos)) 0 0);
}
.glory-reals-wrap .glory-ba__tag {
	position: absolute;
	z-index: 2;
	bottom: 12px;
	padding: 6px 16px;
	border-radius: 2px;
	background: rgba(11, 13, 18, 0.74);
	color: #fff;
	font-size: 14px;
	line-height: 1.2;
	pointer-events: none;
}
.glory-reals-wrap .glory-ba__tag--before {
	left: 12px;
}
.glory-reals-wrap .glory-ba__tag--after {
	right: 12px;
}
.glory-reals-wrap .glory-ba__handle {
	position: absolute;
	z-index: 3;
	top: 0;
	bottom: 0;
	left: var(--glory-pos);
	width: 2px;
	margin-left: -1px;
	background: #fff;
	box-shadow: 0 0 14px rgba(11, 13, 18, 0.35);
	pointer-events: none;
}
/* Poignée en lame de raclette */
.glory-reals-wrap .glory-ba__handle::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 12px;
	height: 58px;
	margin: -29px 0 0 -6px;
	border-radius: 6px;
	background: var(--glory-red);
	box-shadow: 0 4px 14px rgba(11, 13, 18, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.28);
	transition: transform 0.2s ease;
}
.glory-reals-wrap .glory-ba:hover .glory-ba__handle::before {
	transform: scaleY(1.12);
}
.glory-reals-wrap .glory-ba:has(.glory-ba__range:focus-visible) .glory-ba__handle::before {
	outline: 3px solid #fff;
	outline-offset: 3px;
}
.glory-reals-wrap .glory-ba__range {
	position: absolute;
	z-index: 4;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	opacity: 0;
	cursor: ew-resize;
	-webkit-appearance: none;
	appearance: none;
	background: transparent;
}

@media (max-width: 1180px) {
	.glory-reals-wrap .glory-reals {
		grid-template-columns: repeat(6, 1fr);
	}
	.glory-reals-wrap .glory-real {
		grid-column: span 3;
	}
	.glory-reals-wrap .glory-real--wide {
		grid-column: span 6;
	}
}
@media (max-width: 767px) {
	.glory-reals-wrap .glory-filters {
		flex-wrap: nowrap;
		justify-content: flex-start;
		overflow-x: auto;
		padding-bottom: 6px;
		scrollbar-width: none;
	}
	.glory-reals-wrap .glory-filters button {
		flex: none;
		padding: 0 22px;
	}
	.glory-reals-wrap .glory-reals {
		grid-template-columns: 1fr;
		gap: 22px;
	}
	.glory-reals-wrap .glory-real,
	.glory-reals-wrap .glory-real--wide {
		grid-column: 1 / -1;
	}
}
@media (prefers-reduced-motion: reduce) {
	.glory-reals-wrap .glory-real.is-in,
	.glory-reals-wrap .glory-real__media > img {
		animation: none;
		transition: none;
	}
}
