/* « À la une » de l'accueil (inc/une.php). */
.ebtp-une {
	position: relative;
	height: clamp(460px, 64vh, 620px);
	overflow: hidden;
	background: var(--ebtp-encre);
	color: #fff;
}

.ebtp-une__diapo {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity .8s ease, visibility 0s linear .8s;
}
.ebtp-une__diapo.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity .8s ease;
	z-index: 1;
}

.ebtp-une__fond {
	position: absolute;
	inset: 0;
	background: var(--ebtp-une-img, none) var(--ebtp-une-pos, 50% 44%) / cover no-repeat;
	transform: scale(1.06);
	transition: transform 9s ease-out;
}
.ebtp-une__diapo.is-active .ebtp-une__fond { transform: scale(1); }
.ebtp-une__fond::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(18, 28, 40, .9) 0%, rgba(18, 28, 40, .66) 40%, rgba(18, 28, 40, .1) 78%, rgba(18, 28, 40, 0) 100%);
}

.ebtp-une__texte {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
	height: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: 40px 72px 110px;
}
.ebtp-une__texte > * { max-width: 640px; }

.ebtp-une__badge {
	display: inline-block;
	margin-bottom: 18px;
	padding: 6px 14px;
	border-radius: 999px;
	background: var(--ebtp-une-c, var(--ebtp-cyan));
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .08em;
	line-height: 1.3;
	text-transform: uppercase;
}
.ebtp-une .ebtp-une__titre {
	margin: 0 0 16px;
	color: #fff;
	font-size: clamp(32px, 3.4vw, 50px);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -.01em;
	text-transform: none;
	text-wrap: balance;
}
.ebtp-une__intro { font-size: 19px; line-height: 1.55; color: rgba(255, 255, 255, .92); }
.ebtp-une__intro p { margin: 0 0 12px; }
.ebtp-une__intro :is(h1, h2, h3, h4, h5, h6) { color: #fff; font-size: 1em; margin: 0 0 10px; }
.ebtp-une__intro a { color: #fff; text-decoration: underline; }
.ebtp-une__boutons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
/* Bouton sans lien : une information (« bientôt ouvertes »), qui ne réagit pas au survol. */
.ebtp-bouton--info, .ebtp-bouton--info:hover { border: 2px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .14); color: #fff; box-shadow: none; transform: none; cursor: default; }

/* Onglets des annonces, avec barre de progression. */
.ebtp-une__onglets {
	position: absolute;
	z-index: 2;
	left: 0;
	right: 0;
	bottom: 30px;
	display: flex;
	gap: 24px;
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 72px;
}
.ebtp-une__onglet {
	position: relative;
	flex: 1;
	max-width: 280px;
	margin: 0;
	padding: 14px 0 0;
	border: 0;
	background: none;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	text-align: left;
	text-transform: none;
	letter-spacing: 0;
	opacity: .65;
	cursor: pointer;
	min-height: 0;
	transition: opacity .2s;
}
.ebtp-une__onglet:hover,
.ebtp-une__onglet.is-active { opacity: 1; }
.ebtp-une__onglet::before,
.ebtp-une__barre {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	height: 3px;
	border-radius: 2px;
}
.ebtp-une__onglet::before { right: 0; background: rgba(255, 255, 255, .35); }
.ebtp-une__barre { width: 0; background: var(--ebtp-orange); }
.ebtp-une__onglet.is-active .ebtp-une__barre { width: 100%; }
.ebtp-une.is-auto .ebtp-une__onglet.is-active .ebtp-une__barre {
	width: 0;
	animation: ebtp-une-barre var(--ebtp-une-duree, 7s) linear forwards;
}
.ebtp-une.is-pause .ebtp-une__onglet.is-active .ebtp-une__barre { animation-play-state: paused; }
@keyframes ebtp-une-barre { to { width: 100%; } }

/* Tant que le script n'a pas pris la main (UX Builder…), les annonces s'empilent. */
.ebtp-une:not(.is-pret) .ebtp-une__diapo { position: relative; opacity: 1; visibility: visible; height: clamp(460px, 64vh, 620px); }
.ebtp-une:not(.is-pret) { height: auto; }
.ebtp-une:not(.is-pret) .ebtp-une__onglets { display: none; }

@media (max-width: 849px) {
	.ebtp-une { height: auto; min-height: 520px; display: grid; }
	.ebtp-une__diapos { display: grid; }
	.ebtp-une .ebtp-une__diapo { position: relative; grid-area: 1 / 1; }
	.ebtp-une__fond::after { background: linear-gradient(0deg, rgba(18, 28, 40, .92) 0%, rgba(18, 28, 40, .7) 55%, rgba(18, 28, 40, .25) 100%); }
	.ebtp-une__texte { justify-content: flex-end; min-height: 520px; padding: 120px 24px 84px; }
	.ebtp-une__intro { font-size: 17px; }
	.ebtp-une__onglets { bottom: 26px; padding: 0 24px; gap: 8px; }
	.ebtp-une__onglet { flex: 0 0 34px; height: 24px; font-size: 0; padding: 0; }
	.ebtp-une__onglet::before, .ebtp-une__barre { top: 10px; }
}

/* Couleurs du lycée : filet aux 4 couleurs du logo au-dessus du titre, halo de la couleur de
   l'annonce, voile plus léger sur la photo et bouton d'information plein. */
.ebtp-une__fond::after {
	background:
		radial-gradient(120% 90% at 0% 100%, color-mix(in srgb, var(--ebtp-une-c, var(--ebtp-cyan)) 38%, transparent) 0%, transparent 60%),
		linear-gradient(90deg, rgba(18, 28, 40, .78) 0%, rgba(18, 28, 40, .5) 42%, rgba(18, 28, 40, .06) 80%, rgba(18, 28, 40, 0) 100%);
}
.ebtp-une .ebtp-une__titre::before {
	content: "";
	display: block;
	/* 4 tirets séparés, comme dans le pied de page (.ebtp-pied__couleurs), un peu plus grands. */
	/* Un tiret orange, les 3 autres sont ses ombres décalées (arrondis conservés). */
	width: 34px;
	height: 4px;
	margin-bottom: 22px;
	border-radius: 2px;
	background: var(--ebtp-orange);
	box-shadow: 40px 0 0 var(--ebtp-rose), 80px 0 0 var(--ebtp-lime), 120px 0 0 var(--ebtp-cyan);
}
.ebtp-une__intro { font-size: 21px; font-weight: 600; color: #fff; }
.ebtp-une .ebtp-bouton--info,
.ebtp-une .ebtp-bouton--info:hover {
	border: 0;
	background: var(--ebtp-une-c, var(--ebtp-cyan));
	color: #fff;
	box-shadow: 0 10px 26px -10px color-mix(in srgb, var(--ebtp-une-c, var(--ebtp-cyan)) 80%, transparent);
}

@media (max-width: 849px) {
	.ebtp-une__fond::after {
		background:
			radial-gradient(140% 70% at 0% 100%, color-mix(in srgb, var(--ebtp-une-c, var(--ebtp-cyan)) 40%, transparent) 0%, transparent 65%),
			linear-gradient(0deg, rgba(18, 28, 40, .88) 0%, rgba(18, 28, 40, .55) 55%, rgba(18, 28, 40, .12) 100%);
	}
	.ebtp-une .ebtp-une__titre::before { width: 26px; height: 3px; margin-bottom: 16px; box-shadow: 30px 0 0 var(--ebtp-rose), 60px 0 0 var(--ebtp-lime), 90px 0 0 var(--ebtp-cyan); }
	.ebtp-une__intro { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
	.ebtp-une__diapo, .ebtp-une__fond { transition: none; }
	.ebtp-une__fond { transform: none; }
}

/* ==========================================================================
   Effets de transition (attribut effet="…" de [ebtp_une])
   « signature » : effet des sites AB-MEDIA (Left Bank) — la photo sort du
   blanc avec un lent zoom arrière, le titre se dévoile de gauche à droite en
   perdant son flou, puis étiquette, texte et boutons montent un à un.
   « rideau » : une bande de la couleur de l'étiquette balaie l'image et
   découvre l'annonce suivante.
   Les animations repartent à chaque fois qu'une annonce devient active.
   ========================================================================== */
.ebtp-une.is-pret .ebtp-une__diapo.is-active .ebtp-une__badge,
.ebtp-une.is-pret .ebtp-une__diapo.is-active .ebtp-une__intro,
.ebtp-une.is-pret .ebtp-une__diapo.is-active .ebtp-une__boutons {
	animation: ebtp-monte .8s cubic-bezier(.2, .7, .2, 1) both;
}
.ebtp-une.is-pret .ebtp-une__diapo.is-active .ebtp-une__badge { animation-delay: .35s; }
.ebtp-une.is-pret .ebtp-une__diapo.is-active .ebtp-une__intro { animation-delay: 1.05s; }
.ebtp-une.is-pret .ebtp-une__diapo.is-active .ebtp-une__boutons { animation-delay: 1.25s; }

/* Signature */
.ebtp-une--signature.is-pret { background: #fff; }
.ebtp-une--signature.is-pret .ebtp-une__diapo.is-active .ebtp-une__fond {
	transition: none;
	animation: ebtp-photo 2.6s cubic-bezier(.4, 0, .2, 1) both;
}
.ebtp-une--signature.is-pret .ebtp-une__diapo.is-active .ebtp-une__titre {
	animation: ebtp-devoile 1.6s cubic-bezier(.4, 0, .2, 1) .5s both;
}

/* Rideau */
.ebtp-une--rideau.is-pret .ebtp-une__diapo { transition: visibility 0s linear 1.1s, opacity 0s linear 1.1s; }
.ebtp-une--rideau.is-pret .ebtp-une__diapo.is-active {
	transition: none;
	animation: ebtp-rideau 1.1s cubic-bezier(.75, 0, .2, 1) both;
}
.ebtp-une--rideau.is-pret .ebtp-une__diapo.is-active::after {
	content: "";
	position: absolute;
	z-index: 3;
	top: 0;
	bottom: 0;
	width: 18px;
	background: var(--ebtp-une-c, var(--ebtp-cyan));
	box-shadow: 0 0 40px var(--ebtp-une-c, var(--ebtp-cyan));
	animation: ebtp-rideau-bande 1.1s cubic-bezier(.75, 0, .2, 1) both;
}
.ebtp-une--rideau.is-pret .ebtp-une__diapo.is-active .ebtp-une__titre {
	animation: ebtp-monte .8s cubic-bezier(.2, .7, .2, 1) .7s both;
}
.ebtp-une--rideau.is-pret.is-premiere .ebtp-une__diapo.is-active,
.ebtp-une--rideau.is-pret.is-premiere .ebtp-une__diapo.is-active::after { animation: none; }
.ebtp-une--rideau.is-pret.is-premiere .ebtp-une__diapo.is-active::after { display: none; }

@keyframes ebtp-photo {
	from { opacity: 0; transform: scale(1.14); }
	35%  { opacity: 1; }
	to   { opacity: 1; transform: scale(1); }
}
/* Le masque déborde du bloc (hampes de g, p, j, accents) pour ne rien couper. */
@keyframes ebtp-devoile {
	from { clip-path: inset(-25% 100% -35% -5%); filter: blur(6px); opacity: .2; }
	60%  { filter: blur(0); opacity: 1; }
	to   { clip-path: inset(-25% -5% -35% -5%); filter: blur(0); opacity: 1; }
}
@keyframes ebtp-monte {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: translateY(0); }
}
@keyframes ebtp-rideau {
	from { clip-path: inset(0 100% 0 0); }
	to   { clip-path: inset(0 0 0 0); }
}
@keyframes ebtp-rideau-bande {
	from { left: 0; opacity: 1; }
	85%  { opacity: 1; }
	to   { left: calc(100% - 18px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.ebtp-une.is-pret .ebtp-une__diapo.is-active,
	.ebtp-une.is-pret .ebtp-une__diapo.is-active * ,
	.ebtp-une.is-pret .ebtp-une__diapo.is-active::after { animation: none !important; }
}

/* Une seule annonce : pas d'onglets, pas de défilement, le texte reprend la place des onglets. */
.ebtp-une:not(.ebtp-une--plusieurs) .ebtp-une__texte { padding-bottom: 40px; }
@media (max-width: 849px) {
	.ebtp-une:not(.ebtp-une--plusieurs) .ebtp-une__texte { padding-bottom: 40px; }
}

/* Aperçu dans l'UX Builder : les annonces les unes sous les autres (le slider réel ne s'y anime pas). */
.ebtp-une-apercu { padding: 12px; background: #eef1f4; }
.ebtp-une-apercu__annonce {
	position: relative;
	margin: 0 0 10px;
	padding: 18px 22px;
	border-left: 6px solid var(--ebtp-une-c);
	border-radius: 8px;
	background: linear-gradient(90deg, rgba(29, 39, 51, .88) 45%, rgba(29, 39, 51, .45)), var(--ebtp-une-img, none) center / cover, #1d2733;
	color: #fff;
}
.ebtp-une-apercu__annonce .ebtp-une__badge { position: static; display: inline-block; margin-bottom: 8px; }
.ebtp-une-apercu__titre { display: block; color: #fff; font-size: 22px; font-weight: 700; line-height: 1.2; }
.ebtp-une-apercu__texte { min-height: 8px; margin-top: 6px; color: #fff; font-size: 14px; line-height: 1.45; }
.ebtp-une-apercu__texte :is(p, h1, h2, h3, h4, h5, h6) { margin: 0 0 6px; color: #fff; font-size: 14px; }
.ebtp-une-apercu__boutons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ebtp-une-apercu__bouton { padding: 5px 12px; border: 1px solid rgba(255, 255, 255, .7); border-radius: 999px; font-size: 13px; font-weight: 700; }
.ebtp-une-apercu__annonce.is-masquee { opacity: .55; }
.ebtp-une-apercu__masquee { position: absolute; top: 10px; right: 12px; padding: 3px 9px; border-radius: 4px; background: #fff; color: #1d2733; font-size: 12px; font-weight: 700; }
