/* Bandeau promo : défilement horizontal, répétition du texte */
.fpo-promo-banner {
	/* Couleur du thème si définie (ex. Reprizo / ThemeREX) ; sinon #666666 */
	--fpo-banner-bg: var(--theme-color-extra_bg_color, #666666);
	--fpo-banner-fg: #f7f7f7;
	--fpo-banner-accent: rgba(255, 255, 255, 0.15);
	/* Espace horizontal entre deux répétitions du message */
	--fpo-marquee-gap: 2.5rem;
	/* Durée d’un cycle (ajustable depuis le thème enfant) */
	--fpo-marquee-duration: 42s;

	background: var(--fpo-banner-bg);
	color: var(--fpo-banner-fg);
	margin-bottom: 0.5em;
	padding: 0.65rem 0;
	font-size: clamp(0.875rem, 1.5vw + 0.5rem, 1rem);
	line-height: 1.55;
	font-weight: 500;
	letter-spacing: 0.02em;
	border-bottom: 1px solid var(--fpo-banner-accent);
	/* Pleine largeur viewport (évite le bandeau « coincé » dans la colonne du thème) */
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	box-sizing: border-box;
}

.fpo-promo-banner__marquee {
	overflow: hidden;
	width: 100%;
}

.fpo-promo-banner__track {
	display: flex;
	width: max-content;
	animation: fpo-banner-marquee var(--fpo-marquee-duration) linear infinite;
	will-change: transform;
}

.fpo-promo-banner__segment {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 50vw;
	box-sizing: border-box;
	padding-inline: var(--fpo-marquee-gap);
}

.fpo-promo-banner__segment .fpo-promo-banner__inner {
	display: block;
	width: 100%;
	max-width: none;
	margin: 0;
	text-align: center;
	white-space: nowrap;
}

.fpo-promo-banner__segment .fpo-promo-banner__inner p {
	display: inline;
	margin: 0;
	padding: 0;
}

.fpo-promo-banner__segment .fpo-promo-banner__inner p + p::before {
	content: ' ';
}

@keyframes fpo-banner-marquee {
	from {
		transform: translateX(0);
	}
	to {
		transform: translateX(-50%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.fpo-promo-banner__track {
		animation: none;
		justify-content: center;
		width: 100%;
		max-width: min(100%, 72rem);
		margin-inline: auto;
	}

	.fpo-promo-banner__segment[aria-hidden='true'] {
		display: none;
	}

	.fpo-promo-banner__segment:not([aria-hidden='true']) {
		min-width: 0;
		flex: 1 1 auto;
	}

	.fpo-promo-banner__segment .fpo-promo-banner__inner {
		white-space: normal;
		text-align: center;
	}

	.fpo-promo-banner__segment .fpo-promo-banner__inner p {
		display: block;
	}

	.fpo-promo-banner__segment .fpo-promo-banner__inner p + p::before {
		content: none;
	}

	.fpo-promo-banner__segment .fpo-promo-banner__inner p + p {
		margin-top: 0.4em;
	}
}

.fpo-promo-banner a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.fpo-promo-banner a:hover,
.fpo-promo-banner a:focus {
	opacity: 0.92;
}

/* Modal */
.fpo-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
}

.fpo-modal[hidden] {
	display: none !important;
}

.fpo-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.fpo-modal__dialog {
	position: relative;
	z-index: 1;
	max-width: min(92vw, 720px);
	max-height: 90vh;
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
	overflow: auto;
}

.fpo-modal__close {
	position: absolute;
	top: 0.35rem;
	right: 0.35rem;
	z-index: 2;
	border: 0;
	background: rgba(255, 255, 255, 0.9);
	width: 2.25rem;
	height: 2.25rem;
	line-height: 1;
	font-size: 1.5rem;
	cursor: pointer;
	border-radius: 4px;
}

.fpo-modal__body img {
	display: block;
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

html.fpo-modal-open {
	overflow: hidden;
}
