/* Amour Infini — touches de design */
:root {
	--aid-ease: cubic-bezier(.22, 1, .36, 1);
	--aid-primary: #4D2258;
	--aid-secondary: #794A84;
	--aid-lilac: #9E6CAA;
	--aid-soft: #F2DFF8;
	--aid-cream: #FDF8E2;
	--aid-gold: #FECB00;
	--aid-rose: #E4A6C4;
}

/* ---------- finitions générales ---------- */
html.aid-js { scroll-behavior: smooth; }
.aid-on { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
.aid-on .elementor-menu-anchor, .aid-on [id] { scroll-margin-top: 110px; }
.aid-on ::selection { background: var(--aid-soft); color: var(--aid-primary); }
.aid-on :focus-visible { outline: 2px solid var(--aid-lilac); outline-offset: 3px; border-radius: 6px; }
html.aid-js::-webkit-scrollbar { width: 10px; }
html.aid-js::-webkit-scrollbar-track { background: #FBF8FC; }
html.aid-js::-webkit-scrollbar-thumb { background: #D9C3E0; border-radius: 10px; border: 2px solid #FBF8FC; }
html.aid-js::-webkit-scrollbar-thumb:hover { background: var(--aid-lilac); }

/* ---------- barre de progression ---------- */
.aid-progress {
	position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100000; pointer-events: none;
	transform-origin: 0 50%; transform: scaleX(0);
	background: linear-gradient(90deg, var(--aid-lilac), var(--aid-rose) 55%, var(--aid-gold));
	box-shadow: 0 0 10px rgba(228, 166, 196, .45);
}
.admin-bar .aid-progress { top: 32px; }

/* ---------- en-tête vitré ---------- */
.aid-on .aid-header {
	position: sticky; top: 0; z-index: 9990;
	transition: background-color .6s var(--aid-ease), box-shadow .6s var(--aid-ease), -webkit-backdrop-filter .6s, backdrop-filter .6s;
}
.admin-bar.aid-on .aid-header { top: 32px; }
.aid-on .aid-header.is-scrolled {
	background-color: rgba(255, 255, 255, .8) !important;
	-webkit-backdrop-filter: saturate(160%) blur(16px);
	backdrop-filter: saturate(160%) blur(16px);
	box-shadow: 0 1px 0 rgba(77, 34, 88, .06), 0 14px 34px -18px rgba(77, 34, 88, .25);
}
@media (max-width: 782px) {
	.admin-bar.aid-on .aid-header { top: 0; }
	.admin-bar .aid-progress { top: 0; }
}

/* halo doux du bouton « Ouverture » */
.aid-on .menu-bouton-ouverture > a.elementor-item { animation: aidGlow 3.4s ease-in-out infinite; }
@keyframes aidGlow {
	0%, 100% { box-shadow: 0 4px 12px rgba(254, 203, 0, .35), 0 0 0 0 rgba(254, 203, 0, .45); }
	55% { box-shadow: 0 4px 12px rgba(254, 203, 0, .35), 0 0 0 9px rgba(254, 203, 0, 0); }
}

/* ---------- apparitions ---------- */
.aid-on .aid-reveal {
	opacity: 0; transform: translate3d(0, 22px, 0); filter: blur(5px);
	transition: opacity 1s var(--aid-ease), transform 1.15s var(--aid-ease), filter 1s ease;
	will-change: opacity, transform;
}
.aid-on .aid-reveal.elementor-widget-video, .aid-on .aid-reveal.elementor-widget-shortcode { filter: none; }
.aid-on .aid-reveal.is-in { opacity: 1; transform: none; filter: none; }

/* Animations d'entrée d'Elementor adoucies */
.aid-on .elementor-element.animated.fadeIn,
.aid-on .elementor-element.animated.fadeInUp,
.aid-on .elementor-element.animated.fadeInDown,
.aid-on .elementor-element.animated.fadeInLeft,
.aid-on .elementor-element.animated.fadeInRight {
	animation-name: aidSoftIn;
	animation-duration: 1.2s;
	animation-timing-function: var(--aid-ease);
	animation-fill-mode: backwards;
}
@keyframes aidSoftIn {
	from { opacity: 0; transform: translate3d(0, 20px, 0); filter: blur(6px); }
	to { opacity: 1; transform: none; filter: none; }
}

/* titres dévoilés mot à mot */
.aid-split .aid-w { display: inline-block; overflow: hidden; vertical-align: top; padding: .1em 0 .16em; margin: -.1em 0 -.16em; }
.aid-split .aid-wi { display: inline-block; transform: translate3d(0, 108%, 0); transition: transform 1.15s var(--aid-ease); transition-delay: calc(var(--i, 0) * 60ms); }
.aid-split.is-words-in .aid-wi { transform: none; }

/* ---------- boutons ---------- */
.aid-on .elementor-button {
	position: relative; overflow: hidden; isolation: isolate;
	transition: transform .45s var(--aid-ease), box-shadow .45s var(--aid-ease), background-color .35s ease, color .35s ease;
}
.aid-on .elementor-button::after {
	content: ''; position: absolute; top: 0; left: -70%; width: 45%; height: 100%; z-index: 1; pointer-events: none;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .38), transparent);
	transform: skewX(-20deg); transition: left .9s var(--aid-ease);
}
.aid-on .elementor-button:not(.aid-static):hover { transform: translateY(-2px); box-shadow: 0 12px 26px -12px rgba(77, 34, 88, .5); }
.aid-on .elementor-button:not(.aid-static):hover::after { left: 125%; }
.aid-on .elementor-button.aid-static::after { display: none; }

/* ---------- cartes ---------- */
.aid-on .aid-card { transition: transform .6s var(--aid-ease), box-shadow .6s var(--aid-ease); }
.aid-on .aid-card:hover { transform: translateY(-4px); box-shadow: 0 22px 44px -24px rgba(77, 34, 88, .35); }
.aid-on .elementor-widget-call-to-action .elementor-cta { transition: transform .6s var(--aid-ease), box-shadow .6s var(--aid-ease); border-radius: 18px; }
.aid-on .elementor-widget-call-to-action .elementor-cta:hover { transform: translateY(-4px); box-shadow: 0 24px 46px -24px rgba(77, 34, 88, .4); }
.aid-on .elementor-widget-call-to-action .elementor-cta__bg { transition: transform 1.4s var(--aid-ease) !important; }
.aid-on .elementor-widget-call-to-action .elementor-cta:hover .elementor-cta__bg { transform: scale(1.06); }
.aid-on .elementor-widget-icon-box .elementor-icon { transition: transform .6s var(--aid-ease); }
.aid-on .elementor-widget-icon-box:hover .elementor-icon { transform: translateY(-3px) scale(1.06); }

/* ---------- séparateur orné ---------- */
.aid-on .aid-divider .elementor-divider { position: relative; }
.aid-on .aid-divider__heart {
	position: absolute; left: 50%; top: 50%; width: 38px; height: 22px; transform: translate(-50%, -50%);
	display: grid; place-items: center; background: #fff; color: var(--aid-lilac);
}
.aid-on .aid-divider__heart svg { width: 16px; height: 16px; fill: currentColor; animation: aidBeat 2.8s ease-in-out infinite; }
@keyframes aidBeat { 0%, 60%, 100% { transform: scale(1); } 20% { transform: scale(1.18); } 40% { transform: scale(1.04); } }

/* ---------- le logo n'est jamais animé ---------- */
.aid-on .elementor-element.animated:has(img[src*="logo" i]) { animation: none !important; }

/* ---------- cœurs flottants ---------- */
.aid-on .aid-has-hearts { position: relative; isolation: isolate; }
.aid-hearts { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; border-radius: inherit; }
.aid-heart { position: absolute; display: block; opacity: 0; animation-name: aidFloat; animation-timing-function: ease-in-out; animation-iteration-count: infinite; }
.aid-heart svg { width: 100%; height: 100%; display: block; fill: currentColor; }
.aid-heart.is-outline svg { fill: none; stroke: currentColor; stroke-width: 1.6; }
@keyframes aidFloat {
	0% { transform: translate3d(0, 40px, 0) rotate(-8deg) scale(.85); opacity: 0; }
	15% { opacity: var(--o, .2); }
	50% { transform: translate3d(var(--sx, 12px), -70px, 0) rotate(7deg) scale(1); }
	85% { opacity: var(--o, .2); }
	100% { transform: translate3d(0, -170px, 0) rotate(-5deg) scale(.92); opacity: 0; }
}

/* petits cœurs au clic */
.aid-burst {
	position: fixed; width: 12px; height: 12px; margin: -6px 0 0 -6px; z-index: 100001; pointer-events: none;
	animation: aidBurst .9s var(--aid-ease) forwards;
}
.aid-burst svg { width: 100%; height: 100%; display: block; fill: currentColor; }
@keyframes aidBurst {
	0% { transform: translate3d(0, 0, 0) scale(.3); opacity: 1; }
	70% { opacity: .9; }
	100% { transform: translate3d(var(--dx), var(--dy), 0) scale(1); opacity: 0; }
}

/* ---------- retour en haut ---------- */
.aid-on button.aid-top {
	position: fixed; left: 22px; bottom: 22px; z-index: 9998;
	width: 46px; height: 46px; padding: 0; margin: 0; border-radius: 50%;
	display: grid; place-items: center; cursor: pointer;
	border: 1px solid rgba(158, 108, 170, .28); background: rgba(253, 248, 226, .92); color: var(--aid-primary);
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	box-shadow: 0 12px 28px -12px rgba(77, 34, 88, .4);
	opacity: 0; transform: translateY(14px) scale(.9); pointer-events: none;
	transition: opacity .5s var(--aid-ease), transform .5s var(--aid-ease), background-color .3s ease, color .3s ease;
}
.aid-on button.aid-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.aid-on button.aid-top:hover, .aid-on button.aid-top:focus-visible { background: var(--aid-primary); color: var(--aid-cream); }
.aid-on button.aid-top svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s var(--aid-ease); }
.aid-on button.aid-top:hover svg { transform: translateY(-2px); }

/* ---------- annuaire : la carte collante passe sous l'en-tête vitré ---------- */
@media (min-width: 901px) {
	.aid-on .aia-mapwrap { top: 108px; }
	.admin-bar.aid-on .aia-mapwrap { top: 140px; }
	.aid-on .aia-map { height: calc(100vh - 140px); }
	.admin-bar.aid-on .aia-map { height: calc(100vh - 172px); }
}

/* ---------- mouvement réduit ---------- */
@media (prefers-reduced-motion: reduce) {
	html.aid-js { scroll-behavior: auto; }
	.aid-on .aid-reveal, .aid-on .aid-split .aid-wi { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
	.aid-on .menu-bouton-ouverture > a.elementor-item, .aid-heart, .aid-on .aid-divider__heart svg { animation: none !important; }
	.aid-hearts { display: none; }
}
