/**
 * Hero slider pleine page — ps_imageslider stylisé façon somef.tn
 * Nécessite que les slides aient une image, un titre et une description.
 */

:root {
  --somef-hero-height: min(88vh, 700px);
  --somef-hero-height-mobile: min(60vh, 460px);
  --somef-hero-overlay: linear-gradient(
    to top,
    rgba(20, 16, 17, 0.72) 0%,
    rgba(20, 16, 17, 0.32) 55%,
    rgba(20, 16, 17, 0.08) 100%
  );
}

/* Conteneur pleine largeur */
.somef-page-home .homeslider-container {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-bottom: 0 !important;
  overflow: hidden;
  position: relative;
}

/* Liste des slides */
.somef-page-home .homeslider-container .rslides {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Chaque slide */
.somef-page-home .homeslider-container .rslides li.slide {
  height: var(--somef-hero-height);
  position: relative;
  overflow: hidden;
}

/* Image de slide */
.somef-page-home .homeslider-container .rslides li.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Overlay gradient pour lisibilité du texte */
.somef-page-home .homeslider-container .rslides li.slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--somef-hero-overlay);
  pointer-events: none;
}

/* Captions */
.somef-page-home .homeslider-container .caption {
  position: absolute;
  bottom: 12%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: 90%;
  max-width: 860px;
  text-align: center;
  color: #ffffff;
}

.somef-page-home .homeslider-container .caption .caption-description p {
  font-size: clamp(1.25rem, 3.5vw, 2.25rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.6rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9), 0 4px 22px rgba(0, 0, 0, 0.5);
  color: #ffffff;
}

.somef-page-home .homeslider-container .caption .caption-description span {
  display: block;
  font-size: clamp(0.875rem, 1.8vw, 1.125rem);
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
  color: rgba(255, 255, 255, 0.9);
}

/* Bouton CTA dans caption */
.somef-page-home .homeslider-container .caption a.btn,
.somef-page-home .homeslider-container .caption .caption-description a {
  display: inline-block;
  padding: 0.65rem 1.75rem;
  background: var(--color-primary, #d33343);
  color: #ffffff !important;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: var(--border-radius-md, 8px);
  text-decoration: none !important;
  transition: background 0.2s ease, transform 0.2s ease;
  box-shadow: 0 3px 10px rgba(211, 51, 67, 0.35);
}

.somef-page-home .homeslider-container .caption a.btn:hover,
.somef-page-home .homeslider-container .caption .caption-description a:hover {
  background: var(--color-primary-dark, #b01f2e);
  transform: translateY(-1px);
}

/* Pagination (bullets) */
.somef-page-home .homeslider-container .rslides_tabs {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 11;
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.somef-page-home .homeslider-container .rslides_tabs li a {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  text-indent: -9999px;
  transition: background 0.2s ease;
}

.somef-page-home .homeslider-container .rslides_tabs li.rslides_here a {
  background: #ffffff;
}

/* Cacher les flags promo par défaut */
.product-flag.on_sale,
.product-flag.discount,
.product-flag.pack {
  display: none !important;
}

/* Responsive mobile */
@media (max-width: 767px) {
  .somef-page-home .homeslider-container .rslides li.slide {
    height: var(--somef-hero-height-mobile);
  }

  .somef-page-home .homeslider-container .caption {
    bottom: 8%;
    width: 95%;
  }

  .somef-page-home .homeslider-container .caption .caption-description p {
    font-size: clamp(1.1rem, 5vw, 1.75rem);
  }

  .somef-page-home .homeslider-container .caption .caption-description span {
    font-size: 0.875rem;
  }
}
