/* =========================================================
   1.9 : bannière animée, bandeaux en parallaxe, cartes animées
   Tout est désactivé si le visiteur a réduit les animations.
   ========================================================= */

/* ---------- 1. Bannière : photos en fondu + léger zoom ---------- */
.hero-right .ab-hero-slides { position: absolute; inset: 0; z-index: 0; touch-action: pan-y; }
.ab-hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s ease; }
.ab-hero-slide.is-active { opacity: 1; }
.ab-hero-slide .hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1); }
.ab-hero-slide.is-active .hero-photo { animation: ab-souffle 9s ease-out forwards; }
.ab-hero-slide:nth-child(odd) .hero-photo { transform-origin: 30% 40%; }
.ab-hero-slide:nth-child(even) .hero-photo { transform-origin: 70% 60%; }
@keyframes ab-souffle { from { transform: scale(1); } to { transform: scale(1.09); } }
.hero-right::after { z-index: 1; }
.ab-hero-dots { position: absolute; right: 16px; bottom: 14px; z-index: 2; display: flex; gap: 4px; }
.ab-hero-dot { width: 28px; height: 28px; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.ab-hero-dot::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .6); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); transition: transform .3s ease, background .3s ease; }
.ab-hero-dot.is-active::before { background: #fff; transform: scale(1.3); }
.ab-hero-dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 50%; }

/* ---------- 2. Bandeau photo en parallaxe ---------- */
.entry-content > .ab-parallaxe,
.ab-parallaxe {
	position: relative;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	height: clamp(260px, 42vw, 460px);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 4rem;
	margin-bottom: 0;
	background: #2c3e50;
	isolation: isolate;
}
.ab-parallaxe > .wp-block-group__inner-container {
	position: static;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 !important;
}
.ab-parallaxe .wp-block-image { position: absolute; left: 0; right: 0; top: -15%; height: 130%; margin: 0 !important; z-index: -2; will-change: transform; }
.ab-parallaxe .wp-block-image img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.ab-parallaxe::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(20, 30, 36, .22), rgba(20, 30, 36, .48)); }
.ab-parallaxe .ab-parallaxe-texte {
	margin: 0 !important;
	padding: 0 1.5rem;
	max-width: 30ch;
	text-align: center;
	color: #fff;
	font-family: "Cormorant Garamond", Georgia, serif;
	font-style: italic;
	font-weight: 500;
	font-size: clamp(1.6rem, 4.2vw, 2.7rem);
	line-height: 1.2;
	text-shadow: 0 2px 14px rgba(0, 0, 0, .4);
}
.ab-js .ab-parallaxe .ab-parallaxe-texte { opacity: 0; transform: translateY(16px); transition: opacity 1.2s ease, transform 1.2s ease; }
.ab-js .ab-parallaxe.is-visible .ab-parallaxe-texte { opacity: 1; transform: none; }
.entry-content > .ab-parallaxe + * { margin-top: 4rem; }

