@charset "utf-8";

/*----------------------------
Bloc Gutenberg « Détails » : même rendu que les FAQ des LP
Chargé sur le front et dans l'éditeur (enqueue_block_assets)
-------------------------------*/
.wp-block-details {
	interpolate-size: allow-keywords;
	margin-block: 1rem;
	padding: 0;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: .75rem;
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
	transition: box-shadow .3s;
}
.wp-block-details:hover {
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
}

/* Question */
.wp-block-details > summary {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 1.25rem 1.5rem;
	list-style: none;
	cursor: pointer;
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.4;
	color: #1d1d1d;
	transition: color .3s;
}
.wp-block-details > summary::-webkit-details-marker {
	display: none;
}
.wp-block-details > summary:hover {
	color: #f57200;
}
.wp-block-details > summary:focus-visible {
	outline: 2px solid #f57200;
	outline-offset: 2px;
	border-radius: .75rem;
}

/* Pastille + / − */
.wp-block-details > summary::after {
	content: "";
	flex-shrink: 0;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background:
		linear-gradient(#f57200, #f57200) center / 12px 2px no-repeat,
		linear-gradient(#f57200, #f57200) center / 2px 12px no-repeat,
		#fff7ed;
	transition: transform .3s;
}
.wp-block-details[open] > summary::after {
	background:
		linear-gradient(#fff, #fff) center / 12px 2px no-repeat,
		#f57200;
	transform: rotate(180deg);
}

/* Réponse */
.wp-block-details > :not(summary) {
	margin: 0;
	padding-inline: 1.5rem;
	color: #666;
}
.wp-block-details > summary + * {
	margin-top: .5rem;
	padding-top: .5rem;
	border-top: 1px solid #f3f4f6;
}
.wp-block-details > :not(summary) + :not(summary) {
	margin-top: 1rem;
}
.wp-block-details > :last-child:not(summary) {
	padding-bottom: 1.5rem;
}

/* Ouverture animée (navigateurs compatibles, sinon ouverture directe) */
.wp-block-details::details-content {
	block-size: 0;
	overflow: hidden;
	transition: block-size .3s ease-in-out, content-visibility .3s allow-discrete;
}
.wp-block-details[open]::details-content {
	block-size: auto;
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-details,
	.wp-block-details > summary,
	.wp-block-details > summary::after,
	.wp-block-details::details-content {
		transition: none;
	}
}
