/* ================================================================
   YTES — Widget Recherche Financement (Elementor)
   ================================================================ */

:root {
	--ytes-bleu: #1C43A5;
	--ytes-bleu-dark: #132E6E;
	--ytes-bleu-light: #2A56C6;
	--ytes-bleu-subtle: #E8EDF8;
	--ytes-bleu-muted: #94A7D4;
	--ytes-jaune: #FFC044;
	--ytes-jaune-dark: #E5A52E;
	--ytes-g200: #E2E5EC;
	--ytes-g300: #C8CDD8;
	--ytes-g400: #9BA3B5;
	--ytes-g500: #6B7486;
	--ytes-g700: #333B4D;
	--ytes-g800: #1E2433;
	--ytes-white: #FFFFFF;
	--ytes-radius: 10px;
	--ytes-radius-lg: 16px;
	--ytes-font: 'Carlito', -apple-system, sans-serif;
	--ytes-font-display: 'DM Serif Display', Georgia, serif;
	--ytes-ease: cubic-bezier(0.16, 1, 0.3, 1);
	--ytes-shadow-lg: 0 8px 36px rgba(28,67,165,0.1);
	--ytes-shadow-gold: 0 4px 24px rgba(255,192,68,0.25);
}


/* ---- Section ---- */
.ytes-rech {
	padding: 4rem 0;
	position: relative;
	overflow: visible;
}

.ytes-rech__inner {
	position: relative;
	z-index: 1;
	border-radius: var(--ytes-radius-lg);
	padding: 2.5rem 2rem;
	box-shadow: var(--ytes-shadow-lg);
	max-width: 760px;
	margin: 0 auto;
}
@media (min-width: 768px) {
	.ytes-rech__inner { padding: 3rem; }
}


/* ---- Header ---- */
.ytes-rech__header {
	text-align: center;
	margin-bottom: 2rem;
}
.ytes-rech__title {
	font-family: var(--ytes-font-display);
	font-size: 1.5rem;
	color: var(--ytes-bleu);
	margin-bottom: 0.375rem;
  scroll-margin-top: 140px;
}
.ytes-rech__sub {
	font-family: var(--ytes-font);
	font-size: 0.9375rem;
	color: var(--ytes-g500);
}


/* ---- Form layout ---- */
.ytes-rech__form {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}


/* ---- Field labels ---- */
.ytes-rech__field > label:first-child,
.ytes-rech__field--entity > legend {
	display: block;
	font-family: var(--ytes-font);
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--ytes-g700);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 0.5rem;
	padding: 0;
	border: none;
}

.ytes-rech__field--entity {
	margin: 0;
	padding: 0;
	border: none;
}


/* ---- Text input ---- */
.ytes-rech__input-wrap {
	position: relative;
}
.ytes-rech__input-icon {
	position: absolute;
	left: 0.875rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--ytes-g400);
	pointer-events: none;
}
.ytes-rech__input-wrap input[type="text"] {
	width: 100%;
	padding: 0.8rem 1rem 0.8rem 2.75rem;
	border: 1.5px solid var(--ytes-g200);
	border-radius: var(--ytes-radius);
	font-family: var(--ytes-font);
	font-size: 0.9375rem;
	color: var(--ytes-g700);
	background: var(--ytes-white);
	transition: border-color 300ms, box-shadow 300ms;
}
.ytes-rech__input-wrap input[type="text"]::placeholder {
	color: var(--ytes-g400);
	font-weight: 400;
}
.ytes-rech__input-wrap input[type="text"]:focus {
	border-color: var(--ytes-bleu);
	box-shadow: 0 0 0 3px rgba(28,67,165,0.08);
	outline: none;
}


/* ---- Multi-select ---- */
.ytes-rech__multiselect {
	position: relative;
}

.ytes-rech__ms-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 0.8rem 1rem;
	border: 1.5px solid var(--ytes-g200);
	border-radius: var(--ytes-radius);
	font-family: var(--ytes-font);
	font-size: 0.9375rem;
	color: var(--ytes-g700);
	background-color: var(--ytes-white) !important;
	cursor: pointer;
	text-align: left;
	transition: border-color 300ms, box-shadow 300ms;
}
.ytes-rech__ms-trigger:hover {
	border-color: var(--ytes-g300);
}
.ytes-rech__ms-trigger[aria-expanded="true"] {
	border-color: var(--ytes-bleu);
	box-shadow: 0 0 0 3px rgba(28,67,165,0.08);
}

.ytes-rech__ms-placeholder {
	color: var(--ytes-g400);
	font-weight: 400;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex: 1;
}
.ytes-rech__ms-placeholder.has-selection {
	color: var(--ytes-g700);
	font-weight: 700;
}

.ytes-rech__ms-chevron {
	flex-shrink: 0;
	color: var(--ytes-g400);
	transition: transform 300ms var(--ytes-ease);
}
.ytes-rech__ms-trigger[aria-expanded="true"] .ytes-rech__ms-chevron {
	transform: rotate(180deg);
}


