/* INOVU Bannières — carousel of finished banner images. Every banner takes
   the proportions of the first one (--ivb-ratio, set by the widget). */

.ivb {
	--ivb-radius: 20px;
	--ivb-ratio: 1592 / 678;
	--ivb-fleche-fond: rgba(255, 255, 255, 0.9);
	--ivb-fleche: #50555B;
	--ivb-accent: #24B6CC;
	position: relative;
}

body.dark .ivb {
	--ivb-fleche-fond: rgba(30, 30, 30, 0.85);
	--ivb-fleche: rgba(255, 255, 255, 0.87);
	--ivb-accent: #6CC6D7;
}

.ivb__fenetre {
	overflow: hidden;
	border-radius: var(--ivb-radius);
}

.ivb__piste {
	display: flex;
	transition: transform 0.6s ease;
}

.ivb__diapo {
	flex: 0 0 100%;
	min-width: 0;
	aspect-ratio: var(--ivb-ratio);
	background-color: #EDEEEF;
}

body.dark .ivb__diapo {
	background-color: #1E1E1E;
}

.ivb__diapo picture,
.ivb__lien {
	display: block;
	width: 100%;
	height: 100%;
}

.ivb .ivb__image {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.ivb__lien:focus-visible {
	outline: 3px solid var(--ivb-accent);
	outline-offset: -3px;
}

/* Arrows: round buttons over the banner. */
.ivb.ivb .ivb__fleche {
	position: absolute;
	top: 50%;
	z-index: 2;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: var(--ivb-fleche-fond);
	color: var(--ivb-fleche);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	transform: translateY(-50%);
	cursor: pointer;
	transition: color 0.2s, background-color 0.2s;
}

.ivb.ivb .ivb__fleche:hover {
	background-color: var(--ivb-fleche-fond);
	color: var(--ivb-accent);
}

.ivb.ivb .ivb__fleche:focus-visible {
	outline: 2px solid var(--ivb-accent);
	outline-offset: 2px;
}

.ivb__fleche--prec {
	left: 16px;
}

.ivb__fleche--suiv {
	right: 16px;
}

.ivb__fleche::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 11px;
	height: 11px;
	border-left: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: translate(-30%, -50%) rotate(45deg);
}

.ivb__fleche--suiv::before {
	transform: translate(-70%, -50%) rotate(-135deg);
}

/* Dots under the banner. */
.ivb__points {
	display: flex;
	justify-content: center;
	gap: 8px;
	padding-top: 14px;
}

.ivb.ivb .ivb__point {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 5px;
	background-color: #C4C7CA;
	cursor: pointer;
	transition: width 0.25s, background-color 0.25s;
}

.ivb.ivb .ivb__point.is-active {
	width: 28px;
	background-color: var(--ivb-accent);
}

.ivb.ivb .ivb__point:focus-visible {
	outline: 2px solid var(--ivb-accent);
	outline-offset: 2px;
}

body.dark .ivb.ivb .ivb__point:not(.is-active) {
	background-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 767px) {
	.ivb__diapo {
		aspect-ratio: var(--ivb-ratio-mobile, var(--ivb-ratio));
	}

	/* Swipe on phones; small arrows would cover the banner text. */
	.ivb.ivb .ivb__fleche {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ivb__piste,
	.ivb.ivb .ivb__point {
		transition: none;
	}
}
