/* Aperçu en taille réelle dans la zone des images (08/10/2026, maquette options v4).
   Salon scandinave créé dans Magnific, canapé de 210 cm = étalon. */
.woocommerce-product-gallery { position: relative; }
.rda-tr { position: absolute; inset: 0; overflow: hidden; background: rgb(150, 153, 140);   /* couleur du mur en haut du salon */ z-index: 7; display: none; }
.rda-tr.est-ouvert { display: block; }
.rda-tr-scene { position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: url(../images/taille-reelle/salon-canape.webp) center / 100% 100% no-repeat; }
.rda-tr-affiche { position: absolute; transition: left .45s ease, top .45s ease, width .45s ease, height .45s ease;
  box-shadow: 0 1px 2px rgba(20, 24, 20, .25), 0 6px 14px rgba(20, 24, 20, .16); }
.rda-tr-affiche img { display: block; width: 100%; height: 100%; }
.rda-tr-affiche.cadre { box-sizing: content-box; border-style: solid;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18), 0 2px 3px rgba(20, 24, 20, .28), 0 10px 22px rgba(20, 24, 20, .2); }
.rda-tr-affiche.chene { border-color: #c8a476 #b8935f #a9844f #bf9a68; }
.rda-tr-affiche.noyer { border-color: #6e4a31 #5f3f29 #523521 #66442c; }
.rda-tr-affiche.noir { border-color: #262626 #1d1d1d #141414 #212121; }
/* cotes : traits fins, chiffres sans cadre */
.rda-tr-cote { position: absolute; color: #1b1e3d; font: 500 12px/1 'Jost', sans-serif; letter-spacing: .04em; pointer-events: none; transition: all .45s ease; }
.rda-tr-cote.l { height: 0; border-top: 1px solid rgba(27, 30, 61, .55); }
.rda-tr-cote.h { width: 0; border-left: 1px solid rgba(27, 30, 61, .55); }
.rda-tr-cote.l::before, .rda-tr-cote.l::after { content: ''; position: absolute; top: -4px; height: 7px; border-left: 1px solid rgba(27, 30, 61, .55); }
.rda-tr-cote.l::before { left: 0; } .rda-tr-cote.l::after { right: 0; }
.rda-tr-cote.h::before, .rda-tr-cote.h::after { content: ''; position: absolute; left: -4px; width: 7px; border-top: 1px solid rgba(27, 30, 61, .55); }
.rda-tr-cote.h::before { top: 0; } .rda-tr-cote.h::after { bottom: 0; }
.rda-tr-cote span { position: absolute; white-space: nowrap; }
.rda-tr-cote.l span { left: 50%; top: -18px; transform: translateX(-50%); }
.rda-tr-cote.h span { top: 50%; left: 7px; transform: translateY(-50%); }
.rda-tr.sans-cotes .rda-tr-cote { display: none; }
/* pastilles en surimpression */
.rda-tr-haut, .rda-tr-bas { position: absolute; left: 14px; right: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rda-tr-haut { top: 14px; } .rda-tr-bas { bottom: 14px; }
.rda-tr-pastille { font: 400 13px/1 'Jost', sans-serif; color: #1b1e3d; background: rgba(250, 246, 236, .92); border: 0; border-radius: 999px;
  padding: 9px 14px; box-shadow: 0 1px 4px rgba(20, 24, 20, .12); }
button.rda-tr-pastille { cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.rda-tr-pastille.rda-tr-titre { background: rgba(27, 30, 61, .86); color: #fff; }
/* survol des options en bas d'image */
button.rda-tr-pastille:hover { background: #fff; color: #c36a4d; }
button.rda-tr-pastille[aria-pressed="true"]:hover { background: #a9573c; color: #fff; }
.rda-tr-teintes button:hover { transform: scale(1.12); }
.rda-tr-teintes button { transition: transform .15s ease; }
button.rda-tr-pastille[aria-pressed="true"] { background: #c36a4d; color: #fff; }
.rda-tr-teintes { display: none; gap: 6px; padding: 6px 8px; }
.rda-tr.avec-cadre .rda-tr-teintes { display: inline-flex; }
.rda-tr-teintes button { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; cursor: pointer; padding: 0; box-shadow: 0 0 0 1px rgba(27, 30, 61, .25); }
.rda-tr-teintes button[aria-pressed="true"] { box-shadow: 0 0 0 2px #c36a4d; }
.rda-tr-fermer { margin-left: auto; width: 36px; height: 36px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
/* bouton sur l'image principale et vignette */
.rda-tr-ouvrir { position: absolute; left: 14px; bottom: 14px; top: auto; z-index: 6; display: inline-flex; align-items: center; gap: 8px; }
.rda-tr.est-ouvert ~ .rda-tr-ouvrir, .woocommerce-product-gallery.tr-ouvert .rda-zoom-trigger { display: none; }
.flex-control-thumbs li.rda-tr-vignette { position: relative; cursor: pointer; }
.flex-control-thumbs li.rda-tr-vignette img { object-fit: cover; aspect-ratio: 1 / 1; width: 100%; height: auto; }
.flex-control-thumbs li.rda-tr-vignette span { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); padding: 5px 2px; text-align: center;
  background: rgba(27, 30, 61, .82); color: #fff; font: 500 clamp(6.5px, 1.6vw, 10px)/1 'Jost', sans-serif; letter-spacing: .04em; text-transform: uppercase;
  white-space: nowrap; overflow: hidden; pointer-events: none; }
@media (max-width: 560px) {
  .rda-tr-cote { font-size: 11px; }
  .rda-tr-pastille { font-size: 12px; padding: 8px 11px; }
}

/* carte postale : ni bouton ni vignette « Taille réelle » */
.woocommerce-product-gallery.tr-indispo .rda-tr-ouvrir,
.woocommerce-product-gallery.tr-indispo .flex-control-thumbs li.rda-tr-vignette { display: none; }

/* même hauteur pour toutes les pastilles du bas : la rangée ne bouge pas quand les teintes apparaissent */
.rda-tr-bas .rda-tr-pastille { box-sizing: border-box; height: 34px; padding-top: 0; padding-bottom: 0; display: inline-flex; align-items: center; }
.rda-tr-bas .rda-tr-teintes { display: none; padding: 0 8px; }
.rda-tr.avec-cadre .rda-tr-bas .rda-tr-teintes { display: inline-flex; }
.rda-tr-teintes button { width: 20px; height: 20px; }
@media (max-width: 560px) { .rda-tr-bas .rda-tr-pastille { height: 32px; } }

/* passe-partout simulé : seulement avec le cadre */
.rda-tr-bas .rda-tr-passe { display: none; }
.rda-tr.avec-cadre .rda-tr-bas .rda-tr-passe { display: inline-flex; }
.rda-tr-affiche.passe { background: #f7f4ec; }
.rda-tr-affiche.passe img { box-shadow: 0 0 0 1px rgba(60, 50, 30, .12), inset 0 0 0 1px rgba(0, 0, 0, .05); }

/* la rangée du bas s'empile vers le haut : « Simuler un cadre » reste en bas quand les options du cadre apparaissent */
.rda-tr-bas { flex-wrap: wrap-reverse; }

/* aperçu ouvert : hauteur limitée à l'écran (calculée par le script), le thème garde la main sinon */
.woocommerce-product-gallery.tr-ouvert .woocommerce-product-gallery__wrapper { height: var(--rda-tr-h, auto) !important; }

/* pas de pastille de titre en haut de l'aperçu (Max, 09/10) : le format se lit dans la liste et sur les cotes */
.rda-tr-haut .rda-tr-titre { display: none; }

/* Mobile et tablette en portrait : l'aperçu ouvert reste collé sous le menu pendant qu'on choisit
   le format plus bas (comme Unique Maps) ; vignettes masquées tant qu'il est collé. */
@media (max-width: 1024px) {
  /* pleine largeur d'écran, sans marge crème autour (Max, 09/10) */
  .rda-product-gallery.rda-tr-colle { position: sticky; top: var(--rda-nav-h, 64px); z-index: 40;
    width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); padding: 0; background: none; }
  .rda-product-gallery.rda-tr-colle .flex-control-thumbs { display: none; }
}
