/* Composant hero (components/hero_recherche.php) : bandeau de l'accueil et moteur de recherche. */

.hero_recherche {
	/* pleine largeur malgre les marges du body */
	margin: 0 calc(-1 * var(--espace-m));
	background-image: linear-gradient(90deg, rgba(11, 37, 69, 0.92) 0%, rgba(11, 37, 69, 0.78) 42%, rgba(11, 37, 69, 0) 68%), url(/images/hero_accueil.jpg);
	background-size: cover;
	background-position: right center;
}

.hero_recherche_inner {
	display: flex;
	flex-direction: column;
	gap: 20px;
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 72px var(--gutter) 64px;
	box-sizing: border-box;
}

.hero_recherche_titre,
.hero_recherche_accroche {
	max-width: 720px;
	margin: 0;
	font-family: var(--font-sans);
	color: var(--chr-blanc);
}

.hero_recherche_titre {
	font-size: 48px;
	font-weight: var(--fw-extrabold);
	line-height: 1.12;
	letter-spacing: -0.01em;
}

.hero_recherche_accroche {
	font-size: 20px;
	font-weight: var(--fw-regular);
	line-height: 1.45;
}

.hero_recherche_form {
	position: relative;
	display: flex;
	align-items: center;
	gap: var(--space-3);
	width: 100%;
	max-width: 720px;
	margin-top: var(--space-4);
	padding: 6px 6px 6px var(--space-5);
	box-sizing: border-box;
	background: var(--chr-blanc);
	border-radius: var(--radius-pill);
	box-shadow: var(--shadow-md);
}

.hero_recherche_loupe {
	flex-shrink: 0;
	color: var(--chr-primary-dark);
}

.hero_recherche_label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
}

.hero_recherche_champ {
	flex: 1;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	font-family: var(--font-sans);
	font-size: 17px;
	color: var(--chr-encre);
}

.hero_recherche_champ::placeholder {
	color: var(--chr-ardoise);
}

.hero_recherche_bouton {
	flex-shrink: 0;
	min-height: 52px;
	padding: 0 var(--space-6);
	border: 0;
	border-radius: var(--radius-pill);
	background: var(--chr-secondary);
	font-family: var(--font-sans);
	font-size: 18px;
	font-weight: var(--fw-bold);
	color: var(--chr-encre);
	cursor: pointer;
}

.hero_recherche_bouton:hover {
	background: var(--chr-secondary-dark);
}

.hero_recherche_form:focus-within {
	outline: var(--focus-ring);
	outline-offset: var(--focus-offset);
}

/* Suggestions groupees */
.hero_recherche_suggestions {
	position: absolute;
	top: calc(100% + var(--space-2));
	left: 0;
	right: 0;
	z-index: 20;
	max-height: 420px;
	overflow-y: auto;
	padding: var(--space-2) 0;
	background: var(--chr-blanc);
	border: 1px solid var(--chr-nappe);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
	text-align: left;
}

.hero_recherche_suggestions[hidden] {
	display: none;
}

.hero_recherche_groupe {
	padding: var(--space-2) var(--space-5) var(--space-1);
	font-family: var(--font-sans);
	font-size: var(--fs-caption-s);
	font-weight: var(--fw-bold);
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--chr-etain);
}

.hero_recherche_option {
	display: flex;
	flex-direction: column;
	padding: var(--space-2) var(--space-5);
	font-family: var(--font-sans);
	font-size: var(--fs-body);
	color: var(--chr-encre);
	text-decoration: none;
}

.hero_recherche_option small {
	font-family: var(--font-sans);
	font-size: var(--fs-caption);
	color: var(--chr-ardoise);
}

.hero_recherche_option:hover,
.hero_recherche_option[aria-selected="true"] {
	background: var(--chr-givre);
	color: var(--chr-primary-dark);
	text-decoration: none;
}

.hero_recherche_vide {
	padding: var(--space-3) var(--space-5);
	font-family: var(--font-sans);
	font-size: var(--fs-body-s);
	color: var(--chr-ardoise);
}

@media (max-width: 860px) {
	.hero_recherche {
		background-image: linear-gradient(rgba(11, 37, 69, 0.82), rgba(11, 37, 69, 0.82)), url(/images/hero_accueil.jpg);
	}

	.hero_recherche_inner {
		padding-top: var(--space-7);
		padding-bottom: var(--space-7);
	}

	.hero_recherche_titre {
		font-size: 34px;
	}
}

@media (max-width: 560px) {
	/* Champ et bouton dissocies : champ en pilule blanche, bouton pleine largeur dessous */
	.hero_recherche_form {
		flex-direction: column;
		align-items: stretch;
		padding: 0;
		background: none;
		border-radius: 0;
		box-shadow: none;
	}

	.hero_recherche_form:focus-within {
		outline: 0;
	}

	.hero_recherche_loupe {
		position: absolute;
		top: 28px;
		left: var(--space-4);
		transform: translateY(-50%);
		pointer-events: none;
	}

	.hero_recherche_champ {
		flex: none;
		min-height: 56px;
		padding: 0 var(--space-4) 0 52px;
		background: var(--chr-blanc);
		border-radius: var(--radius-pill);
		box-shadow: var(--shadow-md);
	}

	.hero_recherche_champ:focus-visible {
		outline: var(--focus-ring);
		outline-offset: var(--focus-offset);
	}

	.hero_recherche_bouton {
		width: 100%;
		box-shadow: var(--shadow-md);
	}

	.hero_recherche_suggestions {
		top: 64px;
	}
}
