.lnd-slider-block{
  position:relative;
  width:100%;
  margin:0px !important;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
}

.lnd-slider{
  width:100%;
  overflow:hidden;
}

.lnd-slider .swiper-wrapper{
  align-items:stretch;
}

.lnd-slide{
  height:auto;
  box-sizing:border-box;
}

.lnd-slide > *:first-child{
  margin-top:0;
}

.lnd-slide > *:last-child{
  margin-bottom:0;
}

.lnd-slider .swiper-button-prev,
.lnd-slider .swiper-button-next{
  top:44%;
  color:var(--color-primary, #111827);
}

.lnd-slider .swiper-button-prev{
  left:2px;
}

.lnd-slider .swiper-button-next{
  right:2px;
}

.lnd-slider .swiper-pagination-bullet-active{
  background:var(--color-primary, #111827);
}

/*
 * L'image est portée par le bloc parent et ne fait donc jamais partie
 * du mouvement des slides.
 */
.lnd-slider-block.has-background-image{
  overflow:hidden;
  background-size: contain;
  background-position: left center;
}
/* La zone des slides suit l'image (largeur ajustée par view.js), calée à gauche. */
.lnd-slider-block.has-background-image > .swiper.lnd-slider{
  margin-left:0;
  margin-right:auto;
}

/* ==========================================================
   Éditeur : carrousel piloté par editor.js (pas de Swiper dans Gutenberg).
   Les slides ont la largeur calculée comme sur le site (--lnd-editor-slide-width).
   ========================================================== */
.editor-styles-wrapper .lnd-slider-block--editor .swiper.lnd-slider{
  position:relative;
  overflow:hidden;
}

.editor-styles-wrapper .lnd-slider-block--editor .lnd-slider-editor-track{
  display:flex !important;
  flex-wrap:nowrap !important;
  align-items:stretch;
  width:100%;
  transition-property:transform;
  transition-timing-function:ease;
}

.editor-styles-wrapper .lnd-slider-block--editor .lnd-slider-editor-track > *{
  flex:0 0 var(--lnd-editor-slide-width, 100%) !important;
  width:var(--lnd-editor-slide-width, 100%) !important;
  max-width:none !important;
  min-width:0;
  margin:0 !important;
  height:auto;
}

/* Contenu des slides : les images ne débordent jamais de leur slide. */
.editor-styles-wrapper .lnd-slider-block--editor .lnd-slide img{
  max-width:100%;
  height:auto;
}
.editor-styles-wrapper .lnd-slider-block--editor .lnd-slide .wp-block-image,
.editor-styles-wrapper .lnd-slider-block--editor .lnd-slide .wp-block-image > div{
  max-width:100%;
}

/* Flèches et points cliquables dans l'éditeur, comme sur le site. */
.editor-styles-wrapper .lnd-slider-block--editor .swiper-button-prev,
.editor-styles-wrapper .lnd-slider-block--editor .swiper-button-next{
  display:flex;
  pointer-events:auto;
  cursor:pointer;
  z-index:20;
}
.editor-styles-wrapper .lnd-slider-block--editor .swiper-button-disabled{
  opacity:.35;
  cursor:default;
}
.editor-styles-wrapper .lnd-slider-block--editor .swiper-pagination{
  z-index:20;
}
.editor-styles-wrapper .lnd-slider-block--editor .swiper-pagination-bullet{
  cursor:pointer;
}

/* Barre « Slides 1 2 3 + Ajouter une slide » : éditeur uniquement. */
.editor-styles-wrapper .lnd-slider-editor-bar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:4px;
  margin:0 0 8px;
  padding:6px 8px;
  border:1px solid #dcdcde;
  border-radius:4px;
  background:#fff;
  font-family:var(--font-body);
  font-size:.8125em;
  line-height:1.4;
  color:#1e1e1e;
}
.editor-styles-wrapper .lnd-slider-editor-bar__label{
  margin-right:4px;
  font-weight:600;
}
.editor-styles-wrapper .lnd-slider-editor-bar__btn{
  min-width:28px;
  height:28px;
  padding:0 8px;
  border:1px solid #1e1e1e;
  border-radius:2px;
  background:#fff;
  color:#1e1e1e;
  font:inherit;
  font-weight:400;
  letter-spacing:normal;
  text-transform:none;
  line-height:1;
  cursor:pointer;
}
.editor-styles-wrapper .lnd-slider-editor-bar__btn.is-current{
  background:#1e1e1e;
  color:#fff;
}
.editor-styles-wrapper .lnd-slider-editor-bar__btn:disabled{
  opacity:.35;
  cursor:default;
}
.editor-styles-wrapper .lnd-slider-editor-bar__add{
  margin-left:auto;
}

/* Position verticale des flèches (réglage « Position verticale des flèches »).
   Centre = comportement historique (top:44%), aucun attribut en HTML. */
.lnd-slider-block[data-arrows-position="top"] .lnd-slider .swiper-button-prev,
.lnd-slider-block[data-arrows-position="top"] .lnd-slider .swiper-button-next{
  top:1rem;
  margin-top:0;
}
.lnd-slider-block[data-arrows-position="bottom"] .lnd-slider .swiper-button-prev,
.lnd-slider-block[data-arrows-position="bottom"] .lnd-slider .swiper-button-next{
  top:auto;
  bottom:1rem;
  margin-top:0;
}
/* Avec des points de pagination, les flèches du bas restent au-dessus d'eux. */
.lnd-slider-block[data-arrows-position="bottom"][data-dots="1"] .lnd-slider .swiper-button-prev,
.lnd-slider-block[data-arrows-position="bottom"][data-dots="1"] .lnd-slider .swiper-button-next{
  bottom:2.5rem;
}
