/* ==========================================================================
   COMPOSEUR : infos et photos du support, sur la grande image
   (custom-composeur-infos.js). Tailles en px : le rem du thème suit la largeur d'écran.
   Charte : Encre #3A343C, Manrope.
   ========================================================================== */

/* ---------- coins de la grande image, sous le menu fixe ---------- */
.ody-compo-coins {
  position: absolute;
  z-index: 3;
  top: calc(var(--ody-haut, 84px) + 6px); /* au plus haut : le Collier Horizon a des charms dans les coins */
  left: 12px;
  right: 12px;
  display: flex;
  align-items: flex-start;
  pointer-events: none; /* les emplacements de charms restent touchables entre les deux */
}
.ody-compo-coins [hidden] {
  display: none !important;
}

/* Badge « Voir des photos » : même style que le badge « Épuisé ». À droite : à gauche, il cacherait
   le charm du 1er emplacement du Collier Horizon. */
.ody-compo-photos-btn {
  margin-left: auto;
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: #3a343c;
  color: #fff;
  font: 600 11px/28px 'Manrope', sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
}

/* Rond « ! » : discret, zone tactile élargie par ::after */
.ody-compo-info {
  position: relative;
  pointer-events: auto;
}
.ody-compo-info__btn {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(58, 52, 60, 0.5);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  color: #3a343c;
  font: 600 14px/26px 'Manrope', sans-serif;
  text-align: center;
  cursor: pointer;
}
.ody-compo-info__btn::after {
  content: '';
  position: absolute;
  inset: -8px;
}
.ody-compo-info__btn[aria-expanded='true'] {
  border-color: #3a343c;
  background: #3a343c;
  color: #fff;
}
.ody-compo-photos-btn:focus-visible,
.ody-compo-info__btn:focus-visible {
  outline: 2px solid #3a343c;
  outline-offset: 2px;
}

.ody-compo-info__bulle {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  box-sizing: border-box;
  width: max-content;
  max-width: min(280px, calc(100vw - 24px));
  padding: 12px 14px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(58, 52, 60, 0.18);
  color: #3a343c;
  font: 400 13px/1.45 'Manrope', sans-serif;
}
.ody-compo-info__nom {
  margin: 0 0 6px;
  font: 600 13px/1.3 'Manrope', sans-serif;
}
.ody-compo-info__bulle ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ody-compo-info__bulle li {
  margin: 0 0 2px;
}

/* ---------- fenêtre des photos ---------- */
html.ody-compo-photos-ouverte {
  overflow: hidden;
}
.ody-compo-photos {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #f4f0f6;
  color: #3a343c;
}
.ody-compo-photos[open] {
  display: flex;
  flex-direction: column;
}
.ody-compo-photos::backdrop {
  background: #f4f0f6;
}
.ody-compo-photos__haut {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 16px;
}
.ody-compo-photos__titre {
  margin: 0;
  font: 500 15px/1.3 'Manrope', sans-serif;
}
.ody-compo-photos__fermer,
.ody-compo-photos__fleche {
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  background: none;
  color: #3a343c;
  cursor: pointer;
}
.ody-compo-photos__fermer svg,
.ody-compo-photos__fleche svg {
  display: block;
  width: 24px;
  height: 24px;
}
.ody-compo-photos__fleche.is-suivante svg {
  transform: rotate(180deg);
}
.ody-compo-photos__fleche:disabled {
  opacity: 0.25;
  cursor: default;
}

/* Une photo par écran, défilement natif au doigt */
.ody-compo-photos__piste {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.ody-compo-photos__piste::-webkit-scrollbar {
  display: none;
}
.ody-compo-photos__diapo {
  flex: 0 0 100%;
  box-sizing: border-box;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
.ody-compo-photos__diapo img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.ody-compo-photos__bas {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 4px 16px calc(8px + env(safe-area-inset-bottom));
}
.ody-compo-photos.is-seule .ody-compo-photos__bas {
  visibility: hidden;
}
.ody-compo-photos__compteur {
  min-width: 48px;
  text-align: center;
  font: 500 13px/1 'Manrope', sans-serif;
}

/* Téléphone : plus petit */
@media (max-width: 767px) {
  .ody-compo-coins {
    left: 10px;
    right: 10px;
  }
  .ody-compo-photos-btn {
    height: 26px;
    padding: 0 10px;
    font-size: 10px;
    line-height: 26px;
  }
  .ody-compo-info__btn {
    width: 26px;
    height: 26px;
    line-height: 24px;
  }
}
