/* Plan Studio — hotel layout from a floor plan. Builds on styles.css tokens. */

.studio-body { background: var(--bg); }

/* Stepper */
.stepper { display: flex; gap: 6px; flex-wrap: wrap; padding: 14px 0 6px; }
.stepper .stp {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--muted);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s; white-space: nowrap;
}
.stepper .stp .num { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 800; background: var(--accent-soft); color: var(--accent); }
.stepper .stp.on { border-color: var(--ink); color: var(--ink); background: var(--paper); box-shadow: var(--shadow-sm); }
.stepper .stp.on .num { background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #fff; }
.stepper .stp.done .num { background: var(--good); color: #fff; }
.stepper .stp:disabled { opacity: .45; cursor: not-allowed; }

/* Two-pane studio layout */
.studio { display: grid; grid-template-columns: 1fr 380px; gap: 18px; align-items: start; padding-bottom: 60px; }
@media (max-width: 980px) { .studio { grid-template-columns: 1fr; } }

.canvas-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; position: relative; }
.canvas-toolbar { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line);
  background: #fbfaf8; flex-wrap: wrap; }
.canvas-toolbar .tb-spacer { flex: 1; }
.tb-btn { border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink-soft); border-radius: 8px;
  padding: 6px 10px; font-size: 13px; font-weight: 600; }
.tb-btn:hover { border-color: var(--ink); }
.tb-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.tb-label { font-size: 12px; color: var(--muted); font-weight: 600; }
#stageHost { width: 100%; height: 64vh; min-height: 420px; background:
  repeating-conic-gradient(#f4f1ec 0% 25%, #fbfaf8 0% 50%) 0 / 22px 22px; cursor: grab; }
#stageHost.dragging { cursor: grabbing; }
#stageHost.tool-zone { cursor: crosshair; }

.dropzone { position: absolute; inset: 44px 0 0 0; display: grid; place-items: center; text-align: center;
  background: rgba(255,255,255,.86); backdrop-filter: blur(2px); z-index: 5; padding: 24px; }
.dropzone.hide { display: none; }
.dropzone .dz-inner { max-width: 440px; }
.dropzone.hover .dz-card { border-color: var(--accent); background: var(--accent-soft); }
.dz-card { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 38px 28px; transition: .15s; }
.dz-card .ico { font-size: 40px; margin-bottom: 12px; }
.dz-card h3 { font-size: 22px; margin-bottom: 8px; }
.dz-card p { color: var(--ink-soft); font-size: 14.5px; margin: 0 0 18px; }
.dz-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Side panel */
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 18px; position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow: auto; }
.panel h2 { font-size: 21px; margin-bottom: 4px; }
.panel .p-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 14px; }
.panel .p-foot { display: flex; gap: 8px; margin-top: 16px; }
.panel .p-foot .btn { flex: 1; }

.field-row { display: grid; gap: 5px; margin-bottom: 12px; }
.field-row label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.field-row input, .field-row select, .field-row textarea {
  border: 1px solid var(--line-strong); border-radius: 9px; padding: 9px 11px; font: 14px var(--font-body);
  background: var(--paper); color: var(--ink); width: 100%; }
.field-row input:focus, .field-row select:focus { outline: none; border-color: var(--accent); }

