/*
 * FAQ du Trésor — styles du shortcode [faq_tresor].
 * Design tokens repris de la charte des pages sentresor.org déjà refaites,
 * scopés à .faq pour ne pas interférer avec le thème Cityzen.
 *
 * Les valeurs des custom properties ci-dessous sont les défauts d'origine ;
 * elles sont surchargées dynamiquement via wp_add_inline_style() selon les
 * réglages choisis dans Réglages > Apparence de la FAQ (voir
 * includes/class-faq-tresor-shortcode.php::build_dynamic_css()).
 */

@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("../fonts/poppins-600.woff2") format("woff2");
}

@font-face {
	font-family: "Poppins";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/poppins-700.woff2") format("woff2");
}

@font-face {
	font-family: "Open Sans";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/opensans-400.woff2") format("woff2");
}

.faq {
	--faq-gold: #C3A038;
	--faq-gold-deep: #A8861C;
	--faq-gold-pale: #FBF6E6;
	--faq-gold-line: #E7D9A8;
	--faq-ink: #1C1B18;
	--faq-text: #54514B;
	--faq-muted: #8A867D;
	--faq-card: #FFFFFF;
	--faq-bg: #F1F0EC;
	--faq-line: #E9E7E1;
	--faq-radius: 14px;
	--faq-theme-gap: 20px;
	--faq-font-heading: inherit;
	--faq-font-body: inherit;

	font-family: var(--faq-font-body);
	color: var(--faq-text);
	background: var(--faq-bg);
	border-radius: var(--faq-radius);
	padding: 24px;
	box-sizing: border-box;
}

.faq *,
.faq *::before,
.faq *::after {
	box-sizing: inherit;
}

.faq-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	margin-bottom: 24px;
}

.faq-search-label {
	display: block;
	flex: 1 1 260px;
}

.faq-search {
	width: 100%;
	font-family: var(--faq-font-body);
	font-size: 15px;
	color: var(--faq-ink);
	background: var(--faq-card);
	border: 1px solid var(--faq-line);
	border-radius: 30px;
	padding: 10px 18px;
}

.faq-search:focus {
	outline: none;
	border-color: var(--faq-gold);
	box-shadow: 0 0 0 3px var(--faq-gold-pale);
}

.faq-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	flex: 2 1 400px;
}

.chip-btn {
	font-family: var(--faq-font-heading);
	font-size: 13px;
	font-weight: 600;
	color: var(--faq-text);
	background: var(--faq-card);
	border: 1px solid var(--faq-gold-line);
	border-radius: 30px;
	padding: 8px 16px;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.chip-btn:hover {
	border-color: var(--faq-gold);
}

.chip-btn.is-active {
	background: var(--faq-gold);
	border-color: var(--faq-gold);
	color: var(--faq-ink);
}

.faq-count {
	flex: 0 0 auto;
	margin: 0;
	font-size: 13px;
	color: var(--faq-muted);
	white-space: nowrap;
}

.faq-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.cat-h {
	font-family: var(--faq-font-heading);
	font-size: 16px;
	font-weight: 700;
	color: var(--faq-gold-deep);
	margin: var(--faq-theme-gap) 0 4px;
	padding-bottom: 6px;
	border-bottom: 1px solid var(--faq-gold-line);
}

.cat-h:first-child {
	margin-top: 0;
}

.faq-item {
	background: var(--faq-card);
	border: 1px solid var(--faq-line);
	border-left: 3px solid var(--faq-gold);
	border-radius: var(--faq-radius);
	padding: 4px 18px;
	box-shadow: 0 1px 3px rgba(28, 27, 24, .04);
}

.faq-item[open] {
	box-shadow: 0 4px 10px rgba(28, 27, 24, .08);
}

.faq-q {
	font-family: var(--faq-font-heading);
	font-size: 15px;
	font-weight: 600;
	color: var(--faq-ink);
	padding: 14px 32px 14px 0;
	cursor: pointer;
	list-style: none;
	position: relative;
}

.faq-q::-webkit-details-marker {
	display: none;
}

.faq-q::after {
	content: "+";
	position: absolute;
	right: 0;
	top: 50%;
	transform: translateY(-50%);
	font-size: 20px;
	line-height: 1;
	color: var(--faq-gold-deep);
	transition: transform .2s ease;
}

.faq-item[open] .faq-q::after {
	content: "\2212";
}

.faq-a {
	padding: 0 0 16px;
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--faq-text);
}

.faq-a > *:first-child {
	margin-top: 0;
}

.faq-a > *:last-child {
	margin-bottom: 0;
}

.faq-empty,
.faq-no-results {
	background: var(--faq-gold-pale);
	border: 1px solid var(--faq-gold-line);
	border-radius: var(--faq-radius);
	padding: 16px 18px;
	color: var(--faq-text);
	font-size: 14.5px;
}

.faq [hidden] {
	display: none !important;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
