/* v0.6.9 — le déplacement vertical est porté par le widget média externe.
   Elementor positionne les widgets texte à partir de ce niveau : animer seulement
   la piste interne ne suffit pas sur toutes les mises en page. */
.tdm-artwork--carousel,
.tdm-artwork-carousel,
.tdm-artwork--carousel .elementor-element{
  overflow-anchor:none;
}
html.tdm-carousel-resizing,
html.tdm-carousel-resizing body{
  overflow-anchor:none !important;
}

.tdm-artwork-carousel{background:transparent !important}
.tdm-artwork-carousel-track{
  align-items:flex-start !important;
  background:transparent !important;
  transition:none !important;
  will-change:height;
  overflow-anchor:none;
}
.tdm-artwork-carousel-track.tdm-carousel-height-ready{overflow-y:hidden !important}

[data-tdm-carousel-layout-host="1"]{
  box-sizing:border-box;
  min-height:0 !important;
  overflow:visible;
  transition:none !important;
  will-change:height;
  overflow-anchor:none;
}

.tdm-artwork-carousel-slide{
  align-self:flex-start !important;
  height:auto !important;
  min-height:0 !important;
  background:transparent !important;
  overflow-anchor:none;
}
.tdm-artwork-carousel-slide>.tdm-artwork-media,
.tdm-artwork-carousel-slide .tdm-artwork-field--media,
.tdm-artwork-carousel-slide .elementor-widget-container,
.tdm-artwork-carousel-slide .elementor-wrapper{
  height:auto !important;
  min-height:0 !important;
  aspect-ratio:auto !important;
  background:transparent !important;
}
.tdm-artwork-carousel-slide .tdm-artwork-media img,
.tdm-artwork-carousel-slide .tdm-artwork-media video,
.tdm-artwork-carousel-slide img,
.tdm-artwork-carousel-slide video{
  display:block !important;
  width:100% !important;
  height:auto !important;
  max-height:none !important;
  aspect-ratio:auto !important;
  object-fit:contain !important;
  background:transparent !important;
}
.tdm-artwork-carousel-slide .elementor-wrapper>video{position:static !important}

/* Aucun fondu/translation artificielle du texte. Le widget média change
   réellement de hauteur à chaque frame, donc tout widget Elementor situé après
   lui remonte/descend dans le flux normal de la page. */
.tdm-artwork--carousel .tdm-artwork-field:not(.tdm-artwork-field--media),
.tdm-artwork--carousel .tdm-artwork-copy,
.tdm-artwork--carousel .tdm-artwork-carousel-text{
  opacity:1 !important;
  overflow-anchor:none;
}

@media(prefers-reduced-motion:reduce){
  .tdm-artwork-carousel-track,[data-tdm-carousel-layout-host="1"]{will-change:auto}
}

/* v0.7.2 — correction STRICTEMENT limitée aux images portrait.
   Le rendu paysage et les animations restent ceux de la v0.7.0. */
.tdm-artwork-carousel-slide .tdm-artwork-media img.tdm-artwork-image--portrait,
.tdm-artwork-carousel-slide img.tdm-artwork-image--portrait{
  width:auto !important;
  max-width:100% !important;
  height:auto !important;
  max-height:88vh !important;
  margin-left:auto !important;
  margin-right:auto !important;
  object-fit:contain !important;
  object-position:center center !important;
}


/* v0.8.2 — aide gestuelle au swipe, de droite vers gauche. */
.tdm-artwork-carousel{position:relative}
.tdm-artwork-carousel-swipe-hint{
  position:absolute;
  z-index:9;
  left:50%;
  bottom:62px;
  display:flex;
  align-items:center;
  gap:11px;
  min-height:46px;
  max-width:calc(100% - 28px);
  padding:8px 12px 8px 14px;
  border:1px solid rgba(255,255,255,.24);
  border-radius:18px;
  color:#fff;
  background:linear-gradient(135deg,rgba(2,21,34,.86),rgba(5,45,65,.72));
  box-shadow:0 10px 30px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.08);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translate(-50%,9px) scale(.965);
  transition:opacity .24s ease,transform .36s cubic-bezier(.2,.8,.2,1),visibility 0s linear .36s;
}
.tdm-artwork--carousel.tdm-artwork-carousel--external-controls .tdm-artwork-carousel-swipe-hint{bottom:14px}
.tdm-artwork-carousel-swipe-hint.is-visible:not(.is-dismissed){
  opacity:1;
  visibility:visible;
  transform:translate(-50%,0) scale(1);
  transition-delay:0s;
  animation:tdmCarouselHintBreath 2.4s ease-in-out infinite;
}
.tdm-artwork-carousel-swipe-hint.is-dismissed{opacity:0!important;visibility:hidden!important;animation:none!important}
.tdm-artwork-carousel-swipe-hint-copy{display:flex;flex-direction:column;min-width:0;line-height:1.08}
.tdm-artwork-carousel-swipe-hint-label{font-size:12px;font-weight:750;letter-spacing:.015em;white-space:nowrap}
.tdm-artwork-carousel-swipe-hint-copy small{margin-top:4px;font-size:10px;font-weight:500;opacity:.72;white-space:nowrap}
.tdm-artwork-carousel-swipe-hint-motion{position:relative;width:52px;height:28px;display:block;flex:0 0 52px}
.tdm-artwork-carousel-swipe-hint-motion::after{
  content:"";
  position:absolute;
  left:8px;
  right:7px;
  top:50%;
  height:1px;
  background:linear-gradient(90deg,rgba(255,255,255,.08),rgba(255,255,255,.55),rgba(255,255,255,.06));
  transform:translateY(-50%);
}
.tdm-artwork-carousel-swipe-hint-motion i{
  position:absolute;
  z-index:2;
  right:3px;
  top:50%;
  width:13px;
  height:13px;
  margin-top:-6.5px;
  border:1.5px solid currentColor;
  border-radius:50%;
  background:rgba(255,255,255,.18);
  box-shadow:0 0 0 4px rgba(255,255,255,.06);
  animation:tdmCarouselSwipeLeft 1.55s cubic-bezier(.42,0,.22,1) infinite;
}
.tdm-artwork-carousel-swipe-hint-motion b{
  position:absolute;
  z-index:3;
  left:0;
  top:50%;
  line-height:1;
  font-size:18px;
  font-weight:700;
  transform:translateY(-55%);
  opacity:.96;
}
@keyframes tdmCarouselSwipeLeft{
  0%,12%{transform:translateX(0) scale(.96);opacity:.58}
  28%{opacity:1}
  72%{transform:translateX(-29px) scale(1.04);opacity:1}
  100%{transform:translateX(-29px) scale(.92);opacity:.05}
}
@keyframes tdmCarouselHintBreath{
  0%,100%{box-shadow:0 10px 30px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.08)}
  50%{box-shadow:0 12px 34px rgba(0,0,0,.26),0 0 0 1px rgba(148,233,255,.08),inset 0 1px 0 rgba(255,255,255,.11)}
}
@media(max-width:390px){
  .tdm-artwork-carousel-swipe-hint{gap:8px;padding-left:11px;padding-right:9px}
  .tdm-artwork-carousel-swipe-hint-label{font-size:11px}
  .tdm-artwork-carousel-swipe-hint-copy small{font-size:9px}
  .tdm-artwork-carousel-swipe-hint-motion{width:46px;flex-basis:46px}
}
@media(prefers-reduced-motion:reduce){
  .tdm-artwork-carousel-swipe-hint-motion i{animation:none;right:auto;left:8px}
  .tdm-artwork-carousel-swipe-hint{transition:none;animation:none!important}
}