.hint { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.hint.warn { color: var(--warn); }
.note-card { background: #fff7ed; border: 1px solid #fed7aa; color: #7c2d12; border-radius: 10px; padding: 10px 12px; font-size: 12.8px; margin-bottom: 12px; }

/* Room list */
.room-list { display: grid; gap: 8px; }
.room-item { border: 1px solid var(--line); border-radius: 11px; padding: 10px 11px; background: #fcfbf9; }
.room-item.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.room-item .ri-top { display: flex; gap: 8px; align-items: center; }
.room-item .ri-dot { width: 11px; height: 11px; border-radius: 3px; flex: none; }
.room-item input.ri-name { flex: 1; border: 0; background: transparent; font-weight: 700; font-size: 14px; color: var(--ink); padding: 2px 0; }
.room-item input.ri-name:focus { outline: none; border-bottom: 1px solid var(--accent); }
.room-item .ri-del { border: 0; background: transparent; color: var(--muted); font-size: 16px; line-height: 1; padding: 2px 4px; }
.room-item .ri-del:hover { color: var(--bad); }
.room-item .ri-grid { display: grid; grid-template-columns: 1fr 86px; gap: 6px; margin-top: 7px; }
.room-item .ri-grid select, .room-item .ri-grid input { border: 1px solid var(--line-strong); border-radius: 7px; padding: 5px 7px; font-size: 12.5px; background: var(--paper); }
.room-item .ri-meta { font-size: 11.5px; color: var(--muted); margin-top: 5px; }

/* Style presets */
.style-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.style-chip { border: 1px solid var(--line-strong); border-radius: 11px; padding: 11px 12px; background: var(--paper);
  text-align: left; cursor: pointer; transition: .14s; }
.style-chip:hover { border-color: var(--ink); }
.style-chip.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: var(--shadow-sm); }
.style-chip .sc-name { font-weight: 700; font-size: 14px; }
.style-chip .sc-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.swatches { display: flex; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.swatch { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0,0,0,.1); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip-tag { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; }

/* Furniture legend / palette */
.legend { display: grid; gap: 6px; }
.legend .lg { display: flex; align-items: center; gap: 8px; font-size: 12.8px; }
.legend .lg .sw { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.add-furn { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.add-furn button { border: 1px solid var(--line-strong); background: var(--paper); border-radius: 9px; padding: 7px 8px; font-size: 12px; font-weight: 600; text-align: left; }
.add-furn button:hover { border-color: var(--accent); }
.sel-bar { display: flex; gap: 6px; margin-top: 10px; }
.sel-bar .btn { flex: 1; }

/* Renders */
.render-list { display: grid; gap: 12px; }
.render-card { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #fcfbf9; }
.render-card .rc-head { display: flex; align-items: center; justify-content: space-between; padding: 9px 11px; }
.render-card .rc-head b { font-size: 14px; }
.render-card img { width: 100%; display: block; background: #eee; }
.render-card .rc-ph { aspect-ratio: 3/2; display: grid; place-items: center; color: var(--muted); font-size: 13px; background: #f3f1ec; }

/* Shopping list */
.shop-room { margin-bottom: 16px; }
.shop-room h3 { font-size: 16px; margin-bottom: 8px; }
.shop-item { display: grid; grid-template-columns: 54px 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--line);
  border-radius: 10px; padding: 8px; margin-bottom: 6px; background: var(--paper); }
.shop-item img { width: 54px; height: 54px; object-fit: cover; border-radius: 7px; background: #f0ede8; }
.shop-item .si-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.shop-item .si-meta { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.shop-item .si-price { text-align: right; font-weight: 800; font-size: 14px; white-space: nowrap; }
.shop-item .si-alt { font-size: 11px; color: var(--muted); }
.shop-item a { color: var(--accent-2); font-weight: 600; }

/* Budget */
.budget-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 6px 0 14px; }
.budget-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; background: #fcfbf9; }
.budget-card.mid { border-color: var(--accent); background: var(--accent-soft); }
.budget-card .bc-lbl { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.budget-card .bc-val { font-size: 22px; font-weight: 800; font-family: var(--font-display); margin-top: 4px; }
.budget-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.budget-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.budget-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* Export */
.export-grid { display: grid; gap: 8px; }
.export-grid .btn { width: 100%; justify-content: flex-start; }

/* Disclaimer */
.studio-disclaimer { font-size: 12px; color: var(--muted); text-align: center; padding: 8px 0 30px; max-width: 760px; margin: 0 auto; }

/* Busy overlay */
.busy { position: absolute; inset: 44px 0 0 0; display: none; place-items: center; background: rgba(255,255,255,.78); z-index: 8; }
.busy.on { display: grid; }
.busy .spinner { width: 38px; height: 38px; border: 3px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; }
.busy .msg { margin-top: 12px; font-size: 13.5px; color: var(--ink-soft); font-weight: 600; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  box-shadow: var(--shadow-lg); z-index: 200; transition: .22s; pointer-events: none; max-width: 90vw; }
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

.pill-soft { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent);
  border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 700; }

/* Méthodologie & MAJ doc */
.doc-body { font-size: 14px; color: var(--ink-soft); line-height: 1.6; }
.doc-body h2 { font-family: var(--font-display); font-size: 24px; color: var(--ink); margin: 0 0 4px; }
.doc-body h3 { font-size: 16px; color: var(--ink); margin: 20px 0 6px; }
.doc-body p { margin: 6px 0; }
.doc-body ul { margin: 6px 0 10px; padding-left: 20px; }
.doc-body li { margin: 3px 0; }
.doc-body .doc-rule { background: #fff7ed; border: 1px solid #fed7aa; color: #7c2d12; border-radius: 10px; padding: 10px 12px; margin: 10px 0; font-size: 13px; }
.doc-body .doc-tag { display: inline-block; background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 1px 7px; font-size: 12px; font-weight: 700; margin-right: 6px; }
.doc-changelog { border-left: 2px solid var(--line-strong); margin: 8px 0; padding-left: 14px; }
.doc-cl { margin: 0 0 14px; }
.doc-cl .doc-when { font-size: 12px; font-weight: 800; color: var(--accent); letter-spacing: .02em; }
.doc-cl ul { margin: 4px 0; }
.doc-tabs { display: inline-flex; gap: 4px; background: #f1ece0; border: 1px solid var(--line); border-radius: 11px; padding: 4px; margin: 6px 0 14px; }
.doc-tabs button { border: 0; background: transparent; border-radius: 8px; padding: 7px 14px; font-size: 13.5px; font-weight: 700; color: var(--muted); cursor: pointer; }
.doc-tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

/* Inspiration: numbered detected elements, each with priced products */
.insp-seg { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.insp-seg:first-of-type { border-top: 0; }
.insp-seg-head { display: flex; align-items: center; gap: 9px; margin-bottom: 7px; }
.insp-num { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.insp-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; border: 1px solid var(--line); }
.insp-label { font-weight: 700; font-size: 14px; }
.insp-more { display: inline-block; margin-top: 5px; font-size: 12.5px; font-weight: 700; color: var(--accent); }
.insp-more:hover { text-decoration: underline; }
