:root {
  --navy: #0d2f68;
  --navy-2: #164783;
  --green: #4fb555;
  --green-dark: #378c3e;
  --ink: #17243a;
  --muted: #66758c;
  --line: #dce4ef;
  --soft: #f3f7fb;
  --white: #fff;
  --danger: #b42318;
  --warning: #a15c00;
  --shadow: 0 22px 55px rgba(13, 47, 104, .11);
  --shadow-sm: 0 8px 25px rgba(13, 47, 104, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f5f8fc;
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 0 auto; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.top { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.top-in { position: relative; max-width: 1280px; height: 84px; margin: auto; padding: 10px 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand img { display: block; width: 180px; max-height: 62px; object-fit: contain; }
.top nav { display: flex; gap: 8px; }
.top nav a { padding: 11px 13px; border-radius: 9px; color: var(--navy); text-decoration: none; font-size: 14px; font-weight: 700; }
.top nav a:hover, .top nav a.active { color: var(--green-dark); background: #eef4fb; }
.menu { display: none; padding: 10px 13px; border: 0; border-radius: 9px; background: var(--navy); color: #fff; font-weight: 700; }

.hero {
  position: relative;
  overflow: hidden;
  min-height: 92px;
  padding: 18px max(22px, calc((100vw - 1240px) / 2)) 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(circle at 84% 12%, rgba(79,181,85,.32), transparent 26%),
    linear-gradient(124deg, #0a285a 0%, #0d2f68 55%, #154b7d 100%);
}
.hero::after { display: none; }
.hero-copy { position: relative; z-index: 1; }
.eyebrow, .panel-head > span {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .16em;
  color: #83da88;
}
.hero h1 {
  margin: 0;
  max-width: none;
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.15;
  letter-spacing: -.025em;
}
.hero p { max-width: 680px; margin: 0; color: #dce7f6; font-size: 15px; line-height: 1.55; }
.hero-points { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 26px; font-size: 13px; font-weight: 700; color: #f2f7ff; }
.hero-points span { display: flex; align-items: center; gap: 8px; }
.hero-points i { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--green); font-style: normal; font-size: 11px; }
.hero-card {
  position: relative;
  z-index: 1;
  width: 245px;
  flex: 0 0 auto;
  padding: 19px 21px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 18px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
}
.hero-card::before {
  content: "35";
  display: block;
  color: #fff;
  font-size: 38px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.05em;
}
.hero-card::after { content: "µm"; position: absolute; top: 23px; left: 70px; color: #83da88; font-weight: 800; }
.hero-card strong, .hero-card span { display: block; }
.hero-card strong { margin-top: 12px; font-size: 14px; }
.hero-card span { margin-top: 7px; color: #cfdcee; font-size: 12px; line-height: 1.55; }

.progress-wrap {
  position: relative;
  z-index: 3;
  width: min(850px, calc(100% - 40px));
  margin: -14px auto 26px;
  padding: 20px 48px 17px;
  border: 1px solid #e2e9f2;
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.progress-steps {
  position: relative;
  z-index: 2;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.progress-steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #95a0af; font-size: 11px; font-weight: 700; }
.progress-steps b { display: grid; place-items: center; width: 28px; height: 28px; border: 3px solid #fff; border-radius: 50%; background: #e9eef4; color: #8b97a8; box-shadow: 0 0 0 1px #e2e8f0; font-size: 11px; }
.progress-steps li.active, .progress-steps li.done { color: var(--navy); }
.progress-steps li.active b { background: var(--navy); color: #fff; box-shadow: 0 0 0 4px rgba(13,47,104,.11); }
.progress-steps li.done b { background: var(--green); color: #fff; box-shadow: none; }
.progress-bar { position: absolute; z-index: 1; top: 34px; left: 13%; right: 13%; height: 3px; background: #e7edf4; }
.progress-bar span { display: block; width: 0; height: 100%; background: var(--green); transition: width .35s ease; }

.config-shell { width: min(1240px, calc(100% - 40px)); margin: 0 auto 55px; }
.workspace {
  display: grid;
  grid-template-columns: minmax(430px, .88fr) minmax(500px, 1.12fr);
  min-height: 650px;
  overflow: hidden;
  border: 1px solid #dfe7f1;
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}
.config-panel {
  position: relative;
  padding: 42px 42px 32px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}
.panel-head > span { color: var(--green-dark); }
.panel-head h2 { margin: 9px 0 9px; color: var(--navy); font-size: clamp(24px, 3vw, 32px); line-height: 1.16; letter-spacing: -.035em; }
.panel-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.step { display: none; margin-top: 32px; animation: stepIn .3s ease; }
.step.active { display: block; }
@keyframes stepIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.choice-grid { display: grid; gap: 14px; }
.roof-grid { grid-template-columns: 1fr 1fr; }
.choice-card {
  position: relative;
  min-height: 170px;
  padding: 25px 20px 21px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 20px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: .22s ease;
}
.choice-card:hover { transform: translateY(-2px); border-color: #a9bcd5; box-shadow: var(--shadow-sm); }
.choice-card.selected { border-color: var(--green); background: #f5fcf6; box-shadow: 0 0 0 3px rgba(79,181,85,.1); }
.choice-copy strong, .choice-copy small { display: block; }
.choice-copy strong { color: var(--navy); font-size: 17px; }
.choice-copy small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.choice-check, .color-card i {
  position: absolute;
  top: 13px;
  right: 13px;
  display: none;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 12px;
  font-style: normal;
}
.selected .choice-check, .color-card.selected i { display: grid; }
.roof-diagram { display: block; width: 132px; height: 78px; }
.roof-diagram svg { display: block; width: 100%; height: 100%; overflow: visible; }
.roof-diagram .wall { fill: #eef4fa; stroke: #b9cce0; stroke-width: 2; }
.roof-diagram .roof { fill: var(--navy); stroke: #092756; stroke-width: 2.5; stroke-linejoin: round; }
.roof-diagram .seam { fill: none; stroke: #80a2c7; stroke-width: 2; stroke-linecap: round; }
.choice-card.selected .roof-diagram .roof { fill: var(--green); stroke: #327e38; }
.choice-card.selected .roof-diagram .seam { stroke: #d9f3dc; }

.color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.color-card {
  position: relative;
  min-height: 76px;
  padding: 12px 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  transition: .2s ease;
}
.color-card:hover { border-color: #9eafc2; transform: translateY(-1px); }
.color-card.selected { border-color: var(--green); background: #f5fcf6; box-shadow: 0 0 0 3px rgba(79,181,85,.1); }
.swatch { flex: 0 0 auto; width: 39px; height: 39px; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px #d5dde7, inset 0 0 8px rgba(255,255,255,.15); }
.ral-7016 { background: #293133; }
.ral-8004 { background: #8f4e35; }
.ral-8017 { background: #442f29; }
.ral-9005 { background: #0a0a0a; }
.ral-6020 { background: #37422f; }
.color-card strong, .color-card small { display: block; }
.color-card strong { color: var(--navy); font-size: 14px; }
.color-card small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.stock-badge { display: inline-block; margin-top: 6px; padding: 3px 7px; border-radius: 999px; font-size: 8px; font-style: normal; font-weight: 800; }
.stock-badge.in-stock { color: #24752d; background: #e8f8ea; }
.stock-badge.on-order { color: #9a5b00; background: #fff3d9; }
.availability-note { min-height: 41px; margin-top: 14px; padding: 11px 13px; border-radius: 10px; background: var(--soft); color: var(--muted); font-size: 11px; line-height: 1.45; }
.availability-note strong { color: var(--navy); }

.dimension-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dimension-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfe;
}
.dimension-card.full { grid-column: 1 / -1; }
.dimension-card h3 { margin: 0 0 12px; color: var(--navy); font-size: 13px; }
.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
label.field { display: flex; min-width: 0; flex-direction: column; color: var(--muted); font-size: 10px; font-weight: 700; }
.field-label { display: flex; min-height: 25px; align-items: flex-end; line-height: 1.25; }
.input-unit { position: relative; display: block; margin-top: 6px; }
.input-unit input {
  width: 100%;
  height: 44px;
  padding: 0 38px 0 12px;
  border: 1px solid #cfd9e6;
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  outline: none;
}
.input-unit input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(79,181,85,.12); }
.input-unit span { position: absolute; top: 50%; right: 12px; transform: translateY(-50%); color: #8995a5; font-size: 11px; font-weight: 700; }
.measure-help { margin-top: 12px; padding: 11px 13px; display: flex; gap: 10px; border-radius: 11px; background: #eef5fb; color: #5d6f84; }
.measure-help > span { flex: 0 0 auto; display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 11px; font-weight: 800; }
.measure-help p { margin: 0; font-size: 10px; line-height: 1.55; }
.measure-help strong { color: var(--navy); }
.accessory-fieldset { margin: 17px 0 0; padding: 0; border: 0; }
.accessory-fieldset legend { margin-bottom: 10px; color: var(--navy); font-size: 12px; font-weight: 800; }
.accessory-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.accessory-option {
  position: relative;
  min-height: 52px;
  padding: 10px 10px 10px 39px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.accessory-option input { position: absolute; left: 12px; width: 17px; height: 17px; accent-color: var(--green); }
.accessory-option strong, .accessory-option small { display: block; }
.accessory-option strong { color: var(--navy); font-size: 11px; }
.accessory-option small { margin-top: 2px; color: var(--muted); font-size: 9px; }

.result-intro { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 13px; background: #f0faf2; }
.result-icon { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; }
.result-intro strong, .result-intro small { display: block; }
.result-intro strong { color: #216c2a; font-size: 13px; }
.result-intro small { margin-top: 3px; color: #58845d; font-size: 10px; }
.result-table-wrap { margin-top: 13px; max-height: 230px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.result-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.result-table th { position: sticky; top: 0; z-index: 1; padding: 10px 9px; background: #f3f6fa; color: #6a788c; text-align: left; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.result-table td { padding: 10px 9px; border-top: 1px solid #edf1f5; color: #536177; vertical-align: middle; }
.result-table td:first-child { color: var(--navy); font-weight: 700; }
.result-table td:last-child, .result-table th:last-child { text-align: right; white-space: nowrap; }
.availability { display: inline-block; padding: 4px 6px; border-radius: 999px; font-size: 8px; font-weight: 800; white-space: nowrap; }
.availability.ok { color: #24752d; background: #e8f8ea; }
.availability.order { color: #9a5b00; background: #fff3d9; }
.totals { margin-top: 11px; padding: 12px 14px; border-radius: 12px; background: var(--soft); }
.totals > div { display: flex; justify-content: space-between; padding: 4px 0; color: var(--muted); font-size: 10px; }
.totals strong { color: var(--navy); }
.totals .grand-total { margin-top: 5px; padding-top: 9px; border-top: 1px solid #d8e2ee; color: var(--navy); font-size: 13px; font-weight: 800; }
.grand-total strong { color: var(--green-dark); font-size: 17px; }
.quote-warning { margin: 9px 0; color: var(--warning); font-size: 9px; line-height: 1.45; }

.panel-actions { margin-top: auto; padding-top: 24px; display: flex; gap: 10px; }
.primary-button, .secondary-button {
  min-height: 47px;
  border-radius: 11px;
  border: 0;
  font-weight: 800;
  font-size: 12px;
  transition: .2s ease;
}
.primary-button { margin-left: auto; padding: 0 20px; background: var(--green); color: #fff; box-shadow: 0 9px 20px rgba(79,181,85,.22); }
.primary-button span { margin-left: 12px; }
.primary-button:hover { transform: translateY(-1px); background: #45a64b; box-shadow: 0 12px 24px rgba(79,181,85,.3); }
.primary-button:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.secondary-button { display: none; padding: 0 17px; border: 1px solid var(--line); background: #fff; color: var(--navy); }
.secondary-button.visible { display: block; }
.wide { width: 100%; margin: 0; }
.step[data-step="4"] .wide { margin-top: 5px; }
.panel-status { min-height: 16px; margin-top: 8px; color: var(--danger); font-size: 10px; }

.visual-panel { padding: 31px; display: flex; flex-direction: column; background: linear-gradient(155deg, #f1f6fb, #eaf1f8); }
.visual-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.visual-top span, .visual-top strong { display: block; }
.visual-top span { color: var(--green-dark); font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.visual-top strong { margin-top: 5px; color: var(--navy); font-size: 16px; }
.visual-top button { padding: 7px 9px; border: 0; background: transparent; color: #77869a; font-size: 9px; font-weight: 700; text-decoration: underline; }
.visual-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex-wrap: wrap; }
.visual-top .tutorial-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid rgba(79,181,85,.28);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: var(--green-dark);
  text-decoration: none;
  transition: .18s ease;
}
.visual-top .tutorial-button:hover { border-color: var(--green); background: #fff; transform: translateY(-1px); }
.visual-top .tutorial-button span { color: inherit; font-size: 8px; letter-spacing: 0; }
.house-frame {
  position: relative;
  aspect-ratio: 3 / 2;
  min-height: 0;
  margin-top: 20px;
  overflow: hidden;
  display: flex;
  align-items: center;
  border: 6px solid #fff;
  border-radius: 19px;
  background: #dce8f2;
  box-shadow: 0 16px 38px rgba(13,47,104,.14);
}
.house-frame img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; transition: opacity .22s ease; }
.roof-overlay { position: absolute; z-index: 2; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.roof-overlay .highlight { fill: none; stroke: #63de68; stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; opacity: 0; filter: drop-shadow(0 0 8px rgba(30, 128, 41, .9)); transition: opacity .2s ease; }
.roof-overlay .highlight.active { opacity: .96; }
.roof-overlay .dimension-line { fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; filter: drop-shadow(0 1px 4px rgba(0, 25, 56, .95)); }
.roof-overlay .dimension-guide { stroke: rgba(255,255,255,.82); stroke-width: 3; stroke-dasharray: 10 9; }
.roof-overlay .dimension-label { fill: rgba(13,47,104,.94); stroke: #fff; stroke-width: 3; }
.roof-overlay .dimension-text { fill: #fff; font-size: 31px; font-weight: 800; text-anchor: middle; dominant-baseline: middle; }
.roof-overlay .dimension-caption { fill: #fff; font-size: 20px; font-weight: 600; text-anchor: middle; dominant-baseline: middle; }
.image-loader { position: absolute; z-index: 3; inset: 0; display: none; place-items: center; background: rgba(240,246,251,.55); }
.image-loader.active { display: grid; }
.image-loader span { width: 34px; height: 34px; border: 3px solid #d8e4ed; border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.visual-summary { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; overflow: hidden; border: 1px solid #d7e1ec; border-radius: 13px; background: #d7e1ec; }
.visual-summary > div { min-height: 72px; padding: 14px 12px; background: rgba(255,255,255,.82); }
.visual-summary span, .visual-summary strong { display: block; }
.visual-summary span { color: #7b8999; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.visual-summary strong { margin-top: 7px; color: var(--navy); font-size: 10px; line-height: 1.4; }
.sync-status { margin-top: auto; padding-top: 18px; display: flex; align-items: center; gap: 8px; color: #6c7e91; font-size: 9px; }
.sync-status i { width: 8px; height: 8px; border-radius: 50%; background: #d49c31; box-shadow: 0 0 0 4px rgba(212,156,49,.12); }
.sync-status.ok i { background: var(--green); box-shadow: 0 0 0 4px rgba(79,181,85,.12); }
.sync-status.error i { background: #d85f54; box-shadow: 0 0 0 4px rgba(216,95,84,.12); }

.site-footer { min-height: 104px; padding: 0 22px; background: var(--navy); color: #fff; }
.footer-in { max-width: 1280px; min-height: 104px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.footer-brand { padding: 8px 13px; border-radius: 10px; background: #fff; }
.footer-brand img { display: block; width: 130px; max-height: 46px; object-fit: contain; }
.site-footer strong, .site-footer span { display: block; }
.site-footer strong { font-size: 14px; }
.site-footer span { margin-top: 5px; color: #bbcbe1; font-size: 9px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { color: #fff; font-size: 11px; font-weight: 700; text-decoration: none; }
.site-footer a:hover { color: #83da88; }

/* Header et footer repris à l’identique du devis en ligne JTLM */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(13,47,104,.06);
}
.topbar__inner {
  position: relative;
  max-width: 1280px;
  min-height: 82px;
  margin: 0 auto;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand--devis {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: var(--navy);
}
.brand--devis img {
  width: 150px;
  max-height: 58px;
  object-fit: contain;
  flex: none;
}
.brand--devis div {
  min-width: 0;
  padding-left: 15px;
  border-left: 1px solid var(--line);
}
.brand--devis strong {
  display: block;
  color: var(--navy);
  font-size: 16px;
  line-height: 1.25;
  font-weight: 800;
}
.brand--devis span {
  display: block;
  margin-top: 4px;
  color: #72869a;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.topbar__right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
}
.top-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  white-space: nowrap;
}
.top-info b {
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
}
.top-info span,
.top-info a {
  color: #61768b;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.top-info a:hover { color: var(--green); }
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
  transition: .16s ease;
}
.ghost-link:hover {
  border-color: var(--green);
  background: #f7fff8;
  color: var(--green);
}
.topbar .menu {
  display: none;
  padding: 10px 13px;
  border: 0;
  border-radius: 9px;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
}
.topbar .mobile-nav { display: none; }
.jtlm-footer-brief {
  margin-top: auto;
  flex-shrink: 0;
  background: var(--navy);
  border-top: 4px solid var(--green);
  color: #fff;
}
.jtlm-footer-brief-inner {
  max-width: 1280px;
  min-height: 76px;
  margin: 0 auto;
  padding: 14px 22px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 26px;
}
.jtlm-footer-brief .footer-brand {
  padding: 0;
  border-radius: 0;
  background: transparent;
}
.jtlm-footer-brief .footer-brand strong {
  display: block;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}
.jtlm-footer-brief .footer-brand span {
  display: block;
  margin-top: 3px;
  color: #bfcfe1;
  font-size: 11px;
}
.footer-contact {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #bfcfe1;
  font-size: 11px;
  white-space: nowrap;
}
.footer-contact a {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}
.footer-contact a:hover { color: #83dc88; }
.footer-contact > span { color: var(--green); }
.footer-copy {
  color: #bfcfe1;
  font-size: 11px;
  white-space: nowrap;
}

dialog {
  width: min(680px, calc(100% - 28px));
  max-height: calc(100vh - 30px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(4,24,54,.28);
}
dialog::backdrop { background: rgba(5,24,52,.66); backdrop-filter: blur(3px); }
.video-dialog { width: min(460px, calc(100% - 28px)); }
.video-modal { position: relative; padding: 30px; }
.video-modal .eyebrow { color: var(--green-dark); }
.video-modal h2 { margin: 8px 38px 6px 0; color: var(--navy); font-size: 23px; letter-spacing: -.03em; }
.video-modal > p { margin: 0 0 16px; color: var(--muted); font-size: 12px; }
.video-modal video {
  display: block;
  width: 100%;
  max-height: 68vh;
  border-radius: 14px;
  background: #06172e;
  box-shadow: 0 12px 28px rgba(5,24,52,.18);
  object-fit: contain;
}
#quoteForm { position: relative; padding: 36px; }
.dialog-close { position: absolute; top: 17px; right: 17px; width: 33px; height: 33px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--navy); font-size: 20px; }
#quoteForm .eyebrow { color: var(--green-dark); }
#quoteForm h2 { margin: 9px 35px 8px 0; color: var(--navy); font-size: 25px; letter-spacing: -.03em; }
#quoteForm > p { margin: 0 0 22px; color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-grid label { color: var(--navy); font-size: 10px; font-weight: 800; }
.form-grid label.full { grid-column: 1 / -1; }
.website-field { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.form-grid input, .form-grid textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px 13px;
  border: 1px solid #cfd9e6;
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--ink);
  outline: 0;
  resize: vertical;
}
.form-grid input:focus, .form-grid textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(79,181,85,.12); }
.consent { margin: 15px 0; display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.consent input { width: 16px; height: 16px; accent-color: var(--green); }
.quote-status { min-height: 18px; margin-top: 10px; font-size: 11px; line-height: 1.5; }
.quote-status.error { color: var(--danger); }
.quote-status.ok { color: #25722d; }
.legal-note { display: block; margin-top: 9px; color: #8b97a7; font-size: 8px; line-height: 1.5; text-align: center; }

@media (max-width: 1020px) {
  .workspace { grid-template-columns: 1fr; }
  .config-panel { min-height: 620px; border-right: 0; border-bottom: 1px solid var(--line); }
  .visual-panel { order: -1; }
  .sync-status { margin-top: 18px; }
}
@media (max-width: 760px) {
  .top nav { display: none; position: absolute; top: 84px; left: 0; right: 0; padding: 12px; flex-direction: column; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
  .top nav.open { display: flex; }
  .menu { display: block; }
  .brand img { width: 145px; }
  .hero { min-height: 125px; padding: 20px 18px 34px; }
  .hero h1 { font-size: 24px; }
  .hero p { font-size: 14px; }
  .hero-card { display: none; }
  .hero-points { gap: 10px 17px; font-size: 11px; }
  .progress-wrap { width: calc(100% - 28px); margin-top: -35px; padding: 16px 16px 13px; }
  .progress-bar { top: 30px; }
  .progress-steps span { font-size: 9px; }
  .config-shell { width: calc(100% - 20px); }
  .workspace { border-radius: 17px; }
  .visual-panel { padding: 18px; }
  .visual-top { align-items: center; }
  .visual-actions { max-width: 190px; }
  .house-frame { margin-top: 14px; border-width: 4px; }
  .visual-summary { grid-template-columns: 1fr; }
  .visual-summary > div { min-height: 56px; }
  .config-panel { min-height: 650px; padding: 30px 20px 22px; }
  .roof-grid, .color-grid { grid-template-columns: 1fr; }
  .choice-card { min-height: 112px; flex-direction: row; align-items: center; justify-content: flex-start; padding: 18px; }
  .roof-diagram { flex: 0 0 auto; width: 108px; height: 64px; margin-right: 2px; }
  .dimension-fields, .accessory-grid { grid-template-columns: 1fr; }
  .dimension-card.full { grid-column: auto; }
  .result-table th:nth-child(3), .result-table td:nth-child(3) { display: none; }
  .footer-in { padding: 24px 0; align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid label.full { grid-column: auto; }
  #quoteForm { padding: 28px 20px; }
  .video-modal { padding: 25px 18px 18px; }
}
@media (max-width: 420px) {
  .hero h1 { font-size: 22px; }
  .progress-wrap { width: calc(100% - 16px); }
  .progress-steps li span { display: none; }
  .progress-bar { left: 14%; right: 14%; }
  .visual-panel { padding: 12px; }
  .panel-actions { position: sticky; bottom: 0; margin: 0 -20px -22px; padding: 15px 20px; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); }
}

@media (max-width: 900px) {
  .topbar__inner { min-height: 74px; padding: 8px 14px; }
  .brand--devis { gap: 10px; }
  .brand--devis img { width: 125px; max-height: 48px; }
  .brand--devis div { padding-left: 10px; }
  .brand--devis strong { font-size: 14px; }
  .brand--devis span { display: none; }
  .topbar__right .top-info,
  .topbar__right .ghost-link { display: none; }
  .topbar .menu { display: block; }
  .topbar .mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 10px 14px 14px;
    background: #fff;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(13,47,104,.12);
    flex-direction: column;
    gap: 5px;
  }
  .topbar .mobile-nav.open { display: flex; }
  .topbar .mobile-nav a {
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--navy);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
  }
  .topbar .mobile-nav a:hover { background: #eef4fb; color: var(--green); }
  .jtlm-footer-brief-inner { grid-template-columns: 1fr; gap: 8px; text-align: center; }
  .footer-contact { justify-content: center; flex-wrap: wrap; white-space: normal; }
}

@media (max-width: 520px) {
  .brand--devis img { width: 105px; }
  .brand--devis strong { font-size: 13px; }
  .footer-contact > span { display: none; }
  .footer-contact { flex-direction: column; gap: 4px; }
}
