/* =========================================================
   Alsharidah Child — Section FAQ

   Valeurs relevées dans src/app/components/FAQSection.tsx, recoupées
   avec le CSS compilé (dist/assets/index-Bm-wdw9b.css) et les mesures
   au pixel de la capture de l'original : onglet actif 196 x 63,
   carré d'icône 36 x 36, fond de carte (251, 252, 253) — soit
   slate-50 à 50 % sur blanc.

   Cette feuille sert trois pages : l'accueil, « خدماتنا القانونية »
   et « طلب استشارة قانونية ».

   Le mode sombre du source n'est pas repris.
   Les ombres non plus : theme.css les neutralise pour tout le site,
   donc les shadow-lg / shadow-md du composant ne produisent rien sur
   l'original et ne sont pas reproduits ici.
   ========================================================= */

.ash-faq {
	--ash-muted: #4b5873;
	--ash-slate-50: #f8fafc;
	--ash-slate-100: #f1f5f9;
	--ash-slate-200: #e2e8f0;
	--ash-slate-300: #cbd5e1;
	--ash-slate-400: #94a3b8;
	--ash-slate-600: #475569;
	--ash-slate-700: #334155;
	--ash-slate-800: #1e293b;
	--ash-slate-950: #020617;

	position: relative;
	overflow: hidden;
	padding-block: 64px;
	background: #fff;
	border-top: 1px solid var(--ash-slate-100);

	/*
	 * Le lien « الأسئلة الشائعة » du pied de page vise cette section par
	 * son ancre. L'en-tête étant fixe, la cible se logerait dessous et le
	 * titre de section resterait masqué : la marge de défilement décale
	 * l'arrivée d'exactement sa hauteur — 64px, puis 72 à partir de 768,
	 * comme h-16 md:h-[72px] dans Header.tsx.
	 *
	 * La même déclaration couvre les deux chemins, et c'est la raison de
	 * la préférer à un décalage calculé en JavaScript : le défilement
	 * doux de footer.js quand la section est sur la page affichée, et le
	 * saut natif du navigateur à l'arrivée sur /#faq depuis une autre.
	 */
	scroll-margin-top: 64px;
}

@media (min-width: 768px) {
	.ash-faq {
		padding-block: 96px;
		scroll-margin-top: 72px;
	}
}

/* Deux halos de 320px très peu opaques (2 %), flous à 64px.
   Les positions du source sont physiques (top/right, bottom/left) et
   ne sont donc pas inversées en RTL. */
.ash-faq__glow {
	position: absolute;
	width: 320px;
	height: 320px;
	border-radius: 50%;
	filter: blur(64px);
	pointer-events: none;
}

.ash-faq__glow--green {
	top: 0;
	right: 25%;
	background: rgba(76, 175, 80, 0.02);
}

.ash-faq__glow--navy {
	bottom: 0;
	left: 25%;
	background: rgba(15, 41, 87, 0.02);
}

/* max-w-6xl px-4 sm:px-6 lg:px-8 relative z-10 */
.ash-faq__container {
	position: relative;
	z-index: 10;
	max-width: 1152px;
	margin-inline: auto;
	padding-inline: 16px;
}

@media (min-width: 640px) {
	.ash-faq__container {
		padding-inline: 24px;
	}
}

@media (min-width: 1024px) {
	.ash-faq__container {
		padding-inline: 32px;
	}
}

/* =========================================================
   En-tête
   ========================================================= */

/* text-center max-w-3xl mx-auto mb-14 */
.ash-faq__head {
	max-width: 768px;
	margin-inline: auto;
	margin-bottom: 56px;
	text-align: center;
}

/* text-xs font-bold tracking-wider uppercase bg-green/8 px-4 py-1.5
   Opacité de fond à 8 %, et non 10 % comme les pastilles de la page
   des services. */
