/*
 Theme Name: Astra Child (Eden de Lilie)
 Template: astra
 Version: 1.0
*/

/* donné à une Section Elementor : classe "hero-eden" */
.hero-eden {
	background: #b67c3b; /* terre de sienne dorée */
	color: #fff;
	padding: clamp(3rem, 7vw, 7rem) 1.25rem;
}
.hero-eden .elementor-button {
	border-radius: 9999px !important;
}

/* Base : tout élément .reveal est invisible et légèrement décalé */
.reveal {
	opacity: 0;
	transform: translate3d(0, 24px, 0);
	transition: opacity 0.6s ease, transform 0.6s ease;
	will-change: opacity, transform; /* perf */
}

/* Quand l'élément entre dans le viewport, on lui ajoute .in */
.reveal.in {
	opacity: 1;
	transform: none;
}

/* Variantes directionnelles (tu empiles avec .reveal) */
.reveal-up {
	transform: translate3d(0, 24px, 0);
}
.reveal-down {
	transform: translate3d(0, -24px, 0);
}
.reveal-left {
	transform: translate3d(24px, 0, 0);
}
.reveal-right {
	transform: translate3d(-24px, 0, 0);
}
.reveal-zoom {
	transform: scale(0.96);
}

/* Groupe avec cascade (stagger) : applique .reveal-group au conteneur */
.reveal-group > * {
	opacity: 0;
	transform: translate3d(0, 16px, 0);
	transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-group.in > * {
	opacity: 1;
	transform: none;
}
/* Delays progressifs pour les 8 premiers enfants */
.reveal-group.in > *:nth-child(1) {
	transition-delay: 0ms;
}
.reveal-group.in > *:nth-child(2) {
	transition-delay: 120ms;
}
.reveal-group.in > *:nth-child(3) {
	transition-delay: 240ms;
}
.reveal-group.in > *:nth-child(4) {
	transition-delay: 360ms;
}
.reveal-group.in > *:nth-child(5) {
	transition-delay: 480ms;
}
.reveal-group.in > *:nth-child(6) {
	transition-delay: 600ms;
}
.reveal-group.in > *:nth-child(7) {
	transition-delay: 720ms;
}
.reveal-group.in > *:nth-child(8) {
	transition-delay: 840ms;
}

/* Accessibilité : respect du “réduire les animations” */
@media (prefers-reduced-motion: reduce) {
	.reveal,
	.reveal-group > * {
		transition: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}

/* ===== Back to top — Font Awesome ===== */
.back-to-top {
	/* Réglages rapides */
	--btt-size: 48px; /* diamètre */
	--btt-offset: 16px; /* marge bord écran */
	--btt-bg: rgba(217, 158, 137, 0.65); /* fond normal */
	--btt-bg-hover: rgba(242, 178, 121, 0.8); /* fond hover */
	--btt-fg: #fff; /* couleur icône */
	--btt-fg-hover: #964a24;

	position: fixed;
	right: calc(var(--btt-offset) + env(safe-area-inset-right));
	bottom: calc(var(--btt-offset) + env(safe-area-inset-bottom));
	width: var(--btt-size);
	height: var(--btt-size);
	border: 0;
	border-radius: 9999px;
	background: var(--btt-bg);
	color: var(--btt-fg);
	display: grid;
	place-items: center;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
	z-index: 100002;
	overflow: hidden;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	padding: 0;
	appearance: none;
	-webkit-appearance: none;
}

/* caché par défaut quand [hidden] est présent */
.back-to-top[hidden] {
	display: none !important;
}

/* affichage contrôlé par le JS */
.back-to-top.show {
	opacity: 1;
	transform: translateY(0);
}

/* états d’interaction */
.back-to-top:hover {
	background: var(--btt-bg-hover);
	color: var(--btt-fg-hover) !important;
}
.back-to-top:focus,
.back-to-top:active {
	background: var(--btt-bg);
	color: var(--btt-fg-hover) !important;
}
.back-to-top:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Icône Font Awesome : taille, centrage, pas d’événements */
.back-to-top i {
	/* l'icône prend ~56% du diamètre de la pastille */
	font-size: calc(var(--btt-size) * 0.56);
	line-height: 1; /* pas de ligne qui déborde */
	width: 1em; /* boîte carrée basée sur la font-size */
	height: 1em;
	display: grid; /* et on centre l’intérieur (glyph) */
	place-items: center;
	pointer-events: none; /* clic = bouton, pas l'icône */
	/* micro-nudge optique si besoin : décommente et ajuste -1px / 0 / +1px */
	/* transform: translateY(-1px); */
}

/* tactile : pas de hover “collant” */
@media (hover: none) {
	.back-to-top:hover {
		background: var(--btt-bg);
	}
}

/* mobile (optionnel) */
@media (max-width: 768px) {
	.back-to-top {
		--btt-size: 44px;
		--btt-offset: 14px;
	}
}

/* Accessibilité : réduit animations */
@media (prefers-reduced-motion: reduce) {
	.back-to-top {
		transition: none;
		transform: none;
		opacity: 1;
	}
}

/* ===== Astra mobile dropdown -> plein écran stylé ===== */

/* 1) Quand le menu est ouvert, on empêche le scroll de la page */
body.menu-open {
	overflow: hidden;
}

/* 2) Le conteneur mobile couvre 100% de l’écran pendant l’ouverture */
body.menu-open .ast-mobile-header-content {
	position: fixed;
	inset: 0;
	z-index: 100000; /* au-dessus du reste */
	display: block !important; /* force l’affichage du bloc dropdown */
}

/* 3) Fond de l’overlay (couleur pleine) */
body.menu-open .ast-mobile-header-content::before {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--menu-overlay-bg);
}

/* 4) Panneau de navigation centré */
body.menu-open .ast-mobile-header-content .main-header-bar-navigation,
body.menu-open nav#ast-mobile-site-navigation {
	position: relative;
	z-index: 100001;
	display: block !important;
	width: min(92vw, 720px);
	margin: 0 auto;
	height: 100%;
	display: flex !important;
	align-items: center;
	justify-content: center;
}

