/* Bulle WhatsApp flottante du secrétariat — module inc/whatsapp-chat.
   Le dépôt ne contient pas les sources SCSS du thème : CSS écrit ici, à part de index.css. */

.hayat-wa {
	--wa-right: 24px;
	--wa-bottom: 24px;
	position: fixed;
	right: var(--wa-right);
	bottom: var(--wa-bottom);
	z-index: 9990;
	font-family: Poppins, sans-serif;
	line-height: 1.4;
}

.hayat-wa *,
.hayat-wa *::before,
.hayat-wa *::after {
	box-sizing: border-box;
}

/* Accueil : centrée au-dessus du rond « RDV en ligne » (.fixed-btn : 114 px, top 85vh, right 128 / 70 / 20 px). */
.home .hayat-wa {
	--wa-right: 155px;
	--wa-bottom: calc(15vh + 14px);
}

@media screen and (max-width: 1600px) {
	.home .hayat-wa {
		--wa-right: 97px;
	}
}

/* Bulle */
.hayat-wa__toggle {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #25d366;
	color: #fff;
	text-decoration: none;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hayat-wa__toggle:hover {
	color: #fff;
	transform: scale(1.06);
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.hayat-wa__toggle:focus-visible,
.hayat-wa__close:focus-visible,
.hayat-wa__cta:focus-visible {
	outline: 3px solid #c32580;
	outline-offset: 3px;
}

.hayat-wa__toggle svg {
	width: 32px;
	height: 32px;
}

.hayat-wa__dot {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #e53935;
	border: 2px solid #fff;
}

.hayat-wa.is-seen .hayat-wa__dot {
	display: none;
}

/* Fenêtre */
.hayat-wa__card {
	position: absolute;
	right: 0;
	bottom: 74px;
	width: 340px;
	max-width: calc(100vw - 32px);
	border-radius: 16px;
	overflow: hidden;
	background: #efeae2;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px) scale(0.98);
	transform-origin: bottom right;
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}

.hayat-wa.is-open .hayat-wa__card {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
}

.hayat-wa__photo {
	position: relative;
	background: #075e54;
}

.hayat-wa__photo img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 660 / 260;
	max-height: 22vh;
	object-fit: cover;
	object-position: center 35%;
}

.hayat-wa__close {
	position: absolute;
	top: 8px;
	right: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	cursor: pointer;
}

.hayat-wa__close svg {
	width: 16px;
	height: 16px;
}

.hayat-wa__head {
	padding: 12px 16px 14px;
	background: #075e54;
	color: #fff;
}

.hayat-wa__title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: #fff;
}

.hayat-wa__subtitle {
	margin: 2px 0 0;
	font-size: 13px;
	line-height: 1.35;
	color: rgba(255, 255, 255, 0.88);
}

.hayat-wa__body {
	padding: 16px 16px 20px;
}

.hayat-wa__bubble {
	position: relative;
	max-width: 85%;
	margin: 0 0 0 8px;
	padding: 10px 14px;
	border-radius: 0 12px 12px 12px;
	background: #fff;
	color: #222;
	font-size: 15px;
	line-height: 1.45;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

.hayat-wa__bubble::before {
	content: "";
	position: absolute;
	top: 0;
	left: -8px;
	border-top: 10px solid #fff;
	border-left: 8px solid transparent;
}

.hayat-wa__cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: fit-content;
	margin: 18px auto 0;
	padding: 12px 22px;
	border-radius: 999px;
	background: #008069;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.hayat-wa__cta:hover {
	background: #006d59;
	color: #fff;
}

.hayat-wa__cta svg {
	width: 22px;
	height: 22px;
	flex: 0 0 22px;
}

/* Mobile : bulle dans le coin ; fenêtre ouverte en bas d'écran, sur toute la largeur
   (elle recouvre la bulle et le rond « RDV en ligne » le temps d'être ouverte). */
@media screen and (max-width: 576px) {
	.hayat-wa {
		--wa-right: 16px;
		--wa-bottom: 16px;
	}

	.home .hayat-wa {
		--wa-right: 47px;
		--wa-bottom: 148px;
	}

	.hayat-wa__card {
		position: fixed;
		left: 16px;
		right: 16px;
		bottom: 16px;
		width: auto;
		max-width: none;
		z-index: 1;
	}

	.hayat-wa__photo img {
		max-height: 20vh;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hayat-wa__toggle,
	.hayat-wa__card,
	.hayat-wa.is-open .hayat-wa__card {
		transition: none;
	}
}
