/* Carousel Avis */
.carousel {
  /* Arrow buttons */
  .controllers {
    display: block;
    margin-bottom: 1em;
    text-align: center;
    
    .arrow {
      margin: .5em;
      min-width: 45px;
      min-height: 45px;
      background: none;
      border: none;
      color: whitesmoke;
      cursor: pointer;
    }
  }

  .carousel-avis {
    position: relative;
    overflow: hidden;
    width: 340px;
    margin: 0 auto;
    box-sizing: border-box;

    .carousel-inner {
      animation: none;
      transform: translateX(0);
      transition: transform 0.3s ease;
      display: flex;
      width: max-content;
    }

    &:hover .carousel-inner {
      animation-play-state: paused;
    }

    .slide {
      border: solid var(--color-oringe) 2px;
      background: var(--bg-gradient-yellow);
      border-radius: 1em;
      min-width: 300px;
      padding: 1em;
      width: 300px;
      box-sizing: border-box;
      display: flex;
      margin: 0 20px;

      .content {
        margin: 0;
        display: flex;
        flex: 1;
        flex-direction: column;
        justify-content: space-between;

        & > p {
          flex: 1;
          font-size: 17px;
        }

        & > footer {
          font-size: 18px;
          font-family: var(--font-title-regular);
          text-align: left;
          margin: 1em 0;
        }
      }
    }
  }

  @media (min-width: 750px) and (max-width: 1024px) {
      .carousel-avis {
        width: 660px;
        margin: 0 auto;
      }
  }

  @media (min-width: 1024px) {
      width: 100%;

      .controllers {
        display: none;
      }
      
      .carousel-avis { 
        width: 100%;
        margin: 0 auto;
        display: flex;
        align-items: center;

        .slide {
          margin: 0 2vw;
        }

        .carousel-inner {
          transition: none;
          /* Animation speed */
          animation: scroll 160s linear infinite;
        }
      }
  }
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}