/* Trouver mon village — chargé uniquement sur la page « Trouver mon village » */

.vil-page [hidden] { display: none !important; }

.vil-head { padding-bottom: clamp(110px, 11vw, 150px); }
.vil-head .lede { max-width: 64ch; }
.vil-head__facts { display: flex; flex-wrap: wrap; gap: 14px 44px; margin: 30px 0 0; }
.vil-head__facts dt { font: 500 13px/1.3 var(--sans); color: var(--muted); }
.vil-head__facts dd { margin: 4px 0 0; font: 700 22px/1.15 var(--sans); letter-spacing: -.02em; color: var(--ink); }

.vil-section { position: relative; z-index: 2; margin-top: clamp(-96px, -7vw, -56px); padding-bottom: clamp(56px, 7vw, 100px); }
.vil-noscript { padding: 28px; background: var(--white); box-shadow: var(--shadow); }
.vil-noscript a { color: var(--teal-ink); font-weight: 700; text-decoration: underline; }
.vil-sent { margin-bottom: 18px; padding: 16px 20px; font-weight: 600; background: var(--white); border-left: 3px solid var(--teal); box-shadow: var(--shadow); }
.vil-sent.is-error { border-left-color: #b3261e; }

/* ---------------------------------------------------------------- Questionnaire */
.vq { max-width: 920px; margin: 0 auto; padding: clamp(26px, 3.4vw, 52px); background: var(--white); box-shadow: var(--shadow); }
.vq__top { display: flex; align-items: center; gap: 18px; margin-bottom: clamp(22px, 3vw, 34px); }
.vq__count { flex: none; font: 700 12px/1 var(--sans); letter-spacing: .14em; color: var(--teal-ink); }
.vq__bar { flex: 1; height: 3px; background: var(--stone); border-radius: 2px; overflow: hidden; }
.vq__bar i { display: block; height: 100%; width: 16%; background: var(--teal); transition: width .45s var(--ease); }

.vq-step { margin: 0; padding: 0; border: 0; min-width: 0; animation: vq-in .35s var(--ease) both; }
@keyframes vq-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.vq-step__q { display: block; width: 100%; margin: 0 0 22px; padding: 0; font: 650 clamp(24px, 2.4vw, 34px)/1.15 var(--sans); letter-spacing: -.03em; color: var(--ink); text-wrap: balance; }
.vq-step__q:focus { outline: none; }
.vq-step__hint { margin: -10px 0 22px; font-size: 15px; color: var(--ink-soft); }
.vq-step__label { display: block; margin: 26px 0 12px; font: 600 14px/1.3 var(--sans); color: var(--ink-soft); }
.vq-step__label:first-of-type { margin-top: 0; }

.vq-choices { display: grid; gap: 10px; }
.vq-choices--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vq-choices--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vq-choice { position: relative; display: block; cursor: pointer; }
.vq-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.vq-choice__box { display: flex; align-items: center; gap: 14px; height: 100%; min-height: 60px; padding: 14px 18px; border: 1.5px solid var(--line-strong); border-radius: 6px; background: var(--white); font: 600 15.5px/1.3 var(--sans); color: var(--ink); transition: border-color .2s, background .2s, box-shadow .2s; }
.vq-choice__box .icon { flex: none; width: 26px; height: 26px; color: var(--teal); }
.vq-choice__txt small { display: block; margin-top: 4px; font: 500 13px/1.35 var(--sans); color: var(--muted); }
.vq-choice:hover .vq-choice__box { border-color: var(--ink); }
.vq-choice input:checked + .vq-choice__box { border-color: var(--teal); background: var(--opal); box-shadow: inset 0 0 0 1px var(--teal); }
.vq-choice input:focus-visible + .vq-choice__box { outline: 2px solid var(--teal); outline-offset: 3px; }
.vq-choice.is-disabled { opacity: .45; cursor: not-allowed; }
.vq-choices--big .vq-choice__box { min-height: 112px; padding: 22px 24px; font-size: 18px; }
.vq-choices--big .icon { width: 34px; height: 34px; }
.vq-choices--row .vq-choice__box { justify-content: center; }

/* Pastilles (surface, lieux) */
.vq-choices--pills { display: flex; flex-wrap: wrap; gap: 8px; }
.vq-choices--pills .vq-choice__box { min-height: 46px; padding: 10px 18px; border-radius: 23px; font-size: 14.5px; }
.vq-choices--pills .vq-choice__txt small { display: inline; margin: 0 0 0 6px; font-size: 13px; }
.vq-choices--pills input:checked + .vq-choice__box { background: var(--ink); border-color: var(--ink); color: var(--white); box-shadow: none; }
.vq-choices--pills input:checked + .vq-choice__box small { color: var(--on-deep-muted); }
.vq-choices--seg .vq-choice__box { justify-content: center; min-height: 48px; padding: 10px 12px; font-size: 14px; text-align: center; }

/* Budget */
.vq-budget { margin-top: 26px; }
.vq-money { position: relative; max-width: 360px; }
.vq-money input { width: 100%; min-height: 62px; padding: 12px 52px 12px 18px; border: 1.5px solid var(--line-strong); border-radius: 6px; background: var(--paper); font: 700 24px/1 var(--sans); letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.vq-money input:focus { outline: none; border-color: var(--teal); background: var(--white); box-shadow: 0 0 0 4px rgba(0, 159, 157, .14); }
.vq-money span { position: absolute; right: 18px; top: 50%; translate: 0 -50%; font: 700 20px/1 var(--sans); color: var(--muted); }
.vq-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.vq-pill { min-height: 36px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--white); font: 600 13px/1 var(--sans); color: var(--ink-soft); transition: background .2s, color .2s, border-color .2s; }
.vq-pill:hover { border-color: var(--ink); color: var(--ink); }
.vq-pill[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* Ville de départ */
.vq-city { position: relative; max-width: 560px; }
.vq-city__icon { position: absolute; left: 16px; top: 31px; translate: 0 -50%; width: 22px; height: 22px; color: var(--teal); pointer-events: none; }
.vq-city input { width: 100%; min-height: 62px; padding: 14px 18px 14px 50px; border: 1.5px solid var(--line-strong); border-radius: 6px; background: var(--paper); font: 500 17px/1.3 var(--sans); color: var(--ink); }
.vq-city input::placeholder { color: #9a9d9c; }
.vq-city input:focus { outline: none; border-color: var(--teal); background: var(--white); box-shadow: 0 0 0 4px rgba(0, 159, 157, .14); }
.vq-city__list { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px 0; list-style: none; background: var(--white); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }
.vq-city__list li { display: flex; justify-content: space-between; gap: 12px; padding: 11px 18px; font: 600 15px/1.3 var(--sans); cursor: pointer; }
.vq-city__list li span { font-weight: 500; color: var(--muted); }
.vq-city__list li[aria-selected="true"], .vq-city__list li:hover { background: var(--opal); }
.vq-city__list li.is-empty { color: var(--muted); font-weight: 500; cursor: default; background: none; }
.vq-city__picked { margin-top: 12px; font-size: 15px; color: var(--ink-soft); }
.vq-city__picked strong { color: var(--teal-ink); }
.vq-city__wait { color: var(--muted); }
.vq-workcity { margin-top: 16px; }
.vq-workcity .vq-city__picked { margin-top: 10px; }
.vq-city__ok { color: var(--ink-soft); }
.vq-step__label--gap { margin-top: 26px !important; }
.vq-pills--origin .vq-pill { min-height: 42px; padding: 0 18px; font-size: 14px; color: var(--ink); }
.vq-pills--origin .vq-pill[aria-pressed="true"] { color: var(--white); }

/* Lieux de travail */
.vq-freq { margin-top: 24px; }
.vq-work--2 { margin-top: 26px; padding-top: 22px; border-top: 1px dashed var(--line-strong); }
.vq-add { margin-top: 20px; padding: 0; border: 0; background: none; font: 700 14px/1.4 var(--sans); color: var(--teal-ink); text-decoration: underline; text-underline-offset: 4px; }
.vq-add--remove { color: var(--muted); font-weight: 600; }

.vq__error { margin-top: 20px; padding: 12px 16px; background: #fbeaea; color: #8c1d18; font: 600 14px/1.4 var(--sans); border-radius: 4px; }
.vq__nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: clamp(26px, 3vw, 38px); padding-top: 22px; border-top: 1px solid var(--line); }
.vq__nav .btn { margin-left: auto; }
.vq__nav .btn.is-loading { opacity: .7; cursor: progress; white-space: normal; text-align: left; line-height: 1.35; }
.vq-back { padding: 10px 0; border: 0; background: none; font: 700 13px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.vq-back:hover { color: var(--ink); }

/* ---------------------------------------------------------------- Résultats */
.vr { padding: clamp(24px, 3vw, 48px); background: var(--white); box-shadow: var(--shadow); }
.vr__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.vr__head h2 { margin-top: 12px; }
.vr__head h2:focus { outline: none; }
.vr__profile { max-width: 80ch; margin-top: 12px; font-size: 14.5px; color: var(--ink-soft); }
.vr__alerts:not(:empty) { display: grid; gap: 10px; margin-top: 22px; }
.vr-alert { padding: 14px 18px; background: var(--sand); border-left: 3px solid var(--teal); font-size: 15px; }

.vr__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, .62fr); gap: clamp(24px, 3vw, 44px); margin-top: 28px; align-items: start; }
.vr__cards { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.vr__aside { position: sticky; top: 110px; }
.vr__map { height: min(68vh, 560px); background: var(--sand); }
.vr__map-note { margin-top: 8px; font-size: 12.5px; color: var(--muted); }

.vr-card { padding: clamp(20px, 2.2vw, 30px); border: 1px solid var(--line); background: var(--white); scroll-margin-top: 110px; }
.vr-card:first-child { border-color: var(--teal); box-shadow: inset 0 3px 0 var(--teal); }
.vr-card__head { display: flex; align-items: center; gap: 16px; }
.vr-card__rank { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--white); font: 700 17px/1 var(--sans); }
.vr-card:first-child .vr-card__rank { background: var(--teal-btn); }
.vr-card__name { flex: 1; font: 650 clamp(22px, 2vw, 28px)/1.15 var(--sans); letter-spacing: -.025em; }
.vr-card__name small { margin-left: 6px; font: 500 13px/1 var(--sans); letter-spacing: 0; color: var(--muted); }
.vr-card__score { display: flex; flex-direction: column; align-items: flex-end; text-align: right; color: var(--teal-ink); }
.vr-card__pct { font: 700 17px/1 var(--sans); white-space: nowrap; }
.vr-card__pct strong { margin-right: 2px; font: 700 34px/1 var(--sans); letter-spacing: -.04em; }
.vr-card__score small { margin-top: 4px; font: 600 11px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.vr-card__facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.vr-card__facts li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 10px; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; font: 600 13px/1.3 var(--sans); color: var(--ink); }
.vr-card__facts svg { flex: none; color: var(--teal); }
.vr-card__facts li[data-k="budget"] { background: var(--opal); border-color: transparent; }

.vr-card__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 20px; }
.vr-card__cols:empty { display: none; }
.vr-card__cols > div:only-child { grid-column: 1 / -1; }
.vr-card__h { margin-bottom: 8px; font: 700 11.5px/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }
.vr-plus, .vr-moins { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 14.5px; line-height: 1.5; }
.vr-plus li, .vr-moins li { position: relative; padding-left: 24px; }
.vr-plus li::before { content: ""; position: absolute; left: 2px; top: .42em; width: 11px; height: 6px; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); rotate: -45deg; }
.vr-moins li::before { content: "!"; position: absolute; left: 0; top: .2em; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: #f3e3c4; color: #7a4b00; font: 800 11px/1 var(--sans); }

.vr-card__price { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink-soft); }
.vr-card__price strong { color: var(--ink); font-size: 16px; }
.vr-card__price small { display: block; margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.vr-card__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 20px; }
.vr-card__cta .btn { gap: 14px; white-space: normal; text-align: left; line-height: 1.35; }