/* 5) La liste du sommaire en colonne, centrée */
body.menu-open #ast-hf-mobile-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
	display: flex !important;
	flex-direction: column;
	align-items: center;
}

/* 6) Liens gros/gras/centrés + séparateurs */
body.menu-open #ast-hf-mobile-menu > li > a.menu-link {
	color: var(--menu-overlay-fg) !important;
	text-decoration: none;
	font-weight: 700;
	font-size: clamp(1.4rem, 3.8vw, 2rem);
	line-height: 1.35;
	text-align: center;
	display: block;
	padding: 14px 0;
	width: 100%;
}

body.menu-open #ast-hf-mobile-menu > li + li {
	border-top: 1px solid var(--menu-overlay-sep);
	width: 100%;
}

/* 7) Bouton “croix” visible et correctement positionné */
/* ===== Astra mobile toggle: burger/croix correct ===== */
.ast-mobile-header-wrap .mobile-menu-toggle-icon .ast-menu-svg {
	display: inline-block;
}
.ast-mobile-header-wrap .mobile-menu-toggle-icon .ast-close-svg {
	display: none;
}

/* Quand le menu est ouvert, on cache le burger et on montre la croix */
.ast-mobile-header-wrap .menu-toggle[aria-expanded='true'] .ast-menu-svg,
.ast-mobile-header-wrap .menu-toggle.toggled .ast-menu-svg {
	display: none;
}

.ast-mobile-header-wrap .menu-toggle[aria-expanded='true'] .ast-close-svg,
.ast-mobile-header-wrap .menu-toggle.toggled .ast-close-svg {
	display: inline-block;
}

.ast-mobile-header-wrap .menu-toggle.main-header-menu-toggle {
	position: relative;
	z-index: 100002;
}

body.menu-open .menu-toggle.main-header-menu-toggle {
	position: fixed;
	top: 16px;
	right: 16px;
	color: var(--menu-overlay-fg);
}

/* Accessibilité : si l’utilisateur préfère réduire les animations, pas d’anim ici */
@media (prefers-reduced-motion: reduce) {
	body.menu-open * {
		scroll-behavior: auto;
	}
}

/* ===== Dropdown mobile Astra -> overlay plein écran ===== */
:root {
	--menu-overlay-bg: #b67c3b; /* ← ta couleur d’arrière-plan */
	--menu-overlay-fg: #ffffff; /* couleur du texte/icone */
	--menu-overlay-sep: rgba(255, 255, 255, 0.25); /* séparateur entre items */
}

/* Verrouille le scroll de la page quand le menu est ouvert */
body.menu-open {
	overflow: hidden;
}

/* Le conteneur mobile couvre tout l'écran */
body.menu-open .ast-mobile-header-content {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: block !important; /* force l'affichage du block dropdown */
}

/* Fond plein écran */
body.menu-open .ast-mobile-header-content::before {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--menu-overlay-bg);
}

/* Le nav est centré verticalement/horizontalement et scrollable si besoin */
body.menu-open nav#ast-mobile-site-navigation {
	position: relative;
	z-index: 100001;
	width: min(92vw, 720px);
	margin: 0 auto;
	min-height: 100dvh; /* viewport mobile fiable */
	display: flex !important;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: calc(env(safe-area-inset-top) + 24px) 0 calc(env(safe-area-inset-bottom) + 24px);
	overflow: auto; /* si beaucoup d’items */
}

/* Liste du sommaire (colonne centrée) */
body.menu-open #ast-hf-mobile-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100%;
	display: flex !important;
	flex-direction: column;
	align-items: center;
}

/* Chaque item prend toute la largeur cliquable */
body.menu-open #ast-hf-mobile-menu > li {
	width: 100%;
}

/* Liens : grosse typo, gras, centrés — même fond que l’overlay */
body.menu-open #ast-hf-mobile-menu > li > a.menu-link {
	color: var(--menu-overlay-fg) !important;
	background: transparent !important; /* pas de dalle plus claire */
	text-decoration: none;
	font-weight: 800;
	text-align: center;
	display: block;
	padding: 18px 0; /* ↑ plus d’espace */
	font-size: clamp(1.4rem, 4.2vw, 2.2rem);
	line-height: 1.35;
}

/* Séparateur entre items (même palette) */
body.menu-open #ast-hf-mobile-menu > li + li {
	border-top: 1px solid var(--menu-overlay-sep);
}

/* États : toujours même fond (transparent) et même couleur de texte */
body.menu-open #ast-hf-mobile-menu > li > a.menu-link:hover,
body.menu-open #ast-hf-mobile-menu > li > a.menu-link:focus,
body.menu-open #ast-hf-mobile-menu > li.current-menu-item > a.menu-link {
	background: transparent !important;
	color: var(--menu-overlay-fg) !important;
}

/* Le bouton toggle devient une croix en haut à droite, bien visible */
body.menu-open .menu-toggle.main-header-menu-toggle {
	position: fixed;
	top: 16px;
	right: 16px;
	z-index: 100002;
	color: var(--menu-overlay-fg);
}
