/**
 * @file
 * Styles for Paragraphs Carousel.
 */

.paragraphs-carousel {
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.paragraphs-carousel *,
.paragraphs-carousel *::before,
.paragraphs-carousel *::after {
  box-sizing: inherit;
}

.paragraphs-carousel__viewport {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.paragraphs-carousel__track {
  display: flex;
  width: 100%;
  transition: transform 0.5s ease;
  will-change: transform;
}

.paragraphs-carousel__slide {
  flex: 0 0 100%;
  min-width: 100%;
  width: 100%;
  position: relative;
}

/* Fade effect */
.paragraphs-carousel--effect-fade .paragraphs-carousel__track {
  display: grid;
  grid-template-columns: 1fr;
  transform: none !important;
}

.paragraphs-carousel--effect-fade .paragraphs-carousel__slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  z-index: 1;
}

.paragraphs-carousel--effect-fade .paragraphs-carousel__slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

/* Navigation arrows */
.paragraphs-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px;
  height: 48px;
  border: none;
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 0;
  transition: background-color 0.3s ease, opacity 0.3s ease;
}

.paragraphs-carousel__arrow:hover,
.paragraphs-carousel__arrow:focus-visible {
  background-color: rgba(0, 0, 0, 0.8);
  outline: 2px solid #fcbd31;
}

.paragraphs-carousel__arrow--prev {
  left: 80px;
}

.paragraphs-carousel__arrow--next {
  right: 80px;
}

.paragraphs-carousel__arrow::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 12px;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
}

.paragraphs-carousel__arrow--prev::before {
  transform: rotate(-45deg);
  margin-left: 4px;
}

.paragraphs-carousel__arrow--next::before {
  transform: rotate(135deg);
  margin-right: 4px;
}

.paragraphs-carousel__arrow[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Pagination dots */
.paragraphs-carousel__dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.paragraphs-carousel__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
  background-color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 0;
  margin: 0;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.paragraphs-carousel__dot:hover,
.paragraphs-carousel__dot:focus-visible {
  background-color: rgba(255, 255, 255, 0.8);
  outline: none;
}

.paragraphs-carousel__dot.is-active {
  background-color: #fcbd31;
  border-color: #fcbd31;
  transform: scale(1.15);
}

/* Visually hidden utility */
.paragraphs-carousel .visually-hidden {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  overflow: hidden !important;
  height: 1px !important;
  width: 1px !important;
  word-wrap: normal !important;
}

/* Hero Carousel Specific Styles */
.paragraphs-carousel--hero {
  background-color: #02261c;
}

.paragraphs-carousel--hero,
.paragraphs-carousel--hero .paragraphs-carousel__viewport,
.paragraphs-carousel--hero .paragraphs-carousel__track,
.paragraphs-carousel--hero .paragraphs-carousel__slide {
  height: 100%;
  min-height: 500px;
}

.carrousel-hero .paragraphs-carousel--hero,
.carrousel-hero .paragraphs-carousel--hero .paragraphs-carousel__viewport,
.carrousel-hero .paragraphs-carousel--hero .paragraphs-carousel__track,
.carrousel-hero .paragraphs-carousel--hero .paragraphs-carousel__slide {
  height: 90vh;
}

.paragraphs-carousel--hero .paragraph--type--hero {
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.paragraphs-carousel--hero .paragraph--type--hero .field--name-field-image,
.paragraphs-carousel--hero .paragraph--type--hero .field--name-field-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.paragraphs-carousel--hero .paragraph--type--hero .field--name-field-image img {
  opacity: 0.35;
}

.paragraphs-carousel--hero .slide-hero-contenu {
  position: relative;
  z-index: 2;
}
