/* ============================================================
   CD — FAQ (grille / liste / accordéon)
   ------------------------------------------------------------
   Accordéon = <details>/<summary> natif. Le JS ne sert qu'à
   l'option « un seul ouvert à la fois ».
   ============================================================ */

.ck-faq {
	--ck-faq-qa-gap: 12px;
	--ck-faq-row-gap: 32px;
	--ck-faq-col-gap: 48px;
	--ck-faq-cols: 2;
	--ck-faq-divider: #e4e4e7;
}

.ck-faq__list {
	display: grid;
	gap: var(--ck-faq-row-gap) var(--ck-faq-col-gap);
}

/* Grille + accordéon : N colonnes réglables (1 colonne = une simple liste). */
.ck-faq--grid .ck-faq__list,
.ck-faq--accordion .ck-faq__list {
	grid-template-columns: repeat(var(--ck-faq-cols), minmax(0, 1fr));
}
/* En multi-colonnes, chaque item accordéon reste autonome en hauteur. */
.ck-faq--accordion .ck-faq__item { align-self: start; }

/* Question / réponse — hérite la typo par défaut (thème), surchargée par Elementor. */
.ck-faq__q {
	margin: 0 0 var(--ck-faq-qa-gap);
	font-weight: 700;
	line-height: 1.3;
}
.ck-faq__a {
	margin: 0;
	line-height: 1.6;
}
.ck-faq__a > :first-child { margin-top: 0; }
.ck-faq__a > :last-child { margin-bottom: 0; }

/* Séparateurs entre questions (grille). */
.ck-faq--dividers.ck-faq--grid .ck-faq__item {
	border-bottom: 1px solid var(--ck-faq-divider);
	padding-bottom: var(--ck-faq-row-gap);
}

/* ---------------------------- Accordéon ---------------------------- */
.ck-faq--accordion .ck-faq__item {
	border-bottom: 1px solid var(--ck-faq-divider);
}
.ck-faq--accordion .ck-faq__summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	cursor: pointer;
	padding: var(--ck-faq-row-gap, 20px) 0;
	list-style: none;               /* retire le triangle par défaut */
	user-select: none;
}
.ck-faq--accordion .ck-faq__summary::-webkit-details-marker { display: none; }
.ck-faq--accordion .ck-faq__q { margin: 0; }

.ck-faq__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	transition: transform .25s ease;
}
.ck-faq__icon svg { width: 22px; height: 22px; display: block; }
.ck-faq__icon i { font-size: 20px; line-height: 1; }

/* Une seule icône → elle pivote à l'ouverture. */
.ck-faq--accordion .ck-faq__item[open] .ck-faq__icon--rotate { transform: rotate(180deg); }

/* Deux icônes (fermée / ouverte) → bascule sans rotation. */
.ck-faq__icon--open { display: none; }
.ck-faq--accordion .ck-faq__item[open] .ck-faq__icon--closed { display: none; }
.ck-faq--accordion .ck-faq__item[open] .ck-faq__icon--open { display: inline-flex; }

.ck-faq--accordion .ck-faq__a {
	padding: 0 0 var(--ck-faq-row-gap, 20px);
}

/* Accordéon : on retire le double séparateur créé par --dividers (déjà bordé). */
.ck-faq--dividers.ck-faq--accordion .ck-faq__item { padding-bottom: 0; }
