/* =========================================================================
   FAQ SCL — feuille de style
   Charte : lavande perle (#F4F1FA), violet (#7c5cff), or (#e8c372)
   Tout est scopé sous .scl-faq-page pour ne pas entrer en conflit avec Astra.
   ========================================================================= */

.scl-faq-page {
	--scl-bg:        #F4F1FA;
	--scl-card:      #ffffff;
	--scl-ink:       #1e1738;
	--scl-ink-soft:  #5d5780;
	--scl-violet:    #7c5cff;
	--scl-violet-2:  #5b3fd6;
	--scl-gold:      #e8c372;
	--scl-gold-2:    #c9a14a;
	--scl-line:      #e7e1f5;
	--scl-shadow:    0 6px 24px rgba(40, 24, 90, .07);
	--scl-shadow-lg: 0 16px 48px rgba(40, 24, 90, .14);
	--scl-radius:    18px;

	background: var(--scl-bg);
	color: var(--scl-ink);
	overflow-x: hidden;
}

/* Largeur de lecture commune */
.scl-faq-shell {
	width: 100%;
	max-width: 1120px;
	margin-inline: auto;
	padding-inline: clamp(18px, 5vw, 40px);
}

/* =========================================================================
   NEUTRALISATION DES ESPACEMENTS ASTRA AUTOUR DE LA PAGE
   Scopé via la classe body .scl-faq-flush (ajoutée par scl-faq-admin.php),
   donc aucun impact sur les autres pages du site.
   ========================================================================= */
.scl-faq-flush #content,
.scl-faq-flush .site-content,
.scl-faq-flush #primary,
.scl-faq-flush .site-content > .ast-container,
.scl-faq-flush .ast-article-single,
.scl-faq-flush .entry-content {
	padding-top: 0 !important;
	margin-top: 0 !important;
}
/* Si Astra affiche un titre de page / en-tête d'article, on le masque ici */
.scl-faq-flush .entry-header,
.scl-faq-flush .ast-single-post-order,
.scl-faq-flush .ast-archive-description { display: none; }

