/* Visionneuse 3D des miroirs LED (fiche Harmonie) — chargé seulement sur les fiches qui l'ont ($ledco3d dans
   views/ecommerce/product.blade.php). La 3D s'ouvre À LA PLACE des photos et de la description (mode « scène ») ;
   la colonne d'achat reste à droite : on choisit le format et la lumière en regardant le miroir changer. */

.l3d [hidden], .l3d[hidden] { display: none !important; }

/* la scène prend la place de la galerie + description ; la colonne d'achat ne bouge pas */
.ps-product--detail .ps-product__header.l3d-actif > .ps-product__thumbnail,
.ps-product--detail .ps-product__header.l3d-actif > .ps-product__specification { display: none !important; }

.l3d { display: flex; flex-direction: column; gap: 12px; margin-bottom: 30px; font-family: Poppins, sans-serif; color: #222; }
.l3d-barre { display: flex; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.l3d-retour { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px 7px 8px; border: 1px solid #e2e4df; border-radius: 4px;
  background: #fff; color: #222; font: 600 13px/1.2 Poppins, sans-serif; cursor: pointer; }
.l3d-retour:hover { border-color: #79b732; color: #5f9a1f; }
.l3d-titre { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; color: #626262; }
.l3d-titre b { color: #79b732; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; margin-right: 6px; }
.l3d-icone { display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid #e2e4df; border-radius: 4px;
  background: #fff; color: #222; cursor: pointer; }
.l3d-icone:hover { border-color: #79b732; color: #5f9a1f; }

/* la scène laisse la place, à l'écran, à la barre du haut ET aux réglages dessous (jpare : « on voit plus en bas comment ajuster ») */
.l3d-scene { position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: max(300px, calc(100vh - 400px)); background: #e4e2dd; border-radius: 6px; overflow: hidden; }
.l3d-scene canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
.l3d-chargement { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 16px;
  color: #5d625f; font-size: 13px; text-align: center; }
.l3d-chargement button { margin-top: 4px; padding: 7px 14px; border: 0; border-radius: 4px; background: #79b732; color: #fff; font: 600 13px Poppins, sans-serif; cursor: pointer; }
.l3d-roue { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(0, 0, 0, .1); border-top-color: #79b732; animation: l3d-tourne .9s linear infinite; }
@keyframes l3d-tourne { to { transform: rotate(360deg); } }
.l3d-badge { position: absolute; z-index: 2; left: 12px; top: 12px; max-width: calc(100% - 140px); padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, .86); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-size: 12px; font-weight: 500; line-height: 1.3; color: #222; pointer-events: none; font-variant-numeric: tabular-nums; }
/* l'indice (tourner, zoomer) reste affiché en tout temps, dans le coin inférieur droit de la scène (jpare, 4 oct. 2026 : « coin
   inférieur droit » — centré, il cachait le bas de l'image) */
.l3d-geste { position: absolute; z-index: 2; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px;
  max-width: calc(100% - 24px); padding: 8px 16px 8px 12px; border-radius: 999px; background: rgba(24, 26, 25, .78); color: #fff;
  font-size: 13px; font-weight: 500; line-height: 1.3; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.l3d-geste b { font-weight: 600; }
.l3d-geste svg { flex: none; }
/* bouton 360° sur la scène, en haut à droite */
.l3d-360 { position: absolute; z-index: 3; right: 12px; top: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px 8px 11px;
  border: 0; border-radius: 999px; background: rgba(24, 26, 25, .84); color: #fff; font: 600 13px/1 Poppins, sans-serif; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.l3d-360:hover { background: rgba(24, 26, 25, .95); }
.l3d-360:focus-visible { outline: 2px solid #79b732; outline-offset: 2px; }
.l3d-cotes { position: absolute; inset: 0; pointer-events: none; }
.l3d-cote { padding: 2px 6px; border: 1px solid rgba(31, 36, 33, .2); border-radius: 4px; background: rgba(255, 255, 255, .92);
  font: 500 12px/1.2 Poppins, sans-serif; color: #1f2421; white-space: nowrap; }

/* chaque groupe prend sa largeur naturelle (les puces d'une même ligne ne se cassent pas) ; Affichage a sa propre ligne */
.l3d-reglages { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 40px; padding: 16px;
  border: 1.6px solid #e7e7e7; border-radius: 6px; background: #fff; }
.l3d-groupe { display: grid; gap: 8px; align-content: start; flex: 0 1 auto; min-width: 0; max-width: 100%; }
.l3d-groupe.l3d-large { flex-basis: 100%; }
.l3d-etiquette { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #8a8f8b; }
.l3d-puces { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.l3d-puces button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border: 1px solid #e2e4df; border-radius: 999px;
  background: #f3f4f1; color: #222; font: 500 13px/1.2 Poppins, sans-serif; cursor: pointer; }
.l3d-puces button:hover { border-color: #c4c8c1; }
.l3d-puces button[aria-pressed="true"] { background: #222; border-color: #222; color: #fff; }
.l3d-puces button:focus-visible, .l3d input[type=range]:focus-visible, .l3d-retour:focus-visible, .l3d-icone:focus-visible { outline: 2px solid #79b732; outline-offset: 2px; }
.l3d-pt { width: 10px; height: 10px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .2); flex: none; }
.l3d-curseur { display: flex; align-items: center; gap: 10px; }
.l3d-curseur small { font-size: 12px; color: #626262; }
.l3d-curseur output { min-width: 3.4em; font-size: 12px; color: #222; font-variant-numeric: tabular-nums; }
.l3d input[type=range] { width: 100%; max-width: 240px; margin: 0; accent-color: #79b732; }
.l3d input.l3d-nuance { max-width: 180px; }
.l3d-aide { margin: 0; font-size: 11.5px; font-style: italic; line-height: 1.4; color: #8a8f8b; }

/* plein écran : la scène s'étire, les réglages restent dessous */
.l3d.l3d-plein { margin: 0; padding: 16px; overflow: auto; background: #fff; }
.l3d.l3d-plein .l3d-scene { flex: 1 1 auto; aspect-ratio: auto; max-height: none; min-height: 55vh; }
.l3d.l3d-plein .l3d-reglages { flex: none; }

/* l'entrée sur la photo */
.ps-product--detail .ps-product__thumbnail > figure { position: relative; }
.l3d-pastille { position: absolute; left: 14px; bottom: 14px; z-index: 5; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px 9px 12px; border: 0; border-radius: 999px; background: rgba(24, 26, 25, .84); color: #fff;
  font: 600 13px/1 Poppins, sans-serif; letter-spacing: .02em; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); }
.l3d-pastille:hover { background: rgba(24, 26, 25, .95); }
.l3d-pastille:focus-visible, .l3d-bouton:focus-visible { outline: 2px solid #79b732; outline-offset: 2px; }

/* l'entrée à droite du prix, sur sa ligne : la colonne d'achat ne bouge pas (le bouton panier reste où il était) */
.attr-div.l3d-prix { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 10px; flex-wrap: wrap; }
.attr-div.l3d-prix .l3d-bouton { margin-top: -3px; }   /* centrée sur la 1re ligne du prix (le h4 garde sa marge du bas) */
/* en noir, comme la pastille sur la photo (jpare : « met en noir en haut à droite aussi ») */
.l3d-bouton { display: inline-flex; align-items: center; gap: 7px; flex: none; padding: 7px 14px 7px 11px; border: 0;
  border-radius: 999px; background: rgba(24, 26, 25, .9); color: #fff; font: 600 13px/1.2 Poppins, sans-serif; white-space: nowrap; cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .14); transition: background-color .15s; }
.l3d-bouton:hover, .l3d-bouton[aria-expanded="true"] { background: rgba(24, 26, 25, 1); }
.l3d-bouton > svg { flex: none; color: #fff; }

/* téléphone : l'indice sous la scène, toujours visible, sans rien cacher du miroir */
.l3d-geste.l3d-geste-dessous { position: static; transform: none; align-self: center; max-width: 100%; margin-top: -2px; padding: 7px 14px 7px 11px;
  background: #f3f4f1; color: #222; box-shadow: none; white-space: normal; text-align: center; font-size: 12.5px; }
@media (max-width: 767px) {
  .l3d-scene { aspect-ratio: 1 / 1; max-height: 78vh; }
  .l3d-360 { padding: 7px 12px 7px 9px; }
  .l3d-reglages { padding: 12px; }
  .l3d-titre { flex-basis: 100%; order: 3; }
}
@media (prefers-reduced-motion: reduce) { .l3d-roue { animation-duration: 2.4s; } }
