/* Corner Immo – Recherche personnalisée
 * Charte reprise du site : rose #f62f5d, violet #22173b / #351b4f, fond #f8f8f8.
 * Les polices sont héritées du thème. Variables surchargeables depuis le thème.
 */
.cirp {
	--cirp-pink: #f62f5d;
	--cirp-pink-dark: #dc1f4c;
	--cirp-pink-soft: #fdeeef;
	--cirp-purple: #22173b;
	--cirp-purple-2: #351b4f;
	--cirp-text: #22173b;
	--cirp-muted: #7a7190;
	--cirp-line: #e9e6ee;
	--cirp-field: #fff;
	--cirp-card: #fff;
	--cirp-radius: 14px;
	--cirp-radius-sm: 10px;
	--cirp-shadow: 0 12px 40px rgba(34, 23, 59, .08);
	--cirp-font-heading: inherit;
	color: var(--cirp-text);
	max-width: 820px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.55;
}
.cirp *, .cirp *::before, .cirp *::after { box-sizing: border-box; }
.cirp [hidden] { display: none !important; }
.cirp .cirp-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; white-space: nowrap; }

/* Carte principale */
.cirp-form, .cirp-success {
	background: var(--cirp-card);
	border-radius: var(--cirp-radius);
	box-shadow: var(--cirp-shadow);
	padding: 40px 48px;
}
@media (max-width: 640px) { .cirp-form, .cirp-success { padding: 28px 20px; } }

