/* ========================================================
   DBL Contact Flottant – glassmorphic floating button
   ======================================================== */

/* ---- Wrapper – desktop : ancré bord droit ------------- */
.pcf-wrap {
	position: fixed;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	z-index: 9990;
}

/* ---- Bouton ------------------------------------------- */
.pcf-btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 0;
	padding: 16px 18px;
	/* Glass */
	background: rgba(26, 46, 90, 0.78);
	backdrop-filter: blur(14px) saturate(1.5);
	-webkit-backdrop-filter: blur(14px) saturate(1.5);
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-right: none;
	border-radius: 14px 0 0 14px;
	color: #fff;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	box-shadow:
		-4px 0 22px rgba(6, 12, 34, 0.32),
		inset 0 1px 0 rgba(255, 255, 255, 0.18);
	transition:
		gap .32s ease,
		background .2s ease,
		box-shadow .25s ease;
}

/* Reflet glassmorphic */
.pcf-btn::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg,
		rgba(255, 255, 255, 0.13) 0%,
		rgba(255, 255, 255, 0.03) 55%,
		transparent 100%);
	pointer-events: none;
}

.pcf-btn:hover,
.pcf-btn:focus-visible {
	background: rgba(26, 46, 90, 0.96);
	gap: 10px;
	box-shadow:
		-7px 0 34px rgba(6, 12, 34, 0.46),
		inset 0 1px 0 rgba(255, 255, 255, 0.22);
	outline: none;
}

/* ---- Icône -------------------------------------------- */
.pcf-icon {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	position: relative;
}

/* ---- Label : caché → visible au survol ---------------- */
.pcf-label {
	font-family: "Open Sans", sans-serif;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.04em;
	max-width: 0;
	opacity: 0;
	overflow: hidden;
	position: relative;
	transition: max-width .35s ease, opacity .22s ease;
}

.pcf-btn:hover .pcf-label,
.pcf-btn:focus-visible .pcf-label {
	max-width: 160px;
	opacity: 1;
}

/* ====== Mobile : barre fixe en bas ===================== */
@media (max-width: 768px) {

	.pcf-wrap {
		position: fixed; /* réaffirmé : certains thèmes réinitialisent via transform parent */
		top: auto !important;
		right: 0;
		left: 0;
		bottom: 0 !important;
		transform: none !important;
		z-index: 99990; /* au-dessus du header sticky, cookie bar, etc. */
		width: 100%;
	}

	.pcf-btn {
		width: 100%;
		justify-content: center;
		border-radius: 0;
		border: none;
		border-top: 1px solid rgba(255, 255, 255, 0.2);
		padding: 14px 20px;
		padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
		gap: 10px;
		background: rgba(26, 46, 90, 0.95);
		/* backdrop-filter désactivé sur mobile : inutile sur fond sombre opaque */
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
		box-shadow: 0 -5px 24px rgba(6, 12, 34, 0.35);
		overflow: visible; /* évite le clipping du contenu sur mobile */
	}

	/* Label toujours visible sur mobile */
	.pcf-label {
		max-width: 200px;
		opacity: 1;
		overflow: visible;
	}
}

/* ====== Modale contact flottant ========================
   Hérite des classes .propack-modal de dbl-propack.
   Les règles ci-dessous assurent l'autonomie du plugin
   si dbl-propack est absent ou chargé après.
   ======================================================= */

.pcf-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.pcf-modal.is-open {
	display: flex;
	animation: pcf-overlay-in .2s ease;
}

@keyframes pcf-overlay-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.pcf-modal .propack-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(6, 12, 34, .72);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	cursor: pointer;
}

.pcf-modal .propack-modal-box {
	position: relative;
	z-index: 1;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, .6);
	border-radius: 18px;
	box-shadow:
		0 0 0 1px rgba(255, 255, 255, .08) inset,
		0 24px 64px rgba(6, 12, 34, .28),
		0 4px 16px rgba(6, 12, 34, .12);
	width: min(580px, calc(100vw - 2rem));
	max-height: calc(100vh - 2rem);
	overflow-y: auto;
	animation: pcf-modal-in .28s cubic-bezier(.34, 1.3, .64, 1);
}

@keyframes pcf-modal-in {
	from { opacity: 0; transform: translateY(28px) scale(.95); }
	to   { opacity: 1; transform: translateY(0)     scale(1);  }
}

.pcf-modal .propack-modal-header {
	padding: 1.8em 2em 1.6em;
	background: rgba(20, 38, 80, .55);
	backdrop-filter: blur(16px) saturate(1.4);
	-webkit-backdrop-filter: blur(16px) saturate(1.4);
	border-bottom: 1px solid rgba(255, 255, 255, .12);
	border-radius: 18px 18px 0 0;
	position: relative;
	overflow: hidden;
}

.pcf-modal .propack-modal-header::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg,
		rgba(255, 255, 255, .12) 0%,
		rgba(255, 255, 255, .02) 50%,
		transparent 100%);
	pointer-events: none;
}

.pcf-modal .propack-modal-titre {
	margin: 0;
	font-family: "Montserrat", sans-serif;
	font-size: 1.15em;
	font-weight: 700;
	color: #fff;
	letter-spacing: -.01em;
	position: relative;
}

.pcf-modal .propack-modal-form {
	padding: 1.6em 2em 2em;
	background: rgba(255, 255, 255, .95);
	border-radius: 0 0 18px 18px;
}

.pcf-modal .propack-modal-close {
	position: absolute;
	top: 1em;
	right: 1em;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2em;
	height: 2em;
	background: rgba(255, 255, 255, .15);
	border: 1px solid rgba(255, 255, 255, .25);
	border-radius: 50%;
	font-size: 1.1em;
	line-height: 1;
	color: rgba(255, 255, 255, .85);
	cursor: pointer;
	padding: 0;
	z-index: 1;
	transition: background .15s, color .15s, transform .15s;
}

.pcf-modal .propack-modal-close:hover {
	background: rgba(255, 255, 255, .28);
	color: #fff;
	transform: rotate(90deg);
}
