/* ==========================================================================
   1. Main Carousel Structure & Sizing
   ========================================================================== */

#carousel {
  position: relative; 
  width: 100%;
  height: auto; 
  
  /* 
   * Use 16 / 9 for widescreen, 4 / 3 for standard, or 1 / 1 for a square.
  */
  aspect-ratio: 16 / 9;
}

#carousel .carousel-inner,
#carousel .carousel-item {
  height: 100%;
}


/* ==========================================================================
 2. Slide Content (Images & Videos)
 ========================================================================== */

#carousel .carousel-item img,
#carousel .carousel-item .video-wrapper,
#carousel .carousel-item iframe {
  width: 100%;
  height: 100%;
  object-fit: cover; 
}

/* Optional: Ken Burns zoom effect for images. */
.carousel-item img {
  /* animation: kenburns 20s infinite; */
}

@keyframes kenburns {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}


/* ==========================================================================
 3. Carousel Controls (Arrows, Bullets, Buttons)
 ========================================================================== */

/* --- A. Directional Arrows (Left/Right) --- */

/* Somehow the arrows are hidden in the theme, this enables them again */
section.page-home div#carousel div.direction a.carousel-control {
    display:contents !important;
  }

.carousel-control .icon-next .material-icons,.carousel-control .icon-prev .material-icons {
    display: contents !important;
  }

#carousel .carousel-control {
  /* Positioning & Centering */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;

  /* Appearance & Sizing */
  background: none;
  border: none;
  padding: 0;
  opacity: 0.8;
  width: 90px;
  height: 90px;
  transition: opacity 0.2s ease;

  display: flex;
  align-items: center;
  justify-content: center;
}

#carousel .carousel-control:hover {
  opacity: 1;
}

.carousel .carousel-control .icon-prev,
.carousel .carousel-control .icon-next {
    position: absolute;           
    top: 50%;                     
    transform: translateY(-50%);  
}

.carousel .carousel-control .icon-prev {
    left: 1rem; /* Can be set to percentage instead of rem */
}

.carousel .carousel-control .icon-next {
    right: 4rem; /* Can be set to percentage instead of rem */
}

/* The icon itself inside the button */
#carousel .carousel-control .material-icons {
  color: white;
  font-size: 75px;
  text-shadow: 0px 1px 3px rgba(0,0,0,0.4);
}


/* --- B. Bullet Indicators (Dots at the bottom) --- */

.carousel-indicators {
  bottom: 5px !important; 
}

.carousel-indicators li {
  width: 12px !important;
  height: 12px !important;
  border-radius: 50% !important;
  background-color: #fff !important; 
  border: 1px solid rgba(0,0,0,0.5) !important;
  opacity: 0.6;
  margin: 0 5px !important;
}

.carousel-indicators .active {
  opacity: 1;
  transform: scale(1.1); /* Slightly enlarge the active bullet */
}


/* --- C. Custom Link Button (Top Right) --- */

.button-vid-refactored {
  position: absolute;
  top: 25px;
  right: 25px;
  z-index: 30;

  background: rgba(255, 255, 255, 0.8);
  border-radius: 25px;
  padding: 8px 15px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  transition: all 0.3s ease;
  
  display: inline-flex;
  align-items: center;
  gap: 8px;
  
  color: #000;
  text-decoration: none;
  font-weight: 500;
}

.button-vid-refactored:hover {
  color: #000;
  text-decoration: none;
  background: #fff;
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
  transform: scale(1.05);
}

/* ==========================================================================
 4. Legacy or Unused Styles (Removed)
 ========================================================================== */

/* * The ".homeslider" and ".homeslider_nav" rules appeared to be from an older,
* different slider system and have been removed to avoid conflicts with the
* Bootstrap "#carousel". The ".video-wrapper" rules were also superseded
* by the more direct styling of the carousel items. The commented-out
* gradient overlay has also been kept out for clarity.
*/

/* ==========================================================================
   5. Responsive Styles for Mobile & Tablet
   ========================================================================== */

/* These styles will apply ONLY on screens smaller than 768px wide. */
@media (max-width: 767px) {

  #carousel {
      aspect-ratio: 4 / 3;
  }

  /* --- 1. Make the Directional Arrows smaller --- */
  #carousel .carousel-control {
      width: 45px; 
      height: 45px;
  }

  /* Position them closer to the edge on mobile */
  .carousel .carousel-control .icon-prev {
      left: 1rem;
      top: 12rem;
  }
  
  .carousel .carousel-control .icon-next {
    right: 1.8rem;
    top: 12rem;
  }

  /* --- 2. Make the Arrow Icons inside the buttons smaller --- */
  #carousel .carousel-control .material-icons {
      font-size: 30px; 
  }

  /* --- 3. Make the top-right "En savoir plus" button smaller --- */
  .button-vid-refactored {
      /* Reduce padding, font size, and spacing */
      padding: 6px 10px;
      font-size: 12px;
      gap: 4px;
      
      /* Position it closer to the corner */
      top: 10px;
      right: 10px;
  }

  /* --- 4. Make the bottom bullet indicators slightly smaller --- */
  .carousel-indicators li {
      width: 10px !important;
      height: 10px !important;
  }
}