/* ---------- Progression : pastilles comme la frise « Notre méthode » ---------- */
.cirp-progress { position: relative; display: flex; justify-content: space-between; list-style: none; margin: 0 0 28px; padding: 0 12px; }
.cirp-progress::before { content: ""; position: absolute; left: 48px; right: 48px; top: 21px; height: 2px; background: var(--cirp-line); }
.cirp-progress li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0; flex: 0 0 auto; min-width: 72px; }
.cirp-dot {
	display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
	background: #fff; border: 2px solid var(--cirp-line); color: var(--cirp-muted);
	font-weight: 800; font-size: 17px; transition: all .25s;
}
.cirp-progress-label { font-size: 13px; font-weight: 600; color: var(--cirp-muted); }
.cirp-progress li.is-active .cirp-dot { background: var(--cirp-pink); border-color: var(--cirp-pink); color: #fff; box-shadow: 0 6px 18px rgba(246, 47, 93, .35); }
.cirp-progress li.is-active .cirp-progress-label { color: var(--cirp-purple); }
.cirp-progress li.is-done .cirp-dot { background: var(--cirp-pink-soft); border-color: var(--cirp-pink-soft); color: transparent; position: relative; }
.cirp-progress li.is-done .cirp-dot::after { content: ""; position: absolute; width: 14px; height: 8px; border-left: 3px solid var(--cirp-pink); border-bottom: 3px solid var(--cirp-pink); transform: translateY(-2px) rotate(-45deg); }
.cirp-progress li.is-done .cirp-progress-label { color: var(--cirp-purple); }
@media (max-width: 640px) {
	.cirp-progress { padding: 0; }
	.cirp-progress::before { left: 30px; right: 30px; top: 17px; }
	.cirp-progress li { min-width: 60px; }
	.cirp-dot { width: 36px; height: 36px; font-size: 15px; }
	.cirp-progress-label { font-size: 11px; }
}

/* ---------- En-têtes d'étape ---------- */
.cirp-step { border: 0; margin: 0; padding: 0; min-width: 0; animation: cirp-in .3s ease; }
@keyframes cirp-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.cirp-step-head { text-align: center; margin-bottom: 28px; }
.cirp-eyebrow { display: block; color: var(--cirp-pink); font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.cirp .cirp-step-title { font-family: var(--cirp-font-heading); color: var(--cirp-purple); font-size: clamp(24px, 3.2vw, 32px); font-weight: 800; line-height: 1.15; margin: 0 0 8px; padding: 0; }
.cirp-step-desc { color: var(--cirp-muted); margin: 0 auto; max-width: 540px; font-size: 15px; }

/* ---------- Types de biens (style « Nos points forts ») ---------- */
.cirp-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 14px; }
.cirp-type {
	position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px;
	padding: 24px 12px 20px; border: 1.5px solid var(--cirp-line); border-radius: var(--cirp-radius);
	background: #fff; cursor: pointer; text-align: center; margin: 0;
	transition: border-color .2s, box-shadow .2s, transform .2s;
}
.cirp-type:hover { border-color: var(--cirp-pink); box-shadow: var(--cirp-shadow); transform: translateY(-2px); }
.cirp-type input { position: absolute; opacity: 0; pointer-events: none; }
.cirp-type-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; background: var(--cirp-pink-soft); color: var(--cirp-pink); line-height: 0; transition: all .2s; }
.cirp-type-label { font-weight: 700; color: var(--cirp-purple); }
.cirp-type-check { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--cirp-pink); color: #fff; opacity: 0; transform: scale(.6); transition: all .2s; }
.cirp-type:has(input:checked) { border-color: var(--cirp-pink); box-shadow: 0 8px 24px rgba(246, 47, 93, .15); }
.cirp-type:has(input:checked) .cirp-type-icon { background: var(--cirp-pink); color: #fff; }
.cirp-type:has(input:checked) .cirp-type-check { opacity: 1; transform: none; }
.cirp-type:has(input:focus-visible) { outline: 2px solid var(--cirp-pink); outline-offset: 3px; }

/* ---------- Champs ---------- */
.cirp-field { margin-bottom: 22px; position: relative; }
.cirp-field > label, .cirp-label { display: block; font-weight: 700; color: var(--cirp-purple); margin-bottom: 8px; font-size: 15px; }
.cirp-label small { font-weight: 500; color: var(--cirp-muted); }
.cirp-req { color: var(--cirp-pink); }
.cirp input[type="text"], .cirp input[type="email"], .cirp input[type="tel"] {
	width: 100%; height: 52px; padding: 0 16px; margin: 0;
	border: 1.5px solid var(--cirp-line); border-radius: var(--cirp-radius-sm);
	background: var(--cirp-field); color: var(--cirp-text); font: inherit; font-size: 16px;
	transition: border-color .2s, box-shadow .2s;
}
.cirp input::placeholder { color: #b3adc0; }
.cirp input:focus { outline: none; border-color: var(--cirp-pink); box-shadow: 0 0 0 4px rgba(246, 47, 93, .12); }
.cirp input.is-invalid { border-color: var(--cirp-pink); background: #fffafb; }
.cirp-error { color: var(--cirp-pink-dark); font-size: 13px; font-weight: 600; margin: 6px 0 0; }
.cirp-error:empty { display: none; }
.cirp-global-error { margin: 0 0 16px; padding: 12px 16px; border-radius: var(--cirp-radius-sm); background: var(--cirp-pink-soft); text-align: center; }

.cirp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px) { .cirp-grid { grid-template-columns: 1fr; } }

/* Fourchettes : bloc encadré par critère */
.cirp-crit { padding: 20px; border: 1.5px solid var(--cirp-line); border-radius: var(--cirp-radius); margin-bottom: 14px; }
.cirp-range { display: flex; align-items: center; gap: 12px; }
.cirp-range-sep { color: var(--cirp-muted); font-weight: 600; }
.cirp-input-unit { position: relative; flex: 1; min-width: 0; }
.cirp-input-unit input { padding-right: 44px !important; }
.cirp-input-unit span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--cirp-muted); font-weight: 600; pointer-events: none; }
@media (max-width: 480px) { .cirp-range { flex-direction: column; align-items: stretch; gap: 8px; } .cirp-range-sep { display: none; } }

