.t2t-wpf-legacy-attachments{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:8px 0;
  padding:0;
  border:0;
}
.t2t-wpf-attachment{display:inline-block;max-width:100%}
.t2t-wpf-image img{
  display:block;
  max-width:100%;
  height:auto;
  border-radius:4px;
  cursor:zoom-in;
}
.t2t-wpf-video video{max-width:100%;height:auto}
.t2t-wpf-audio audio{max-width:100%}
.t2t-wpf-file a{overflow-wrap:anywhere}
.t2t-wpf-attachment-denied{font-size:13px;opacity:.78}

.t2t-wpf-lightbox[hidden]{display:none!important}
.t2t-wpf-lightbox{
  position:fixed!important;
  inset:0!important;
  z-index:2147483000!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  padding:20px 76px!important;
  box-sizing:border-box!important;
  background:rgba(0,0,0,.92)!important;
}
.t2t-wpf-lightbox-stage{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  pointer-events:none;
}
.t2t-wpf-lightbox-stage img{
  display:block!important;
  max-width:96vw!important;
  max-height:92vh!important;
  width:auto!important;
  height:auto!important;
  object-fit:contain!important;
  pointer-events:auto;
}

/* Important : sélecteurs volontairement spécifiques + !important pour battre Extra/wpForo. */
body button.t2t-wpf-lightbox-close,
body button.t2t-wpf-lightbox-nav{
  position:fixed!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:#000!important;
  background-color:#000!important;
  color:#fff!important;
  cursor:pointer!important;
  box-shadow:0 0 0 1px rgba(255,255,255,.45)!important;
  text-shadow:none!important;
  opacity:1!important;
  -webkit-appearance:none!important;
  appearance:none!important;
}
body button.t2t-wpf-lightbox-close{
  top:14px!important;
  right:18px!important;
  width:44px!important;
  height:44px!important;
  min-width:44px!important;
  min-height:44px!important;
  border-radius:999px!important;
  font-size:30px!important;
  line-height:42px!important;
  font-family:Arial,sans-serif!important;
}
body button.t2t-wpf-lightbox-nav{
  top:50%!important;
  transform:translateY(-50%)!important;
  width:56px!important;
  height:76px!important;
  min-width:56px!important;
  min-height:76px!important;
  border-radius:7px!important;
  font-size:0!important; /* la flèche est dessinée ci-dessous */
}
body button.t2t-wpf-lightbox-prev{left:12px!important}
body button.t2t-wpf-lightbox-next{right:12px!important}
body button.t2t-wpf-lightbox-nav[hidden]{display:none!important}
body button.t2t-wpf-lightbox-nav > span{
  position:absolute!important;
  top:50%!important;
  left:50%!important;
  display:block!important;
  width:18px!important;
  height:18px!important;
  border-top:4px solid #fff!important;
  border-right:4px solid #fff!important;
  background:transparent!important;
  box-sizing:border-box!important;
}
body button.t2t-wpf-lightbox-prev > span{
  transform:translate(-38%,-50%) rotate(-135deg)!important;
}
body button.t2t-wpf-lightbox-next > span{
  transform:translate(-62%,-50%) rotate(45deg)!important;
}
body button.t2t-wpf-lightbox-close:hover,
body button.t2t-wpf-lightbox-close:focus,
body button.t2t-wpf-lightbox-nav:hover,
body button.t2t-wpf-lightbox-nav:focus{
  outline:2px solid #fff!important;
  outline-offset:2px!important;
  background:#000!important;
  color:#fff!important;
}
.t2t-wpf-lightbox-counter{
  position:fixed!important;
  left:50%!important;
  bottom:14px!important;
  transform:translateX(-50%)!important;
  padding:5px 10px!important;
  border-radius:999px!important;
  background:#000!important;
  color:#fff!important;
  font-size:13px!important;
  line-height:1.2!important;
}

@media (max-width:640px){
  .t2t-wpf-lightbox{padding:16px 48px!important}
  body button.t2t-wpf-lightbox-nav{
    width:44px!important;
    min-width:44px!important;
    height:62px!important;
    min-height:62px!important;
  }
  body button.t2t-wpf-lightbox-prev{left:4px!important}
  body button.t2t-wpf-lightbox-next{right:4px!important}
  body button.t2t-wpf-lightbox-nav > span{width:15px!important;height:15px!important;border-width:3px!important}
}
