/* Pages besoin : intro repliée + contenu éditorial sous les produits (inc/besoin-seo.php)
   Palette du site : --tertiary = vert sapin #2B6A60, --primary = terracotta #C77269,
   --secondary = crème #F9EFE8 (fond, jamais en couleur de texte sur blanc). */

/* Intro (description du terme, dans la carte verte) : 3 lignes, le reste via « Lire la suite » */
.besoin-green-card .brxe-text.text-l {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	overflow: hidden;
}
.besoin-green-card .brxe-text.text-l.hb-intro--ouverte {
	display: block;
	-webkit-line-clamp: unset;
	line-clamp: unset;
	overflow: visible;
}
.besoin-green-card .brxe-text.text-l p { margin: 0; }
.hb-intro-suite {
	align-self: flex-start;
	margin-top: calc(-1 * var(--space-2xs, .4rem));
	padding: 0;
	border: 0;
	background: none;
	color: var(--secondary); /* crème sur la carte verte */
	font: inherit;
	font-size: var(--text-s);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

/* Espace accordéons → « Besoin d'aide » = celui entre « Besoin d'aide » et le portrait (gap-l),
   au lieu du cumul des deux marges de conteneur. */
#besoin-contenu > .brxe-container { padding-bottom: 0; }
#besoin-contenu + .brxe-section > .brxe-container { padding-top: var(--space-l); }

/* Accordéon sous les produits, calqué sur la FAQ des fiches produit */
.hb-besoin-seo {
	display: flex;
	flex-direction: column;
	gap: var(--space-xs);
	width: 100%; /* même largeur que la grille, « Besoin d'aide » et le portrait */
}
.hb-bs-bloc {
	background-color: var(--secondary);
	border-radius: var(--radius-m);
	overflow: hidden;
}
.hb-bs-entete {
	display: flex;
	align-items: center;
	gap: var(--space-s);
	padding: var(--space-s);
	cursor: pointer;
	list-style: none;
	color: var(--text-title);
	transition: color .2s ease;
}
.hb-bs-entete::-webkit-details-marker { display: none; }
.hb-bs-entete::marker { content: ''; }
.hb-bs-entete:hover,
.hb-bs-bloc[open] .hb-bs-entete { color: var(--tertiary); }
.hb-bs-entete:focus-visible { outline: 2px solid var(--tertiary); outline-offset: -2px; border-radius: var(--radius-m); }
.hb-bs-titre {
	flex: 1;
	margin: 0;
	color: inherit;
	font-size: var(--text-xl);
	line-height: 1.3;
}
.hb-bs-chevron {
	flex: 0 0 auto;
	width: 1.25em;
	height: 1.25em;
	color: var(--primary);
	transition: transform .25s ease;
}
.hb-bs-bloc[open] .hb-bs-chevron { transform: rotate(90deg); }

.hb-bs-texte {
	max-width: 80ch; /* lignes lisibles malgré la pleine largeur */
	padding: 0 var(--space-s) var(--space-m);
	color: var(--text-body);
	font-size: var(--text-m);
	line-height: 1.7;
}
.hb-bs-texte > * + * { margin-top: var(--space-s); }
.hb-bs-texte ul, .hb-bs-texte ol { padding-left: 1.25em; }
.hb-bs-texte li + li { margin-top: .35em; }
.hb-bs-texte li::marker { color: var(--primary); }
.hb-bs-texte strong, .hb-bs-texte b { color: var(--text-title); }
.hb-bs-texte a { color: var(--tertiary); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.hb-bs-texte a:hover { color: var(--primary); }

.hb-bs-avertissement { font-size: var(--text-s); font-style: italic; opacity: .8; }

/* Cartes des produits du protocole (blanches sur le fond crème) */
.hb-bs-cartes {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--space-s);
	margin: 0;
	padding: 0 !important;
	list-style: none;
}
.hb-bs-carte { margin: 0 !important; }
.hb-bs-carte__lien {
	display: flex;
	flex-direction: column;
	gap: var(--space-2xs, .4rem);
	height: 100%;
	padding: var(--space-xs);
	border-radius: var(--radius-s);
	background: #fff;
	color: var(--text-body);
	font-weight: 400 !important;
	text-decoration: none !important;
	transition: transform .2s ease, box-shadow .2s ease;
}
.hb-bs-carte__lien:hover { transform: translateY(-3px); box-shadow: 0 6px 18px var(--dark-10, rgba(0,0,0,.1)); color: var(--text-body); }
.hb-bs-carte__img {
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: var(--radius-xs, 4px);
}
.hb-bs-carte__titre { font-family: "Fraunces", serif; font-weight: 600; line-height: 1.3; color: var(--text-title); }
.hb-bs-carte__prix { font-size: var(--text-s); }
.hb-bs-carte__cta { margin-top: auto; color: var(--tertiary); font-size: var(--text-s); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.hb-bs-pourquoi { margin-top: var(--space-m); }
.hb-bs-pourquoi > * + * { margin-top: var(--space-s); }

@media (max-width: 767px) {
	.hb-bs-titre { font-size: var(--text-l); }
	.hb-bs-cartes { grid-template-columns: 1fr; }
	.hb-bs-carte__lien { flex-direction: row; align-items: center; flex-wrap: wrap; column-gap: var(--space-s); }
	.hb-bs-carte__img { width: 84px; flex: 0 0 84px; }
	.hb-bs-carte__titre { flex: 1 1 0; }
	.hb-bs-carte__prix, .hb-bs-carte__cta { flex-basis: 100%; padding-left: calc(84px + var(--space-s)); margin-top: 0; }
}