.ash-faq__badge {
	display: inline-flex;
	align-items: center;
	margin-bottom: 16px;
	padding: 6px 16px;
	border-radius: 999px;
	background: rgba(76, 175, 80, 0.08);
	color: var(--ash-green);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3333;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

/* text-2xl sm:text-3xl md:text-4xl font-extrabold leading-tight */
.ash-faq__title {
	margin: 0;
	color: var(--ash-navy);
	font-size: 24px;
	font-weight: 800;
	line-height: 1.25;
}

@media (min-width: 640px) {
	.ash-faq__title {
		font-size: 30px;
	}
}

@media (min-width: 768px) {
	.ash-faq__title {
		font-size: 36px;
	}
}

/* mt-4 text-base leading-relaxed — qui vaut 2 sur ce site, la règle
   `p, .leading-relaxed { line-height: 2 !important }` du CSS compilé
   écrasant la valeur par défaut de l'utilitaire. */
.ash-faq__lead {
	margin: 16px 0 0;
	color: var(--ash-muted);
	font-size: 16px;
	line-height: 2;
}

/* =========================================================
   Corps : onglets puis panneaux
   ========================================================= */

/* flex flex-col gap-10 items-center */
.ash-faq__body {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 40px;
	width: 100%;
}

/* ---------- Onglets ---------- */

/* grid-cols-2 sm:grid-cols-3 lg:flex lg:flex-wrap lg:justify-center gap-3 */
.ash-faq__tabs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	width: 100%;
}

/* La dernière catégorie occupe toute la largeur tant que la
   disposition est une grille (last:col-span-2 / sm:last:col-span-3). */
.ash-faq__tabs > :last-child {
	grid-column: span 2 / span 2;
}

