/* Moissons - Emplois (archive)
 *
 * Basé sur `bb-bewod/modules/moissons-emplois/css/moissons-emplois.css`
 * adapté à une grille (hors Swiper).
 */

/* Zone grid + candidature : fond gris */
.emplois-grid-wrap {
	background-color: var(--light);
}

/* Ancre candidature */
#candidature {
	scroll-margin-top: 120px;
}

/* CTA sticky (mobile + desktop) */
.btn.candidature-sticky {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 9999;
	background: var(--purple);
	opacity: 1;
	transform: translateY(0);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.btn.candidature-sticky.is-hidden {
	opacity: 0;
	pointer-events: none;
	transform: translateY(12px);
}

.btn.candidature-sticky:hover {
	background: var(--green);
}

/* Bloc candidature (après la liste) */
.candidature-section {
	margin: 2rem auto 4rem;
	padding: 2rem 1.25rem;
}

.candidature-section .card .card-body {
	gap: 1.5rem;
}

.candidature-section__form {
	width: 100%;
}

/* Barre de recherche (top) */
.emplois-searchbar {
	max-width: var(--mxw-medium);
	margin: 0 auto 1.5rem;
	padding: 0 1.25rem;
}

.emplois-searchbar__mobile-toggle {
	display: none;
}

.emplois-searchbar__mobile-icon {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--green);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 56px;
}

.emplois-searchbar__mobile-icon img {
	width: 20px;
	height: 20px;
	filter: brightness(0) invert(1);
}

.emplois-searchbar__row {
	display: grid;
	grid-template-columns: 1.1fr 1fr 1fr 1fr auto;
	gap: 2px;
	/*
	background: rgba(0, 0, 0, 0.08);
	*/
	background: #fff;
	border-radius: 999px;
	/* overflow: visible pour laisser les dropdowns dépasser */
}

.emplois-searchbar__field {
	position: relative;
	padding: 0.85rem 1.5rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.25rem;
    min-width: 0;
    border-radius: 100px;
}

.emplois-searchbar__field:first-child {
	padding-left: 2rem;
}

.emplois-searchbar__field:before {
	z-index: 10;
	border-left: 1px solid rgba(0, 0, 0, 0.12);
	content: '';
	position: absolute;
	right: 0;
	height: 60%;
	width: 1px;
}

.emplois-searchbar__last {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem 2rem 1rem;
}

.emplois-searchbar__last::before {
	display: none;
}

.emplois-searchbar__field-noborder:before {
	border-left: none;
}

.emplois-multiselect .esb-dropdown li {
    padding: 0;
}


.emplois-searchbar__label {
	font-size: 0.75rem;
	font-weight: 600;
	color: rgba(0, 0, 0, 0.6);
}

.emplois-searchbar input,
.emplois-searchbar select {
	border: 0;
	box-shadow: none;
	padding: 0;
	margin: 0;
	background: transparent;
	border-color: #fff !important;
	font-size: 0.95rem;
	min-width: 0;
}

.emplois-searchbar input {
	padding: 0 !important;
}

/* Le select natif est masqué par JS — règle arrow supprimée */

.emplois-searchbar input:focus,
.emplois-searchbar select:focus {
	box-shadow: none !important;
	outline: none;
}

.emplois-searchbar__submit {
	width: 56px;
	height: 56px;
	border: 0;
	border-radius: 50%;
	background: var(--green);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

/* ---- Custom select : pill hover ---- */
.emplois-searchbar__field {
	transition: background-color 0.25s ease, color 0.35s ease;
}

.emplois-searchbar__field.esb-field--select:hover,
.emplois-searchbar__field.esb-field--select.is-open {
	background-color: var(--green);
	color: #fff;
}

.emplois-searchbar__field.esb-field--select:hover .emplois-searchbar__label,
.emplois-searchbar__field.esb-field--select.is-open .emplois-searchbar__label {
	color: rgba(255, 255, 255, 0.8);
}

.emplois-searchbar__field.esb-field--select:hover::before,
.emplois-searchbar__field.esb-field--select.is-open::before {
	border-left-color: transparent;
}



/* Valeur affichée (remplacement du select natif) */
.esb-value {
	display: block;
	font-size: 0.95rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ---- Custom select : dropdown ---- */
.esb-dropdown {
	display: none;
	position: absolute;
	top: calc(100% + 0.5rem);
	left: 0;
	min-width: 220px;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.13);
	z-index: 300;
	padding: 0.4rem 0;
	list-style: none;
	margin: 0;
	max-height: 280px;
	overflow-y: auto;
}

.emplois-searchbar__field.is-open .esb-dropdown {
	display: block;
}

.esb-dropdown li {
	padding: 0.6rem 1.25rem;
	cursor: pointer;
	font-size: 0.9rem;
	color: #333;
	transition: background-color 0.15s;
}

.esb-dropdown li:hover {
	background: rgba(0, 0, 0, 0.04);
}

.esb-dropdown li.is-selected {
	font-weight: 700;
}

.esb-option-checkbox {
	padding: 0;
}

.esb-option-checkbox__label {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.6rem 1.25rem;
	cursor: pointer;
	font-size: 0.9rem;
	line-height: 1.25;
	color: #333;
}


.esb-option-checkbox__label input[type='checkbox'] {
	margin: 0;
	accent-color: var(--green);
}

@media (max-width: 991px) {
	/* Mobile: on masque le moteur complet par défaut,
	   et on l'ouvre via JS en ajoutant .is-open sur .emplois-searchbar */
	.emplois-searchbar__mobile-toggle {
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		border: 0;
		padding: 0.75rem 0.75rem 0.75rem 1.25rem;
		background: #fff;
		border-radius: 999px;
		box-shadow: 0 10px 16px rgba(0, 0, 0, 0.08);
		cursor: pointer;
	}
	.emplois-searchbar__mobile-toggle:hover,
	.emplois-searchbar__mobile-toggle:focus {
		background: var(--green);
	}
	.emplois-searchbar__mobile-toggle:hover .emplois-searchbar__mobile-label,
	.emplois-searchbar__mobile-toggle:focus .emplois-searchbar__mobile-label {
		color: #fff;
	}

	.emplois-searchbar__mobile-label {
		font-size: 0.95rem;
		font-weight: 500;
		color: rgba(0, 0, 0, 0.7);
	}

	.emplois-searchbar__panel {
		display: none;
		margin-top: 0.75rem;
	}

	.emplois-searchbar.is-open .emplois-searchbar__panel {
		display: block;
	}

	.emplois-searchbar__row {
		grid-template-columns: 1fr;
		border-radius: 1.5rem;
		gap: 1rem;
		background-color: var(--light);
	}
	.emplois-searchbar__field {
		background-color: #fff;
		padding-top: 1.5rem;
		padding-bottom: 1.5rem;
		border-radius: 1.5rem;
	}
	.emplois-searchbar__field:before {
		display: none;
	}
	.emplois-searchbar__last {
		background-color: #fff;
		border-radius: 1.5rem;
	}
	.emplois-searchbar__submit {
		width: 100%;
		border-radius: 1.5rem;
	}

	.candidature-sticky {
		right: 1rem;
		bottom: 1rem;
		padding: 0.85rem 1rem;
	}
}

/* Contact form – styles NF globaux déplacés dans moissons-ninja-forms.css */