/* ==========================================================================
   JXC — Modale de recherche (search-modal.css)
   Dépend de topbar.css pour les tokens .jxc-modal de base.
   Chargé par le widget jxc-search-modal via get_style_depends().
   Peut aussi être utilisé indépendamment partout où la modale est instanciée.
   ========================================================================== */

/* ── Box (taille spécifique à la recherche) ─────────────────────────────── */

.jxc-search-modal .jxc-modal__box {
	max-width: 700px;
}

/* ── Titre ───────────────────────────────────────────────────────────────── */

.jxc-search-modal-title {
	font-family: var(--jxc-font, 'Jost', sans-serif);
	font-size: 40px;
	font-weight: 900;
	text-transform: uppercase;
	line-height: 44px;
	color: #121212;
	margin: 0 0 24px;
}

/* ── Champ de saisie ─────────────────────────────────────────────────────── */

.jxc-search-field-wrap {
	margin-bottom: 14px;
}

.jxc-search-field {
	display: flex;
	align-items: center;
	border: 2px solid #ddd;
	border-radius: 6px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.jxc-search-field:focus-within {
	border-color: var(--jxc-accent, #212121);
	box-shadow: 0 0 0 3px rgba(33, 33, 33, 0.12);
}

.jxc-search-icon {
	display: flex;
	align-items: center;
	padding: 0 12px;
	color: #aaa;
	pointer-events: none;
	flex-shrink: 0;
}

.jxc-search-input {
	flex: 1;
	border: none;
	outline: none;
	font-family: var(--jxc-font, 'Jost', sans-serif);
	font-size: 20px;
	font-weight: 300;
	color: #121212;
	padding: 13px 0;
	background: transparent;
	min-width: 0;
	-webkit-appearance: none;
	appearance: none;
}

.jxc-search-input::placeholder { color: #ccc; }

/* Bouton effacer */
.jxc-search-clear {
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	cursor: pointer;
	color: #aaa;
	padding: 0 12px;
	line-height: 1;
	transition: color 0.15s ease;
	flex-shrink: 0;
}

.jxc-search-clear:hover { color: #333; }

/* ── Boutons d'action ────────────────────────────────────────────────────── */

.jxc-search-actions {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-wrap: wrap;
}

.jxc-search-submit {
	height: 44px;
	padding: 0 24px;
	background: var(--jxc-accent, #212121);
	color: #fff;
	border: none;
	border-radius: 4px;
	font-family: var(--jxc-font, 'Jost', sans-serif);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	cursor: pointer;
	transition: opacity 0.15s ease;
	flex-shrink: 0;
}

.jxc-search-submit:hover { opacity: 0.88; }

.jxc-search-advanced-toggle {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 44px;
	padding: 0 18px;
	background: transparent;
	border: 2px solid #ddd;
	border-radius: 4px;
	font-family: var(--jxc-font, 'Jost', sans-serif);
	font-size: 13px;
	color: #666;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease;
	white-space: nowrap;
	flex-shrink: 0;
}

.jxc-search-advanced-toggle:hover,
.jxc-search-advanced-toggle[aria-expanded="true"] {
	border-color: var(--jxc-accent, #212121);
	color: var(--jxc-accent, #212121);
}

.jxc-search-chevron {
	transition: transform 0.2s ease;
}

.jxc-search-advanced-toggle[aria-expanded="true"] .jxc-search-chevron {
	transform: rotate(180deg);
}

/* ── Panneau filtres avancés ─────────────────────────────────────────────── */

.jxc-search-advanced {
	margin-top: 18px;
	padding: 18px;
	background: #f8f8f8;
	border: 1px solid #e8e8e8;
	border-radius: 6px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.jxc-search-advanced[hidden] { display: none; }

.jxc-search-filter-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.jxc-search-filter-label {
	font-family: var(--jxc-font, 'Jost', sans-serif);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #999;
}

/* ── Chips ───────────────────────────────────────────────────────────────── */

.jxc-search-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
}

.jxc-chip {
	display: inline-flex;
	align-items: center;
	height: 32px;
	padding: 0 14px;
	background: #fff;
	border: 1.5px solid #ddd;
	border-radius: 100px;
	font-family: var(--jxc-font, 'Jost', sans-serif);
	font-size: 13px;
	color: #444;
	cursor: pointer;
	transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
	white-space: nowrap;
}

.jxc-chip:hover {
	border-color: var(--jxc-accent, #212121);
	color: var(--jxc-accent, #212121);
}

.jxc-chip.is-active {
	background: var(--jxc-accent, #212121);
	border-color: var(--jxc-accent, #212121);
	color: #fff;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 767px) {
	.jxc-search-modal-title { font-size: 28px; line-height: 32px; }
	.jxc-search-input { font-size: 17px; }
	.jxc-search-actions { flex-direction: column; align-items: stretch; }
	.jxc-search-submit,
	.jxc-search-advanced-toggle { width: 100%; justify-content: center; }
}
