.mateq-search-form {
	position: relative;
	display: flex;
	align-items: center;
	max-width: 420px;
}

.mateq-search-input {
	flex: 1 1 auto;
	padding: 8px 12px;
	border: 1px solid #ccc;
	border-radius: 4px 0 0 4px;
	font-size: 14px;
}

.mateq-search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #ccc;
	border-left: none;
	background: #1f4e78;
	color: #fff;
	padding: 8px 12px;
	border-radius: 0 4px 4px 0;
	cursor: pointer;
}

/* Le bouton contient un <svg> (icône loupe) sans width/height/stroke
   propres : sans ces règles, il est invisible (comportement normal du
   navigateur pour un SVG non dimensionné et sans trait défini). */
.mateq-search-submit svg {
	width: 18px;
	height: 18px;
	stroke: currentColor;
	fill: none;
}

/* Panneau sous le champ, scindé en deux zones fixes qui restent visibles
   en même temps : les correspondances en haut (mots-clés / titres, un
   clic ne fait que sélectionner), les produits de la sélection active en
   bas (seule zone où un clic navigue réellement). Aucune navigation
   automatique, même sur une correspondance unique. */
.mateq-panel {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #ddd;
	box-shadow: 0 4px 10px rgba(0, 0, 0, .08);
	z-index: 100;
	max-height: 480px;
	overflow-y: auto;
}

.mateq-panel-matches {
	padding: 4px 0;
	border-bottom: 1px solid #eee;
}

.mateq-panel-products {
	padding: 4px 0 8px;
}

.mateq-suggestion-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 8px;
	padding: 9px 12px;
	cursor: pointer;
	border-bottom: 1px solid #f2f2f2;
}

.mateq-suggestion-item:last-child {
	border-bottom: none;
}

.mateq-suggestion-item:hover,
.mateq-suggestion-item.is-active {
	background: #f4f8fb;
}

.mateq-suggestion-count {
	font-size: 12px;
	color: #757575;
	white-space: nowrap;
}

.mateq-suggestion-empty {
	padding: 10px 12px;
	color: #757575;
	font-size: 13px;
}

.mateq-panel-heading {
	padding: 6px 12px 10px;
	font-weight: 600;
	font-size: 13px;
}

.mateq-panel-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 10px;
	padding: 0 12px 12px;
}

.mateq-panel-product {
	display: block;
	text-decoration: none;
	color: inherit;
	border: 1px solid #eee;
	border-radius: 4px;
	overflow: hidden;
	font-size: 12px;
}

.mateq-panel-product img {
	width: 100%;
	height: 80px;
	object-fit: cover;
	display: block;
}

.mateq-panel-product-title {
	display: block;
	padding: 6px 8px;
	font-weight: 600;
}

/* État "aucun résultat" (zone du haut : message + mots-clés proches,
   affichés comme des .mateq-suggestion-item classiques, sélection
   uniquement, jamais de navigation directe). */
.mateq-no-results {
	padding: 10px 12px 0;
	font-weight: 600;
}

.mateq-near-heading {
	padding: 8px 12px 2px;
	font-size: 13px;
	color: #757575;
}

.mateq-contact-fallback {
	margin: 6px 12px 12px;
	padding: 10px 12px;
	background: #f4f8fb;
	border-left: 3px solid #1f4e78;
	font-size: 13px;
}

/* Page de secours sans JavaScript ([mateq_resultats]) */
.mateq-results-intro {
	font-weight: 600;
	margin-bottom: 16px;
}

.mateq-results-group-title {
	font-size: 15px;
	font-weight: 600;
	margin: 20px 0 10px;
}

.mateq-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 20px;
}

.mateq-card {
	display: block;
	text-decoration: none;
	color: inherit;
	border: 1px solid #eee;
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow .15s ease;
}

.mateq-card:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
}

.mateq-card-thumb img {
	width: 100%;
	height: 150px;
	object-fit: cover;
	display: block;
}

.mateq-card-title {
	padding: 10px 12px;
	font-weight: 600;
}
