/* BP FAQ widget styles
 *
 * Rounded cream section with a centered section heading and a
 * 2-column grid of accordion rows. Each row is a clean cream
 * surface with a hairline beige border, a question button with
 * a "+" icon on the inline-end, and a hidden answer that slides
 * open on click. An optional decorative botanical image can
 * enter from the inline-start edge of the section.
 *
 * All rules stay under .bp-faq. Logical properties keep LTR/RTL
 * aligned without an override file. Layout uses CSS grid so the
 * responsive breakpoints stay clean. The "+" icon is drawn with
 * pseudo-elements so the widget ships with no extra icons.
 */

.bp-faq {
	--bp-faq-bg:           #F4ECDD;
	--bp-faq-border:       #E4DCCB;
	--bp-faq-border-w:     1px;
	--bp-faq-radius:       24px;
	--bp-faq-pad:          44px;
	--bp-faq-heading:      #374F37;
	--bp-faq-item-bg:      #FBF6EC;
	--bp-faq-item-border:  #E4DCCB;
	--bp-faq-item-radius:  12px;
	--bp-faq-item-gap:     14px;
	--bp-faq-question:     #1F2A1F;
	--bp-faq-answer:       #5C6A5C;
	--bp-faq-icon:         #374F37;
	--bp-faq-icon-size:    16px;
	--bp-faq-font:         var(--bp-font-body, 'Manrope', system-ui, sans-serif);
	--bp-faq-display:      var(--bp-font-display, 'DM Serif Display', Georgia, serif);

	position: relative;
	overflow: hidden;
	font-family: var(--bp-faq-font);
	color: var(--bp-faq-question);
	isolation: isolate;

	/* Transparent section so the page background shows through;
	 * no border, no radius, no shadow. Only vertical padding is
	 * kept to preserve breathing room above/below the accordion. */
	padding-block: var(--bp-faq-pad);
	padding-inline: 0;
}

/* ---- Decorative botanical layer (inline-start side) ----
 * Wrapper is always rendered so the Elementor editor keeps the
 * feature visible even before an image is selected. The image
 * inside uses object-fit: contain so leaf artwork never crops. */
.bp-faq__decoration {
	position: absolute;
	inset-block-start: 0;
	inset-block-end: 0;
	inset-inline-start: -40px;
	inline-size: clamp(180px, 26vw, 300px);
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	user-select: none;
	z-index: 0;
	max-inline-size: none;
}

.bp-faq__decoration img {
	display: block;
	inline-size: 100%;
	block-size: auto;
	max-block-size: 100%;
	object-fit: contain;
}

/* ---- Section heading ----
 * Eyebrow + title share the same visual scale as the other
 * Barbary Plante section headings ("COMMENT L'UTILISER ?",
 * "NOS RÉSULTATS", "NOS CONSEILS"). The head wrapper centers
 * the stack and sits above the list with a soft bottom margin. */
.bp-faq__head {
	position: relative;
	z-index: 1;
	text-align: center;
	margin-block-end: var(--bp-faq-pad);
}

.bp-faq__eyebrow {
	margin: 0 0 10px;
	font-family: var(--bp-faq-font);
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--bp-faq-heading);
}

.bp-faq__heading {
	position: relative;
	z-index: 1;
	margin: 0;
	font-family: var(--bp-faq-display);
	font-weight: 400;
	font-size: clamp(28px, 3.4vw, 40px);
	line-height: 1.15;
	letter-spacing: 0.01em;
	color: var(--bp-faq-heading);
	text-transform: uppercase;
}

/* ---- Items grid ----
 * CSS grid: 2 columns on desktop, 1 column on tablet/mobile.
 * The selector targets the list directly so Elementor's column
 * responsive control can drive the layout. */
.bp-faq__list {
	position: relative;
	z-index: 1;
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--bp-faq-item-gap);
}

