/* Lflex – Trouver mon OPCO. Couleurs reprises des variables Impreza du site, avec repli. */
.lflex-opco {
	--lfo-primary: var(--color-content-primary, #FF6441);
	--lfo-primary-dark: var(--color-_lf_coral_dark, #B83219);
	--lfo-heading: var(--color-content-heading, #373B4D);
	--lfo-text: var(--color-content-text, #373B4D);
	--lfo-faded: var(--color-content-faded, #5B5F70);
	--lfo-border: var(--color-content-border, #DCE6E5);
	--lfo-aqua: var(--color-_lf_aqua, #B6E8E3);
	--lfo-aqua-bg: #EEF9F8;
	--lfo-turquoise: var(--color-_lf_turquoise, #57BBBF);
	color: var(--lfo-text);
}
.lflex-opco *, .lflex-opco *::before, .lflex-opco *::after { box-sizing: border-box; }

.lflex-opco__card {
	background: #fff;
	border-top: 6px solid var(--lfo-primary);
	border-radius: 14px;
	box-shadow: 0 12px 32px rgba(55, 59, 77, .12);
	padding: clamp(24px, 4vw, 40px) clamp(20px, 4.5vw, 48px) clamp(20px, 3vw, 28px);
}

/* En-tête : illustration + titres */
.lflex-opco__head {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: clamp(16px, 3vw, 36px);
	align-items: center;
	margin-bottom: clamp(20px, 3vw, 30px);
}
.lflex-opco__icon { width: clamp(72px, 11vw, 124px); }
.lflex-opco__icon svg, .lflex-opco__icon img { display: block; width: 100%; height: auto; }
.lflex-opco__eyebrow {
	margin: 0 0 .35em;
	color: var(--lfo-primary-dark);
	font-size: 14px;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
}
.lflex-opco .lflex-opco__title {
	margin: 0 0 .35em;
	padding: 0;
	color: var(--lfo-heading);
	font-size: clamp(24px, 3.2vw, 36px);
	line-height: 1.12;
	font-weight: 800;
	letter-spacing: -.01em;
	text-transform: none;
}
.lflex-opco__intro { margin: 0; font-size: 16px; color: var(--lfo-text); }

/* Champs */
.lflex-opco__fields {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 16px 24px;
}
.lflex-opco__field label {
	display: block;
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 700;
	color: var(--lfo-heading);
}
.lflex-opco__field select,
.lflex-opco__field input[type="text"] {
	display: block;
	width: 100%;
	height: 50px;
	margin: 0;
	padding: 0 16px;
	border: 1.5px solid var(--lfo-faded);
	border-radius: 6px;
	background-color: #fff;
	box-shadow: none;
	color: var(--lfo-text);
	font: inherit;
	font-size: 16px;
	line-height: 1.2;
}
.lflex-opco__field select {
	-webkit-appearance: none;
	appearance: none;
	padding-right: 44px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='10' viewBox='0 0 16 10'%3E%3Cpath d='M1.5 1.5 8 8l6.5-6.5' fill='none' stroke='%23373B4D' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	cursor: pointer;
}
.lflex-opco__field input::placeholder { color: #6B6F7E; opacity: 1; }
.lflex-opco__field select:focus,
.lflex-opco__field input[type="text"]:focus {
	outline: none;
	border-color: var(--lfo-heading);
	box-shadow: 0 0 0 3px rgba(255, 100, 65, .35);
}
.lflex-opco__hint { margin: 6px 0 0; font-size: 13px; color: var(--lfo-faded); }

/* Liste de suggestions */
.lflex-opco__combo { position: relative; }
.lflex-opco__list {
	position: absolute;
	z-index: 50;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	max-height: 320px;
	overflow-y: auto;
	margin: 0;
	padding: 6px;
	list-style: none;
	background: #fff;
	border: 1.5px solid var(--lfo-border);
	border-radius: 8px;
	box-shadow: 0 12px 28px rgba(55, 59, 77, .16);
}
.lflex-opco__list[hidden] { display: none; }
.lflex-opco__option {
	margin: 0;
	padding: 10px 12px;
	border-radius: 6px;
	cursor: pointer;
	line-height: 1.3;
}
.lflex-opco__option strong { display: block; font-size: 15px; color: var(--lfo-heading); }
.lflex-opco__option span { display: block; font-size: 13px; color: var(--lfo-faded); }
.lflex-opco__option[aria-selected="true"],
.lflex-opco__option:hover { background: var(--lfo-aqua-bg); }
.lflex-opco__option[aria-selected="true"] { box-shadow: inset 3px 0 0 var(--lfo-primary); }
.lflex-opco__option--empty { cursor: default; color: var(--lfo-faded); font-size: 14px; }
.lflex-opco__option--empty:hover { background: none; }

/* Bouton (style Impreza + ajustements) */
.lflex-opco .lflex-opco__submit {
	display: flex;
	justify-content: center;
	width: 100%;
	margin-top: 24px;
}
.lflex-opco .lflex-opco__submit[aria-busy="true"] { opacity: .75; cursor: progress; }
.lflex-opco__status { min-height: 1.4em; margin: 10px 0 0; font-size: 14px; text-align: center; color: var(--lfo-faded); }
.lflex-opco__status.is-error { color: var(--lfo-primary-dark); font-weight: 600; }

/* Résultat */
.lflex-opco__result {
	margin-top: 8px;
	padding: 24px clamp(18px, 3vw, 28px);
	border-radius: 10px;
	background: var(--lfo-aqua-bg);
	border: 1.5px solid var(--lfo-aqua);
}
.lflex-opco__result:focus { outline: 3px solid rgba(255, 100, 65, .45); outline-offset: 2px; }
.lflex-opco__result[hidden] { display: none; }
.lflex-opco__result-label {
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--lfo-faded);
}
.lflex-opco .lflex-opco__result .lflex-opco__result-opco {
	margin: 0 0 6px;
	font-size: clamp(26px, 3.4vw, 34px);
	line-height: 1.1;
	font-weight: 800;
	color: var(--lfo-heading);
}
.lflex-opco .lflex-opco__result-opco a { color: inherit; text-decoration: underline; text-decoration-color: var(--lfo-primary); text-underline-offset: .15em; }
.lflex-opco__badge {
	display: inline-block;
	margin: 0 0 14px;
	padding: 3px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	background: #fff;
	color: var(--lfo-heading);
	border: 1px solid var(--lfo-aqua);
}
.lflex-opco__badge--moyenne { background: #FBF0E6; border-color: #F3D2B4; }
.lflex-opco__details { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 0 0 16px; font-size: 15px; }
.lflex-opco__details dt { margin: 0; font-weight: 700; color: var(--lfo-heading); }
.lflex-opco__details dd { margin: 0; }
.lflex-opco__result p { margin: 0 0 12px; font-size: 15px; line-height: 1.5; }
.lflex-opco__result ul { margin: 0 0 12px 1.2em; padding: 0; font-size: 15px; }
.lflex-opco__teaser {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 12px 14px;
	border-radius: 8px;
	background: #fff;
	font-size: 14px !important;
}
.lflex-opco__teaser::before { content: "→"; color: var(--lfo-primary); font-weight: 800; }
.lflex-opco__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.lflex-opco__actions .w-btn { font-size: 15px; }
.lflex-opco__again {
	margin-top: 14px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--lfo-heading);
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

/* Financement indicatif */
.lflex-opco__fin {
	margin: 4px 0 8px;
	padding: 20px clamp(16px, 2.5vw, 24px);
	border-radius: 10px;
	background: #fff;
	border-left: 4px solid var(--lfo-primary);
}
.lflex-opco .lflex-opco__fin-title {
	margin: 0 0 2px;
	padding: 0;
	font-size: 20px;
	line-height: 1.2;
	font-weight: 800;
	color: var(--lfo-heading);
	text-transform: none;
	letter-spacing: 0;
}
.lflex-opco .lflex-opco__fin-profile { margin: 0 0 10px; font-size: 13px; color: var(--lfo-faded); }
.lflex-opco .lflex-opco__fin-env { margin: 0 0 16px; }
.lflex-opco__env { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 10px; }
.lflex-opco__env-tile {
	flex: 1 1 200px;
	padding: 16px 18px;
	border-radius: 8px;
	background: #FBF0E6;
}
.lflex-opco .lflex-opco__env-tile p { margin: 0; }
.lflex-opco .lflex-opco__env .lflex-opco__env-value {
	font-size: clamp(30px, 4vw, 42px);
	line-height: 1.05;
	font-weight: 800;
	color: var(--lfo-primary-dark);
}
.lflex-opco .lflex-opco__env .lflex-opco__env-label { margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--lfo-heading); }
.lflex-opco .lflex-opco__fin .lflex-opco__env-na { margin: 6px 0; font-size: 22px; font-weight: 800; color: var(--lfo-heading); }
.lflex-opco .lflex-opco__fin .lflex-opco__env-note { margin: 0 0 4px; font-size: 13px; color: var(--lfo-faded); }
.lflex-opco__fin-more { margin-top: 14px; font-size: 14px; }
.lflex-opco__fin-more summary { cursor: pointer; font-weight: 700; color: var(--lfo-heading); }
.lflex-opco .lflex-opco__fin-more p { margin: 8px 0 0; font-size: 14px; }

/* Encart email */
.lflex-opco .lflex-opco__gate-intro { margin: 0 0 14px; font-size: 15px; }
.lflex-opco__gate-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.lflex-opco__gate-row .lflex-opco__field { flex: 1 1 260px; }
.lflex-opco__field input[type="email"] {
	display: block;
	width: 100%;
	height: 50px;
	margin: 0;
	padding: 0 16px;
	border: 1.5px solid var(--lfo-faded);
	border-radius: 6px;
	background-color: #fff;
	color: var(--lfo-text);
	font: inherit;
	font-size: 16px;
}
.lflex-opco__field input[type="email"]:focus { outline: none; border-color: var(--lfo-heading); box-shadow: 0 0 0 3px rgba(255, 100, 65, .35); }
.lflex-opco__field input[aria-invalid="true"] { border-color: var(--lfo-primary-dark); }
.lflex-opco .lflex-opco__gate-btn { flex: 0 0 auto; }
.lflex-opco .lflex-opco__gate-btn[aria-busy="true"] { opacity: .75; cursor: progress; }
.lflex-opco__trap { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.lflex-opco .lflex-opco__check { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; font-size: 14px; }
.lflex-opco__check input { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--lfo-primary-dark); }
.lflex-opco .lflex-opco__gate-error { min-height: 0; margin: 8px 0 0; font-size: 14px; font-weight: 600; color: var(--lfo-primary-dark); }
.lflex-opco .lflex-opco__gate-error:empty { display: none; }
.lflex-opco .lflex-opco__gate-legal { margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--lfo-faded); }
.lflex-opco .lflex-opco__gate-legal a { color: inherit; text-decoration: underline; }
.lflex-opco .lflex-opco__sent { margin: 0 0 6px; font-size: 13px; color: var(--lfo-faded); }
.lflex-opco__linkbtn { padding: 0; border: 0; background: none; color: var(--lfo-heading); font: inherit; text-decoration: underline; cursor: pointer; }
.lflex-opco__fin-title:focus { outline: 3px solid rgba(255, 100, 65, .45); outline-offset: 2px; }

.lflex-opco__legal {
	margin: 18px 0 0;
	font-size: 13px;
	font-style: italic;
	text-align: center;
	color: var(--lfo-faded);
}

/* Mobile */
@media (max-width: 767px) {
	.lflex-opco__head { grid-template-columns: 1fr; text-align: left; }
	.lflex-opco__icon { width: 72px; }
	.lflex-opco__fields { grid-template-columns: 1fr; }
	.lflex-opco__details { grid-template-columns: 1fr; gap: 0; }
	.lflex-opco__details dd { margin-bottom: 8px; }
}

@media (prefers-reduced-motion: no-preference) {
	.lflex-opco__result:not([hidden]) { animation: lflex-opco-in .25s ease-out; }
	@keyframes lflex-opco-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}
