/* ===========================================================
   Calculateur tarifaire — Maison 7e Sens
   Charte : Poppins, indigo / cyan / magenta / teal.
   Aucun prix n'est affiché à l'utilisateur.
   =========================================================== */
:root {
  --ink: #1c1b3a;
  --cyan: #10b3e8;
  --cyan-soft: #e6f7fd;
  --pink: #e6007e;
  --pink-dark: #c70069;
  --teal: #1bb9a6;
  --muted: #6b6b85;
  --line: #e7e7ef;
  --bg: #ffffff;
  --bg-soft: #f5f6fb;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(28,27,58,.04), 0 10px 30px rgba(28,27,58,.08);
  --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw: 1280px;   /* largeur max ; la frame remplit la largeur disponible */
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.5; -webkit-font-smoothing: antialiased;
}
.m7s { max-width: var(--maxw); margin: 0 auto; padding: 22px 16px 44px; }
a { color: var(--pink); }

/* ---------- Étapes ---------- */
.steps { display: flex; gap: 8px; list-style: none; margin: 0 0 26px; padding: 0; flex-wrap: wrap; }
.steps li {
  display: flex; align-items: center; gap: 9px; flex: 1 1 0; min-width: 130px;
  color: var(--muted); font-size: 13px; font-weight: 600;
  padding: 9px 12px; border-radius: 40px; background: var(--bg-soft); transition: .2s;
}
.steps li .dot {
  width: 25px; height: 25px; border-radius: 50%; background: #fff; border: 2px solid var(--line);
  color: var(--muted); display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none;
}
.steps li.active { color: #fff; background: var(--ink); }
.steps li.active .dot { background: var(--cyan); border-color: var(--cyan); color: #fff; }
.steps li.done { color: var(--ink); background: var(--cyan-soft); }
.steps li.done .dot { background: var(--cyan); border-color: var(--cyan); color: #fff; }

/* ---------- Titres ---------- */
.view { min-height: 220px; }
h1.title { font-size: 26px; font-weight: 700; margin: 4px 0 6px; letter-spacing: -.02em; }
p.sub { color: var(--muted); margin: 0 0 24px; font-size: 15px; max-width: 70ch; }
.panel { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }

/* ---------- Budget ---------- */
.budget-box { padding: 30px; text-align: center; }
.budget-value { font-size: 46px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
input[type="range"] { width: 100%; margin: 24px 0 6px; accent-color: var(--cyan); height: 6px; }
.range-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.budget-manual { margin-top: 20px; display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; color: var(--muted); }
.budget-manual input { width: 170px; }

/* ---------- Grille modèles ---------- */
.gamme { margin-bottom: 32px; }
.gamme-head { display: flex; align-items: center; gap: 12px; margin: 0 0 4px; }
.gamme-head h2 { font-size: 19px; margin: 0; font-weight: 700; }
.gamme-head .desc { color: var(--muted); font-size: 13px; }
.type-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 10px; font-weight: 700; }
.models { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.model-card {
  text-align: left; cursor: pointer; padding: 0; border-radius: var(--radius); overflow: hidden;
  border: 2px solid var(--line); background: #fff; transition: .16s; display: flex; flex-direction: column;
}
.model-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #d3d3e2; }
.model-card.selected { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(16,179,232,.18); }
.model-photo { aspect-ratio: 16 / 10; width: 100%; object-fit: cover; background: var(--bg-soft); display: block; }
.model-photo.ph { display: grid; place-items: center; }
.model-body { padding: 14px 15px 16px; }
.gtag { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; padding: 4px 10px; border-radius: 30px; letter-spacing: .02em; margin-bottom: 9px; }
.model-card .mname { font-weight: 700; font-size: 17px; }
.model-card .mtype { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.model-card .mdesc { color: var(--muted); font-size: 13px; margin-top: 8px; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 10px; margin-top: 12px; }
.spec { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.spec b { color: var(--ink); font-weight: 700; }
.spec-ic { width: 17px; height: 17px; color: var(--cyan); flex: none; }
.summary .specs { margin: 10px 0 4px; }
.model-card .pick { margin-top: 12px; font-weight: 700; font-size: 13.5px; color: var(--pink); display: inline-flex; align-items: center; gap: 6px; }
.model-card.selected .pick { color: var(--cyan); }
.model-card.selected .pick .pl::after { content: "Sélectionné ✓"; }
.model-card .pick .pl::after { content: "Je choisis ce modèle →"; }
/* état replié : seul le modèle choisi reste visible */
#gammes.collapsed .model-card:not(.selected),
#gammes.collapsed .type-label,
#gammes.collapsed .gamme-head { display: none; }
#gammes.collapsed .gamme { margin-bottom: 0; }
#gammes.collapsed .models { grid-template-columns: minmax(230px, 380px); }
.btn-change { margin: 0 0 16px; padding: 9px 18px; font-size: 14px; }

/* ---------- Options ---------- */
.layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: stretch; }
.opt-cat { border-top: 1px solid var(--line); padding: 18px 0 6px; }
.opt-cat:first-child { border-top: none; padding-top: 4px; }
.opt-cat h3 { font-size: 14px; margin: 0 0 12px; display: flex; align-items: center; gap: 9px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink); }
.opt-cat h3 .cat-ic { width: 22px; height: 22px; color: var(--cyan); flex: none; }
.opt-row, .opt-radio {
  display: flex; align-items: center; gap: 13px; padding: 12px 14px; border: 2px solid var(--line);
  border-radius: var(--radius-sm); margin-bottom: 9px; cursor: pointer; background: #fff; transition: .12s;
}
.opt-row:hover, .opt-radio:hover { border-color: #cfd0e0; }
.opt-row.checked, .opt-radio.checked { border-color: var(--cyan); background: var(--cyan-soft); }
.opt-ic { width: 26px; height: 26px; color: var(--ink); flex: none; opacity: .85; }
.opt-row.checked .opt-ic, .opt-radio.checked .opt-ic { color: var(--cyan); opacity: 1; }
.opt-row input, .opt-radio input { width: 19px; height: 19px; accent-color: var(--cyan); flex: none; }
.opt-row .o-label, .opt-radio .o-label { flex: 1; font-size: 14px; }
.o-desc { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; font-weight: 400; line-height: 1.35; }
.o-inc { font-size: 11px; font-weight: 700; color: var(--teal); background: rgba(27,185,166,.12); padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.group-label { font-size: 12.5px; font-weight: 700; margin: 6px 0 9px; color: var(--ink); }

/* ---------- Récap configuration (sidebar, sans prix) ---------- */
.summary { position: sticky; top: 12px; padding: 0; overflow: hidden; }
.summary .s-photo { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; background: var(--bg-soft); }
.summary .s-in { padding: 16px 18px 18px; }
.summary h3 { margin: 0 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.summary .smodel { font-weight: 700; font-size: 17px; margin-bottom: 2px; }
.summary .smtype { color: var(--muted); font-size: 12.5px; margin-bottom: 12px; }
.s-list { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line); }
.s-list li { font-size: 13px; padding: 4px 0 4px 18px; position: relative; color: var(--ink); }
.s-list li::before { content: ""; position: absolute; left: 0; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
.s-empty { color: var(--muted); font-size: 13px; padding-top: 12px; border-top: 1px solid var(--line); }
.summary .note { font-size: 11.5px; color: var(--muted); margin-top: 14px; }

/* ---------- Formulaire ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
label.flabel { font-size: 13px; font-weight: 600; }
label.flabel .req { color: var(--pink); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], textarea, select {
  font: inherit; padding: 12px 13px; border: 2px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(16,179,232,.15); }
textarea { min-height: 88px; resize: vertical; }
.check-rgpd { display: flex; gap: 11px; align-items: flex-start; font-size: 13px; color: var(--muted); margin-top: 4px; }
.check-rgpd input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--cyan); }
.field-error { color: var(--pink); font-size: 12px; }

/* ---------- Boutons ---------- */
.nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 28px; }
.btn { font: inherit; font-weight: 700; font-size: 15px; padding: 13px 26px; border-radius: 40px; border: 2px solid transparent; cursor: pointer; transition: .15s; display: inline-flex; align-items: center; gap: 8px; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #2a2960; }
.btn-primary:disabled { background: #b9b9cb; cursor: not-allowed; }
.btn-cta { background: var(--pink); color: #fff; }
.btn-cta:hover { background: var(--pink-dark); }
.btn-cta:disabled { background: #e7a9c9; cursor: not-allowed; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: #cfd0e0; }

/* ---------- Confirmation ---------- */
.done-box { text-align: center; padding: 44px 26px; }
.done-box .check { width: 72px; height: 72px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; margin: 0 auto 18px; }
.done-box .check svg { width: 38px; height: 38px; }

/* ---------- Divers ---------- */
.hint { background: var(--cyan-soft); border: 1px solid #bfe9f8; color: var(--ink); padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 18px; display: flex; gap: 10px; align-items: center; }
.hint svg { width: 22px; height: 22px; color: var(--cyan); flex: none; }
.muted { color: var(--muted); }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 44px; text-align: center; color: var(--muted); }

/* Desktop : la liste d'options défile dans sa zone, le récap reste visible à droite */
@media (min-width: 781px) {
  #opts { max-height: 640px; overflow-y: auto; overflow-x: hidden; padding-right: 10px; }
  #opts::-webkit-scrollbar { width: 8px; }
  #opts::-webkit-scrollbar-thumb { background: #d3d4e2; border-radius: 8px; }
  #opts::-webkit-scrollbar-thumb:hover { background: #b9bace; }
  .summary { position: sticky; top: 8px; align-self: start; }
}

/* ---------- Responsive ---------- */
@media (max-width: 780px) {
  .layout { grid-template-columns: 1fr; }
  .summary { position: static; order: -1; }
  .form-grid { grid-template-columns: 1fr; }
  .steps li .lbl { display: none; }
  .steps li { min-width: 0; justify-content: center; flex-basis: auto; }
  h1.title { font-size: 22px; }
  .budget-value { font-size: 36px; }
}
