/* doc-project | public/assets/css/simulator.css | met en forme le configurateur illustré, l’autocomplétion des communes et les actions selon l’étape */

.simulator { padding: 50px 0 100px; }
.simulator__top { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.simulator__top h1 { max-width: 820px; margin-bottom: 0; font-size: clamp(2.4rem, 5vw, 4.7rem); }
.help-button { padding: 10px 0; border: 0; background: transparent; color: var(--accent-dark); font-weight: 800; text-decoration: underline; cursor: pointer; white-space: nowrap; }
.progress { margin-top: 38px; margin-bottom: 32px; }
.progress__meta { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 10px; color: var(--muted); font-size: .88rem; font-weight: 700; }
.progress__track { height: 7px; overflow: hidden; border-radius: 999px; background: #e5e7e1; }
.progress__track span { display: block; width: 14.28%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), #d9aa6f); transition: width .45s cubic-bezier(.2, .8, .2, 1); }
.simulator__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(310px, 390px); gap: 34px; align-items: start; }
.wizard { min-width: 0; padding: clamp(24px, 4vw, 48px); border: 1px solid var(--line); border-radius: var(--radius-lg); background: rgba(255, 255, 255, .9); box-shadow: var(--shadow-sm); }
.wizard-step { animation: stepIn .42s both cubic-bezier(.2, .75, .25, 1); }
.wizard-step[hidden] { display: none; }
.step-heading { max-width: 780px; margin-bottom: 30px; }
.step-heading > span { color: var(--accent-dark); font-size: .77rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.field > label { font-size: .92rem; font-weight: 760; }
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(183, 123, 75, .12); }
.field small { color: var(--muted); font-size: .78rem; }
.city-autocomplete {
    position: relative;
}
.city-suggestions {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    display: grid;
    max-height: 230px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}
.city-suggestions[hidden] {
    display: none;
}
.city-suggestion {
    width: 100%;
    padding: 11px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.city-suggestion:hover,
.city-suggestion:focus-visible {
    outline: none;
    background: var(--paper-warm);
    color: var(--accent-dark);
}
.field small[data-state="loading"] { color: var(--accent-dark); }
.field small[data-state="success"] { color: #26705c; }
.field small[data-state="empty"] { color: #8b642e; }
.field small[data-state="error"] { color: var(--danger); }
.choice-group { margin: 28px 0 0; padding: 0; border: 0; }
.choice-group legend { margin-bottom: 10px; font-weight: 800; }
.segmented { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; padding: 6px; border-radius: 15px; background: #eef0eb; }
.segmented--compact { grid-template-columns: repeat(2, minmax(105px, 1fr)); }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: grid; place-items: center; min-height: 44px; padding: 9px 12px; border-radius: 11px; text-align: center; font-size: .9rem; font-weight: 750; transition: background .2s ease, box-shadow .2s ease, transform .2s ease; }
.segmented input:checked + span { background: var(--white); box-shadow: 0 6px 18px rgba(23, 53, 47, .1); color: var(--ink); transform: translateY(-1px); }
.visual-options { display: grid; gap: 16px; }
.visual-options--models { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.visual-options--options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.visual-card { position: relative; display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); cursor: pointer; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.visual-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.visual-card input { position: absolute; opacity: 0; }
.visual-card:has(input:focus-visible) { outline: 3px solid #e0a75f; outline-offset: 3px; }
.visual-card:has(input:checked) { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(107, 169, 161, .15), var(--shadow-sm); }
.visual-card__media { overflow: hidden; background: var(--paper-warm); }
.visual-card__media img { width: 100%; aspect-ratio: 1.62; object-fit: cover; transition: transform .35s ease; }
.visual-card:hover .visual-card__media img { transform: scale(1.035); }
.visual-card__body { display: grid; gap: 5px; padding: 15px; }
.visual-card__body strong { font-family: var(--font-serif); font-size: 1.12rem; }
.visual-card__body small { min-height: 44px; color: var(--muted); line-height: 1.4; }
.visual-card__check { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--ink); font-weight: 900; box-shadow: var(--shadow-sm); transform: scale(.8); transition: transform .2s ease, background .2s ease, color .2s ease; }
.visual-card:has(input:checked) .visual-card__check { transform: scale(1); background: var(--ink); color: var(--white); }
.visual-card--option .visual-card__media img { aspect-ratio: 1.45; }
.level-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.level-card { position: relative; display: flex; flex-direction: column; min-height: 235px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); cursor: pointer; transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.level-card:hover { transform: translateY(-4px); }
.level-card input { position: absolute; opacity: 0; }
.level-card:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(183, 123, 75, .14), var(--shadow-sm); }
.level-card__top { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 30px; }
.level-card__orb { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-light), var(--sage)); box-shadow: inset 0 0 0 9px rgba(255, 255, 255, .45); }
.level-card:nth-child(2) .level-card__orb { background: linear-gradient(135deg, #b9cfb8, #80aaa2); }
.level-card:nth-child(3) .level-card__orb { background: linear-gradient(135deg, #d3a56e, #7e9f96); }
.level-card:nth-child(4) .level-card__orb { background: linear-gradient(135deg, #17352f, #b77b4b); }
.level-card em { padding: 4px 7px; border-radius: 999px; background: var(--paper-warm); color: var(--accent-dark); font-size: .65rem; font-style: normal; font-weight: 800; text-transform: uppercase; }
.level-card > strong { font-family: var(--font-serif); font-size: 1.25rem; }
.level-card > small { margin-top: 8px; color: var(--muted); line-height: 1.4; }
.level-card__check { position: absolute; right: 15px; bottom: 15px; opacity: 0; font-weight: 900; color: var(--accent-dark); transition: opacity .2s ease; }
.level-card:has(input:checked) .level-card__check { opacity: 1; }
.mode-switch { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-top: 26px; padding: 20px; border-radius: var(--radius-md); background: var(--paper-warm); }
.mode-switch > div:first-child { display: grid; }
.mode-switch span { color: var(--muted); font-size: .88rem; }
.surface-control { padding: 28px; border-radius: var(--radius-md); background: linear-gradient(135deg, var(--paper-warm), var(--sage)); }
.surface-control > label { font-weight: 800; }
.surface-control__value { display: flex; align-items: baseline; gap: 7px; margin: 14px 0; }
.surface-control__value output { font-family: var(--font-serif); font-size: 3.6rem; line-height: 1; }
.surface-control input[type='range'] { width: 100%; accent-color: var(--ink); }
.surface-control__scale { display: flex; justify-content: space-between; color: var(--muted); font-size: .8rem; }
.counter-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 22px; }
.counter { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); }
.counter > span:first-child { font-weight: 800; }
.counter__controls { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.counter__controls button { width: 38px; height: 38px; border: 0; background: var(--paper-warm); cursor: pointer; font-size: 1.3rem; }
.counter__controls input { width: 43px; height: 38px; border: 0; background: var(--white); text-align: center; -moz-appearance: textfield; }
.counter__controls input::-webkit-outer-spin-button, .counter__controls input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.smart-message { margin-top: 18px; padding: 14px 16px; border-left: 4px solid var(--teal); border-radius: 0 12px 12px 0; background: #edf6f3; color: var(--ink-soft); }
.detail-categories { display: grid; gap: 12px; }
.detail-category { border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--white); overflow: hidden; }
.detail-category summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; cursor: pointer; font-weight: 800; }
.detail-category summary small { color: var(--muted); font-weight: 600; }
.detail-category__items { display: grid; border-top: 1px solid var(--line); }
.detail-item { display: grid; grid-template-columns: 1fr minmax(160px, 210px); align-items: center; gap: 20px; padding: 16px 20px; border-bottom: 1px solid rgba(23, 53, 47, .08); }
.detail-item:last-child { border-bottom: 0; }
.detail-item > span { display: grid; }
.detail-item small { color: var(--muted); }
.detail-item select { min-height: 42px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); padding: 8px 10px; }
.consent { display: flex; align-items: start; gap: 12px; margin-top: 22px; padding: 17px; border-radius: var(--radius-sm); background: #f4f4ef; color: var(--muted); }
.consent input { width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--ink); }
.review-card { display: grid; gap: 10px; margin-top: 24px; padding: 22px; border-radius: var(--radius-md); background: var(--ink); color: var(--white); }
.review-card strong { font-family: var(--font-serif); font-size: 1.45rem; }
.review-card span, .review-card small { color: rgba(255, 255, 255, .72); }
.wizard-actions { position: sticky; bottom: 10px; z-index: 8; display: flex; justify-content: space-between; gap: 12px; margin-top: 34px; padding: 12px; border: 1px solid rgba(23, 53, 47, .1); border-radius: 999px; background: rgba(251, 250, 246, .9); backdrop-filter: blur(14px); box-shadow: var(--shadow-sm); }
.wizard-actions [hidden] {
    display: none !important;
}
.form-error { margin: 15px 0 0; padding: 12px 15px; border-radius: 10px; background: #fff1ef; color: var(--danger); }
.project-preview__sticky { position: sticky; top: 24px; padding: 24px; border-radius: var(--radius-lg); background: var(--ink); color: var(--white); box-shadow: var(--shadow-lg); overflow: hidden; }
.project-preview .eyebrow { color: #e8c89f; }
.house-scene { position: relative; min-height: 290px; margin: 10px -10px 18px; display: grid; place-items: center; border-radius: var(--radius-md); background: linear-gradient(180deg, #f5e7d5, #dae7dc); overflow: hidden; }
.house-scene::after { content: ''; position: absolute; left: -10%; right: -10%; bottom: -12%; height: 38%; border-radius: 50% 50% 0 0; background: #b8cdb6; }
.house-scene__sun { position: absolute; top: 22px; right: 28px; width: 43px; height: 43px; border-radius: 50%; background: #efc477; box-shadow: 0 0 0 13px rgba(239, 196, 119, .15); animation: sunPulse 4s ease-in-out infinite; }
.house-scene__house { position: relative; z-index: 2; width: 92%; transform-origin: 50% 80%; animation: previewArrive .55s both; }
.scene-option { position: absolute; z-index: 4; width: 92px; border-radius: 14px; box-shadow: var(--shadow-sm); animation: optionPop .42s both cubic-bezier(.2, .9, .25, 1.25); }
.scene-option--garage { left: 5px; bottom: 36px; }
.scene-option--terrasse { right: 6px; bottom: 35px; }
.scene-option--piscine { right: 32px; bottom: 6px; width: 110px; }
.scene-option--solaire { top: 52px; left: 20px; width: 83px; }
.preview-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.preview-facts div { display: grid; gap: 3px; padding: 11px; border-radius: 12px; background: rgba(255, 255, 255, .08); }
.preview-facts span { color: rgba(255, 255, 255, .62); font-size: .72rem; }
.preview-facts strong { font-size: .92rem; }
.preview-note { margin: 15px 0 0; color: rgba(255, 255, 255, .62); font-size: .78rem; }
@keyframes stepIn { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
@keyframes previewArrive { from { opacity: 0; transform: scale(.94) translateY(12px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes optionPop { from { opacity: 0; transform: scale(.5) rotate(-5deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@keyframes sunPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
@media (max-width: 1060px) { .simulator__layout { grid-template-columns: 1fr; } .project-preview { order: -1; } .project-preview__sticky { position: relative; top: auto; display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 18px; } .project-preview__sticky > .eyebrow, .preview-note { grid-column: 1 / -1; } .house-scene { min-height: 230px; margin: 0; } .visual-options--models, .visual-options--options { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 780px) { .simulator { padding-top: 30px; } .simulator__top { align-items: start; flex-direction: column; } .wizard { padding: 22px 16px; border-radius: 24px; } .visual-options--models, .visual-options--options, .level-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .project-preview__sticky { grid-template-columns: 1fr; } .project-preview__sticky > .eyebrow, .preview-note { grid-column: auto; } .house-scene { min-height: 220px; } .mode-switch { align-items: stretch; flex-direction: column; } .counter-grid { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .segmented { grid-template-columns: 1fr; } .segmented--compact { grid-template-columns: repeat(2, 1fr); } .visual-options--models, .visual-options--options, .level-grid { grid-template-columns: 1fr; } .visual-card { grid-template-columns: 118px 1fr; align-items: center; } .visual-card__media img { aspect-ratio: 1; height: 100%; } .visual-card__body small { min-height: 0; } .detail-item { grid-template-columns: 1fr; } .wizard-actions { bottom: 6px; border-radius: 18px; } .wizard-actions .button { flex: 1; padding-inline: 12px; } .preview-facts { grid-template-columns: 1fr 1fr 1fr; } }