.vr__h3 { margin: clamp(36px, 4vw, 52px) 0 16px; font: 650 22px/1.2 var(--sans); letter-spacing: -.02em; }
.vr-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.vr-table th, .vr-table td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.vr-table thead th { font: 700 11.5px/1.3 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.vr-table tbody th { font-weight: 650; }
.vr-table tbody th a { text-decoration: underline; text-decoration-color: var(--teal); text-underline-offset: 4px; }
.vr-table td:nth-child(3) { white-space: nowrap; }
.vr-bar { display: inline-block; vertical-align: middle; width: 90px; height: 6px; margin-right: 8px; background: var(--stone); border-radius: 3px; overflow: hidden; }
.vr-bar i { display: block; height: 100%; background: var(--teal); }
.vr__hors-txt { font-size: 15px; color: var(--ink-soft); }
.vr__hors-txt small { color: var(--muted); }

.vr-lead { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: clamp(26px, 4vw, 64px); margin-top: clamp(40px, 5vw, 64px); padding: clamp(24px, 3.4vw, 48px); background: var(--sand); scroll-margin-top: 100px; }
.vr-lead__text h3 { margin: 12px 0 14px; }
.vr-lead__text p { color: var(--ink-soft); }
.vr-lead__text .agent { margin-top: 22px; }

.vr__sources { margin-top: 28px; font-size: 13.5px; color: var(--ink-soft); }
.vr__sources summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.vr__sources ul { margin: 12px 0; padding-left: 18px; }
.vr__sources p { max-width: 90ch; }

/* Carte : épingles numérotées */
.vr-pin { display: grid; place-items: center; }
.vr-pin span { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--white); border-radius: 50%; background: var(--ink); color: var(--white); font: 700 13px/1 var(--sans); box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.leaflet-marker-icon.vr-pin:first-of-type span { background: var(--teal-btn); }

.vil-method { padding-top: clamp(56px, 7vw, 100px); }

@media (max-width: 960px) {
	.vr__layout { grid-template-columns: minmax(0, 1fr); }
	.vr__aside { position: static; }
	.vr__map { height: 300px; }
	.vr-lead { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
	.vq-choices--2, .vq-choices--3 { grid-template-columns: 1fr; }
	.vq-choices--row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.vq-choices--row .vq-choice__box { flex-direction: column; gap: 6px; min-height: 84px; padding: 12px 8px; font-size: 14px; text-align: center; }
	.vq-choices--seg { grid-template-columns: 1fr; }
	.vq-choices--big .vq-choice__box { min-height: 84px; }
	.vr__head { flex-direction: column; align-items: flex-start; }
	.vr-card__cols { grid-template-columns: 1fr; }
	.vr-card__pct strong { font-size: 28px; }
	.vr-card__cta .btn { width: 100%; }
	.vr { padding: 22px 16px; }
	.vr-card { padding: 18px 16px; }
	.vr-card__facts li { font-size: 12.5px; }
	.vr-card__head { gap: 12px; }
	.vr-card__rank { width: 34px; height: 34px; font-size: 15px; }
	.vr-lead { margin-left: -16px; margin-right: -16px; padding: 24px 16px; }
	.vq { padding: 22px 18px; }
	.vr-table td:nth-child(5), .vr-table th:nth-child(5) { display: none; }
	.vr-bar { width: 54px; }
}
@media (prefers-reduced-motion: reduce) {
	.vq-step { animation: none; }
	.vq__bar i { transition: none; }
}
