/* Header Wave – caforum/headerwave */

.caforum-hw-host {
	position: relative;
}

/* ------------------------------------------------------------------
 * Ondulation, version Safari / iPhone / iPad (bandes verticales)
 * ------------------------------------------------------------------ */

/* Pendant la vague seulement : les bandes passent derrière le contenu */
.caforum-hw-host--strips {
	isolation: isolate;
}

.caforum-hw-strips {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	overflow: hidden;
	border-radius: inherit;
	pointer-events: none;
	z-index: -1;
	visibility: hidden;
}

.caforum-hw-strips--on {
	visibility: visible;
}

.caforum-hw-strips__strip {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}

/* ------------------------------------------------------------------
 * Reflet lumineux
 * ------------------------------------------------------------------ */

/* Calque de découpe : couvre l'élément ciblé sans toucher à son overflow */
.caforum-hw {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	overflow: hidden;
	border-radius: inherit;
	pointer-events: none;
	z-index: 1;
}

/* La bande lumineuse qui traverse de gauche à droite */
.caforum-hw__band {
	position: absolute;
	top: -10%;
	bottom: -10%;
	left: calc(-1 * var(--hw-width, 25%));
	width: var(--hw-width, 25%);
	background-repeat: no-repeat;
	background-size: 100% 100%;
	opacity: 0;
}

.caforum-hw--play .caforum-hw__band {
	will-change: transform, opacity;
	animation: caforum-hw-sweep var(--hw-duration, 1800ms) cubic-bezier(.37, 0, .63, 1) 1 both;
}

/* Passage de droite à gauche */
.caforum-hw--reverse .caforum-hw__band {
	animation-direction: reverse;
}

@keyframes caforum-hw-sweep {
	0% {
		transform: translateX(0);
		opacity: 0;
	}
	12% {
		opacity: var(--hw-opacity, .45);
	}
	88% {
		opacity: var(--hw-opacity, .45);
	}
	100% {
		transform: translateX(var(--hw-distance, 500%));
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.caforum-hw--play .caforum-hw__band {
		animation: none;
	}
}
