/*
 * Bulle flottante « Prendre rendez-vous » (BulleReservationSubscriber).
 *
 * Fenêtre ouverte sans JavaScript (:target), parcours en iframe. Couleurs du
 * thème du site : --ev-primary (fond du bouton), --ev-btn-color (texte), avec
 * replis neutres. Classes préfixées evapi-bulle : aucune collision avec le
 * thème du site.
 */
.evapi-bulle__bouton {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 2147483000;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 13px 20px;
	border-radius: 999px;
	background: var(--ev-primary, #c01010);
	color: var(--ev-btn-color, #fff);
	font: 600 15px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	text-decoration: none;
	box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 10px 28px rgba(0, 0, 0, .28);
	transition: transform .15s ease, box-shadow .15s ease;
}

/*
 * Les thèmes imposent souvent leur couleur aux liens (marks : a { color:
 * #282828 }) : texte sombre sur bouton sombre. Couleur verrouillée ici, et
 * seulement ici (sélecteurs préfixés evapi-bulle).
 */
.evapi-bulle a.evapi-bulle__bouton,
.evapi-bulle a.evapi-bulle__bouton:visited,
.evapi-bulle a.evapi-bulle__bouton *,
.evapi-bulle .evapi-bulle__entete,
.evapi-bulle .evapi-bulle__entete *,
.evapi-bulle a.evapi-bulle__fermer {
	color: var(--ev-btn-color, #fff) !important;
}

.evapi-bulle__bouton:hover,
.evapi-bulle__bouton:focus-visible {
	color: var(--ev-btn-color, #fff);
	text-decoration: none;
	transform: translateY(-2px);
	box-shadow: 0 0 0 2px #fff, 0 14px 34px rgba(0, 0, 0, .34);
}

.evapi-bulle__bouton:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--ev-primary, #c01010) 40%, #fff);
	outline-offset: 3px;
}

.evapi-bulle__fenetre {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 2147483001;
}

/* Page de fond figée pendant l'ouverture (sans script). */
html:has(.evapi-bulle__fenetre:target) {
	overflow: hidden;
}

.evapi-bulle__fenetre:target {
	display: flex;
	align-items: center;
	justify-content: center;
}

.evapi-bulle__fond {
	position: absolute;
	inset: 0;
	background: rgba(10, 16, 24, .55);
}

.evapi-bulle__panneau {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(1100px, calc(100vw - 32px));
	height: min(860px, calc(100vh - 32px));
	background: #fff;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

.evapi-bulle__entete {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 18px;
	background: var(--ev-primary, #c01010);
	color: var(--ev-btn-color, #fff);
	font: 600 16px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.evapi-bulle__fermer {
	color: inherit;
	font-size: 28px;
	line-height: 1;
	text-decoration: none;
}

.evapi-bulle__cadre {
	flex: 1;
	width: 100%;
	border: 0;
}

@media (max-width: 600px) {
	.evapi-bulle__bouton {
		right: 14px;
		bottom: 14px;
		padding: 14px;
	}

	.evapi-bulle__libelle {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.evapi-bulle__panneau {
		width: 100vw;
		height: 100vh;
		height: 100dvh;
		border-radius: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.evapi-bulle__bouton {
		transition: none;
	}
}
