/* ===== Configurateur visuel : aperçu « Votre configuration » ===== */

/* Calque posé par-dessus la grande image (dans .flex-viewport) */
.c7-config-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  background-color: #fff;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}
.c7-config-overlay[hidden] { display: none; }

.c7-config-overlay .c7-config-layers,
.c7-config-overlay .c7-config-set,
.c7-config-overlay .c7-config-layer {
  position: absolute;
  inset: 0;
}

.c7-config-overlay .c7-config-layer {
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

/* Fondu entre deux configurations : les pièces se remplacent sans clignoter */
.c7-config-overlay .c7-config-set {
  opacity: 0;
  transition: opacity .3s ease;
}
.c7-config-overlay .c7-config-set.is-visible { opacity: 1; }

/* Base non incluse (fiches « interface seule ») */
.c7-config-overlay .c7-config-layer.is-ghost {
  opacity: .35;
  filter: grayscale(1);
}

.c7-config-overlay .c7-config-badge {
  position: absolute;
  left: 14px;
  bottom: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(20, 20, 20, .6);
  color: #fff;
  font-size: 13px;
  line-height: 1.4;
  pointer-events: none;
}

/* ----- Miniature bureau (colonne FlexSlider), 2e position ----- */
.c7-config-thumb-img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  background-size: contain, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  cursor: pointer;
  opacity: .5;
  transition: opacity .2s ease;
}
.c7-config-thumb-img:hover,
.c7-config-on .c7-config-thumb-img { opacity: 1; }
/* Pendant l'aperçu, la miniature de la photo n'est plus mise en avant */
.c7-config-on ol.flex-control-thumbs li img.flex-active { opacity: .5; }
.c7-config-thumb-img:focus-visible,
.c7-config-mthumb:focus-visible { outline: 2px solid #f5a623; outline-offset: 2px; }

/* ----- Miniature mobile (même gabarit que .wcg-mobile-thumb), 2e position ----- */
.c7-config-mthumb {
  flex: 0 0 80px;
  width: 80px;
  height: 80px;
  position: relative;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: all .3s ease;
  background-color: rgba(255, 255, 255, .05);
  background-size: contain, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
.woocommerce-product-gallery.c7-config-on ~ .wcg-mobile-thumbs .c7-config-mthumb {
  border-color: #f5a623;
  box-shadow: 0 0 12px rgba(245, 166, 35, .6);
  transform: scale(1.05);
  z-index: 2;
}
.woocommerce-product-gallery.c7-config-on ~ .wcg-mobile-thumbs .wcg-mobile-thumb.is-active {
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .c7-config-overlay .c7-config-set,
  .c7-config-thumb-img,
  .c7-config-mthumb { transition: none; }
}
