/* Vaporis - Bannières & Informations - Front */

.vbi-slider {
  position: relative;
  display: block;
  width: 100vw;
  max-width: 100vw;
  margin-top: 0;
  margin-bottom: 28px;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: hidden;
  border-radius: 0;
  background: var(--vbi-current-bg, #f3f9fb);
  box-shadow: 0 10px 30px rgba(20, 45, 50, 0.08);
}

/* Autorise le slider à dépasser du conteneur Astra/Gutenberg quand le shortcode est placé dans une zone limitée. */
.ast-container .vbi-slider,
.entry-content .vbi-slider,
.wp-block-shortcode .vbi-slider {
  max-width: 100vw;
}

.vbi-slider-track {
  position: relative;
  width: 100%;
  background: inherit;
}

.vbi-slide {
  display: none;
  width: 100%;
  background: var(--vbi-slide-bg, #f3f9fb);
}

.vbi-slide.is-active {
  display: block;
  animation: vbiFadeIn 420ms ease both;
}

.vbi-slide a,
.vbi-slide img {
  display: block;
}

.vbi-slide a {
  width: 100%;
}

.vbi-slide img {
  width: auto;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  object-fit: contain;
}

/* Quand l'image source est assez grande, JS ajoute .vbi-fill-image pour l'afficher en pleine largeur. */
.vbi-slide.vbi-fill-image img,
.vbi-slide.vbi-force-fill img {
  width: 100% !important;
  max-width: none !important;
}

.vbi-slider-arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.94) !important;
  color: #12362f !important;
  font-size: 0 !important;
  line-height: 0 !important;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.14);
  transition: transform 160ms ease, background 160ms ease;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
  text-indent: 0 !important;
}

.vbi-slider-arrow::before,
.vbi-slider-arrow::after {
  content: none !important;
}

.vbi-slider-arrow-icon {
  display: block;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.vbi-slider-arrow:hover,
.vbi-slider-arrow:focus {
  background: #ffffff !important;
  color: #12362f !important;
  transform: translateY(-50%) scale(1.05);
}

.vbi-slider-prev {
  left: 24px;
}

.vbi-slider-next {
  right: 24px;
}

.vbi-slider-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 4;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.vbi-slider-dot {
  width: 11px;
  height: 11px;
  padding: 0 !important;
  border: 2px solid #111111 !important;
  border-radius: 999px;
  background: #ffffff !important;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  transition: width 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
  appearance: none;
  -webkit-appearance: none;
}

.vbi-slider-dot:hover,
.vbi-slider-dot:focus {
  transform: scale(1.08);
}

.vbi-slider-dot.is-active {
  width: 26px;
  background: #111111 !important;
  border-color: #ffffff !important;
}

.vbi-info-bar {
  width: 100%;
  padding: 10px 16px;
  font-size: 15px;
  line-height: 1.45;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.vbi-info-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  text-align: center;
}

.vbi-info-message p {
  margin: 0;
}

.vbi-info-info {
  background: #eef8f0;
  color: #214b27;
}

.vbi-info-warning {
  background: #fff7df;
  color: #6b4b00;
}

.vbi-info-urgent {
  background: #fdecec;
  color: #7a1e1e;
}

.vbi-info-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 7px 14px;
  border-radius: 999px;
  background: #3e9f31;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
}

.vbi-info-button:hover,
.vbi-info-button:focus {
  filter: brightness(0.95);
}

@keyframes vbiFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 768px) {
  .vbi-slider {
    border-radius: 0;
    margin-bottom: 22px;
  }

  .vbi-slider-arrow {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    font-size: 28px;
  }

  .vbi-slider-prev {
    left: 10px;
  }

  .vbi-slider-next {
    right: 10px;
  }

  .vbi-slider-dots {
    bottom: 8px;
  }

  .vbi-info-inner {
    flex-direction: column;
    gap: 8px;
  }
}

/* Fond personnalisable par bannière : appliqué aussi au conteneur principal via JS */

/* v1.1.6 - Correction renforcée pleine largeur + flèches */
body .vbi-slider {
  left: 50% !important;
  right: auto !important;
  width: 100vw !important;
  max-width: none !important;
  min-width: 100vw !important;
  margin-left: -50vw !important;
  margin-right: 0 !important;
}

body .vbi-slider .vbi-slider-track,
body .vbi-slider .vbi-slide,
body .vbi-slider .vbi-slide > a {
  width: 100% !important;
  max-width: none !important;
}

body .vbi-slider .vbi-slide.vbi-force-fill > img,
body .vbi-slider .vbi-slide.vbi-fill-image > img,
body .vbi-slider .vbi-slide.vbi-force-fill > a > img,
body .vbi-slider .vbi-slide.vbi-fill-image > a > img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  object-fit: contain !important;
}

body .vbi-slider .vbi-slider-arrow {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
}

body .vbi-slider .vbi-slider-arrow svg,
body .vbi-slider .vbi-slider-arrow .vbi-slider-arrow-icon {
  position: static !important;
  display: block !important;
  margin: 0 !important;
  transform: none !important;
}

/* v1.2.0 - Images mobiles dédiées */
.vbi-slide picture {
  display: block;
  width: 100%;
}

body .vbi-slider .vbi-slide.vbi-force-fill picture,
body .vbi-slider .vbi-slide.vbi-fill-image picture {
  width: 100% !important;
  max-width: none !important;
}

body .vbi-slider .vbi-slide.vbi-force-fill picture > img,
body .vbi-slider .vbi-slide.vbi-fill-image picture > img {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  object-fit: contain !important;
}