/* ---- Dropdown panel ---- */
.ytes-rech__ms-dropdown {
	position: absolute;
	top: calc(100% + 6px);
	left: 0; right: 0;
	z-index: 50;
	background: var(--ytes-white);
	border: 1.5px solid var(--ytes-g200);
	border-radius: var(--ytes-radius);
	box-shadow: var(--ytes-shadow-lg);
	max-height: 260px;
	overflow-y: auto;
	padding: 0.5rem 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: all 250ms var(--ytes-ease);
}
.ytes-rech__ms-dropdown.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.ytes-rech__ms-dropdown::-webkit-scrollbar { width: 6px; }
.ytes-rech__ms-dropdown::-webkit-scrollbar-track { background: transparent; }
.ytes-rech__ms-dropdown::-webkit-scrollbar-thumb { background: var(--ytes-g300); border-radius: 3px; }

.ytes-rech__ms-option {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	padding: 0.5rem 1rem;
	cursor: pointer;
	font-family: var(--ytes-font);
	font-size: 0.875rem;
	color: var(--ytes-g700);
	transition: background 150ms;
	user-select: none;
	font-weight: 400 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	margin-bottom: 0 !important;
}
.ytes-rech__ms-option:hover {
	background: var(--ytes-bleu-subtle);
}
.ytes-rech__ms-option input[type="checkbox"] {
	width: 16px; height: 16px;
	border-radius: 3px;
	accent-color: var(--ytes-bleu);
	cursor: pointer;
	flex-shrink: 0;
}
.ytes-rech__ms-option span {
	font-weight: 400;
}
.ytes-rech__ms-option:has(input:checked) span {
	font-weight: 700;
	color: var(--ytes-bleu);
}


/* ---- Tags ---- */
.ytes-rech__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.375rem;
	margin-top: 0.5rem;
	min-height: 0;
}
.ytes-rech__tags:empty {
	margin-top: 0;
}
.ytes-rech__tag {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.25rem 0.5rem 0.25rem 0.75rem;
	background: var(--ytes-bleu-subtle);
	color: var(--ytes-bleu);
	font-family: var(--ytes-font);
	font-size: 0.75rem;
	font-weight: 700;
	border-radius: 100px;
	animation: ytes-tag-in 250ms var(--ytes-ease);
}
@keyframes ytes-tag-in {
	from { opacity: 0; transform: scale(0.85); }
	to { opacity: 1; transform: scale(1); }
}
.ytes-rech__tag-remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 16px; height: 16px;
	border-radius: 50%;
	background: transparent !important;
	color: var(--ytes-bleu-muted) !important;
	cursor: pointer;
	border: none;
	padding: 0;
	transition: all 200ms;
	padding: 0 !important;
}
.ytes-rech__tag-remove:hover {
	background: var(--ytes-bleu) !important;
	color: var(--ytes-white) !important;
}
.ytes-rech__tag-remove svg {
	width: 10px; height: 10px;
}


/* ---- Checkboxes (Vous êtes) ---- */
.ytes-rech__checkboxes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.ytes-rech__cb {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	cursor: pointer;
	font-family: var(--ytes-font);
	font-size: 0.9375rem;
	color: var(--ytes-g700);
	padding: 0.5rem 1rem;
	border: 1.5px solid var(--ytes-g200);
	border-radius: var(--ytes-radius);
	transition: all 300ms var(--ytes-ease);
	user-select: none;
	font-weight: 400 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	margin-bottom: 0 !important;
}
.ytes-rech__cb:hover {
	border-color: var(--ytes-bleu-muted);
	background: var(--ytes-bleu-subtle);
}
.ytes-rech__cb:has(input:checked) {
	border-color: var(--ytes-bleu);
	background: var(--ytes-bleu-subtle);
}

.ytes-rech__cb input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 0; height: 0;
	pointer-events: none;
}

.ytes-rech__cb-box {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px; height: 20px;
	border: 1.5px solid var(--ytes-g300);
	border-radius: 4px;
	background: var(--ytes-white);
	flex-shrink: 0;
	transition: all 250ms var(--ytes-ease);
	color: transparent;
}
.ytes-rech__cb:has(input:checked) .ytes-rech__cb-box {
	background: var(--ytes-bleu);
	border-color: var(--ytes-bleu);
	color: var(--ytes-white);
}
.ytes-rech__cb span:last-child {
	font-weight: 700;
	transition: color 200ms;
}
.ytes-rech__cb:has(input:checked) span:last-child {
	color: var(--ytes-bleu);
}


/* ---- Submit button ---- */
.ytes-rech__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	font-family: var(--ytes-font);
	font-weight: 700;
	font-size: 1rem;
	line-height: 1;
	border-radius: var(--ytes-radius);
	padding: 1rem 2rem;
	border: none;
	cursor: pointer;
	transition: all 400ms var(--ytes-ease);
	white-space: nowrap;
	width: 100%;
	box-shadow: var(--ytes-shadow-gold);
}
.ytes-rech__submit:hover {
	filter: brightness(0.95);
}

@media (min-width: 480px) {
	.ytes-rech__submit {
		width: auto;
		align-self: center;
	}
}
