/**
 * Barre de recherche (moteur V1, SRCH-01) — feuille AUTONOME du shortcode
 * `[cintu_immo_part_recherche]`, réutilisable hors page de résultats (home Elementor).
 *
 * Charte extraite de `rechercher_un_bien.html` (`.search-bar`), remappée sur les
 * variables `--cip-*` du thème enfant avec repli neutre EN DUR comme filet (aucune
 * couleur de marque codée en dur dans les règles — §3). Classes publiques préfixées
 * `cip-` (§8.3, §12.2). Chargée APRÈS le thème via `$deps` : les ré-affirmations de
 * style ci-dessous neutralisent le reset Hello Elementor à égalité de spécificité
 * (§33.6).
 */

.cip-search-bar {
	/* Remappage sur la charte réelle du thème ; repli = valeurs de la maquette. */
	--cip-search-primary: var(--cip-marine, #1a3c5e);
	--cip-search-accent: var(--cip-or, #c5a656);
	--cip-search-white: var(--cip-blanc, #ffffff);

	background: var(--cip-search-primary);
	padding: 20px 40px;
	border-top: 1px solid rgba(197, 166, 86, 0.3);
	box-sizing: border-box;
}

.cip-search-bar *,
.cip-search-bar *::before,
.cip-search-bar *::after {
	box-sizing: border-box;
}

.cip-search-inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	gap: 12px;
	align-items: center;
}

.cip-search-field {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.cip-search-label {
	font-family: 'Montserrat', sans-serif;
	font-size: 10px;
	color: var(--cip-search-accent);
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 500;
}

/* Ré-affirmation complète des champs (neutralise le reset Hello Elementor). */
.cip-search-select,
.cip-search-input {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	width: 100%;
	margin: 0;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(197, 166, 86, 0.4);
	color: var(--cip-search-white);
	padding: 10px 14px;
	font-family: 'Montserrat', sans-serif;
	font-size: 13px;
	line-height: 1.4;
	border-radius: 2px;
	outline: none;
	transition: border-color 0.2s;
}

.cip-search-select:focus,
.cip-search-input:focus {
	border-color: var(--cip-search-accent);
}

/* Le menu déroulant natif s'affiche sur fond système : on force fond marine + texte
   blanc pour rester lisible (comme la maquette). */
.cip-search-select option {
	background: var(--cip-search-primary);
	color: var(--cip-search-white);
}

.cip-search-input::placeholder {
	color: rgba(255, 255, 255, 0.55);
	opacity: 1;
}

.cip-search-submit {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	background: var(--cip-search-accent);
	color: var(--cip-search-primary);
	border: none;
	padding: 10px 28px;
	font-family: 'Montserrat', sans-serif;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	border-radius: 2px;
	cursor: pointer;
	/* Aligne le bouton avec la ligne des champs (qui portent un label au-dessus). */
	margin-top: 20px;
	white-space: nowrap;
	transition: background 0.2s;
}

.cip-search-submit:hover,
.cip-search-submit:focus {
	background: #b8963f;
}

/* Responsive : sous 782px, les champs s'empilent et le bouton passe pleine largeur. */
@media (max-width: 782px) {
	.cip-search-bar {
		padding: 20px;
	}

	.cip-search-inner {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
	}

	.cip-search-submit {
		margin-top: 4px;
		width: 100%;
	}
}
