/* Commander layout — Monoprint v2.2.0 */
.mp-wrap {
  max-width: 860px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a1a;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── Kicker / title ─────────────────────────────────────────── */
.mp-kicker {
  font-size: 11px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: #888; margin: 0 0 6px;
}
.mp-title {
  font-size: 1.35rem; font-weight: 700; margin: 0 0 18px; line-height: 1.25;
}

/* ── Dropzone ───────────────────────────────────────────────── */
.mp-upload-zone {
  position: relative;
  border: 2px dashed #cfd6d4;
  border-radius: 14px;
  background: #f8faf9;
  padding: 2.4rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.mp-upload-zone:hover,
.mp-upload-zone.mp-drag {
  border-color: #0f6e56;
  background: #eef8f4;
  box-shadow: 0 0 0 3px rgba(15,110,86,.12);
}
.mp-upload-zone input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2;
}
.mp-upload-inner { pointer-events: none; }
.mp-upload-icon {
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 14px;
  background: #0f6e56; color: #fff;
  margin: 0 auto 14px;
}
.mp-upload-icon svg { width: 24px; height: 24px; stroke: #fff; }
.mp-upload-title {
  font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; color: #1a1a1a;
}
.mp-upload-sub { font-size: 0.8rem; color: #888; line-height: 1.5; }

/* ── Error ──────────────────────────────────────────────────── */
.mp-error {
  background: #fff3f3; border: 1px solid #f5c2c2; border-radius: 8px;
  color: #c0392b; padding: 10px 14px; font-size: 0.85rem;
}

/* ── Rows ────────────────────────────────────────────────────── */
.mp-rows { display: flex; flex-direction: column; gap: 12px; }

/* ── Récapitulatif box ──────────────────────────────────────── */
.mp-recap-box {
  background: #fff;
  border: 1px solid #e6e9e8;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.mp-recap-title {
  font-size: 1rem; font-weight: 700; margin: 0 0 14px;
}
.mp-recap-lines {
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.mp-recap-item {
  display: flex; justify-content: space-between; gap: 8px;
  padding: 6px 0; font-size: 0.83rem; color: #444;
  border-bottom: 1px solid #f5f5f5;
}
.mp-recap-item:last-child { border-bottom: none; }
.mp-recap-item span:first-child {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0;
}
.mp-recap-totals { display: flex; flex-direction: column; gap: 6px; }
.mp-recap-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.88rem; padding: 3px 0;
}
.mp-recap-muted { color: #888; font-size: 0.82rem; }
.mp-recap-divider { height: 1px; background: #e6e9e8; margin: 6px 0; }
.mp-recap-grand {
  font-weight: 700; font-size: 1.05rem; padding: 4px 0;
}
.mp-recap-grand strong { color: #0f6e56; font-size: 1.2rem; }
.mp-ship-note {
  font-size: 0.75rem; color: #aaa; text-align: center;
  margin-top: 10px; line-height: 1.4;
}

/* ── Checkout ────────────────────────────────────────────────── */
.mp-checkout-wrap { display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
.mp-cta-btn {
  width: 100%; padding: 15px 16px; border: none; border-radius: 10px;
  background: #0f6e56; color: #fff;
  font-size: 1rem; font-weight: 700; cursor: pointer; font-family: inherit;
  transition: background .2s; letter-spacing: .01em;
}
.mp-cta-btn:hover:not(:disabled) { background: #0a5a46; }
.mp-cta-btn:disabled { background: #c5ccc9; cursor: not-allowed; }
.mp-sidebar-note {
  font-size: 0.78rem; color: #999; text-align: center; margin: 0;
}

/* ── Trust line ─────────────────────────────────────────────── */
.mp-trust-line {
  font-size: 0.75rem; color: #aaa; text-align: center;
  line-height: 1.6; margin: 0;
}

.mp-card {
  border: 1px solid #e6e9e8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.mp-card-head {
  display: grid;
  grid-template-columns: 76px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #f0f0f0;
}

.mp-thumb-wrap {
  position: relative;
  width: 72px;
  height: 96px;
  border-radius: 8px;
  overflow: hidden;
  background: #eef1ef;
  border: 1px solid #e0e6e3;
  flex-shrink: 0;
  cursor: zoom-in;
}

.mp-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mp-thumb-pdf {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  transform: scale(0.92);
  transform-origin: top center;
  pointer-events: none;
}


.mp-thumb-canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
  display: none;
  border-radius: 8px;
  overflow: hidden;
}
.mp-thumb-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  color: #555;
  letter-spacing: 0.02em;
}

.mp-thumb-fallback.mp-thumb-cad {
  background: linear-gradient(145deg, #2c3e50, #1a252f);
  color: #ecf0f1;
  font-size: 0.65rem;
}

.mp-card-head-center {
  min-width: 0;
}

.mp-card-file {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.mp-file-status {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}

.mp-st-pending {
  background: #f3f3f3;
  color: #888;
}

.mp-st-uploading {
  background: #e8f2ff;
  color: #1a5fb4;
}

.mp-st-done {
  background: #e1f5ee;
  color: #0f6e56;
}

.mp-st-error {
  background: #ffe8e8;
  color: #b00020;
}

.mp-file-text {
  min-width: 0;
}

.mp-file-name {
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-file-meta {
  font-size: 0.75rem;
  color: #777;
  margin-top: 2px;
}

.mp-remove {
  flex-shrink: 0;
  border: none;
  background: #f5f5f5;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  color: #555;
}

.mp-remove:hover {
  background: #eee;
  color: #111;
}

.mp-card-progress {
  height: 4px;
  background: #eef2f0;
}

.mp-card-progress-fill {
  height: 100%;
  background: #0f6e56;
  transition: width 0.12s ease-out;
}

.mp-card-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
  padding: 12px 14px 14px;
}

.mp-field label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #777;
  margin-bottom: 5px;
}

.mp-field select,
.mp-qty-input {
  width: 100%;
  font-size: 0.875rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fafafa;
  font-family: inherit;
}

.mp-field-qty {
  grid-column: span 1;
}

.mp-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mp-qty-btn {
  width: 34px;
  height: 34px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
}

.mp-qty-btn:hover {
  background: #f0f0f0;
}

.mp-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-size: 0.85rem;
  background: #fafcfb;
  border-top: 1px solid #f0f0f0;
}

.mp-line-price {
  color: #0f6e56;
  font-size: 1rem;
}

.mp-trust-line {
  margin-top: 18px;
  font-size: 0.78rem;
  color: #888;
  line-height: 1.5;
}

.mp-sidebar {
  position: sticky;
  top: 20px;
  border: 1px solid #e6e9e8;
  border-radius: 14px;
  padding: 18px 16px 20px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.mp-sidebar-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
}

.mp-recap-lines {
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 12px;
  font-size: 0.8rem;
}

.mp-recap-item {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  color: #444;
}

.mp-recap-item span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.mp-recap-totals {
  border-top: 1px solid #eee;
  padding-top: 10px;
}

.mp-recap-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 4px 0;
}

.mp-recap-muted {
  color: #888;
  font-size: 0.8rem;
}

.mp-recap-grand {
  margin-top: 8px;
  font-weight: 700;
  font-size: 0.95rem;
}

.mp-cta-btn {
  width: 100%;
  margin-top: 14px;
  padding: 14px 16px;
  border: none;
  border-radius: 10px;
  background: #0f6e56;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.mp-cta-btn:hover:not(:disabled) {
  background: #0a5a46;
}

.mp-cta-btn:disabled {
  background: #c5ccc9;
  cursor: not-allowed;
}

.mp-sidebar-note {
  margin: 10px 0 0;
  font-size: 0.75rem;
  color: #999;
  text-align: center;
}


/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .mp-card-body { grid-template-columns: 1fr 1fr; }
  .mp-upload-zone { padding: 1.8rem 1rem; }
}
@media (max-width: 400px) {
  .mp-card-body { grid-template-columns: 1fr; }
}


  to   { opacity: 1; }
}

/* ── Bouton zoom sur thumbnail ─────────────────────────── */
.mp-thumb-wrap {
  cursor: zoom-in;
}
.mp-zoom-btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0);
  border: none;
  cursor: zoom-in;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background .18s;
  z-index: 10;
  padding: 0;
  color: white;
}
.mp-zoom-btn svg {
  opacity: 0;
  transition: opacity .18s;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.8));
  width: 32px;
  height: 32px;
}
.mp-thumb-wrap:hover .mp-zoom-btn {
  background: rgba(0,0,0,0.40);
}
.mp-thumb-wrap:hover .mp-zoom-btn svg {
  opacity: 1;
}
