/* Block « Bannière projet (slider) ». */

.agpn-banniere {
	position: relative;
	overflow: hidden;
	width: 100%;
	height: var( --agpn-bh, 520px );
}

/* Gradient haut → transparent (couleur contrast du thème). */
.agpn-banniere::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to bottom,
		var( --wp--preset--color--contrast, #000 ) 0%,
		transparent 40%
	);
	opacity: 0.65;
	pointer-events: none;
	z-index: 2;
}

/* Overlay couleur pleine piloté par les attributs du bloc. */
.agpn-banniere::after {
	content: '';
	position: absolute;
	inset: 0;
	background: var( --agpn-ov-color, #000 );
	opacity: var( --agpn-ov-opacity, 0 );
	pointer-events: none;
	z-index: 1;
}

.agpn-banniere__track {
	position: absolute;
	inset: 0;
}

/* Crossfade : toutes les diapos empilées, on fait varier l'opacité. */
.agpn-banniere__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.9s ease-in-out;
	will-change: opacity;
}

.agpn-banniere__slide.is-active {
	opacity: 1;
}

.agpn-banniere__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.agpn-banniere__arrow {
	position: absolute;
	bottom: 16px;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 0;
	background: rgba( 26, 71, 107, 0.7 );
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 3;
	transition: background 0.25s;
}

.agpn-banniere__arrow:hover {
	background: rgba( 26, 71, 107, 1 );
}

/* Flèches calées sur la largeur de contenu du site (contentSize du thème) ; en écran
   plus étroit que le contenu, repli sur le padding racine pour rester alignées. */
.agpn-banniere__prev { left: max( var( --wp--style--root--padding-left, 16px ), calc( ( 100% - var( --wp--style--global--content-size, 1200px ) ) / 2 ) ); }
.agpn-banniere__next { right: max( var( --wp--style--root--padding-right, 16px ), calc( ( 100% - var( --wp--style--global--content-size, 1200px ) ) / 2 ) ); }

.agpn-banniere__dots {
	position: absolute;
	bottom: 16px;
	left: 0;
	right: 0;
	display: flex;
	justify-content: center;
	gap: 8px;
	z-index: 3;
}

.agpn-banniere__dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba( 255, 255, 255, 0.5 );
	cursor: pointer;
}

.agpn-banniere__dot.is-active {
	background: #fff;
}

/* Breadcrumb centré verticalement dans la bannière projet, calé sur la largeur de
   contenu du site (même formule que les flèches) et au-dessus des overlays. */
.single-projet .wp-block-breadcrumbs {
	top: calc( var( --agpn-bh-single, 520px ) / 2 );
	transform: translateY( -50% );
	left: max( var( --wp--style--root--padding-left, 16px ), calc( ( 100% - var( --wp--style--global--content-size, 1200px ) ) / 2 ) );
	z-index: 10;
}
