/* HBC Événements : pop-up et ses thèmes (classique, Halloween, Noël, Pâques, été). */

.hbc-popup {
	--pp-box: #ffffff;
	--pp-ink: #1B2147;
	--pp-head: #161D4F;
	--pp-muted: #4A5068;
	--pp-accent: #2B3BB0;
	--pp-accent-ink: #ffffff;
	--pp-band: linear-gradient(135deg, #2B3BB0, #161D4F);
	position: relative;
	display: flex;
	flex: 0 1 30rem;
	min-width: 0;
	font-family: inherit;
	transition: opacity 200ms ease, transform 200ms ease;
}

.hbc-popup.is-leaving {
	opacity: 0;
	transform: scale(0.96);
}

/* ---------- Calque commun (un ou plusieurs pop-ups côte à côte) ---------- */

.hbc-popups {
	position: fixed;
	z-index: 1000;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.hbc-popups[hidden] {
	display: none;
}

.hbc-popup-open {
	overflow: hidden;
}

.hbc-popups__backdrop {
	position: absolute;
	inset: 0;
	background: rgb(13 15 26 / 60%);
	opacity: 0;
	transition: opacity 200ms ease;
}

.hbc-popups__track {
	position: relative;
	box-sizing: border-box;
	display: flex;
	align-items: stretch;
	justify-content: center;
	gap: 1.25rem;
	width: 100%;
	max-width: 30rem;
	max-height: calc(100vh - 2rem);
	max-height: calc(100dvh - 2rem);
}

.hbc-popups--2 .hbc-popups__track {
	max-width: calc(60rem + 1.25rem);
}

.hbc-popups--3 .hbc-popups__track {
	max-width: calc(84rem + 2.5rem);
}

.hbc-popups--3 .hbc-popup {
	flex-basis: 28rem;
}

.hbc-popup__box {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-height: calc(100vh - 2rem);
	max-height: calc(100dvh - 2rem);
	overflow-y: auto;
	overscroll-behavior: contain;
	border-radius: 1.4rem;
	background: var(--pp-box);
	color: var(--pp-ink);
	box-shadow: 0 2rem 4rem rgb(0 0 0 / 35%);
	opacity: 0;
	transform: translateY(1rem) scale(0.98);
	transition: opacity 220ms ease, transform 220ms ease;
}

.hbc-popups.is-open .hbc-popups__backdrop {
	opacity: 1;
}

.hbc-popups.is-open .hbc-popup__box {
	opacity: 1;
	transform: none;
}

/* Deuxième et troisième annonce : arrivée légèrement décalée. */
.hbc-popups.is-open .hbc-popup:nth-child(2) .hbc-popup__box {
	transition-delay: 70ms;
}

.hbc-popups.is-open .hbc-popup:nth-child(3) .hbc-popup__box {
	transition-delay: 140ms;
}

/* ---------- Plusieurs annonces : présentation sobre et identique ----------
   Même taille pour toutes : une zone visuelle de même hauteur (l'affiche entière sur le fond du bandeau,
   ou l'illustration du thème), puis le texte, les boutons alignés en bas. Pas d'effets lumineux. */

.hbc-popups--multi:not(.is-booking) .hbc-popup__body {
	display: flex;
	flex: 1 0 auto;
	flex-direction: column;
}

.hbc-popups--multi:not(.is-booking) .hbc-popup__actions {
	margin-top: auto;
	padding-top: 0.75rem;
}

.hbc-popups--multi:not(.is-booking) .hbc-popup__box {
	border: 1px solid color-mix(in srgb, var(--pp-ink) 12%, transparent);
	border-radius: 1.1rem;
	box-shadow: 0 1.25rem 3rem rgb(0 0 0 / 28%);
}

.hbc-popups--multi:not(.is-booking) .hbc-popup .hbc-popup__title {
	font-family: inherit;
	font-size: 1.35rem;
	font-style: normal;
	font-weight: 800;
	text-shadow: none;
	text-transform: none;
}

.hbc-popups--multi:not(.is-booking) .hbc-popup .hbc-popup__button,
.hbc-popups--multi:not(.is-booking) .hbc-popup .hbc-popup__button:not(.hbc-popup__button--ghost) {
	border-radius: 999px;
	box-shadow: none;
	font-style: normal;
	text-transform: none;
}

.hbc-popups--multi:not(.is-booking) .hbc-popup__date {
	background: color-mix(in srgb, var(--pp-accent) 12%, transparent);
}

/* Le visuel : l'affiche entière (ou la première photo), posée sur le fond du bandeau. */
.hbc-popups--multi:not(.is-booking) .hbc-popup__box:has(.hbc-popup__media) .hbc-popup__band {
	display: none;
}

.hbc-popups--multi:not(.is-booking) .hbc-popup__media {
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	background: var(--pp-band);
}

.hbc-popups--multi:not(.is-booking) .hbc-popup__media img {
	display: none;
}

.hbc-popups--multi:not(.is-booking) .hbc-popup__media img:first-child {
	display: block;
	border: 0;
	box-shadow: 0 0.4rem 1rem rgb(0 0 0 / 25%);
}

@media (min-width: 761px) {
	.hbc-popups--multi:not(.is-booking) .hbc-popups__track {
		align-items: stretch;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup {
		flex: 0 1 26rem;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__box {
		height: 100%;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__media,
	.hbc-popups--multi:not(.is-booking) .hbc-popup__box:not(:has(.hbc-popup__media)) .hbc-popup__band {
		box-sizing: border-box;
		flex: 0 0 auto;
		height: min(15rem, 34vh);
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__media {
		padding: 1rem;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__media img:first-child {
		width: auto;
		max-width: 100%;
		height: 100%;
		max-height: none;
		border-radius: 0.5rem;
		object-fit: contain;
	}

	/* Photo en largeur : elle remplit la zone. */
	.hbc-popups--multi:not(.is-booking) .hbc-popup__media:not(.hbc-popup__media--poster) {
		padding: 0;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__media:not(.hbc-popup__media--poster) img:first-child {
		width: 100%;
		border-radius: 0;
		box-shadow: none;
		object-fit: cover;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__body {
		padding: 1.1rem 1.4rem 1.3rem;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__text {
		display: -webkit-box;
		overflow: hidden;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 4;
		line-clamp: 4;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__text p {
		margin: 0;
	}
}

.hbc-popups__dots {
	display: none;
}

/* Écran étroit (téléphone, petite tablette) : les annonces s'empilent en cartes compactes,
   visuel à gauche (affiche ou illustration du thème) et texte à droite, toutes visibles d'un coup d'œil. */
@media (max-width: 760px) {
	.hbc-popups--multi:not(.is-booking) {
		justify-content: center;
		padding: 0;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popups__track {
		display: grid;
		grid-auto-rows: 1fr;
		align-items: stretch;
		justify-content: stretch;
		gap: 0.75rem;
		max-width: 30rem;
		height: auto;
		max-height: 100%;
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 1rem;
		-webkit-overflow-scrolling: touch;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup {
		flex: 0 0 auto;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__box {
		height: 100%;
		display: grid;
		grid-template-columns: 6.75rem minmax(0, 1fr);
		grid-template-rows: 1fr;
		align-items: start;
		max-height: none;
		overflow: hidden;
		border-radius: 1.2rem;
	}

	/* Le visuel : l'affiche (ou la première photo), sinon l'illustration du thème dans une vignette. */
	.hbc-popups--multi:not(.is-booking) .hbc-popup__box:has(.hbc-popup__media) .hbc-popup__band {
		display: none;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__media,
	.hbc-popups--multi:not(.is-booking) .hbc-popup__band {
		grid-row: 1;
		grid-column: 1;
		margin: 0.85rem 0 0.85rem 0.85rem;
	}

	/* Vignette de même taille pour toutes : l'affiche entière sur le fond du bandeau, ou l'illustration. */
	.hbc-popups--multi:not(.is-booking) .hbc-popup__media,
	.hbc-popups--multi:not(.is-booking) .hbc-popup__band {
		position: relative;
		box-sizing: border-box;
		height: 9rem;
		overflow: hidden;
		border-radius: 0.7rem;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__media {
		padding: 0.35rem;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__media img:first-child {
		width: 100%;
		height: 100%;
		max-height: none;
		aspect-ratio: auto;
		border-radius: 0;
		box-shadow: none;
		object-fit: contain;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__media:not(.hbc-popup__media--poster) {
		padding: 0;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__media:not(.hbc-popup__media--poster) img:first-child {
		border-radius: 0;
		box-shadow: none;
		object-fit: cover;
	}

	/* L'illustration est plus large que la vignette : on en garde le centre. */
	.hbc-popups--multi:not(.is-booking) .hbc-popup__band svg {
		position: absolute;
		top: 50%;
		left: 50%;
		width: 19rem;
		max-width: none;
		height: auto;
		transform: translate(-50%, -50%);
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__body {
		grid-row: 1;
		grid-column: 2;
		align-self: stretch;
		padding: 0.85rem 0.9rem 0.9rem 0.8rem;
	}

	/* Place pour la croix de fermeture. */
	.hbc-popups--multi:not(.is-booking) .hbc-popup__date {
		margin: 0 2.4rem 0.4rem 0;
		border-radius: 0.6rem;
		padding: 0.2rem 0.5rem;
		font-size: 0.72rem;
		line-height: 1.3;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__date svg {
		display: none;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup .hbc-popup__title {
		margin: 0 0 0.3rem;
		font-size: 1.05rem;
		line-height: 1.2;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__text {
		display: -webkit-box;
		overflow: hidden;
		font-size: 0.85rem;
		line-height: 1.4;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		line-clamp: 2;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__text p {
		margin: 0;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__actions {
		gap: 0.4rem;
		margin-top: auto;
		padding-top: 0.55rem;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__button {
		padding: 0.5rem 0.85rem;
		font-size: 0.82rem;
	}

	/* Second bouton en simple lien : plus sobre et plus compact. */
	.hbc-popups--multi:not(.is-booking) .hbc-popup .hbc-popup__button--ghost {
		border: 0;
		padding: 0.5rem 0.2rem;
		text-decoration: underline;
		text-underline-offset: 0.2em;
	}

	.hbc-popups--multi:not(.is-booking) .hbc-popup__close {
		top: 0.45rem;
		right: 0.45rem;
		width: 2.1rem;
		height: 2.1rem;
		font-size: 1.3rem;
	}
}

/* Réservation commencée dans l'une des annonces : elle reste seule, en grand. */
.hbc-popups.is-booking .hbc-popup:not(.is-booking) {
	display: none;
}

.hbc-popups.is-booking .hbc-popups__dots {
	display: none;
}

.hbc-popups.is-booking .hbc-popups__track {
	justify-content: center;
	max-width: 42rem;
	overflow: visible;
	padding: 0;
}

.hbc-popups.is-booking .hbc-popup.is-booking {
	flex: 0 1 42rem;
	max-width: 42rem;
}

@media (max-width: 760px) {
	.hbc-popups--multi.is-booking {
		padding: 1rem;
	}

	.hbc-popups--multi.is-booking .hbc-popup.is-booking .hbc-popup__box {
		max-height: calc(100vh - 2rem);
		max-height: calc(100dvh - 2rem);
	}
}

.hbc-popup__band {
	display: grid;
	place-items: center;
	height: 7.5rem;
	overflow: hidden;
	background: var(--pp-band);
}

.hbc-popup__band svg {
	width: 100%;
	height: 100%;
}

.hbc-popup__close {
	position: absolute;
	top: 0.6rem;
	right: 0.6rem;
	display: grid;
	place-items: center;
	width: 2.4rem;
	height: 2.4rem;
	border: 0;
	border-radius: 50%;
	background: rgb(255 255 255 / 92%);
	padding: 0;
	color: #1B2147;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 0.3rem 0.8rem rgb(0 0 0 / 20%);
}

.hbc-popup__close:hover {
	background: #fff;
	color: #1B2147;
	box-shadow: 0 0.3rem 0.8rem rgb(0 0 0 / 30%);
	transform: none;
}

.hbc-popup__media {
	display: grid;
	gap: 0.35rem;
	margin: -0.9rem 1.25rem 0;
}

.hbc-popup__media--2 {
	grid-template-columns: 1fr 1fr;
}

.hbc-popup__media--3 {
	grid-template-columns: 2fr 1fr;
	grid-template-rows: 1fr 1fr;
}

.hbc-popup__media--3 img:first-child {
	grid-row: span 2;
}

.hbc-popup__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-height: 13rem;
	border: 3px solid var(--pp-box);
	border-radius: 0.9rem;
	object-fit: cover;
	box-shadow: 0 0.5rem 1rem rgb(0 0 0 / 15%);
}

.hbc-popup__media--3 img {
	max-height: none;
	aspect-ratio: 4 / 3;
}

.hbc-popup__media--3 img:first-child {
	aspect-ratio: auto;
}

.hbc-popup__body {
	padding: 1.1rem 1.4rem 1.4rem;
}

.hbc-popup__date {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0 0 0.6rem;
	border-radius: 999px;
	background: color-mix(in srgb, var(--pp-accent) 14%, transparent);
	padding: 0.25rem 0.75rem;
	color: var(--pp-accent);
	font-size: 0.82rem;
	font-weight: 800;
}

.hbc-popup .hbc-popup__title {
	margin: 0 0 0.5rem;
	color: var(--pp-head);
	font-size: clamp(1.35rem, 4vw, 1.7rem);
	line-height: 1.15;
}

.hbc-popup__text {
	color: var(--pp-ink);
	font-size: 0.97rem;
	line-height: 1.55;
}

.hbc-popup__text p {
	margin: 0 0 0.6rem;
}

.hbc-popup__text a {
	color: var(--pp-accent);
	font-weight: 700;
}

.hbc-popup__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0.6rem 0 0;
}

.hbc-popup__button {
	display: inline-flex;
	border-radius: 999px;
	background: var(--pp-accent);
	padding: 0.75rem 1.3rem;
	color: var(--pp-accent-ink);
	font-weight: 850;
	text-decoration: none;
	transition: filter 150ms ease, transform 150ms ease;
}

.hbc-popup__button:hover {
	color: var(--pp-accent-ink);
	filter: brightness(1.08);
	transform: translateY(-1px);
}

.hbc-popup__button--ghost {
	border: 2px solid var(--pp-accent);
	background: transparent;
	color: var(--pp-accent);
}

.hbc-popup__button--ghost:hover {
	color: var(--pp-accent);
}

/* Une affiche (image en hauteur) : montrée en entier. */
.hbc-popup__media--poster {
	display: flex;
	justify-content: center;
}

.hbc-popup__media--poster img {
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: min(58vh, 34rem);
	object-fit: contain;
}

/* ---------- Thèmes ---------- */

/* « Couleurs de l'affiche » : les couleurs sont données par l'attribut style (variables --pp-*). */
.hbc-popup--affiche .hbc-popup__date {
	background: color-mix(in srgb, var(--pp-accent) 18%, transparent);
}


.hbc-popup--halloween {
	--pp-box: #1d1426;
	--pp-ink: #eadff5;
	--pp-head: #ffb067;
	--pp-accent: #ff7a1a;
	--pp-accent-ink: #1d1426;
	--pp-band: radial-gradient(circle at 50% 120%, #ff7a1a55, transparent 60%), linear-gradient(180deg, #120b18, #2a1838);
}

.hbc-popup--noel {
	--pp-box: #fffdf8;
	--pp-ink: #1f2d26;
	--pp-head: #8f1a24;
	--pp-accent: #b3202c;
	--pp-accent-ink: #ffffff;
	--pp-band: radial-gradient(circle, #ffffff66 1.5px, transparent 2px) 0 0 / 22px 22px, linear-gradient(180deg, #0f4d3a, #155c45);
}

.hbc-popup--paques {
	--pp-box: #fffaf3;
	--pp-ink: #3b3346;
	--pp-head: #7a4f9a;
	--pp-accent: #c2578a;
	--pp-accent-ink: #ffffff;
	--pp-band: radial-gradient(circle, #ffffff99 2px, transparent 2.5px) 0 0 / 26px 26px, linear-gradient(120deg, #ffd6e7, #d6f0ff 55%, #fff1c1);
}

.hbc-popup--ete {
	--pp-box: #fffdf5;
	--pp-ink: #1f3a40;
	--pp-head: #0e5c6b;
	--pp-accent: #e8663d;
	--pp-accent-ink: #ffffff;
	--pp-band: linear-gradient(180deg, #ffd166, #4fc3cf);
}

/* Styles d'ambiance du thème « Couleurs de l'affiche ». */
.hbc-popup--vibe-neon .hbc-popup__box {
	border: 1px solid color-mix(in srgb, var(--pp-glow) 60%, transparent);
	box-shadow: 0 0 2.5rem color-mix(in srgb, var(--pp-glow) 45%, transparent), 0 2rem 4rem rgb(0 0 0 / 45%);
}

.hbc-popup--vibe-neon .hbc-popup__title {
	text-shadow: 0 0 0.35em var(--pp-title-glow), 0 0 1em color-mix(in srgb, var(--pp-title-glow) 60%, transparent);
}

.hbc-popup--vibe-neon .hbc-popup__media img {
	border-color: color-mix(in srgb, var(--pp-glow) 70%, transparent);
	box-shadow: 0 0 1.4rem color-mix(in srgb, var(--pp-glow) 55%, transparent);
}

.hbc-popup--vibe-neon .hbc-popup__button:not(.hbc-popup__button--ghost) {
	box-shadow: 0 0 0.6rem var(--pp-accent), 0 0 1.4rem color-mix(in srgb, var(--pp-accent) 55%, transparent);
}

.hbc-popup--vibe-sportif .hbc-popup__title {
	font-style: italic;
	font-weight: 900;
	text-transform: uppercase;
}

.hbc-popup--vibe-sportif .hbc-popup__button {
	border-radius: 0.35rem;
	font-style: italic;
	text-transform: uppercase;
}

.hbc-popup--vibe-elegant .hbc-popup__title {
	font-family: Georgia, "Times New Roman", serif;
	font-weight: 600;
}

.hbc-popup--vibe-doux .hbc-popup__box {
	border-radius: 2rem;
}

.hbc-popup--vibe-festif .hbc-popup__box {
	border-top: 6px solid var(--pp-accent);
}

/* ---------- Aperçu dans l'administration ---------- */

.hbc-popup.is-preview {
	position: static;
	display: block;
	padding: 0;
}

.hbc-popup.is-preview .hbc-popup__box {
	width: 100%;
	max-height: none;
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.hbc-popup,
	.hbc-popups__backdrop,
	.hbc-popup__box,
	.hbc-popup__button {
		transition: none;
	}

	.hbc-popups--multi .hbc-popups__track {
		scroll-behavior: auto;
	}
}

.hbc-popup__form {
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid rgb(22 29 79 / 12%);
	scroll-margin-top: 1rem;
}

.hbc-popup__form[hidden] {
	display: none;
}

.hbc-popup__form .hbc-book-head {
	display: none;
}

.hbc-popup button.hbc-popup__button {
	border: 0;
	cursor: pointer;
	font: inherit;
	font-weight: 850;
}
