/* cdesigner-situation.css — « Voir en situation » (fichier additif) */

/* Pendant la capture : on retire ce qui n'est pas imprimé */
.pxs-capturing #cp-sel-Device .img-src { visibility: hidden !important; }
.pxs-capturing #cp-sel-Device .cp-gridme,
.pxs-capturing #cp-sel-Device .cp-gridme-cover { outline: none !important; }

/* Copie temporaire du design pour la capture (retirée aussitôt) */
#pxs-shot { position: absolute; left: 0; top: 0; z-index: -1; pointer-events: none; }
#pxs-shot .img-src { visibility: hidden !important; }
#pxs-shot.pxs-nodecor .cp-mask-img img { visibility: hidden !important; }
#pxs-shot .cp-gridme, #pxs-shot .cp-gridme-cover { outline: none !important; }
#pxs-shot .squared { border: 0 !important; padding: 0 !important; background: none !important; margin: 0 !important; }

/* Bouton */
.pxs-btn {
  position: fixed;
  z-index: 999999999998;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 18px;
  background: rgba(31, 41, 51, 0.88);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.pxs-btn:hover { background: #1F2933; }
.pxs-btn svg { flex: none; }

/* Fenêtre */
.pxs-ov {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 999999999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  background: rgba(17, 24, 39, 0.62);
  font-family: inherit;
  color: #1F2933;
}
.pxs-box {
  width: 100%;
  max-width: 620px;
  max-height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}
.pxs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 12px 12px 20px;
  font-size: 17px;
}
.pxs-x {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 22px;
  background: transparent; color: #1F2933; cursor: pointer;
}
.pxs-x:hover { background: #F1F3F5; }

.pxs-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 6 / 5;
  overflow: hidden;
  background: #E9E4DC;
}
@supports not (aspect-ratio: 1) {
  .pxs-stage { height: 0; padding-bottom: 83%; }
}
.pxs-wall { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }

.pxs-obj {
  position: absolute;
  z-index: 2;
  filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.30));
}
.pxs-fill, .pxs-white, .pxs-design, .pxs-shine {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: block;
  max-width: none;
}
.pxs-m-rect { overflow: hidden; border-radius: 4px; }
.pxs-shine {
  background: linear-gradient(115deg,
    rgba(255,255,255,0) 0%, rgba(255,255,255,0) 36%,
    rgba(255,255,255,0.42) 45%,
    rgba(255,255,255,0) 55%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

/* Gâteau devant le topper (décors par défaut) */
.pxs-cake {
  position: absolute;
  z-index: 3;
  left: 9%; right: 9%;
  bottom: -2%;
  height: 28%;
  border-radius: 22px 22px 0 0;
}

.pxs-wait, .pxs-fail {
  position: absolute; z-index: 4;
  top: 50%; left: 0; right: 0;
  transform: translateY(-50%);
  text-align: center;
  font-size: 15px;
  color: #3E4C59;
  display: none;
}
.pxs-loading .pxs-wait { display: block; }
.pxs-loading .pxs-obj, .pxs-error .pxs-obj { visibility: hidden; }
.pxs-error .pxs-fail { display: block; }
.pxs-loading .pxs-ctrl, .pxs-error .pxs-ctrl { opacity: 0.4; pointer-events: none; }

.pxs-ctrl { padding: 14px 20px 18px; display: flex; flex-direction: column; gap: 10px; }
.pxs-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pxs-lbl { font-size: 14px; font-weight: 600; margin-right: 4px; min-width: 60px; }
.pxs-pill {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 22px;
  border: 2px solid #CBD2D9;
  background: #fff;
  color: #1F2933;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.pxs-pill.pxs-on { background: #1F2933; border-color: #1F2933; color: #fff; }
.pxs-msg { margin: 2px 0 0; font-size: 14px; line-height: 1.45; color: #3E4C59; }
.pxs-note { margin: 0; font-size: 12px; color: #616E7C; }

@media (max-width: 978px) {
  .pxs-btn { min-height: 32px; padding: 0 10px; font-size: 12px; }

  /* À côté de « Ajouter au panier » : le bouton panier se décale à gauche
     et se rétrécit pour laisser la place (uniquement sur les produits où
     « Voir en situation » est actif). */
  html body.pxs-mob #wrap-phone-pop #cp-add-cart-mobile,
  html body.pxs-mob #cp-add-cart-mobile { text-align: left !important; padding: 0 12px !important; box-sizing: border-box !important; }
  html body.pxs-mob #wrap-phone-pop #cp-add-cart-mobile .cp-btn-save,
  html body.pxs-mob #cp-add-cart-mobile .cp-btn-save {
    width: calc(100% - 136px) !important;
    min-width: 0 !important;
    max-width: 300px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .pxs-btn.pxs-btn-mob {
    width: 120px;
    height: 42px;
    padding: 0 8px;
    border-radius: 10px;
    justify-content: center;
    white-space: normal;
    line-height: 1.15;
    text-align: left;
  }
}
@media (max-width: 600px) {
  .pxs-ov { padding: 0; align-items: stretch; }
  .pxs-box { max-width: none; border-radius: 0; height: 100%; }
  .pxs-pill { padding: 0 12px; font-size: 13px; }
  .pxs-lbl { min-width: 0; width: 100%; }
}
