/* Front */
.cdwcp-visual-root,
.cdwcp-choices-root {
  width: 100%;
}

.cdwcp-visual {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.cdwcp-stage {
  position: relative;
  width: 100%;
  aspect-ratio: var(--cdwcp-stage-ratio, 4 / 3);
  background: #f7f7f8;
  overflow: hidden;
  border-radius: 18px;
}

.cdwcp-stage-bg,
.cdwcp-stage-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cdwcp-stage-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cdwcp-stage-layer {
  pointer-events: none;
}

.cdwcp-stage-layer img {
  position: absolute;
  height: auto;
  max-width: none;
}

.cdwcp-bg-nav {
  position: absolute;
  inset: auto 12px 12px auto;
  z-index: 3;
  display: flex;
  gap: 8px;
}

.cdwcp-bg-nav button {
  border: 0;
  background: rgba(255,255,255,0.94);
  color: #1f2937;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(15,23,42,.14);
  cursor: pointer;
}

.cdwcp-choices {
  margin-top: 18px;
  margin-bottom: 2rem;
}

.cdwcp-choices-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.cdwcp-back-btn {
  border: 0;
  background: transparent;
  color: #111827;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.cdwcp-step-progress {
  font-size: 13px;
  color: #6b7280;
}

.cdwcp-step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.cdwcp-step-number {
  font-size: 42px;
  font-weight: 700;
  line-height: 1;
  color: #bdd7ee;
}

.cdwcp-step-title {
  font-size: 28px;
  font-weight: 700;
  color: #202737;
}

.cdwcp-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 14px;
}

.cdwcp-option {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dfe7ef;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: all .2s ease;
}

.cdwcp-option:hover,
.cdwcp-option.is-active {
  border-color: #a7c6e4;
  box-shadow: 0 10px 22px rgba(102, 155, 199, 0.18);
  transform: translateY(-1px);
}

.cdwcp-option-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
}

.cdwcp-option-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cdwcp-option-label {
  font-size: 15px;
  line-height: 1.3;
  color: #374151;
}

@media (max-width: 768px) {
  .cdwcp-step-title {
    font-size: 22px;
  }

  .cdwcp-step-number {
    font-size: 32px;
  }

  .cdwcp-choices {
    padding: 14px;
  }

  .cdwcp-options-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.cdwcp-stage-bg {
  transition: transform .35s ease;
  will-change: transform;
}

.cdwcp-stage-bg--incoming,
.cdwcp-stage-bg--outgoing {
  z-index: 1;
}

.cdwcp-stage-layer,
.cdwcp-bg-nav {
  z-index: 3;
}

.cdwcp-stock-message {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #f4b6ad;
  border-radius: 12px;
  background: #fff4f2;
  color: #9f2317;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.cdwcp-option.is-unavailable,
.cdwcp-option:disabled {
  opacity: .42;
  cursor: not-allowed;
}

.cdwcp-option.is-unavailable:hover,
.cdwcp-option:disabled:hover {
  border-color: #dfe7ef;
  box-shadow: none;
  transform: none;
}

.cdwcp-option-stock {
  display: inline-flex;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff4f2;
  color: #9f2317;
  font-size: 12px;
  font-weight: 700;
}

.cdwcp-add-to-cart-disabled {
  cursor: not-allowed !important;
  opacity: .55;
}

.cdwcp-step-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.cdwcp-next-btn {
  border: 0;
  background: #202737;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  padding: 12px 20px;
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(32, 39, 55, 0.18);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.cdwcp-next-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(32, 39, 55, 0.22);
}

.cdwcp-next-btn:disabled {
  cursor: not-allowed;
  opacity: .55;
  transform: none;
  box-shadow: none;
}

.cdwcp-step-description {
  margin: -6px 0 18px;
  color: #4b5563;
  line-height: 1.55;
  font-size: 15px;
}

.cdwcp-step-description p:last-child {
  margin-bottom: 0;
}

/* Accessoires front */
.cdwcp-option-price {
  display: block;
  font-size: 14px;
  line-height: 1.25;
  color: #1f2460;
  font-weight: 700;
}

.cdwcp-accessory-option.is-active {
  border-color: #9fc3e4;
  box-shadow: 0 10px 22px rgba(102, 155, 199, 0.26);
}

.cdwcp-accessories-summary {
  margin-top: 20px;
  text-align: center;
}

.cdwcp-accessories-summary__title {
  margin-bottom: 14px;
  color: #555f6f;
  font-weight: 700;
}

.cdwcp-accessories-summary__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.cdwcp-accessory-summary-card {
  position: relative;
  width: 138px;
  border: 1px solid #dfe7ef;
  border-radius: 16px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
}

.cdwcp-accessory-summary-card__thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
  margin-bottom: 8px;
}

.cdwcp-accessory-summary-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cdwcp-accessory-summary-card__name,
.cdwcp-accessory-summary-card__price {
  display: block;
  color: #4b5563;
  line-height: 1.25;
}

.cdwcp-accessory-summary-card__price {
  color: #1f2460;
  font-weight: 700;
  margin-top: 4px;
}

/* Déclinaisons des accessoires sélectionnés */
.cdwcp-accessory-summary-card {
  width: 180px;
  padding-top: 22px;
}

.cdwcp-accessory-summary-card__remove {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: #dc2626;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(220, 38, 38, .25);
}

.cdwcp-accessory-summary-card__remove:hover,
.cdwcp-accessory-summary-card__remove:focus {
  background: #b91c1c;
  color: #fff;
}

.cdwcp-accessory-summary-card__combinations {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.cdwcp-accessory-combination-group__label {
  display: block;
  margin-bottom: 5px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.cdwcp-accessory-combination-values {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cdwcp-accessory-attribute {
  min-height: 28px;
  border: 1px solid #cfd8e3;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.cdwcp-accessory-attribute:hover,
.cdwcp-accessory-attribute:focus,
.cdwcp-accessory-attribute.is-active {
  border-color: #1f2460;
  box-shadow: 0 0 0 2px rgba(31, 36, 96, .14);
}

.cdwcp-accessory-attribute--swatch {
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  text-indent: -999px;
}

.cdwcp-accessory-attribute--swatch.is-active {
  box-shadow: 0 0 0 2px #fff, 0 0 0 5px #1f2460;
}

/* Récapitulatif des accessoires dans la pop-up d'ajout panier */
.cdwcp-cart-modal-accessories {
  clear: both;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

.cdwcp-cart-modal-accessories__title {
  margin-bottom: 12px;
  color: #202737;
  font-size: 15px;
  font-weight: 700;
}

.cdwcp-cart-modal-accessories__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cdwcp-cart-modal-accessory {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
}

.cdwcp-cart-modal-accessory__thumb {
  display: flex;
  flex: 0 0 58px;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 10px;
  background: #f8fafc;
  overflow: hidden;
}

.cdwcp-cart-modal-accessory__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cdwcp-cart-modal-accessory__details {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
}

.cdwcp-cart-modal-accessory__name {
  color: #202737;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.cdwcp-cart-modal-accessory__reference,
.cdwcp-cart-modal-accessory__combination {
  color: #6b7280;
  font-size: 12px;
  line-height: 1.3;
}

.cdwcp-cart-modal-accessory__price {
  margin-top: 2px;
  color: #1f2460;
  font-size: 13px;
  font-weight: 700;
}
