/* =========================================================
   BELART — Devis époxy (nouvelle section)
   ========================================================= */
.devis-hero { position: relative; min-height: 380px; display: flex; align-items: flex-end; color: #fff; background: var(--dark) center 60%/cover no-repeat; }
.devis-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,16,10,.2), rgba(20,16,10,.72)); }
.devis-hero .inner { position: relative; width: 100%; max-width: 1320px; margin: 0 auto; padding: 50px 24px; }
.devis-hero h1 { font-family: var(--ff-title); font-weight: 600; font-size: clamp(36px, 5vw, 58px); margin-bottom: 10px; }
.devis-hero p { max-width: 620px; opacity: .95; margin: 0; }
.devis-hero .breadcrumb { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; opacity: .85; margin-bottom: 8px; }
.devis-hero .breadcrumb a { text-decoration: none; }

.devis-section { background: linear-gradient(180deg, var(--cream) 0%, var(--cream-2) 100%); }
.devis-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 36px; align-items: start; }
#devis-form, #demande-form { background: #fff; border-radius: 26px; box-shadow: var(--shadow); padding: 34px 40px 36px; min-width: 0; }

/* Onglets d'étapes */
.devis-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.devis-tabs button { background: none; border: 0; padding: 8px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: var(--ff-body); font-weight: 500; font-size: 14px; color: var(--body); text-align: center; line-height: 1.2; }
.devis-tabs button span { width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--body); transition: all .3s; }
.devis-tabs button.active { color: var(--ink); font-weight: 600; }
.devis-tabs button.active span { background: var(--gold-deep); border-color: var(--gold-deep); color: #fff; box-shadow: 0 6px 16px rgba(156,133,79,.35); }
.devis-tabs button.done span { border-color: var(--gold); color: var(--gold-deep); background: var(--cream); }
.devis-tabs button:disabled { cursor: default; opacity: .6; }
.devis-progress { height: 3px; background: var(--line); border-radius: 3px; margin: 14px 0 30px; overflow: hidden; }
.devis-progress div { height: 100%; width: 20%; background: linear-gradient(90deg, var(--gold), var(--gold-deep)); transition: width .4s ease; }

.devis-step { border: 0; padding: 0; margin: 0; min-width: 0; }
.devis-step h2 { font-family: var(--ff-title); font-weight: 600; font-size: clamp(28px, 3vw, 38px); color: var(--ink); text-align: center; margin-bottom: 6px; }
.step-sub { text-align: center; color: var(--body); margin-bottom: 24px; }
.field-group { margin: 22px 0; }
.field-group h3 { font-family: var(--ff-body); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 10px; }

/* Puces de choix */
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-opt { cursor: pointer; }
.chip-opt input { position: absolute; opacity: 0; pointer-events: none; }
.chip-opt span { display: inline-block; padding: 9px 18px; border-radius: 30px; border: 1.5px solid var(--line); background: #fff; font-size: 15px; color: var(--ink); transition: all .2s; }
.chip-opt:hover span { border-color: var(--beige); }
.chip-opt input:checked + span { background: var(--beige); border-color: var(--beige); color: #fff; }
.chip-opt input:focus-visible + span { outline: 2px solid var(--gold-deep); outline-offset: 2px; }

/* Curseurs */
.dim-wrap { display: grid; grid-template-columns: 1fr 300px; gap: 30px; align-items: center; margin: 10px 0 18px; }
.range-row { border: 1px solid var(--line); border-radius: 16px; padding: 14px 18px 10px; margin-bottom: 12px; background: var(--cream-3); }
.range-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.range-top label { font-weight: 600; font-size: 15px; color: var(--ink); }
.range-val { display: flex; align-items: center; gap: 6px; }
.range-val input { width: 72px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; text-align: right; font-weight: 600; color: var(--ink); background: #fff; }
.range-val span { font-size: 13px; color: var(--body); }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--gold-deep) var(--p, 50%), var(--line) var(--p, 50%)); outline: none; margin: 6px 0; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--gold-deep); cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid var(--gold-deep); cursor: pointer; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(156,133,79,.3); }
.range-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--body); }
.plateau-preview { background: var(--cream); border-radius: 18px; padding: 16px; text-align: center; }
.plateau-preview svg { width: 100%; height: auto; }
.plateau-preview .top > * { fill: #B98E5E; stroke: #8A6A43; stroke-width: 1.5; }
.plateau-preview .river { fill: none; stroke: rgba(40, 30, 20, .75); stroke-width: 9; stroke-linecap: round; }
.plateau-preview p { margin: 6px 0 0; font-size: 13.5px; color: var(--ink); font-weight: 600; }

/* Essences de bois */
.wood-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.wood-card { cursor: pointer; text-align: center; }
.wood-card input { position: absolute; opacity: 0; pointer-events: none; }
.wood-img { position: relative; display: block; aspect-ratio: 10/7; border-radius: 14px; overflow: hidden; border: 3px solid transparent; box-shadow: var(--shadow-sm); transition: all .2s; }
.wood-img svg, .wood-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wood-card:hover .wood-img { transform: translateY(-3px); }
.wood-card input:checked + .wood-img { border-color: var(--gold-deep); box-shadow: 0 0 0 4px rgba(156,133,79,.2), var(--shadow-sm); }
.wood-card input:focus-visible + .wood-img { outline: 2px solid var(--gold-deep); outline-offset: 3px; }
.tick { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--gold-deep); opacity: 0; transform: scale(.6); transition: all .2s; }
.tick::after { content: ""; position: absolute; left: 8px; top: 6px; width: 7px; height: 11px; border-right: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(45deg); }
.wood-card input:checked + .wood-img .tick { opacity: 1; transform: none; }
.wood-name { display: block; margin-top: 8px; font-family: var(--ff-body); font-weight: 600; font-size: 15.5px; color: var(--ink); }