/* ---- Single item ----
 * Cream surface with a hairline beige border. The item is a
 * flex column so the button (top) and the panel (bottom) sit
 * flush and animate cleanly. */
.bp-faq__item {
	background-color: var(--bp-faq-item-bg);
	border: 1px solid var(--bp-faq-item-border);
	border-radius: var(--bp-faq-item-radius);
	overflow: hidden;
	transition: border-color 0.2s ease;
}

.bp-faq__item.is-open {
	border-color: var(--bp-faq-icon);
}

/* ---- Question button ----
 * Real <button> for keyboard + AT support. Question is at the
 * inline-start, the "+" icon sits at the inline-end. Hover and
 * focus-visible get a subtle background tint. */
.bp-faq__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	inline-size: 100%;
	padding: 16px 20px;
	background: transparent;
	border: 0;
	border-radius: 0;
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--bp-faq-question);
	text-align: start;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.bp-faq__question:hover {
	background-color: rgba(55, 79, 55, 0.04);
}

.bp-faq__question:focus-visible {
	outline: 2px solid var(--bp-faq-icon);
	outline-offset: -2px;
}

.bp-faq__question-text {
	flex: 1 1 auto;
	min-inline-size: 0;
}

/* ---- "+" icon ----
 * Drawn with two pseudo-elements (a horizontal and a vertical
 * bar). The vertical bar rotates 90deg to become "−" when the
 * item is open. The plus sits at the inline-end of the button. */
.bp-faq__icon {
	position: relative;
	flex: none;
	inline-size: var(--bp-faq-icon-size);
	block-size: var(--bp-faq-icon-size);
	color: var(--bp-faq-icon);
}

.bp-faq__icon::before,
.bp-faq__icon::after {
	content: "";
	position: absolute;
	inset-block-start: 50%;
	inset-inline-start: 50%;
	background-color: currentColor;
	border-radius: 1px;
	transition: transform 0.25s ease, opacity 0.25s ease;
}

.bp-faq__icon::before {
	inline-size: 60%;
	block-size: 2px;
	transform: translate(-50%, -50%);
}

.bp-faq__icon::after {
	inline-size: 2px;
	block-size: 60%;
	transform: translate(-50%, -50%);
}

.bp-faq__item.is-open .bp-faq__icon::after {
	transform: translate(-50%, -50%) rotate(90deg);
	opacity: 0;
}

/* ---- Answer panel ----
 * Region controlled by the button via aria-controls. The panel
 * uses a grid-template-rows: 0fr -> 1fr transition so the
 * answer expands and collapses smoothly (no display:none jump).
 * The inner wrapper hides its overflow and animates opacity +
 * a tiny translate to match the rest of the page's animation
 * language. aria-hidden toggles in lockstep with is-open so
 * screen readers and keyboard users see the right state. */
.bp-faq__panel {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 300ms ease, padding 300ms ease;
}

.bp-faq__panel-inner {
	overflow: hidden;
	min-block-size: 0;
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity 300ms ease, transform 300ms ease;
}

.bp-faq__item.is-open .bp-faq__panel {
	grid-template-rows: 1fr;
}

.bp-faq__item.is-open .bp-faq__panel-inner {
	opacity: 1;
	transform: none;
}

.bp-faq__answer {
	padding: 4px 20px 18px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--bp-faq-answer);
}

/* ---- Tablet: single column ---- */
@media (max-width: 880px) {
	.bp-faq {
		--bp-faq-pad: 28px;
	}

	.bp-faq__list {
		grid-template-columns: minmax(0, 1fr);
	}
}

/* ---- Mobile: tighter spacing, no horizontal overflow ---- */
@media (max-width: 560px) {
	.bp-faq {
		--bp-faq-pad: 22px;
		--bp-faq-item-radius: 10px;
	}

	.bp-faq__question {
		padding: 14px 16px;
		font-size: 13px;
	}

	.bp-faq__answer {
		padding: 4px 16px 14px;
		font-size: 13px;
	}
}
