/* ==========================================================================
   Texte repliable « Voir plus » (widget lwfc-fold-content)
   --lwfc-lines : lignes visibles (réglages lines / lines_tablet / lines_mobile, valeurs de repli ci-dessous) ;
   --lwfc-max-h : hauteur repliée en px, posée par le script (sinon calculée en lh).
   ========================================================================== */
.lwfc {
	--lwfc-lines: 3;
}

@media (max-width: 1024px) {
	.lwfc {
		--lwfc-lines: 4;
	}
}

@media (max-width: 767px) {
	.lwfc {
		--lwfc-lines: 5;
	}
}

.lwfc__text {
	overflow: hidden;
	overflow-wrap: break-word;
}

.lwfc__text > :first-child {
	margin-top: 0;
}

.lwfc__text > :last-child {
	margin-bottom: 0;
}

.lwfc:not(.lwfc--open) .lwfc__text {
	max-height: var(--lwfc-max-h, calc(var(--lwfc-lines) * 1lh));
}

.lwfc:not(.lwfc--open) .lwfc__text > * {
	margin-top: 0;
	margin-bottom: 0;
}

.lwfc--ellipsis:not(.lwfc--open) .lwfc__text {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: var(--lwfc-lines);
	line-clamp: var(--lwfc-lines);
}

.lwfc--fade.lwfc--overflow:not(.lwfc--open) .lwfc__text {
	-webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 1.5em), transparent);
	mask-image: linear-gradient(to bottom, #000 calc(100% - 1.5em), transparent);
}

/* Le lien n'apparaît que si le texte dépasse (classe posée par le script). */
.lwfc__actions {
	display: none;
	margin-top: var(--lwfc-gap, 0.5rem);
}

.lwfc--overflow .lwfc__actions,
.lwfc--open .lwfc__actions {
	display: block;
}

/* Un lien, pas un bouton plein : neutralise les styles de bouton du thème et du Kit. */
.lwfc .lwfc__btn,
.lwfc .lwfc__btn:is(:hover, :focus, :focus-visible, :active) {
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: var(--lwfc-btn-bg, transparent);
	text-transform: none;
	letter-spacing: normal;
}

.lwfc .lwfc__btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	font: inherit;
	font-weight: 600;
	line-height: inherit;
	color: var(--lwfc-btn-color, currentColor);
	cursor: pointer;
	transition: color 0.2s ease;
}

.lwfc .lwfc__btn:is(:hover, :focus-visible) {
	color: var(--lwfc-btn-color-hover, var(--lwfc-btn-color, currentColor));
	text-decoration: underline;
}

.lwfc .lwfc__btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.lwfc__chevron {
	flex: none;
	width: 0.75em;
	height: auto;
	transition: transform 0.3s ease;
}

.lwfc--open .lwfc__chevron {
	transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
	.lwfc .lwfc__btn,
	.lwfc__chevron {
		transition: none;
	}
}
