/* =============================================
   Tapis Catalog — Catalogue des tapis AquaCove
   Preview via configurateur piscine
   ============================================= */

.mova-tc {
  margin: 0 auto;
}

/* --- Layout 2 colonnes --- */
.mova-tc-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  align-items: start;
}

/* --- Colonne pastilles --- */
.mova-tc-col-swatches {
  /* scrollable si très nombreuses pastilles */
  /* max-height: 80vh; */
  /* overflow-y: auto; */
  padding-right: 4px;
}

/* --- Colonne preview (sticky) --- */
.mova-tc-col-preview {
  position: sticky;
  top: 120px;
}

/* --- Titre sélecteur --- */
.mova-tc-swatches-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;
}

/* --- Grille des pastilles --- */
.mova-tc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  padding: 0.5rem;
}

.mova-tc-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.15s;
}

.mova-tc-card:hover {
  border-color: #1a4759;
  background-color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(26, 71, 89, 0.12);
}

.mova-tc-card:focus {
  background-color: white;
}

.mova-tc-card.active {
  border-color: #1a4759;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px #1a4759;
}

.mova-tc-card-swatch {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.mova-tc-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f5f6f8;
  font-size: 20px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
}

.mova-tc-card-name {
  display: block;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  color: #1a4759;
  text-align: center;
  width: 100%;
}

/* --- Label actif (couleur sélectionnée) --- */
.mova-tc-active-label {
  font-size: 14px;
  font-weight: 500;
  color: #1a4759;
  margin: 10px 0 0;
  min-height: 20px;
}

/* --- Swatches couleurs de coque --- */
.mova-tc-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mova-tc-swatch {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: #eee;
  transition:
    border-color 0.2s,
    transform 0.15s;
}

.mova-tc-swatch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mova-tc-swatch:hover {
  border-color: #1a4759;
  background-color: transparent;
  transform: scale(1.06);
}

.mova-tc-swatch.is-active {
  border-color: #1a4759;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px #1a4759;
}

.mova-tc-swatch:focus {
  background-color: transparent;
}

.mova-tc-swatch-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 13px;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
}

/* --- Toggles par zone --- */
.mova-tc-zone-row {
  margin-bottom: 10px;
}

.mova-tc-zone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mova-tc-zone-label {
  font-size: 14px;
  font-weight: 500;
  color: #1a4759;
}

.mova-tc-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-tc-zone-toggle:focus {
  background-color: #bbb;
}

.mova-tc-zone-toggle:hover {
  background-color: #bbb;
}

.mova-tc-zone-toggle.is-active {
  background: #1a4759;
}

.mova-tc-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-tc-zone-toggle.is-active .mova-tc-zone-toggle-icon {
  transform: translateX(16px);
}

/* --- Preview en layers --- */
.mova-tc-layers {
  position: relative;
  background: #f5f6f8;
  overflow: hidden;
  line-height: 0;
}

.mova-tc-layer--fond {
  position: relative;
  width: 100%;
  height: auto;
  display: block;
}

.mova-tc-layer--overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mova-tc-layer--overlay.loading {
  opacity: 0.3;
}

/* --- Panneau --- */
.mova-tc-panel {
  padding: 16px 0 0;
}

.mova-tc-tapis-name {
  font-size: 24px;
  font-weight: 700;
  color: #1a4759;
  margin: 0 0 24px;
  line-height: 1.2;
}

/* --- Section --- */
.mova-tc-section {
  margin-bottom: 28px;
}

.mova-tc-section-title {
  font-size: 16px;
  font-weight: 600;
  color: #1a4759;
  margin: 0 0 12px;
}

.mova-tc-disclaimer {
  font-size: 12px;
  font-weight: 400;
  color: #1a4759;
  font-style: italic;
  opacity: 0.7;
  margin: 0;
  margin-top: 8px;
}

/* --- Sélecteur de piscines --- */
.mova-tc-piscines {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mova-tc-piscine-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #1a4759;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 20px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s,
    color 0.2s;
}

.mova-tc-piscine-title {
  font-weight: 600;
  line-height: 1.2;
}

.mova-tc-piscine-cat {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.7;
  line-height: 1.2;
}

.mova-tc-piscine-btn.active .mova-tc-piscine-cat {
  opacity: 0.85;
}

.mova-tc-piscine-btn:hover {
  border-color: #1a4759;
}

.mova-tc-piscine-btn.active {
  background: #1a4759;
  border-color: #1a4759;
  color: #fff;
}

.mova-tc-piscine-btn:hover, .mova-tc-piscine-btn:focus {
  background-color: transparent !important;
  color: #1a4759 !important;
}

/* =============================================
   Responsive
   ============================================= */

/* Tablette */
@media (max-width: 1024px) {
  .mova-tc-layout {
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
  }

  .mova-tc-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .mova-tc-layout {
    grid-template-columns: 1fr;
  }

  .mova-tc-col-swatches {
    max-height: none;
    overflow-y: visible;
  }

  .mova-tc-col-preview {
    position: static;
  }

  .mova-tc-grid {
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 8px;
  }

  .mova-tc-card-name {
    font-size: 12px;
    padding: 8px;
  }

  .mova-tc-tapis-name {
    font-size: 20px;
  }
}
