/* ---------------------------------------------------------------------
   Caelia — Liste / Accordéon étapes
   Structure et mouvement uniquement. Couleurs, typographies et tailles
   viennent des contrôles Elementor, préfixés par {{WRAPPER}}.
   --------------------------------------------------------------------- */

.caelia-acc {
	display: flex;
	flex-direction: column;
}

.caelia-acc__item {
	transition: background-color 0.25s ease, border-color 0.25s ease,
	            box-shadow 0.25s ease;
}

/* Mode liste : séparateur sous chaque étape */
.caelia-acc--list .caelia-acc__item {
	border-bottom: 1px solid transparent;
}

/* Mode cartes : chaque étape est un bloc autonome */
.caelia-acc--cards .caelia-acc__item {
	position: relative;
	border: 1px solid transparent;
	overflow: hidden;
}

/* Trait d'accent en bas de la carte ouverte */
.caelia-acc--cards .caelia-acc__item::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background-color: transparent;
	opacity: 0;
	transition: opacity 0.25s ease;
	pointer-events: none;
}

/* --------------------------- Zone cliquable -------------------------- */

.caelia-acc__head {
	display: flex;
	align-items: center;
	width: 100%;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
	font: inherit;
	color: inherit;
	text-align: left;
	text-decoration: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;

	/* Hello Elementor force nowrap et un fond rouge sur tous les button */
	white-space: normal;
	background-color: transparent;
	box-shadow: none;
}

.caelia-acc__head:hover,
.caelia-acc__head:focus,
.caelia-acc__head:active {
	background-color: transparent;
	color: inherit;
	text-decoration: none;
}

.caelia-acc__head:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

/* Étape sans contenu dépliable ni lien : rien à cliquer */
.caelia-acc__item.is-static .caelia-acc__head {
	cursor: default;
}

/* ---------------------------- Colonnes ------------------------------- */

.caelia-acc__lead {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	line-height: 1;
	transition: color 0.25s ease, background-color 0.25s ease;
}

.caelia-acc__lead svg {
	display: block;
}

.caelia-acc__body {
	flex: 1 1 auto;
	min-width: 0;          /* sans ça le texte ne revient jamais à la ligne */
}

.caelia-acc__title {
	display: block;
	margin: 0;
	transition: color 0.25s ease;
	overflow-wrap: break-word;
}

.caelia-acc__excerpt {
	display: block;
	transition: color 0.25s ease;
	overflow-wrap: break-word;
}

.caelia-acc__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	line-height: 1;
	transition: color 0.25s ease, transform 0.3s ease;
}

.caelia-acc__icon svg {
	display: block;
}

/* ------------------------ Panneau dépliable -------------------------- */
/*
   grid-template-rows: 0fr -> 1fr anime une hauteur automatique.
   max-height obligerait à deviner une valeur, et casse dès que le texte
   dépasse. Ici le contenu peut faire n'importe quelle longueur.
*/

.caelia-acc__panel {
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	transition-property: grid-template-rows, opacity;
	transition-duration: 350ms;
	transition-timing-function: ease;
}

.caelia-acc__panel-wrap {
	overflow: hidden;
	min-height: 0;
}

.caelia-acc__item.is-active > .caelia-acc__panel {
	grid-template-rows: 1fr;
	opacity: 1;
}

.caelia-acc__panel-inner {
	min-width: 0;
	overflow-wrap: break-word;
}

/*
   Alignement automatique du contenu déplié sous le titre.
   --caelia-indent est mesurée en JS : largeur réelle de la pastille
   plus l'espace entre colonnes. Elle se recalcule au redimensionnement,
   donc elle reste juste quand la taille de l'icône change en responsive.
*/
.caelia-acc--panel-auto .caelia-acc__panel-inner {
	padding-left: var(--caelia-indent, 0px);
}

.caelia-acc__panel-inner > *:first-child {
	margin-top: 0;
}

.caelia-acc__panel-inner > *:last-child {
	margin-bottom: 0;
}

/* Repli de secours si l'animation de grid n'est pas supportée */
@supports not (grid-template-rows: 1fr) {
	.caelia-acc__panel {
		display: block;
		height: 0;
		overflow: hidden;
	}

	.caelia-acc__item.is-active > .caelia-acc__panel {
		height: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.caelia-acc *,
	.caelia-acc *::before,
	.caelia-acc *::after {
		transition-duration: 0.01ms !important;
	}
}
