/* =========================
   CONFIGURATEUR WM
   ========================= */

#wm-configurator {
  width: 100%;
  max-width: 720px;
  box-sizing: border-box;
  font-family: inherit;
}

#wm-configurator * {
  box-sizing: border-box;
}

.wm-hidden {
  display: none !important;
}

/* ── ÉTAPES ── */
.wm-step {
  margin-bottom: 22px;
}

.wm-step-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  color: #2E8B57;
}

.wm-step-number {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 2px solid #2E8B57;
  color: #2E8B57;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .95rem;
  flex: 0 0 30px;
}

.wm-step-content {
  padding: 0;
}

/* ── ÉTAPE 1 : COULEURS ── */
.wm-color-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wm-color-col {
  text-align: center;
  width: 70px;
}

.wm-color-card {
  position: relative;
  width: 70px;
  height: 70px;
  border: 2px solid #e0e0e0;
  border-radius: 999px;
  overflow: hidden;
  background: #f5f5f5;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wm-color-card:hover {
  border-color: #2E8B57;
}

.wm-color-card.active {
  border-color: #2E8B57;
  box-shadow: 0 0 0 2px rgba(46,139,87,.15);
}

.wm-color-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 999px;
}

.wm-color-swatch {
  width: 60%;
  height: 60%;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.1);
}

.wm-check-icon {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #2E8B57;
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(.8);
  transition: all .15s ease;
}

.wm-color-card.active .wm-check-icon {
  opacity: 1;
  transform: scale(1);
}

.wm-color-name {
  display: block;
  margin-top: 5px;
  font-size: .78rem;
  color: #444;
}

/* ── ÉTAPE 2 : QUANTITÉS EN LIGNE ── */
.wm-qty-lines {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wm-qty-line {
  border: 1px solid #e7e7e7;
  border-radius: 12px;
  background: #fff;
  padding: 14px;
}

.wm-qty-line-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.wm-qty-line-thumb img,
.wm-qty-swatch {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.wm-qty-line-title {
  font-size: .95rem;
  color: #222;
}

.wm-qty-line-sizes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.wm-size-qty-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #ededed;
  border-radius: 12px;
  background: #fafafa;
}

.wm-size-qty-meta {
  display: flex;
  flex-direction: column;
  min-width: 82px;
}

.wm-size-qty-item label {
  font-size: .82rem;
  font-weight: 700;
  color: #444;
  margin: 0;
  white-space: nowrap;
}

.wm-stock-hint {
  display: block;
  font-size: .74rem;
  color: #888;
  margin-top: 3px;
  line-height: 1.25;
}

.wm-qty-input {
  width: 72px;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: .9rem;
  background: #fff;
}

.wm-stock-hint {
  display: block;
  font-size: .78rem;
  color: #999;
  margin-top: 2px;
}

/* ── ÉTAPE 3 : POSITIONS MARQUAGE ── */
.wm-positions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.wm-pos-card {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  padding: 14px;
  transition: border-color .15s;
}

.wm-pos-card.has-selection {
  border-color: #2E8B57;
}

.wm-pos-title {
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: 10px;
  color: #222;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.wm-pos-sublabel {
  font-size: .82rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 4px;
  display: block;
}

.wm-pos-select-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

.wm-select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #ccc;
  border-radius: 7px;
  background: #fff;
  font-size: .88rem;
}

.wm-pos-img {
  text-align: center;
  margin-top: 8px;
}

.wm-pos-img img {
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
  display: inline-block;
  cursor: zoom-in;
}

.wm-pos-dim {
  display: none;
  margin: 8px 0 6px 0;
  font-size: 10px;
  font-weight: 700;
  color: #333;
  text-align: center;
}

/* Lightbox */
#wm-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

#wm-lightbox.open {
  display: flex;
}

#wm-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.75);
}

#wm-lightbox-inner {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 90vh;
}

#wm-lightbox-img {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

#wm-lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  border: none;
  font-size: 16px;
  cursor: pointer;
  line-height: 32px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 2;
}

/* ── ÉTAPE 4 : DÉTAILS PERSONNALISATION ── */
.wm-detail-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.wm-detail-label {
  font-size: .88rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
  display: block;
}

