@font-face {
  font-family: 'Midfield';
  src: url('Midfield-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

body {
  overflow: hidden;
  background-color: #000000;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-size: 16px; /* Base pour les calculs rem */
}

/* Background slideshow */
#bg-slideshow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Tous les backgrounds sont chargés et superposés */
#bg-slideshow .bg-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  opacity: 0;
  transition: opacity 2s ease-in-out;
  display: block;
  overflow: hidden;
}

/* Première image visible immédiatement */
#bg-slideshow .bg-slide:nth-child(1) {
  opacity: 1;
  z-index: 1;
}

#bg-slideshow .bg-slide:nth-child(2) {
  opacity: 0;
  z-index: 2;
}

#bg-slideshow .bg-slide:nth-child(3) {
  opacity: 0;
  z-index: 3;
}

/* Style pour les images à l'intérieur des slides */
#bg-slideshow .bg-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* UI au-dessus du diaporama */
.wrapper {
  position: fixed;
  bottom: 3.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
}

.progress-container {
  position: relative;
  width: 100rem;
  max-width: 80%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.progress-status {
  position: absolute;
  top: -2.5rem;
  left: 0;
  font-family: 'Midfield', sans-serif;
  font-size: 2rem;
  font-weight: normal;
  color: #ffffff;
  text-shadow: 0.0625rem 0.0625rem 0.125rem rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.progress-bar-wrapper {
  position: relative;
  width: 100%;
  height: 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  border: 0.0625rem solid rgba(255, 255, 255, 0.4);
  border-radius: 2rem;
  overflow: hidden;
  display: flex;
  justify-content: flex-start;
  backdrop-filter: blur(2px);
  /* Vertical striped texture for unfilled portion */
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 0.1875rem,
    rgba(255, 255, 255, 0.08) 0.1875rem,
    rgba(255, 255, 255, 0.08) 0.375rem
  );
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-top-left-radius: 2rem;
  border-bottom-left-radius: 2rem;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  background: linear-gradient(to right, #1a5aa8, #2d7fd8, #4a9eff);
  transition: width 0.4s ease;
  position: relative;
  overflow: hidden;
  /* Add dots effect using pseudo-element */
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--progress-gradient, linear-gradient(to right, #1a5aa8, #2d7fd8, #4a9eff));
  opacity: 0;
  transition: opacity 2s ease-in-out;
  border-top-left-radius: 2rem;
  border-bottom-left-radius: 2rem;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  z-index: 2;
  pointer-events: none;
}

.progress-bar.transitioning::after {
  opacity: 1;
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 0.375rem,
      rgba(255, 255, 255, 0.6) 0.375rem,
      rgba(255, 255, 255, 0.6) 0.75rem
    );
  background-size: 1rem 1rem;
  background-position: 0 0;
  animation: candyCaneMove 1.5s linear infinite;
  opacity: 1;
  z-index: 1;
}

@keyframes candyCaneMove {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 1rem 0;
  }
}

.progress-percentage {
  position: absolute;
  top: -2.5rem;
  right: 0;
  font-family: 'Midfield', sans-serif;
  font-size: 2rem;
  font-weight: normal;
  color: #ffffff;
  text-shadow: 0.0625rem 0.0625rem 0.125rem rgba(0, 0, 0, 0.5);
  white-space: nowrap;
  pointer-events: none;
  z-index: 10;
}