/* =========================================================
   Alsharidah Child — Boutons flottants
   Valeurs relevées dans src/app/components/FloatingActions.tsx, puis
   confrontées au CSS réellement compilé (dist/assets/index-Bm-wdw9b.css).

   Deux points qui tiennent au CSS compilé :
   - `*, :before, :after { box-shadow: none !important }` est posé hors
     couche : shadow-lg, shadow-xl et shadow-2xl du source ne donnent
     rien. Aucune ombre n'est donc écrite ici.
   - l'infobulle cumule -translate-y-1/2 et scale-90, que Tailwind réunit
     dans une seule propriété transform. Elle est écrite comme telle, et
     seul le facteur d'échelle change au survol.

   Le mode sombre du source n'est pas repris : décision prise pour
   l'ensemble du site.
   ========================================================= */

/* fixed bottom-6 end-6 z-50 flex flex-col items-center gap-3
   end- suit le sens de lecture : le bloc est à gauche de l'écran en
   arabe, à droite en anglais, sans règle supplémentaire. */
.ash-float {
	position: fixed;
	bottom: 24px;
	inset-inline-end: 24px;
	z-index: 50;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

/* ---------- Retour en haut ---------- */

/* w-11 h-11 rounded-full bg-navy text-white transition-colors
   Le source ne monte ce bouton qu'au-delà de 400px de défilement ; ici
   il est écrit une fois pour toutes et l'attribut hidden fait le même
   travail. La règle ci-dessous est explicite : sans elle, le display du
   bouton l'emporterait sur celui de la feuille du navigateur. */
.ash-float__top {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: var(--brand-navy, #0f2957);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.ash-float__top[hidden] {
	display: none;
}

.ash-float__top svg {
	display: block;
}

@media (hover: hover) {
	.ash-float__top:hover {
		background-color: var(--brand-navy-dark, #071630);
	}
}

/* ---------- WhatsApp ---------- */

/* group relative w-14 h-14 rounded-full bg-[#25D366] text-white
   transition-all hover:bg-[#1fba59] hover:scale-110 duration-300 */
.ash-float__wa {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background-color: #25d366;
	color: #fff;
	text-decoration: none;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
	.ash-float__wa:hover {
		background-color: #1fba59;
		scale: 1.1;
	}
}

/* absolute inset-0 rounded-full bg-[#25D366] + .animate-pulse-ring,
   dont la définition compilée est reprise telle quelle. */
.ash-float__ring {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background-color: #25d366;
	animation: ash-pulse-ring 2.4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes ash-pulse-ring {
	0% {
		opacity: 0.5;
		transform: scale(0.9);
	}

	100% {
		opacity: 0;
		transform: scale(1.6);
	}
}

/* w-7 h-7 relative group-hover:rotate-12 transition-transform
   position: relative est nécessaire — sans lui, l'icône se peindrait
   sous le halo, qui est positionné. */
.ash-float__wa-icon {
	position: relative;
	display: block;
	width: 28px;
	height: 28px;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
	.ash-float__wa:hover .ash-float__wa-icon {
		transform: rotate(12deg);
	}
}

/* absolute end-16 top-1/2 -translate-y-1/2 bg-[#0e1f3a]/95 text-white
   text-[11px] font-bold py-1.5 px-3.5 rounded-xl opacity-0 scale-90
   border border-white/10 whitespace-nowrap pointer-events-none

   end-16 vaut inset-inline-end: 64px. Le bouton faisant 56px de large,
   l'infobulle démarre 8px après son bord opposé au bloc : elle s'ouvre
   donc vers l'intérieur de l'écran, dans les deux sens de lecture.

   rounded-xl vaut calc(var(--radius) + 4px), soit 20px.
   text-[11px] ne fixe que la taille : la hauteur de ligne reste celle du
   corps de page, 2. */
.ash-float__tip {
	position: absolute;
	top: 50%;
	inset-inline-end: 64px;
	padding: 6px 14px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: 20px;
	background-color: rgba(14, 31, 58, 0.95);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 2;
	white-space: nowrap;
	opacity: 0;
	transform: translateY(-50%) scale(0.9);
	pointer-events: none;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (hover: hover) {
	.ash-float__wa:hover .ash-float__tip {
		opacity: 1;
		transform: translateY(-50%) scale(1);
	}
}

/* ---------- Accessibilité ---------- */

.ash-float a:focus-visible,
.ash-float button:focus-visible {
	outline: 2px solid var(--brand-green, #4caf50);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.ash-float * {
		transition: none !important;
	}

	.ash-float__ring {
		animation: none;
		opacity: 0;
	}
}