/* Pastilles de choix */
.cirp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cirp-chip { position: relative; cursor: pointer; margin: 0; }
.cirp-chip input { position: absolute; opacity: 0; pointer-events: none; }
.cirp-chip span {
	display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 44px; padding: 0 18px;
	border: 1.5px solid var(--cirp-line); border-radius: 999px; background: #fff;
	font-weight: 600; color: var(--cirp-purple); transition: all .2s;
}
.cirp-chip:hover span { border-color: var(--cirp-pink); color: var(--cirp-pink); }
.cirp-chip input:checked + span { background: var(--cirp-pink); border-color: var(--cirp-pink); color: #fff; }
.cirp-chip input:focus-visible + span { outline: 2px solid var(--cirp-pink); outline-offset: 2px; }
.cirp-chip input.is-invalid + span { border-color: var(--cirp-pink); }

/* Rayon */
.cirp-radius-out { display: inline-block; margin-left: 6px; padding: 2px 12px; border-radius: 999px; background: var(--cirp-pink-soft); color: var(--cirp-pink); font-size: 13px; font-weight: 700; }
.cirp input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; margin: 14px 0 4px; border-radius: 999px; background: linear-gradient(var(--cirp-pink), var(--cirp-pink)) 0 / var(--cirp-fill, 0%) 100% no-repeat, var(--cirp-line); cursor: pointer; }
.cirp input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--cirp-pink); box-shadow: 0 2px 8px rgba(34, 23, 59, .2); }
.cirp input[type="range"]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--cirp-pink); }
.cirp input[type="range"]:focus { outline: none; box-shadow: none; }

/* Autocomplétion */
.cirp-suggest { position: absolute; z-index: 50; left: 0; right: 0; margin: 6px 0 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--cirp-line); border-radius: var(--cirp-radius-sm); box-shadow: var(--cirp-shadow); max-height: 300px; overflow: auto; }
.cirp-suggest li { padding: 10px 12px; border-radius: 8px; cursor: pointer; margin: 0; color: var(--cirp-purple); }
.cirp-suggest li span { color: var(--cirp-muted); font-size: 14px; }
.cirp-suggest li:hover, .cirp-suggest li.is-active { background: var(--cirp-pink-soft); }
.cirp-suggest .cirp-suggest-empty { color: var(--cirp-muted); cursor: default; }

/* Consentement */
.cirp-consent { padding: 16px 18px; border-radius: var(--cirp-radius-sm); background: #f8f8f8; }
.cirp-consent label { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; font-size: 13.5px; color: var(--cirp-muted); margin: 0; cursor: pointer; }
.cirp-consent input { margin-top: 2px; flex: none; width: 20px; height: 20px; accent-color: var(--cirp-pink); }
.cirp-consent a { color: var(--cirp-pink); font-weight: 600; }

/* Navigation */
.cirp-nav { display: flex; align-items: center; gap: 12px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--cirp-line); }
.cirp-nav [data-next], .cirp-nav [data-submit] { margin-left: auto; }
.cirp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 30px;
	border: 0; border-radius: 999px; background: var(--cirp-pink); color: #fff;
	font: inherit; font-weight: 700; font-size: 16px; cursor: pointer;
	box-shadow: 0 8px 20px rgba(246, 47, 93, .28); transition: background .2s, transform .2s;
}
.cirp-btn:hover { background: var(--cirp-pink-dark); transform: translateY(-1px); }
.cirp-btn:disabled { opacity: .6; cursor: wait; transform: none; }
.cirp-btn--ghost { background: transparent; color: var(--cirp-purple); box-shadow: none; padding: 0 12px; }
.cirp-btn--ghost::before { content: "←"; }
.cirp-btn--ghost:hover { background: transparent; color: var(--cirp-pink); }
.cirp-btn[data-next]::after { content: "→"; }
@media (max-width: 480px) { .cirp-btn { padding: 0 22px; } }