/* =========================== HERO =========================== */
.scl-faq-hero {
	position: relative;
	padding-block: clamp(22px, 4vw, 46px) clamp(24px, 4vw, 44px);
	text-align: center;
	overflow: hidden;
}
.scl-faq-hero__glow {
	position: absolute;
	inset: -22% 0 auto 0;
	height: 340px;
	pointer-events: none;
	background:
		radial-gradient(420px 320px at 28% 20%, rgba(124, 92, 255, .22), transparent 70%),
		radial-gradient(420px 320px at 76% 30%, rgba(232, 195, 114, .20), transparent 72%);
	filter: blur(8px);
}
.scl-faq-eyebrow {
	margin: 0 0 14px;
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--scl-violet-2);
}
.scl-faq-h1 {
	margin: 0;
	font-size: clamp(2.2rem, 6vw, 3.6rem);
	line-height: 1.05;
	font-weight: 800;
	letter-spacing: -.02em;
	color: var(--scl-ink);
}
.scl-faq-h1 span {
	background: linear-gradient(100deg, var(--scl-violet), var(--scl-violet-2));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
.scl-faq-sub {
	margin: 16px auto 0;
	max-width: 540px;
	font-size: clamp(1rem, 2.2vw, 1.12rem);
	color: var(--scl-ink-soft);
}

/* Recherche */
.scl-faq-search {
	position: relative;
	max-width: 520px;
	margin: 28px auto 0;
}
.scl-faq-search__icon {
	position: absolute;
	left: 18px;
	top: 50%;
	transform: translateY(-50%);
	width: 20px;
	height: 20px;
	fill: none;
	stroke: var(--scl-violet);
	stroke-width: 2;
	stroke-linecap: round;
	pointer-events: none;
}
.scl-faq-search__input {
	width: 100%;
	box-sizing: border-box;
	padding: 16px 18px 16px 50px;
	font-size: 1rem;
	color: var(--scl-ink);
	background: var(--scl-card);
	border: 1px solid var(--scl-line);
	border-radius: 999px;
	box-shadow: var(--scl-shadow);
	transition: border-color .2s, box-shadow .2s;
}
.scl-faq-search__input::placeholder { color: #a39cc0; }
.scl-faq-search__input:focus {
	outline: none;
	border-color: var(--scl-violet);
	box-shadow: 0 0 0 4px rgba(124, 92, 255, .15);
}

/* =========================== FILTRES =========================== */
.scl-faq-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-block: 8px 36px;
}
.scl-faq-pill {
	appearance: none;
	cursor: pointer;
	padding: 9px 18px;
	font-size: .92rem;
	font-weight: 600;
	color: var(--scl-ink-soft);
	background: var(--scl-card);
	border: 1px solid var(--scl-line);
	border-radius: 999px;
	transition: color .2s, border-color .2s, background .2s, transform .15s;
}
.scl-faq-pill:hover { transform: translateY(-1px); border-color: #cdc2f2; }
.scl-faq-pill.is-active {
	color: #fff;
	background: linear-gradient(120deg, var(--scl-violet), var(--scl-violet-2));
	border-color: transparent;
	box-shadow: 0 6px 16px rgba(124, 92, 255, .32);
}
.scl-faq-pill:focus-visible {
	outline: 2px solid var(--scl-violet);
	outline-offset: 2px;
}

/* =========================== CONTENU =========================== */
.scl-faq-body { padding-bottom: clamp(40px, 7vw, 80px); }

.scl-faq-group { margin-bottom: 44px; }
.scl-faq-group.is-faded { display: none; }
.scl-faq-group__title {
	margin: 0 0 18px;
	font-size: 1.05rem;
	font-weight: 700;
	letter-spacing: .01em;
	color: var(--scl-ink);
	display: flex;
	align-items: center;
	gap: 12px;
}
.scl-faq-group__title::after {
	content: "";
	flex: 1;
	height: 1px;
	background: linear-gradient(90deg, var(--scl-line), transparent);
}

.scl-faq-list {
	display: grid;
	gap: 14px;
}

/* ---- Carte question (signature : barre violette + balayage holographique) ---- */
.scl-faq-item {
	position: relative;
	background: var(--scl-card);
	border: 1px solid var(--scl-line);
	border-radius: var(--scl-radius);
	box-shadow: var(--scl-shadow);
	overflow: hidden;
	transition: box-shadow .25s, transform .2s, border-color .2s;
}
/* barre violette à gauche */
.scl-faq-item::before {
	content: "";
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 4px;
	background: linear-gradient(180deg, var(--scl-violet), var(--scl-violet-2));
}
/* voile holographique iridescent qui balaie la carte au survol */
.scl-faq-item::after {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0;
	background: linear-gradient(
		115deg,
		transparent 30%,
		rgba(124, 92, 255, .12) 42%,
		rgba(232, 195, 114, .16) 50%,
		rgba(91, 63, 214, .12) 58%,
		transparent 70%
	);
	background-size: 280% 100%;
	background-position: 100% 0;
	transition: opacity .3s ease, background-position .9s ease;
}
.scl-faq-item:hover {
	transform: translateY(-2px);
	border-color: #d8cef7;
	box-shadow: var(--scl-shadow-lg);
}
.scl-faq-item:hover::after {
	opacity: 1;
	background-position: 0 0;
}

.scl-faq-item__head { margin: 0; }
.scl-faq-q {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 16px;
	text-align: left;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	padding: 20px 22px;
	margin: 0;
	font: inherit;
	font-size: clamp(.98rem, 2vw, 1.05rem);
	font-weight: 600;
	line-height: 1.4;
	text-transform: none;
	letter-spacing: normal;
	border-radius: 0;
	-webkit-tap-highlight-color: transparent;
}
/* Annule les styles boutons hérités du thème (Astra/WooCommerce) sur TOUS les états :
   c'est ce qui colorait la question en violet au focus. */
.scl-faq-q,
.scl-faq-q:hover,
.scl-faq-q:focus,
.scl-faq-q:active,
.scl-faq-q:focus-visible {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: var(--scl-ink) !important;
	outline: none;
}
.scl-faq-q:focus-visible {
	outline: 2px solid var(--scl-violet) !important;
	outline-offset: -3px;
}
.scl-faq-q__text { flex: 1; color: inherit; }

.scl-faq-q__chevron {
	flex: none;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: rgba(124, 92, 255, .10);
	transition: background .2s, transform .3s cubic-bezier(.4,.05,.2,1);
}
.scl-faq-q__chevron svg {
	width: 16px; height: 16px;
	fill: none;
	stroke: var(--scl-violet);
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.scl-faq-item.is-open .scl-faq-q__chevron {
	transform: rotate(180deg);
	background: rgba(124, 92, 255, .18);
}

/* Panneau réponse — animation propre via grid-template-rows */
.scl-faq-a {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows .32s ease;
}
.scl-faq-item.is-open .scl-faq-a { grid-template-rows: 1fr; }
.scl-faq-a__inner {
	overflow: hidden;
	color: var(--scl-ink-soft);
	line-height: 1.65;
}
.scl-faq-a__inner > * { margin: 0; }
.scl-faq-a__inner { padding: 0 22px; }
.scl-faq-item.is-open .scl-faq-a__inner { padding: 0 22px 22px; }
.scl-faq-a__inner a {
	color: var(--scl-violet-2);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
}
.scl-faq-a__inner a:hover { color: var(--scl-violet); }
.scl-faq-a__inner strong { color: var(--scl-ink); }

/* Masquage recherche / filtre */
.scl-faq-item[hidden] { display: none; }

/* État vide */
.scl-faq-empty {
	text-align: center;
	color: var(--scl-ink-soft);
	font-size: 1.02rem;
	padding: 30px 0;
}
.scl-faq-empty a { color: var(--scl-violet-2); font-weight: 600; }

/* =========================== CTA =========================== */
.scl-faq-cta-wrap { padding-bottom: clamp(48px, 8vw, 96px); }
.scl-faq-cta {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 26px;
	padding: clamp(28px, 5vw, 44px);
	border-radius: 24px;
	color: #fff;
	background: linear-gradient(125deg, #2a1d57 0%, var(--scl-violet-2) 55%, var(--scl-violet) 100%);
	box-shadow: 0 20px 50px rgba(91, 63, 214, .32);
}
.scl-faq-cta::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(300px 200px at 88% 12%, rgba(232, 195, 114, .35), transparent 70%),
		radial-gradient(280px 220px at 6% 110%, rgba(255, 255, 255, .12), transparent 70%);
}
.scl-faq-cta__text { position: relative; }
.scl-faq-cta__text h2 {
	margin: 0 0 6px;
	font-size: clamp(1.3rem, 3vw, 1.7rem);
	font-weight: 800;
	color: #fff;
}
.scl-faq-cta__text p { margin: 0; color: rgba(255, 255, 255, .82); }
.scl-faq-cta__actions {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}
.scl-faq-btn {
	display: inline-flex;
	align-items: center;
	padding: 13px 24px;
	font-weight: 700;
	font-size: .98rem;
	border-radius: 999px;
	text-decoration: none;
	transition: transform .15s, box-shadow .2s, background .2s;
}
.scl-faq-btn--primary {
	color: var(--scl-violet-2);
	background: linear-gradient(120deg, #fff, #f3eeff);
	box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}
.scl-faq-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(0, 0, 0, .24); }
.scl-faq-btn--ghost {
	color: #fff;
	background: rgba(255, 255, 255, .12);
	border: 1px solid rgba(255, 255, 255, .42);
}
.scl-faq-btn--ghost:hover { background: rgba(255, 255, 255, .22); transform: translateY(-2px); }
.scl-faq-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* =========================== RESPONSIVE =========================== */
@media (max-width: 640px) {
	.scl-faq-cta { flex-direction: column; align-items: flex-start; text-align: left; }
	.scl-faq-cta__actions { width: 100%; }
	.scl-faq-btn { flex: 1; justify-content: center; }
}

/* =========================== MOTION REDUITE =========================== */
@media (prefers-reduced-motion: reduce) {
	.scl-faq-page * {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
	.scl-faq-item::after { display: none; }
}
