/* =============================================
   Pool Configurator — AquaCove Tapis Layers
   ============================================= */

.mova-cfg {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 40px;
  align-items: start;
  margin: 0 auto;
}

/* --- Preview / Layers --- */
.mova-cfg-preview {
  position: sticky;
  top: 120px;
}

.mova-cfg-layers {
  position: relative;
  background: #f5f6f8;
  overflow: hidden;
}

.mova-cfg-layer--fond {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 1;
}

.mova-cfg-layer--overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
  pointer-events: none;
}

/* --- Panneau --- */
.mova-cfg-panel {
  padding: 10px 0;
}

.mova-cfg-title {
  font-family: "AcuminPro", sans-serif !important;
  font-size: 1.625rem !important;
  font-weight: 600 !important;
  color: inherit;
  margin: 0 0 24px;
  line-height: 1.2;
}

.mova-cfg-disclaimer {
  font-size: 12px;
  font-weight: 400;
  color: #1a4759;
  font-style: italic;
  opacity: 0.7;
  margin: 0 0 16px;
}

/* --- Section --- */
.mova-cfg-section {
  margin-bottom: 32px;
}

.mova-cfg-section-title {
  font-family: "AcuminPro", sans-serif !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  color: inherit;
  margin: 0 0 12px;
}

/* --- Swatches (couleurs + tapis) --- */
.mova-cfg-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mova-cfg-swatch {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: #eee;
  transition:
    border-color 0.2s,
    transform 0.15s;
  position: relative;
}

.mova-cfg-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mova-cfg-swatch:hover {
  border-color: #1a4759;
  background-color: transparent;
  transform: scale(1.06);
}

.mova-cfg-swatch.is-active {
  border-color: #1a4759;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px #1a4759;
}

.mova-cfg-swatch:focus {
  background-color: transparent;
}

.mova-cfg-swatch-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 14px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
}

/* --- Label actif --- */
.mova-cfg-active-label {
  font-size: 14px;
  font-weight: 500;
  color: #1a4759;
  margin: 10px 0 0;
  min-height: 20px;
}

/* --- Zone header (title + toggle) --- */
.mova-cfg-zone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.mova-cfg-zone-header .mova-cfg-section-title {
  margin: 0;
}

/* --- Zone toggles --- */
.mova-cfg-zone-toggle {
  width: 36px;
  height: 20px;
  border-radius: 10px !important;
  border: none;
  background: #ccc;
  cursor: pointer;
  position: relative;
  padding: 0;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.mova-cfg-zone-toggle:focus {
  background-color: #bbb;
}

.mova-cfg-zone-toggle:hover {
  background-color: #bbb;
}

.mova-cfg-zone-toggle.is-active {
  background: #1a4759;
}

.mova-cfg-zone-toggle-icon {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.2s;
}

.mova-cfg-zone-toggle.is-active .mova-cfg-zone-toggle-icon {
  transform: translateX(16px);
}

/* --- Disabled zone swatches --- */
.mova-cfg-zone-swatches.is-disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* --- Options checkboxes --- */
.mova-cfg-options {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.mova-cfg-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
}

.mova-cfg-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #1a4759;
  cursor: pointer;
  margin: 0;
}

/* --- Bouton Zoom --- */
.mova-cfg-zoom {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: #1a4759;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition:
    background 0.2s,
    transform 0.2s;
}

.mova-cfg-zoom:hover {
  background: #fff;
  color: inherit;
}

/* --- Lightbox --- */
.mova-cfg-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.mova-cfg-lightbox.open {
  display: flex;
}

.mova-cfg-lb-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 8px;
  transition: opacity 0.2s;
  z-index: 10;
}

.mova-cfg-lb-close:hover {
  opacity: 0.7;
}

.mova-cfg-lb-close:hover, .mova-cfg-lb-close:focus {
  background: none;
}

.mova-cfg-lb-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
}

.mova-cfg-lb-content .mova-cfg-layers {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
}

.mova-cfg-lb-content .mova-cfg-layer--fond {
  display: block;
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 85vh;
  position: relative;
  z-index: 1;
}

.mova-cfg-lb-content .mova-cfg-layer--overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 2;
  pointer-events: none;
}

/* --- Bouton Obtenir un devis --- */
.mova-cfg-section--cta {
  margin-top: 8px;
}

.mova-cfg-devis-btn {
  text-align: center;
  font-weight: 600 !important;
  color: inherit;
  background: #ffffff00;
  border: 1px solid #1a4759;
  border-radius: 0;
  padding: 12px 24px;
  cursor: pointer;
  transition: background 0.2s ease;
  display: inline-flex;
  align-items: center;
}

.mova-cfg-devis-btn:hover {
  background: #1a4759;
  color: #fff !important;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .mova-cfg {
    gap: 24px;
  }

  .mova-cfg-title {
    font-size: 22px;
  }
}

@media (max-width: 767px) {
  .mova-cfg {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .mova-cfg-preview {
    position: static;
  }

  .mova-cfg-swatch {
    width: 48px;
    height: 48px;
  }

  .mova-cfg-zone-toggle {
    padding: 6px 14px;
    font-size: 13px;
  }
}
