/* ============================================================================
   Dental Ouest — WhatsApp
   Bouton flottant + sélecteur de numéros (ORAN / ALG / 3e…).
   Position, taille et couleur sont fournies par l'attribut style du bouton.
   ============================================================================ */

.dowo,
.dowo * {
	box-sizing: border-box;
}

/* ── Bouton flottant ── */
.dowo-fab {
	position: fixed;
	top: var(--dowo-top, auto);
	right: var(--dowo-right, auto);
	bottom: var(--dowo-bottom, auto);
	left: var(--dowo-left, auto);
	z-index: 960;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	height: var(--dowo-size, 46px);
	min-width: var(--dowo-size, 46px);
	max-width: calc(100vw - 16px);
	margin: 0;
	padding: 0 calc(var(--dowo-size, 46px) * 0.39);
	border: 0;
	border-radius: 999px;
	background: var(--dowo-bg, #25d366);
	color: #fff;
	font-family: var(--font-head, 'Montserrat', 'Open Sans', sans-serif);
	font-size: clamp(12px, calc(var(--dowo-size, 46px) * 0.3), 17px);
	font-weight: 800;
	letter-spacing: .2px;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: 0 10px 26px rgba(6, 20, 45, .22);
	isolation: isolate;
	transition: transform .3s cubic-bezier(.16, 1, .3, 1), box-shadow .3s, filter .3s;
}

.dowo-fab.dowo-shape-round,
.dowo-fab.dowo-icon-only {
	width: var(--dowo-size, 46px);
	padding: 0;
}

.dowo-fab.dowo-icon-only .dowo-fab-txt {
	display: none;
}

.dowo-fab,
.dowo-fab:visited,
.dowo-fab:hover,
.dowo-fab:focus,
.dowo-close,
.dowo-close:visited,
.dowo-item,
.dowo-item:visited {
	text-decoration: none;
}

.dowo-fab,
.dowo-fab:visited,
.dowo-fab:hover,
.dowo-fab:focus {
	color: #fff;
}

.dowo-backdrop {
	display: block;
	cursor: default;
}

/* Sans JavaScript : le bouton est un lien vers #dowo-modal, la fenêtre s'ouvre par :target. */
.dowo-modal:target,
.dowo-modal[hidden]:target {
	display: grid;
}

.dowo-modal:target .dowo-backdrop {
	opacity: 1;
}

.dowo-modal:target .dowo-card {
	opacity: 1;
	transform: none;
}

.dowo-fab:hover {
	transform: translateY(-3px);
	filter: brightness(.94);
	box-shadow: 0 16px 38px rgba(6, 20, 45, .3);
}

.dowo-fab:focus-visible {
	outline: 3px solid rgba(37, 211, 102, .45);
	outline-offset: 3px;
}

.dowo-fab-ico {
	display: inline-flex;
	width: var(--dowo-ico, 20px);
	height: var(--dowo-ico, 20px);
}

.dowo-fab-ico svg {
	display: block;
	width: 100%;
	height: 100%;
}

.dowo-fab-txt {
	white-space: nowrap;
}

/* ── Bouton posé à côté de « Installer l'app » (position normale, non flottante) ── */
.dowo-fab.dowo-inline {
	position: static !important;
	top: auto !important;
	right: auto !important;
	bottom: auto !important;
	left: auto !important;
	display: inline-flex !important;
	flex: 0 0 auto;
	margin: 0 !important;
	margin-inline-start: 8px !important;
	vertical-align: middle;
	max-width: none;
	z-index: auto;
	transform: none !important;
	box-shadow: none;
	animation: none;
	opacity: 1;
	pointer-events: auto;
}

.dowo-fab.dowo-inline:hover {
	transform: none !important;
	box-shadow: none;
}

.dowo-fab.dowo-inline::before {
	display: none !important;
}

.dowo-pair {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-wrap: nowrap;
	vertical-align: middle;
	max-width: 100%;
}

.dowo-pair > .dowo-fab.dowo-inline {
	margin-inline-start: 0 !important;
}

/* Tant que l'emplacement n'est pas trouvé, le bouton reste invisible.
   Avec JS actif (data-js=1) on révèle très vite ; sans JS, après 2,5 s. */
.dowo-fab.dowo-hold {
	opacity: 0;
	pointer-events: none;
	animation: dowo-reveal 0s linear 2.5s forwards;
}

.dowo[data-js="1"] .dowo-fab.dowo-hold {
	animation-delay: 0.35s;
}

.dowo-fab.dowo-hold-off {
	display: none !important;
}

@keyframes dowo-reveal {
	to {
		opacity: 1;
		pointer-events: auto;
	}
}

/* Mobile / tablette : petite icône */
@media (max-width: 900px) {
	.dowo-fab.dowo-inline {
		width: var(--dowo-size, 40px) !important;
		min-width: var(--dowo-size, 40px) !important;
		max-width: var(--dowo-size, 40px) !important;
		padding: 0 !important;
		gap: 0;
	}

	.dowo-fab.dowo-inline .dowo-fab-txt {
		display: none !important;
	}
}

/* À côté du burger (mobile) : icône compacte, bien alignée */
.dowo-fab.dowo-next-to-burger {
	width: 38px !important;
	min-width: 38px !important;
	max-width: 38px !important;
	height: 38px !important;
	padding: 0 !important;
	margin: 0 0 0 8px !important;
	margin-inline-start: 8px !important;
	border-radius: 50% !important;
	box-shadow: 0 4px 14px rgba(37, 211, 102, .35);
	flex: 0 0 auto;
}

.dowo-fab.dowo-next-to-burger .dowo-fab-txt {
	display: none !important;
}

.dowo-fab.dowo-next-to-burger .dowo-fab-ico {
	width: 20px !important;
	height: 20px !important;
}

/* Desktop : bien aligné verticalement avec le bouton Installer */
.header-cta .dowo-fab.dowo-inline,
.dowo-pair .dowo-fab.dowo-inline {
	align-self: center;
	vertical-align: middle;
}

/* ── Pulsation ── */
.dowo-fab.dowo-pulse::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	border-radius: inherit;
	background: var(--dowo-bg, #25d366);
	opacity: .45;
	animation: dowo-pulse 2.6s cubic-bezier(.4, 0, .6, 1) infinite;
	pointer-events: none;
}

@keyframes dowo-pulse {
	0% {
		transform: scale(1);
		opacity: .45;
	}
	70%,
	100% {
		transform: scale(1.55);
		opacity: 0;
	}
}

/* ── Voile + fenêtre ── */
.dowo-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: grid;
	place-items: center;
	padding: 18px;
}

