:root{
  --bg:#f4f7ff;
  --line:rgba(15,23,42,.10);
  --text:#0f172a;
  --muted:#64748b;
  --shadow: 0 14px 40px rgba(2,6,23,.10);
  --radius2: 22px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(1200px 700px at 30% 0%, rgba(37,99,235,.12), transparent 60%),
    radial-gradient(900px 600px at 90% 40%, rgba(16,185,129,.08), transparent 55%),
    var(--bg);
}

.app{display:grid;grid-template-columns:340px 1fr 420px;gap:14px;padding:14px;min-height:100vh}
.topbar{
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:16px;
  padding:14px 18px;
  border:1px solid var(--line);
  border-radius:var(--radius2);
  background:rgba(255,255,255,.85);
  box-shadow:var(--shadow);
}

.topbar .title{
  position:absolute;
  left:18px;
}

.topbar .steps{
  display:flex;
  align-items:center;
  gap:10px;
}

.topbar .steps .stepPill{
  white-space:nowrap;
}
.title{font-weight:800;font-size:14px;display:flex;align-items:center;gap:8px}
.panel{background:linear-gradient(180deg,#fff,rgba(255,255,255,.98));border:1px solid var(--line);border-radius:var(--radius2);box-shadow:var(--shadow);overflow:hidden;display:flex;flex-direction:column;min-width:0}
.panel header{padding:14px 16px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;background:rgba(255,255,255,.75)}
.content{padding:14px 16px;overflow:auto;flex:1}

.price{font-size:34px;font-weight:900}
.small{font-size:12px;color:var(--muted)}
.kv{margin-top:12px;display:grid;gap:10px}
.kv .row{border:1px solid var(--line);border-radius:14px;background:rgba(2,6,23,.03);padding:10px 12px;display:flex;justify-content:space-between;gap:10px;align-items:center}

.section{border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.78);padding:12px;margin-bottom:12px}
.section h3{margin:0 0 10px 0;font-size:12px;letter-spacing:.4px;text-transform:uppercase;color:rgba(15,23,42,.92);padding-bottom:8px;border-bottom:1px solid var(--line)}
.sub{font-size:12px;color:var(--muted);margin:0 0 10px 0;line-height:1.35}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}

.opt{border:1px solid var(--line);border-radius:14px;padding:10px;background:rgba(2,6,23,.02);cursor:pointer;display:flex;justify-content:space-between;gap:10px;min-height:56px}
.opt.active{border-color:rgba(37,99,235,.65);background:rgba(37,99,235,.12)}
.opt .left{display:flex;gap:10px;align-items:flex-start;min-width:0}
.opt .name{font-weight:800;font-size:12px}
.opt .desc{font-size:11px;color:var(--muted);margin-top:4px}
.opt .price{font-size:12px;font-weight:900;color:rgba(15,23,42,.92)}

/* === Thumbnails (LOCKED – matches validated mockup) === */
.thumbWrap{
  width:56px;
  height:56px;
  flex:0 0 56px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#f1f3f6;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:center;
}

.thumbWrap img{
  width:100%;
  height:100%;
  object-fit:contain; /* IMPORTANT : pas cover */
  display:block;
}

.opt{
  align-items:flex-start;
}

.opt .left{
  align-items:flex-start;
}

.opt .name{
  line-height:1.2;
}

.opt .desc{
  line-height:1.25;
}
/* ===== CENTER DIMENSIONS OVERLAY (Aytaç Pro lock) ===== */
.stage{position:relative;}

.dimsTop{
  position:absolute;
  top:14px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  z-index:5;
}

.dimsLine{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  width:min(560px, 92vw);
}

.dimsCaption{
  font-size:12px;
  color:var(--muted);
  text-align:center;
  margin-top:2px;
}

.dimsHint{
  font-size:12px;
  color:var(--muted);
  text-align:center;
  margin-top:-2px;
}

/* Keep the total dimension input visually stable */
.dimsTotalInput{
  width:110px;
  text-align:center;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.14);
  font-weight:900;
  background:#fff;
  color:rgba(15,23,42,.92);
  outline:none;
}
.dimsTotalInput:focus{
  border-color: rgba(37,99,235,.55);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}

/* Optional: tracks/arrows (if present in index.php) */
.dimsArrow{color:rgba(15,23,42,.45);font-weight:900;}
.dimsTrack{
  flex:1;
  max-width:220px;
  height:1px;
  background:rgba(15,23,42,.12);
  border-radius:999px;
}

/* ===== 3D stage size lock ===== */
.viewport .stage{
  min-height: 520px;
}

.threeRoot{
  position:absolute;
  inset:0;
  z-index:1;
}

/* Si ton placeholder 2D/HTML masque le canvas, on le cache quand la 3D est active */
.has3d .window{
  display:none;
}