.wm-detail-sep {
  font-size: .9rem;
  font-weight: 700;
  color: #555;
  white-space: nowrap;
}

.wm-detail-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #2E8B57;
  border-radius: 8px;
  font-size: .9rem;
  outline: none;
}

.wm-detail-input:focus {
  box-shadow: 0 0 0 2px rgba(46,139,87,.15);
}

.wm-file-zone {
  border: 2px dashed #2E8B57;
  border-radius: 10px;
  padding: 18px 14px;
  text-align: center;
  color: #2E8B57;
  font-size: .85rem;
  font-style: italic;
}

.wm-file-btn {
  display: inline-block;
  margin-top: 10px;
  background: #2E8B57;
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 9px 18px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
}

/* ── RÉCAPITULATIF ── */
.wm-summary-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  font-size: .88rem;
}

.wm-summary-table th,
.wm-summary-table td {
  padding: 10px 10px;
  border-bottom: 1px solid #f0f0f0;
  text-align: left;
  vertical-align: middle;
}

.wm-summary-table thead th {
  background: #fff;
  color: #666;
  font-weight: 600;
  font-size: .82rem;
  text-transform: uppercase;
}

.wm-summary-table img {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
}

.wm-grand-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: #2E8B57;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 0 0 10px 10px;
}

.wm-order-btn {
  margin-top: 14px;
  float: right;
  background: #2E8B57;
  color: #fff;
  border: 0;
  padding: 12px 28px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .04em;
  transition: background .15s ease;
}

.wm-order-btn:hover {
  background: #236b43;
}

.wm-feedback {
  margin-top: 10px;
  color: #b00020;
  font-size: .9rem;
  clear: both;
}

/* ── MINI PANIER ── */
.wm-mini-cart-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9998;
}

.wm-mini-cart {
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 100vw;
  height: 100vh;
  background: #fff;
  z-index: 9999;
  transform: translateX(100%);
  transition: transform .25s ease;
  box-shadow: -10px 0 30px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
}

.wm-mini-cart.open {
  transform: translateX(0);
}

.wm-mini-cart-header {
  display: flex;
  justify-content: flex-end;
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
}

.wm-mini-cart-close {
  border: 0;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  color: #222;
}

.wm-mini-cart-body {
  padding: 14px;
  overflow-y: auto;
  flex: 1;
}

.wm-mini-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}

.wm-mini-thumb {
  width: 64px;
  flex: 0 0 64px;
}

.wm-mini-thumb img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.wm-mini-info {
  flex: 1;
}

.wm-mini-title {
  font-weight: 700;
  margin-bottom: 3px;
  font-size: .92rem;
  color: #222;
}

.wm-mini-meta {
  font-size: .8rem;
  color: #666;
  margin-bottom: 2px;
}

.wm-mini-pricing {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
  font-size: .88rem;
  color: #222;
}

.wm-mini-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  font-size: 1rem;
  font-weight: 700;
  color: #222;
}

.wm-mini-actions {
  display: flex;
  gap: 10px;
  padding-bottom: 10px;
}

.wm-mini-btn {
  flex: 1;
  text-align: center;
  padding: 13px 10px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: .9rem;
}

.wm-mini-btn-light {
  background: #f1f1f1;
  color: #222;
}

.wm-mini-btn-dark {
  background: #2E8B57;
  color: #fff;
}

.wm-mini-empty {
  padding: 40px 0;
  text-align: center;
  color: #888;
  font-size: .9rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
  .wm-positions-grid {
    grid-template-columns: 1fr;
  }

  .wm-detail-grid {
    grid-template-columns: 1fr;
  }

  .wm-detail-sep {
    text-align: center;
  }

  .wm-mini-cart {
    width: 100vw;
  }

  .wm-color-col {
    width: 60px;
  }

  .wm-color-card {
    width: 60px;
    height: 60px;
  }

  .wm-qty-line-sizes {
    flex-direction: column;
    align-items: stretch;
  }

  .wm-size-qty-item {
    width: 100%;
    justify-content: space-between;
    border-radius: 10px;
  }

  .wm-qty-input {
    width: 90px;
  }
}