/* Bouton WhatsApp flottant et barre d'action mobile — LECOSEC */

/* --- Bouton flottant (ordinateur et tablette) --- */
.lecosec-wa-flottant {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 9990;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 56px;
	padding: 0.75rem 1.1rem 0.75rem 0.9rem;
	border-radius: 999px;
	background: #157a40; /* vert WhatsApp foncé : contraste suffisant avec le texte blanc */
	color: #fff !important;
	font-weight: 500;
	text-decoration: none !important;
	box-shadow: 0 6px 18px rgba(13, 43, 110, 0.25);
	transition: transform 0.15s ease, background-color 0.15s ease;
}
.lecosec-wa-flottant:hover,
.lecosec-wa-flottant:focus-visible {
	background: #10612f;
	transform: translateY(-2px);
}
.lecosec-wa-flottant:focus-visible,
.lecosec-barre-mobile a:focus-visible {
	outline: 3px solid #1b75d0;
	outline-offset: 3px;
}
.lecosec-wa-icone {
	flex-shrink: 0;
}

/* --- Barre fixe en bas de l'écran (téléphone) : masquée sur grand écran --- */
.lecosec-barre-mobile {
	display: none;
}

@media (max-width: 781px) {
	/* Sur téléphone, la barre remplace le bouton rond. */
	.lecosec-avec-barre-mobile .lecosec-wa-flottant {
		display: none;
	}

	.lecosec-barre-mobile {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9990;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 0.5rem;
		padding: 0.5rem 0.75rem calc(0.5rem + env(safe-area-inset-bottom));
		background: #fff;
		border-top: 2px solid #dceffc;
		box-shadow: 0 -4px 14px rgba(13, 43, 110, 0.12);
	}

	.lecosec-barre-mobile a {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 0.4rem;
		min-height: 48px; /* zone tactile confortable */
		border-radius: 999px;
		color: #fff !important;
		font-weight: 500;
		font-size: 0.95rem;
		text-decoration: none !important;
		white-space: nowrap;
	}
	.lecosec-barre-mobile__wa {
		background: #157a40;
	}
	.lecosec-barre-mobile__rdv {
		background: #e31e24;
	}
	.lecosec-barre-mobile .lecosec-wa-icone {
		width: 22px;
		height: 22px;
	}
	/* Sans case « Prendre rendez-vous », le bouton WhatsApp prend toute la largeur. */
	.lecosec-barre-mobile a:only-child {
		grid-column: 1 / -1;
	}

	/* Laisse de la place sous le pied de page pour ne rien cacher. */
	body.lecosec-avec-barre-mobile {
		padding-bottom: calc(68px + env(safe-area-inset-bottom));
	}
}

/* Petit téléphone : le bouton flottant n'affiche que l'icône (si la barre est désactivée). */
@media (max-width: 480px) {
	.lecosec-wa-flottant__texte {
		display: none;
	}
	.lecosec-wa-flottant {
		padding: 0.9rem;
	}
}

/* Pas d'animation pour les personnes qui les désactivent. */
@media (prefers-reduced-motion: reduce) {
	.lecosec-wa-flottant {
		transition: none;
	}
}

/* --- Bouton WhatsApp des fiches services (vert, à côté de « Demander ce service ») --- */
.lecosec-boutons-service {
	gap: 0.75rem;
	flex-wrap: wrap;
}
.lecosec-bouton-wa .wp-element-button {
	background-color: #157a40 !important;
	color: #fff !important;
}
.lecosec-bouton-wa .wp-element-button:hover,
.lecosec-bouton-wa .wp-element-button:focus-visible {
	background-color: #10612f !important;
}