.dowo-modal[hidden] {
	display: none;
}

.dowo-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(6, 20, 45, .62);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity .26s ease;
}

.dowo-card {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 400px;
	padding: 26px 24px 22px;
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 30px 80px rgba(6, 20, 45, .35);
	opacity: 0;
	transform: translateY(16px) scale(.97);
	transition: opacity .26s ease, transform .3s cubic-bezier(.16, 1, .3, 1);
}

.dowo-modal.on .dowo-backdrop {
	opacity: 1;
}

.dowo-modal.on .dowo-card {
	opacity: 1;
	transform: none;
}

/* ── Contenu ── */
.dowo-kicker {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 8px;
	font-family: var(--font-head, 'Montserrat', 'Open Sans', sans-serif);
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 1.6px;
	text-transform: uppercase;
	color: #128c7e;
}

.dowo-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #25d366;
	box-shadow: 0 0 0 4px rgba(37, 211, 102, .16);
}

.dowo-title {
	margin: 0 0 8px;
	font-family: var(--font-head, 'Montserrat', 'Open Sans', sans-serif);
	font-size: 1.35rem;
	font-weight: 800;
	line-height: 1.25;
	color: var(--navy, #0d2455);
}

.dowo-sub {
	margin: 0 0 18px;
	font-size: .88rem;
	line-height: 1.6;
	color: #5b6b85;
}

.dowo-list {
	display: grid;
	gap: 10px;
}

.dowo-item {
	display: flex;
	align-items: center;
	gap: 13px;
	padding: 12px 14px;
	border: 1px solid #e4e9f2;
	border-radius: 14px;
	background: #fff;
	color: var(--navy, #0d2455);
	text-decoration: none;
	transition: border-color .25s, transform .25s, box-shadow .25s, background .25s;
}

.dowo-item:hover,
.dowo-item:focus-visible {
	border-color: #25d366;
	background: #f5fdf8;
	outline: none;
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(37, 211, 102, .18);
}

.dowo-item-ico {
	flex: none;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #25d366;
	color: #fff;
}

.dowo-item-ico svg {
	display: block;
	width: 21px;
	height: 21px;
}

.dowo-item-txt {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.dowo-item-txt b {
	font-family: var(--font-head, 'Montserrat', 'Open Sans', sans-serif);
	font-size: .95rem;
	font-weight: 800;
	letter-spacing: .4px;
}

.dowo-item-txt small {
	font-size: .8rem;
	color: #5b6b85;
	direction: ltr;
}

.dowo-arrow {
	flex: none;
	color: #c8d2e2;
	font-size: 1rem;
	font-weight: 700;
	transition: color .25s, transform .25s;
}

.dowo-item:hover .dowo-arrow {
	color: #25d366;
	transform: translateX(3px);
}

.dowo-note {
	margin: 16px 0 0;
	font-size: .72rem;
	line-height: 1.5;
	text-align: center;
	color: #8b99ad;
}

/* ── Fermeture ── */
.dowo-close {
	position: absolute;
	top: 10px;
	inset-inline-end: 10px;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(13, 36, 85, .05);
	color: #5b6b85;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	transition: background .2s, color .2s, transform .2s;
}

.dowo-close:hover {
	background: rgba(13, 36, 85, .1);
	color: var(--navy, #0d2455);
	transform: rotate(90deg);
}

/* ── Verrouillage du fond ── */
body.dowo-lock {
	overflow: hidden;
}

/* ── Sens de lecture arabe ── */
html[lang="ar"] .dowo-arrow {
	transform: scaleX(-1);
}

html[lang="ar"] .dowo-item:hover .dowo-arrow {
	transform: scaleX(-1) translateX(3px);
}

/* ── Mobile : la fenêtre s'adapte, le bouton garde la position choisie ── */
@media (max-width: 640px) {
	.dowo-card {
		padding: 24px 18px 18px;
		border-radius: 20px;
	}

	.dowo-title {
		font-size: 1.2rem;
	}

	.dowo-item {
		padding: 11px 12px;
	}

	.dowo-item-ico {
		width: 38px;
		height: 38px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dowo-fab,
	.dowo-card,
	.dowo-backdrop,
	.dowo-item,
	.dowo-item-ico,
	.dowo-arrow {
		transition: none !important;
	}

	.dowo-fab.dowo-pulse::before {
		animation: none !important;
		opacity: 0 !important;
	}
}
