/* =============================================================================
   OPÉRATION TEMPORAIRE — OCTOBRE ROSE 2026
   CSS autonome (volontairement hors du style.less principal, pour un retrait
   sans recompilation). Tout est préfixé .or- pour éviter tout conflit Divi.
   ========================================================================== */

/* -----------------------------------------------------------------------------
   1. POPIN
   -------------------------------------------------------------------------- */

.or-popin {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100003; /* au-dessus des popins RDV / AIDE / CONTACT (100002) */
	align-items: center;
	justify-content: center;
	padding: 30px 20px;
}

.or-popin.is-open {
	display: flex;
}

.or-popin__overlay {
	position: absolute;
	inset: 0;
	background-color: rgba(255, 255, 255, 0.9); /* même voile clair que les autres popins du site */
	cursor: pointer;
	animation: or-fade-in 0.3s ease both;
}

.or-popin__dialog {
	position: relative;
	max-width: 100%;
	max-height: 100%;
	animation: or-zoom-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.or-popin__visuel {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: calc(100vh - 60px);
	border-radius: 6px;
	box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

/* Croix de fermeture */
.or-popin__close {
	position: absolute;
	top: -16px;
	right: -16px;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: #ffffff;
	color: #D85197;
	font-size: 30px;
	line-height: 42px;
	text-align: center;
	cursor: pointer;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

/* Survol réservé aux appareils à souris (sinon l'état reste « collé » au tactile),
   et :focus-visible au lieu de :focus pour qu'un focus programmatique ou un clic
   ne laisse pas la croix en rose à la réouverture. */
@media (hover: hover) {
	.or-popin__close:hover {
		background-color: #D85197;
		color: #ffffff;
		transform: rotate(90deg);
	}
}

.or-popin__close:focus {
	outline: none;
}

.or-popin__close:focus-visible {
	background-color: #D85197;
	color: #ffffff;
	outline: 3px solid #D85197;
	outline-offset: 3px;
}

/* Le focus initial est posé sur la boîte de dialogue elle-même (tabindex="-1") */
.or-popin__dialog:focus {
	outline: none;
}

/* Fermeture : la popin se réduit en glissant jusqu'à la bulle.
   --or-dx / --or-dy (décalage centre de l'affiche -> centre de la bulle)
   sont calculés en JS au moment de la fermeture. */
.or-popin.is-closing .or-popin__dialog {
	animation: or-shrink 0.5s cubic-bezier(0.55, 0.06, 0.68, 0.19) both;
	transform-origin: 50% 50%;
}

.or-popin.is-closing .or-popin__overlay {
	animation: or-fade-out 0.5s ease both;
}

/* -----------------------------------------------------------------------------
   2. BULLE (picto en bas à droite)
   -------------------------------------------------------------------------- */

.or-bulle {
	display: none;
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 100001;
	width: 62px;
	height: 62px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background-color: #ffffff;
	box-shadow: 0 5px 18px rgba(0, 0, 0, 0.2);
	cursor: pointer;
	align-items: center;
	justify-content: center;
	line-height: 0;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	-webkit-appearance: none;
	appearance: none;
}

.or-bulle.is-visible {
	display: flex;
	animation: or-pop-in 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@media (hover: hover) {
	.or-bulle:hover {
		transform: scale(1.08);
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
	}
}

.or-bulle:focus {
	outline: none;
}

/* Contour uniquement pour la navigation au clavier (accessibilité) */
.or-bulle:focus-visible {
	outline: 3px solid #D85197;
	outline-offset: 3px;
}

.or-bulle img {
	width: 48%;
	height: auto;
	pointer-events: none;
}

/* Le badge reCAPTCHA (Contact Form 7) est lui aussi fixé en bas à droite :
   on le remonte au-dessus de la bulle pour ne pas le masquer. Règle chargée
   uniquement sur l'accueil et pendant l'opération, donc retirée avec le dossier. */
.grecaptcha-badge {
	bottom: 96px !important;
}

/* -----------------------------------------------------------------------------
   3. ANIMATIONS
   -------------------------------------------------------------------------- */

@keyframes or-fade-in {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes or-fade-out {
	from { opacity: 1; }
	to   { opacity: 0; }
}

@keyframes or-zoom-in {
	from { opacity: 0; transform: translateY(18px) scale(0.94); }
	to   { opacity: 1; transform: none; }
}

@keyframes or-shrink {
	0%   { opacity: 1; transform: translate(0, 0) scale(1); }
	75%  { opacity: 1; }
	100% { opacity: 0; transform: translate(var(--or-dx, 0px), var(--or-dy, 0px)) scale(0.04); }
}

@keyframes or-pop-in {
	from { opacity: 0; transform: scale(0.2); }
	to   { opacity: 1; transform: scale(1); }
}

/* -----------------------------------------------------------------------------
   4. RESPONSIVE
   -------------------------------------------------------------------------- */

/* Tablette */
@media only screen and (max-width: 980px) {

	.or-popin {
		padding: 26px 18px;
	}

	.or-bulle {
		width: 58px;
		height: 58px;
		right: 18px;
		bottom: 18px;
	}

	.grecaptcha-badge {
		bottom: 88px !important;
	}
}

/* Mobile */
@media only screen and (max-width: 640px) {

	.or-popin {
		padding: 22px 14px;
	}

	.or-popin__visuel {
		max-height: calc(100vh - 44px);
	}

	.or-popin__close {
		top: -14px;
		right: -6px;
		width: 38px;
		height: 38px;
		font-size: 26px;
		line-height: 38px;
	}

	.or-bulle {
		width: 54px;
		height: 54px;
		right: 14px;
		bottom: 14px;
	}

	.grecaptcha-badge {
		bottom: 80px !important;
	}
}

/* Petits écrans en paysage : l'affiche reste entièrement visible */
@media only screen and (max-height: 520px) {

	.or-popin__visuel {
		max-height: calc(100vh - 36px);
	}
}

/* Blocage du scroll de la page derrière la popin */
body.or-popin-ouverte {
	overflow: hidden;
}

/* -----------------------------------------------------------------------------
   5. ACCESSIBILITÉ — animations réduites
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

	.or-popin__overlay,
	.or-popin__dialog,
	.or-popin.is-closing .or-popin__dialog,
	.or-popin.is-closing .or-popin__overlay,
	.or-bulle.is-visible {
		animation: none !important;
	}

	.or-popin__close,
	.or-bulle {
		transition: none;
	}
}