/* Honeypot */
.cirp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Succès */
.cirp-success { text-align: center; outline: none; padding-top: 48px; padding-bottom: 48px; }
.cirp-success-icon { display: inline-grid; place-items: center; width: 72px; height: 72px; margin-bottom: 18px; border-radius: 50%; background: var(--cirp-pink); color: #fff; box-shadow: 0 10px 30px rgba(246, 47, 93, .35); }

.cirp.is-loading .cirp-btn[data-submit] { pointer-events: none; }

/* ======================================================================
 * v1.3 : critères étendus, oui / non / indifférent, villes multiples
 * ====================================================================== */

/* Grille des critères : oui/non en 2 colonnes, le reste en pleine largeur */
.cirp-crits { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.cirp-crits > .cirp-crit { grid-column: 1 / -1; }
.cirp-crits > .cirp-crit--toggle { grid-column: auto; display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.cirp-crit--toggle .cirp-label { margin-bottom: 0; }
@media (max-width: 640px) { .cirp-crits { grid-template-columns: 1fr; } }

/* Sélecteur segmenté (mode de recherche, oui / non / indifférent) */
.cirp-seg { display: inline-flex; flex-wrap: wrap; padding: 4px; border-radius: 999px; background: #f3f1f6; gap: 2px; max-width: 100%; }
.cirp-seg label { position: relative; margin: 0; cursor: pointer; }
.cirp-seg input { position: absolute; opacity: 0; pointer-events: none; }
.cirp-seg span { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 18px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--cirp-muted); transition: all .2s; white-space: nowrap; }
.cirp-seg label:hover span { color: var(--cirp-purple); }
.cirp-seg input:checked + span { background: #fff; color: var(--cirp-purple); box-shadow: 0 2px 8px rgba(34, 23, 59, .12); }
.cirp-seg input[value="1"]:checked + span { background: var(--cirp-pink); color: #fff; }
.cirp-seg input:focus-visible + span { outline: 2px solid var(--cirp-pink); outline-offset: 2px; }
.cirp-seg--sm { display: flex; }
.cirp-seg--sm label { flex: 1; }
.cirp-seg--sm span { width: 100%; min-height: 36px; padding: 0 10px; font-size: 14px; }
@media (max-width: 480px) { .cirp-seg:not(.cirp-seg--sm) { display: flex; border-radius: 16px; } .cirp-seg:not(.cirp-seg--sm) label { flex: 1 1 100%; } .cirp-seg:not(.cirp-seg--sm) span { width: 100%; white-space: normal; text-align: center; } }

/* Cases à cocher en pastilles */
.cirp-chip--check span::before { content: ""; display: inline-block; width: 0; overflow: hidden; transition: width .2s; }
.cirp-chip--check input:checked + span::before { content: "✓"; width: 1em; margin-right: 6px; }

/* DPE : pastilles aux couleurs de l'étiquette énergie */
.cirp-chips--dpe .cirp-chip span { min-width: 48px; padding: 0 14px; font-weight: 800; }
.cirp-chips--dpe [data-dpe] input:checked + span { color: #fff; border-color: transparent; }
.cirp-chips--dpe [data-dpe="A"] input:checked + span { background: #009c6d; }
.cirp-chips--dpe [data-dpe="B"] input:checked + span { background: #52b153; }
.cirp-chips--dpe [data-dpe="C"] input:checked + span { background: #a5cc74; color: #22173b; }
.cirp-chips--dpe [data-dpe="D"] input:checked + span { background: #f4e70f; color: #22173b; }
.cirp-chips--dpe [data-dpe="E"] input:checked + span { background: #f0b40f; color: #22173b; }
.cirp-chips--dpe [data-dpe="F"] input:checked + span { background: #eb8235; }
.cirp-chips--dpe [data-dpe="G"] input:checked + span { background: #d7221f; }

/* Villes sélectionnées */
.cirp-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.cirp-tags:not(:empty) { margin-bottom: 10px; }
.cirp-tag { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 6px 0 16px; border-radius: 999px; background: var(--cirp-pink-soft); color: var(--cirp-purple); font-weight: 700; font-size: 14px; }
.cirp .cirp-tag-remove { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: transparent; color: var(--cirp-pink); font-size: 20px; line-height: 1; cursor: pointer; box-shadow: none; }
.cirp .cirp-tag-remove:hover { background: #fff; }

/* Chargement à l'envoi */
.cirp { position: relative; }
.cirp-loader {
	position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center;
	gap: 6px; padding: 24px; text-align: center; border-radius: var(--cirp-radius);
	background: rgba(255, 255, 255, .92); backdrop-filter: blur(2px); animation: cirp-in .2s ease;
}
.cirp-loader[hidden] { display: none !important; }
.cirp-loader-title { margin: 14px 0 0; font-size: 20px; font-weight: 800; color: var(--cirp-purple); }
.cirp-loader-text { margin: 0; color: var(--cirp-muted); max-width: 360px; }
.cirp-spinner { display: inline-block; width: 52px; height: 52px; border-radius: 50%; border: 4px solid var(--cirp-pink-soft); border-top-color: var(--cirp-pink); animation: cirp-spin .8s linear infinite; }
.cirp-spinner--sm { width: 18px; height: 18px; border-width: 2.5px; border-color: rgba(255, 255, 255, .4); border-top-color: #fff; }
@keyframes cirp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cirp-spinner { animation-duration: 2s; } }