/* Avec / sans époxy */
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; max-width: 560px; margin: 18px auto 10px; }
.mode-switch label { cursor: pointer; }
.mode-switch input { position: absolute; opacity: 0; }
.mode-switch span { display: block; text-align: center; border: 1.5px solid var(--line); border-radius: 16px; padding: 16px; transition: all .2s; }
.mode-switch b { display: block; font-family: var(--ff-body); font-weight: 600; font-size: 18px; color: var(--ink); }
.mode-switch small { color: var(--body); }
.mode-switch input:checked + span { border-color: var(--gold-deep); background: var(--cream); box-shadow: 0 0 0 3px rgba(156,133,79,.15); }
.mode-switch input:focus-visible + span { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.color-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.color-pick { border: 1px dashed var(--beige); background: #fff; border-radius: 20px; padding: 6px 14px; font-size: 13.5px; color: var(--ink); cursor: pointer; }
.color-pick.active, .color-pick:hover { background: var(--cream-2); border-style: solid; }

.edge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 560px; }
.edge-card { cursor: pointer; }
.edge-card input { position: absolute; opacity: 0; }
.edge-card span { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 1.5px solid var(--line); border-radius: 16px; padding: 14px 10px; font-family: var(--ff-body); font-weight: 500; font-size: 14.5px; color: var(--ink); transition: all .2s; }
.edge-card svg { width: 64px; height: 64px; fill: #D8BF92; stroke: #8A6A43; stroke-width: 1.5; }
.edge-card svg .hl { fill: none; stroke: var(--gold-deep); stroke-width: 3; }
.edge-card input:checked + span { border-color: var(--gold-deep); background: var(--cream); box-shadow: 0 0 0 3px rgba(156,133,79,.15); }
.edge-card input:focus-visible + span { outline: 2px solid var(--gold-deep); outline-offset: 2px; }

/* Piétements */
.leg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.leg-card { cursor: pointer; }
.leg-card input { position: absolute; opacity: 0; }
.leg-card > span { display: flex; flex-direction: column; align-items: center; text-align: center; height: 100%; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 8px 10px; transition: all .2s; background: #fff; }
.leg-card svg { width: 56px; height: 56px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.leg-card svg .muted { stroke: var(--line); }
.leg-card b { font-family: var(--ff-body); font-size: 14.5px; color: var(--ink); font-weight: 600; }
.leg-card small { font-size: 11.5px; color: var(--body); line-height: 1.35; margin-top: 2px; }
.leg-price { margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--gold-deep); }
.leg-card:hover > span { border-color: var(--beige); }
.leg-card input:checked + span { border-color: var(--gold-deep); background: var(--cream); box-shadow: 0 0 0 3px rgba(156,133,79,.15); }
.leg-card input:focus-visible + span { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.leg-detail { display: grid; grid-template-columns: 110px 1fr; gap: 20px; align-items: center; background: var(--cream); border-radius: 16px; padding: 18px 22px; margin: 18px 0; }
.leg-detail-svg svg { width: 100px; height: 100px; fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.leg-detail h4 { font-family: var(--ff-title); font-size: 20px; color: var(--ink); margin: 0 0 4px; }
.leg-detail p { font-size: 14.5px; color: var(--body); margin: 0 0 8px; }
.leg-prices { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.leg-prices li { font-size: 13.5px; color: var(--ink); display: flex; gap: 6px; }
.leg-prices b { color: var(--gold-deep); }

/* Contact + récap */
.contact-grid { display: grid; grid-template-columns: 1fr 300px; gap: 28px; margin-top: 16px; }
.recap-box { background: var(--cream); border-radius: 18px; padding: 20px 22px; align-self: start; position: sticky; top: calc(var(--header-h) + 20px); }
.recap-box h3 { font-family: var(--ff-title); font-size: 19px; color: var(--ink); margin-bottom: 12px; }
.recap-box dl { margin: 0; }
.recap-box dl div { padding: 7px 0; border-bottom: 1px solid var(--line); }
.recap-box dt { font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); }
.recap-box dd { margin: 2px 0 0; font-size: 14px; color: var(--ink); }

.step-error { background: #FBEDED; color: #9B2C2C; border-radius: 10px; padding: 11px 14px; font-size: 14.5px; margin-top: 18px; }
.step-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }

.devis-done { text-align: center; padding: 40px 10px; }
.devis-done .done-ico { width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; background: var(--gold-deep); color: #fff; display: flex; align-items: center; justify-content: center; }
.devis-done .done-ico svg { width: 36px; height: 36px; stroke-width: 2.5; }
.devis-done h2 { font-family: var(--ff-title); font-size: 34px; color: var(--ink); }
.devis-done p { color: var(--body); max-width: 520px; margin: 0 auto 24px; }

/* Colonne latérale */
.devis-aside { display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 20px); }
.aside-card { background: #fff; border-radius: 18px; padding: 22px 22px 18px; box-shadow: var(--shadow-sm); }
.aside-card h3 { font-family: var(--ff-title); font-size: 20px; color: var(--gold-deep); margin-bottom: 6px; }
.aside-card p { font-size: 14.5px; color: var(--ink); margin-bottom: 8px; }
.aside-links { list-style: none; margin: 0; padding: 0; }
.aside-links a { display: flex; align-items: center; gap: 10px; padding: 7px 0; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 15px; }
.aside-links svg { width: 18px; height: 18px; color: var(--gold-deep); }
.aside-card.promo { background: var(--beige); }
.aside-card.promo h3, .aside-card.promo p { color: var(--header-bg); }

/* Fenêtres (guide, catalogue) */
.dlg { border: 0; padding: 0; border-radius: 22px; max-width: 760px; width: calc(100% - 32px); box-shadow: var(--shadow); color: var(--text); }
.dlg-wide { max-width: 1100px; }
.dlg::backdrop { background: rgba(31,31,31,.55); }
.dlg-inner { position: relative; padding: 30px 30px 26px; }
.dlg h2 { font-family: var(--ff-title); font-size: 28px; color: var(--ink); margin-bottom: 4px; }
.dlg-inner > p { color: var(--body); }
.dlg-close { position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--cream-2); font-size: 20px; cursor: pointer; color: var(--ink); }
.table-scroll { overflow-x: auto; }
.guide-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.guide-table th, .guide-table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
.guide-table thead th { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); }
.guide-table tbody th { font-family: var(--ff-body); font-weight: 600; color: var(--ink); }
.guide-table tbody th::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--beige); margin-right: 8px; }
.deconseille { color: #9B2C2C; font-size: 13px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 16px; }
.cat-item { border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.cat-item svg { width: 56px; height: 56px; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cat-item h4 { font-family: var(--ff-title); font-size: 18px; color: var(--gold-deep); margin: 6px 0 4px; }
.cat-item p { font-size: 13.5px; color: var(--ink); margin: 0 0 8px; }
.cat-item em { color: var(--body); }
.cat-item .leg-prices { display: block; }
.cat-item .leg-prices li { justify-content: space-between; border-top: 1px dashed var(--line); padding: 3px 0; }

@media (max-width: 1100px) {
  .devis-layout { grid-template-columns: 1fr; }
  .devis-aside { position: static; grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  #devis-form, #demande-form { padding: 24px 18px 26px; border-radius: 20px; }
  .dim-wrap, .contact-grid { grid-template-columns: 1fr; }
  .plateau-preview { max-width: 320px; margin: 0 auto; }
  .wood-grid { grid-template-columns: repeat(2, 1fr); }
  .recap-box { position: static; }
  .devis-tabs button { font-size: 0; gap: 0; }
  .devis-tabs button span { font-size: 14px; }
  .devis-tabs button.active { font-size: 12px; gap: 4px; }
  .devis-aside { grid-template-columns: 1fr; }
  .leg-detail { grid-template-columns: 1fr; text-align: center; }
  .leg-detail-svg svg { margin: 0 auto; }
  .leg-prices { justify-content: center; }
}
@media (max-width: 480px) { .edge-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; } .edge-card svg { width: 48px; height: 48px; } }

/* =========================================================
   Formulaire unique « Demande de devis » (contact.html)
   ========================================================= */
.demande-context { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin: -6px 0 16px; font-size: 14.5px; color: var(--body); }
.demande-context b { color: var(--ink); font-family: var(--ff-body); font-weight: 600; font-size: 16px; }
.demande-context button { background: none; border: 0; padding: 0; color: var(--gold-deep); font-weight: 600; font-size: 14px; text-decoration: underline; cursor: pointer; }

/* Choix du projet */
.pj-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 8px; }
.pj-option { cursor: pointer; }
.pj-option input { position: absolute; opacity: 0; }
.pj-option > span { display: grid; grid-template-columns: 52px 1fr; grid-template-rows: auto auto; column-gap: 16px; align-items: center; height: 100%; border: 1.5px solid var(--line); border-radius: 18px; padding: 20px; background: #fff; transition: all .2s; }
.pj-option svg { grid-row: 1 / span 2; width: 52px; height: 52px; padding: 12px; border-radius: 50%; background: var(--cream-2); color: var(--gold-deep); }
.pj-option b { font-family: var(--ff-body); font-weight: 600; font-size: 18px; color: var(--ink); }
.pj-option small { font-size: 14px; color: var(--body); }
.pj-option:hover > span { border-color: var(--beige); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.pj-option input:checked + span { border-color: var(--gold-deep); background: var(--cream); box-shadow: 0 0 0 3px rgba(156,133,79,.15); }
.pj-option input:checked + span svg { background: var(--gold-deep); color: #fff; }
.pj-option input:focus-visible + span { outline: 2px solid var(--gold-deep); outline-offset: 2px; }

/* Styles de sol */
.style-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.style-option { cursor: pointer; }
.style-option input { position: absolute; opacity: 0; }
.style-option > span { display: flex; flex-direction: column; height: 100%; border: 1.5px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; transition: all .2s; }
.style-prev { display: block; height: 70px; }
.style-option b { font-family: var(--ff-body); font-weight: 600; font-size: 15px; color: var(--ink); padding: 10px 12px 0; }
.style-option small { font-size: 12.5px; color: var(--body); padding: 0 12px 12px; }
.style-option:hover > span { border-color: var(--beige); }
.style-option input:checked + span { border-color: var(--gold-deep); box-shadow: 0 0 0 3px rgba(156,133,79,.15); }
.style-option input:focus-visible + span { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.chip-opt .dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 8px; vertical-align: -2px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.inline-link { margin-left: 10px; font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--gold-deep); }

/* Champs */
.opt-note { font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--body); }
.dims-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 14px; }
.input-unit { position: relative; }
.input-unit input { padding-right: 46px; }
.input-unit span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--body); pointer-events: none; }
.sol-surface { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: end; }
.sol-surface .form-row { margin: 0; }
.sol-surface .opt-note { margin: 0 0 12px; }
.check-line { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 4px; font-size: 15px; color: var(--ink); cursor: pointer; }
.check-line input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--gold-deep); flex: none; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-row .error-msg { display: none; }
.form-row.invalid .error-msg { display: block; }

@media (max-width: 860px) {
  .pj-grid, .form-grid-2 { grid-template-columns: 1fr; }
  .style-grid { grid-template-columns: repeat(2, 1fr); }
  .sol-surface { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 480px) { .dims-3 { grid-template-columns: 1fr; } }

/* Coordonnées : le récapitulatif passe sous les champs quand la colonne est étroite */
#demande-form { container-type: inline-size; }
@container (max-width: 720px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-grid .recap-box { position: static; }
}
@container (max-width: 460px) {
  .form-grid-2 { grid-template-columns: 1fr; }
}

/* Pièces jointes (photos, plans) */
.files-row .files-label { display: block; font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 8px; }
.files-row .opt { font-weight: 400; color: var(--body); }
.file-drop { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1.5px dashed var(--beige); border-radius: 14px; background: var(--cream); cursor: pointer; transition: border-color .2s, background .2s; }
.file-drop:hover { border-color: var(--gold-deep); background: #fff; }
.files-row:has(#d-fichiers:focus-visible) .file-drop { border-color: var(--gold-deep); outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.file-drop svg { flex: none; width: 38px; height: 38px; padding: 9px; border-radius: 50%; background: #fff; color: var(--gold-deep); box-shadow: var(--shadow-sm); }
.file-drop span { font-size: 14.5px; line-height: 1.45; color: var(--ink); }
.file-drop small { display: block; margin-top: 3px; font-size: 12.5px; color: var(--body); }
.file-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.file-list:empty { display: none; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; background: #fff; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.file-list li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.file-list li small { color: var(--body); flex: none; }
.file-list li button { flex: none; width: 28px; height: 28px; border: 0; border-radius: 50%; background: var(--cream-2); color: var(--ink); font-size: 18px; line-height: 1; cursor: pointer; }
.file-list li button:hover { background: var(--line); }
