/* Exo Search Native — surchargez les variables dans votre thème pour coller à la charte du site */
.exosn {
	--exosn-bg: #1c1c22;
	--exosn-bg-hover: #2a2a33;
	--exosn-border: #34343f;
	--exosn-text: #e8e8ee;
	--exosn-muted: #9a9aab;
	--exosn-accent: #f5a623;
	--exosn-tag: #7aa7ff;
	--exosn-radius: 8px;
	--exosn-font: inherit;
	--exosn-panel-max-h: 70vh;
	--exosn-z: 9999;

	position: relative;
	width: 100%;
	max-width: 520px;
	font-family: var(--exosn-font);
}
.exosn *, .exosn *::before, .exosn *::after { box-sizing: border-box; }

.exosn-form {
	display: flex;
	align-items: center;
	margin: 0;
	background: var(--exosn-bg);
	border: 1px solid var(--exosn-border);
	border-radius: var(--exosn-radius);
	overflow: hidden;
}
.exosn.is-open .exosn-form { border-bottom-left-radius: 0; border-bottom-right-radius: 0; border-bottom-color: var(--exosn-accent); }

.exosn-input {
	flex: 1;
	min-width: 0;
	height: 44px;
	padding: 0 12px;
	border: 0 !important;
	background: transparent !important;
	color: var(--exosn-text) !important;
	font-size: 16px; /* évite le zoom auto sur iOS */
	outline: none;
	box-shadow: none !important;
}
.exosn-input::-webkit-search-cancel-button { display: none; }
.exosn-input::placeholder { color: var(--exosn-muted); }

.exosn-clear, .exosn-submit {
	height: 44px;
	padding: 0 12px;
	border: 0;
	background: transparent;
	color: var(--exosn-muted);
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
}
.exosn-clear:hover, .exosn-submit:hover { color: var(--exosn-text); }
.exosn.is-loading .exosn-submit { animation: exosn-pulse .8s ease-in-out infinite alternate; }
@keyframes exosn-pulse { to { opacity: .35; } }

.exosn-panel {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: var(--exosn-z);
	max-height: var(--exosn-panel-max-h);
	overflow-y: auto;
	background: var(--exosn-bg);
	border: 1px solid var(--exosn-border);
	border-top: 0;
	border-radius: 0 0 var(--exosn-radius) var(--exosn-radius);
	box-shadow: 0 12px 28px rgba(0, 0, 0, .45);
	color: var(--exosn-text);
	font-size: 14px;
}
.exosn-panel[hidden] { display: none; }
.exosn-panel mark { background: none; color: var(--exosn-accent); font-weight: 700; }

/* Suggestions de tags / catégories */
.exosn-terms { border-bottom: 1px solid var(--exosn-border); }
.exosn-term {
	display: flex;
	justify-content: space-between;
	gap: 8px;
	padding: 8px 12px;
	color: var(--exosn-text) !important;
	text-decoration: none !important;
}
.exosn-term small { color: var(--exosn-muted); font-size: 12px; }

/* Vidéos */
.exosn-post {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 8px 12px;
	border-bottom: 1px solid var(--exosn-border);
	color: var(--exosn-text) !important;
	text-decoration: none !important;
}
.exosn-post img {
	flex: 0 0 64px;
	width: 64px;
	height: 40px;
	object-fit: cover;
	border-radius: 4px;
	background: #000;
}
.exosn-post-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.exosn-post-title { line-height: 1.35; }
.exosn-post-tags { color: var(--exosn-tag); font-size: 12px; font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.exosn-term:hover, .exosn-post:hover, .exosn-all:hover,
.exosn-term.is-active, .exosn-post.is-active, .exosn-all.is-active { background: var(--exosn-bg-hover); }

.exosn-empty { margin: 0; padding: 12px; color: var(--exosn-muted); }
.exosn-all {
	display: block;
	padding: 10px 12px;
	color: var(--exosn-accent) !important;
	text-decoration: none !important;
	font-weight: 600;
}

/* Zone publicitaire */
.exosn-ad {
	position: relative;
	padding: 6px;
	border-bottom: 1px solid var(--exosn-border);
	background: #000;
}
.exosn-ad-label {
	position: absolute;
	top: 2px;
	left: 8px;
	z-index: 2;
	font-size: 10px;
	color: var(--exosn-muted);
}
.exosn-ad-inner { min-height: 44px; }
.exosn-ad-inner ins { display: block; }

@media (max-width: 767px) {
	.exosn { max-width: none; }
	.exosn-panel { --exosn-panel-max-h: 75vh; }
}
@media (prefers-reduced-motion: reduce) {
	.exosn.is-loading .exosn-submit { animation: none; }
}