/* ---------- 3. Cartes animées ---------- */
.ab-card, .ab-atelier, .ab-conseil {
	transition: transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .45s ease;
	overflow: hidden;
}
.ab-card::before, .ab-atelier::before, .ab-conseil::before {
	content: "";
	position: absolute;
	left: 0; right: 0; top: 0;
	height: 4px;
	background: #7fcfb3;
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .5s ease;
	z-index: 2;
}
.ab-card, .ab-atelier, .ab-conseil { position: relative; }
.ab-card .ab-card-photo img, .ab-conseil .ab-conseil-image img { transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.ab-card .ab-ico::before, .ab-atelier .ab-ico::before { transition: transform .6s cubic-bezier(.3, 1.6, .5, 1); }
.ab-more a::after { display: inline-block; transition: transform .4s ease; }

@media (hover: hover) {
	.ab-card:hover, .ab-atelier:hover, .ab-conseil:hover { transform: translateY(-8px); box-shadow: 0 18px 38px rgba(44, 62, 80, .16); }
	.ab-card:hover::before, .ab-atelier:hover::before, .ab-conseil:hover::before { transform: scaleX(1); }
	.ab-card:hover .ab-card-photo img, .ab-conseil:hover .ab-conseil-image img { transform: scale(1.07); }
	.ab-card:hover .ab-ico::before, .ab-atelier:hover .ab-ico::before { transform: rotate(-12deg) scale(1.15); }
	.ab-card:hover .ab-more a::after { transform: translateX(5px); }
}
/* Écrans tactiles : léger effet au toucher */
.ab-card.is-touched, .ab-atelier.is-touched, .ab-conseil.is-touched { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(44, 62, 80, .14); }
.ab-card.is-touched::before, .ab-atelier.is-touched::before, .ab-conseil.is-touched::before { transform: scaleX(1); }
.ab-card.is-touched .ab-ico::before { transform: rotate(-12deg) scale(1.15); }

/* Arrivée en cascade au défilement */
.ab-js .ab-cascade { opacity: 0; translate: 0 24px; transition: transform .45s cubic-bezier(.2, .7, .2, 1), box-shadow .45s ease, opacity .8s ease, translate .8s cubic-bezier(.2, .7, .2, 1); }
.ab-js .ab-cascade.is-in { opacity: 1; translate: 0 0; }

/* ---------- Animations réduites ---------- */
@media (prefers-reduced-motion: reduce) {
	.ab-hero-slide { transition: none; }
	.ab-hero-slide.is-active .hero-photo { animation: none; }
	.ab-parallaxe .wp-block-image { top: 0; height: 100%; transform: none !important; }
	.ab-js .ab-parallaxe .ab-parallaxe-texte { opacity: 1; transform: none; transition: none; }
	.ab-card, .ab-atelier, .ab-conseil, .ab-card *, .ab-card::before, .ab-atelier::before, .ab-conseil::before { transition: none !important; }
	.ab-card:hover, .ab-atelier:hover, .ab-conseil:hover, .ab-card.is-touched, .ab-atelier.is-touched, .ab-conseil.is-touched { transform: none; }
	.ab-js .ab-cascade { opacity: 1; translate: 0 0; }
}

/* =========================================================
   1.10 : exercice de respiration, compte à rebours des ateliers
   ========================================================= */
.ab-respiration { text-align: center; margin-top: 4rem; }
.ab-respiration-intro { max-width: 46ch; margin: 0 auto 1.5rem; }
.ab-respiration-scene { position: relative; width: min(300px, 74vw); aspect-ratio: 1; margin: 0 auto; }
.ab-respiration-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ab-ring-fond { fill: none; stroke: rgba(127, 207, 179, .2); stroke-width: 4; }
.ab-ring-progres { fill: none; stroke: #7fcfb3; stroke-width: 4; stroke-linecap: round; stroke-dasharray: 351.86; stroke-dashoffset: 351.86; }
.ab-respiration-bulle {
	position: absolute; inset: 12%;
	border-radius: 50%;
	background: radial-gradient(circle at 35% 30%, #e9f8f2 0%, #bfe8d8 45%, #8fd3bb 100%);
	box-shadow: 0 10px 40px rgba(95, 191, 166, .35), inset 0 -8px 24px rgba(31, 107, 85, .12);
	transform: scale(.55);
	transition: transform 5s cubic-bezier(.45, 0, .55, 1);
}
.ab-respiration.is-inspire .ab-respiration-bulle { transform: scale(1); }
.ab-respiration.is-expire .ab-respiration-bulle { transform: scale(.55); }
.ab-respiration-consigne {
	position: absolute; inset: 0; margin: 0 !important;
	display: grid; place-items: center;
	font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; font-weight: 600;
	font-size: clamp(1.4rem, 5vw, 1.9rem); color: #1f4f43;
	pointer-events: none;
}
.ab-respiration-temps { margin: 1rem 0 0; font-weight: 700; letter-spacing: .08em; color: #5b6b75; font-variant-numeric: tabular-nums; }
.ab-respiration-actions { margin-top: 1rem; }
.ab-respiration-actions .btn { min-width: 11rem; min-height: 48px; color: #fff; }
.ab-respiration-fin { margin-top: 1.5rem; }
.ab-respiration-fin p { margin: 0 auto .5rem; max-width: 46ch; }
.ab-respiration-cta { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: 1rem !important; }
.ab-respiration-cta .btn { min-height: 48px; }
.ab-respiration-cta .btn-primary { color: #fff; }

/* Ateliers : compte à rebours + places qui pulsent */
.ab-atelier { padding-top: 3.25rem !important; }
.ab-atelier-countdown {
	position: absolute; top: 1rem; right: 1rem; z-index: 3;
	font-size: .8rem; font-weight: 700; letter-spacing: .02em;
	color: #1f6b55; background: #e7f5ef; border-radius: 999px; padding: .3rem .75rem;
}
.ab-atelier-countdown:empty { display: none; }
.ab-atelier-countdown.is-proche { color: #fff; background: #5fbfa6; }
.ab-atelier-places.is-urgent { animation: ab-pulse 2.2s ease-in-out infinite; }
@keyframes ab-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(47, 107, 58, .35); transform: scale(1); }
	50% { box-shadow: 0 0 0 8px rgba(47, 107, 58, 0); transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
	.ab-respiration-bulle { transition: none; transform: scale(.8); }
	.ab-respiration.is-inspire .ab-respiration-bulle, .ab-respiration.is-expire .ab-respiration-bulle { transform: scale(.8); }
	.ab-atelier-places.is-urgent { animation: none; }
}

/* =========================================================
   1.10.2 : bandeau du haut compact sur mobile
   Une ligne : réseaux | téléphone + numéro (et « Privilégier SMS » dessous) | Menu
   ========================================================= */
@media (max-width: 991.98px) {
	#mainNav { padding-top: .45rem !important; padding-bottom: .45rem !important; }
	#mainNav > .container { flex-wrap: wrap; align-items: center; row-gap: 0; }
	#mainNav > .container > .d-flex { flex: 1 1 auto; min-width: 0; margin-right: .4rem !important; gap: .5rem; flex-wrap: nowrap; }
	#mainNav .footer-social { margin-right: 0 !important; gap: .3rem; flex: none; }
	#mainNav .btn-social {
		width: 2.2rem !important; height: 2.2rem !important; margin: 0 !important; padding: 0 !important;
		display: inline-flex !important; align-items: center; justify-content: center; font-size: .95rem !important; border-width: 2px;
	}
	#mainNav .navbar-call-wrap { flex-direction: column !important; align-items: flex-start !important; gap: .1rem; margin: 0 !important; min-width: 0; }
	#mainNav .navbar-call { gap: .4rem; align-items: center; }
	#mainNav .navbar-call-icon { width: 1.9rem; height: 1.9rem; font-size: .85rem; flex: none; }
	#mainNav .navbar-call-text { display: flex !important; }
	#mainNav .navbar-call-text small { display: none !important; }
	#mainNav .navbar-call-text strong { font-size: 1rem; line-height: 1.1; white-space: nowrap; letter-spacing: .01em; }
	#mainNav .navbar-sms { margin: 0 0 0 2.3rem !important; font-size: .7rem; line-height: 1.1; gap: .3rem; white-space: nowrap; transform: none !important; }
	#mainNav .navbar-sms i { font-size: .8rem; margin: 0 !important; }
	#mainNav .navbar-toggler { flex: none; margin-left: auto; padding: .5rem .75rem !important; font-size: .8rem !important; line-height: 1.2; }
	#mainNav .navbar-collapse { flex-basis: 100%; }
}
/* Téléphones étroits : le bouton Menu ne garde que son icône */
@media (max-width: 399.98px) {
	#mainNav .footer-social { gap: .2rem; }
	#mainNav .btn-social { width: 2rem !important; height: 2rem !important; font-size: .85rem !important; }
	#mainNav > .container > .d-flex { gap: .4rem; }
	#mainNav .navbar-call-text strong { font-size: .92rem; }
	#mainNav .navbar-toggler { font-size: 0 !important; padding: .55rem .7rem !important; }
	#mainNav .navbar-toggler i { font-size: 1.1rem; margin: 0 !important; }
}
@media (max-width: 339.98px) {
	#mainNav .footer-social { display: none !important; }
}

/* =========================================================
   1.11 : effet de saison sur la bannière
   ========================================================= */
header.split-hero { position: relative; }
canvas.ab-saison { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
@media (prefers-reduced-motion: reduce) { canvas.ab-saison { display: none; } }

/* =========================================================
   1.12 : vrais avis Google qui défilent
   ========================================================= */
.ab-avis { max-width: 1100px; margin: 2rem auto 0; text-align: left; }
.ab-avis-piste {
	display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	padding: .5rem .25rem 1rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain;
}
.ab-avis-piste::-webkit-scrollbar { display: none; }
.ab-avis-piste:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 12px; }
.ab-avis-carte {
	flex: 0 0 86%; scroll-snap-align: center; margin: 0;
	background: #fff; color: #2c3e50; border-radius: 16px; padding: 1.4rem 1.4rem 1.2rem;
	box-shadow: 0 10px 28px rgba(0, 0, 0, .12); display: flex; flex-direction: column; gap: .6rem;
}
@media (min-width: 640px) { .ab-avis-carte { flex-basis: calc(50% - .5rem); scroll-snap-align: start; } }
@media (min-width: 1000px) { .ab-avis-carte { flex-basis: calc(33.333% - .67rem); } }
.ab-avis-etoiles { color: #f4b400; font-size: 1.15rem; letter-spacing: .1em; line-height: 1; }
.ab-avis-texte { margin: 0; font-size: .98rem; line-height: 1.6; }
.ab-avis-texte p { margin: 0; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.ab-avis-carte.is-open .ab-avis-texte p { -webkit-line-clamp: unset; display: block; }
.ab-avis-plus { align-self: flex-start; background: none; border: 0; padding: 0; color: #1f6b55; font-weight: 700; font-size: .9rem; text-decoration: underline; cursor: pointer; }
.ab-avis-auteur { margin-top: auto; display: flex; align-items: center; gap: .7rem; padding-top: .6rem; border-top: 1px solid #e8eef0; }
.ab-avis-auteur a, .ab-avis-auteur strong { color: #2c3e50; font-weight: 700; text-decoration: none; display: block; line-height: 1.2; }
.ab-avis-auteur small { color: #6c7a83; font-size: .8rem; }
.ab-avis-initiale { flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; display: grid; place-items: center; background: #e7f5ef; color: #1f6b55; font-weight: 800; }
.ab-avis-nav { display: flex; align-items: center; justify-content: center; gap: .75rem; margin-top: .25rem; }
.ab-avis-nav button { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .8); background: transparent; color: #fff; cursor: pointer; }
.ab-avis-nav button:hover, .ab-avis-nav button:focus-visible { background: rgba(255, 255, 255, .2); }
.ab-avis-points { display: flex; gap: .4rem; }
.ab-avis-points span { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .5); transition: transform .3s, background .3s; }
.ab-avis-points span.is-active { background: #fff; transform: scale(1.3); }
.ab-avis-source { text-align: center; font-size: .85rem; opacity: .9; margin: .75rem 0 0 !important; }
@media (prefers-reduced-motion: reduce) { .ab-avis-piste { scroll-behavior: auto; } }