@media (min-width: 640px) {
	.ash-faq__tabs {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.ash-faq__tabs > :last-child {
		grid-column: span 3 / span 3;
	}
}

@media (min-width: 1024px) {
	.ash-faq__tabs {
		display: flex;
		flex-wrap: wrap;
		justify-content: center;
	}

	.ash-faq__tabs > :last-child {
		grid-column: auto;
	}
}

/* px-4 py-3 rounded-2xl gap-3, largeur pleine puis min 190px à partir
   de 1024px. Mesuré 196 x 63 sur l'original : 24 de remplissage plus
   37 de contenu (titre 15 + 2 + compteur 20) plus les deux filets.
   Les propriétés de remise à zéro neutralisent le style de bouton du
   thème parent. */
.ash-faq__tab {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	margin: 0;
	padding: 12px 16px;
	border: 1px solid rgba(226, 232, 240, 0.6);
	border-radius: 16px;
	background: var(--ash-slate-50);
	color: var(--ash-slate-700);
	font: inherit;
	text-align: start;
	cursor: pointer;
	user-select: none;
	transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

@media (min-width: 1024px) {
	.ash-faq__tab {
		width: auto;
		min-width: 190px;
	}
}

.ash-faq__tab:hover {
	border-color: rgba(76, 175, 80, 0.2);
	background: rgba(241, 245, 249, 0.5);
}

.ash-faq__tab.is-active {
	border-color: var(--ash-navy);
	background: var(--ash-navy);
	color: #fff;
}

/* w-9 h-9 rounded-xl border */
.ash-faq__tab-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 36px;
	height: 36px;
	border: 1px solid rgba(226, 232, 240, 0.5);
	border-radius: 12px;
	background: #fff;
	color: var(--ash-green);
	transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.ash-faq__tab.is-active .ash-faq__tab-icon {
	border-color: var(--ash-green);
	background: var(--ash-green);
	color: #fff;
}

/* flex-1 min-w-0 */
.ash-faq__tab-body {
	flex: 1;
	min-width: 0;
}

/* text-xs font-bold leading-tight whitespace-normal */
.ash-faq__tab-title {
	display: block;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.25;
	white-space: normal;
}

/* text-[10px] mt-0.5 font-english uppercase tracking-wider
   text-[10px] ne fixe que la taille : la hauteur de ligne reste celle
   héritée du corps de page, soit 2. C'est ce qui donne les 63px de
   haut mesurés sur l'original. */
.ash-faq__tab-count {
	display: block;
	margin-top: 2px;
	color: var(--ash-muted);
	font-family: "IBM Plex Sans", system-ui, sans-serif;
	font-size: 10px;
	line-height: 2;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	transition: color 0.3s ease;
}

.ash-faq__tab.is-active .ash-faq__tab-count {
	color: rgba(255, 255, 255, 0.7);
}

/* ---------- Panneaux ---------- */

/* w-full max-w-4xl space-y-4 */
.ash-faq__panels {
	width: 100%;
	max-width: 896px;
	margin-inline: auto;
}

.ash-faq__panel[hidden] {
	display: none;
}

.ash-faq__panel > * + * {
	margin-top: 16px;
}

/* Le panneau est focalisable pour que le contenu révélé reste
   atteignable au clavier ; l'anneau par défaut du navigateur sur un
   conteneur non interactif serait déroutant, on ne le montre qu'au
   focus clavier. */
.ash-faq__panel:focus {
	outline: none;
}

.ash-faq__panel:focus-visible {
	outline: 2px solid var(--ash-green);
	outline-offset: 4px;
	border-radius: 16px;
}

/* rounded-2xl border bg-slate-50/50 overflow-hidden */
.ash-faq__item {
	overflow: hidden;
	border: 1px solid rgba(226, 232, 240, 0.6);
	border-radius: 16px;
	background: rgba(248, 250, 252, 0.5);
	text-align: start;
	transition: border-color 0.3s ease;
}

.ash-faq__item:hover {
	border-color: var(--ash-slate-300);
}

.ash-faq__item.is-open {
	border-color: rgba(76, 175, 80, 0.3);
}

/* ---------- Question ---------- */

/* Le bouton vit dans un h3 : le titre ne porte donc aucun style
   propre, tout est sur le bouton. */
.ash-faq__q-heading {
	margin: 0;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

/* w-full px-6 py-4.5 flex items-start justify-between gap-4 */
.ash-faq__q {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	margin: 0;
	padding: 18px 24px;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: start;
	cursor: pointer;
	user-select: none;
}

.ash-faq__q:hover {
	background: transparent;
}

/* flex gap-3.5 items-start */
.ash-faq__q-main {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

/* mt-1, gris au repos et vert à l'ouverture */
.ash-faq__q-mark {
	display: flex;
	flex-shrink: 0;
	margin-top: 4px;
	color: var(--ash-slate-400);
	transition: color 0.3s ease;
}

.ash-faq__item.is-open .ash-faq__q-mark {
	color: var(--ash-green);
}

/* text-sm sm:text-base font-extrabold leading-snug */
.ash-faq__q-text {
	color: var(--ash-slate-800);
	font-size: 14px;
	font-weight: 800;
	line-height: 1.375;
	transition: color 0.3s ease;
}

@media (min-width: 640px) {
	.ash-faq__q-text {
		font-size: 16px;
	}
}

.ash-faq__q:hover .ash-faq__q-text {
	color: var(--ash-slate-950);
}

.ash-faq__item.is-open .ash-faq__q-text {
	color: var(--ash-navy);
}

/* mt-1, pivote d'un demi-tour à l'ouverture */
.ash-faq__q-chevron {
	display: flex;
	flex-shrink: 0;
	margin-top: 4px;
	color: var(--ash-slate-400);
	transition: transform 0.3s ease, color 0.3s ease;
}

.ash-faq__item.is-open .ash-faq__q-chevron {
	transform: rotate(180deg);
	color: var(--ash-green);
}

.ash-faq__q:focus-visible {
	outline: 2px solid var(--ash-green);
	outline-offset: -2px;
}

/* ---------- Réponse ---------- */

/*
 * Le source anime max-height et opacity. L'attribut hidden est
 * conservé sur le repli pour que la réponse soit réellement absente du
 * parcours clavier et des lecteurs d'écran, ce que max-height: 0 seul
 * ne garantit pas. Le script retire hidden puis pose is-open à la
 * frame suivante, sinon la transition ne partirait pas depuis
 * display: none.
 *
 * Le filet supérieur n'apparaît qu'à l'ouverture : en box-sizing
 * border-box, une bordure sur un élément à max-height: 0 ne se laisse
 * pas rogner et laisserait un trait visible en permanence.
 */
.ash-faq__a {
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.ash-faq__a[hidden] {
	display: none;
}

.ash-faq__a.is-open {
	max-height: 800px;
	opacity: 1;
	border-top: 1px solid rgba(226, 232, 240, 0.3);
}

/* px-6 py-4.5 bg-white text-xs sm:text-sm leading-loose
   whitespace-pre-line — trois réponses contiennent des retours à la
   ligne, c'est cette déclaration qui les rend. */
.ash-faq__a-inner {
	padding: 18px 24px;
	background: #fff;
	color: var(--ash-slate-600);
	font-size: 12px;
	line-height: 2;
	white-space: pre-line;
	text-align: start;
}

@media (min-width: 640px) {
	.ash-faq__a-inner {
		font-size: 14px;
	}
}

/* ---------- Accessibilité ---------- */

.ash-faq__tab:focus-visible {
	outline: 2px solid var(--ash-green);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.ash-faq * {
		transition: none !important;
	}
}
