@use "../_variable" as *;
@use "@stephane888/wbu-atomique/scss/wbu-ressources.scss" as *;
.swiper {
  width: 100%;
  max-height: 550px;
  .swiper-slide {
    background-color: #333;
    color: #fff;
    .swiper-image {
      position: relative;
      max-height: 600px;
      z-index: 1;
      width: 100%;
      &::before {
        content: "";
        padding-bottom: 65%;
        display: block;
      }

      @include media-min("MD") {
        width: 50%;
      }

      .cover-text {
        position: absolute;
        z-index: 3;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: $wbu-margin;
        align-items: center;
        text-align: center;
        font-size: $wbu-default-font-size * 1.7;
        line-height: 1.7;
        &::before {
          position: absolute;
          background-color: rgba(#333, 0);
          content: "";
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          z-index: -1;
          transition: all 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) 1s;
        }
        @include media-min("MD") {
          padding: $wbu-margin * 2 $wbu-margin * 3;
        }
        > * {
          transition: all 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) 1.6s;
          //transform: translate3d(-20%, 0, 0);
          opacity: 0;
        }
        .title {
          transform: translate3d(0, -10%, 0);
          color: $wbu-color-primary;
          @include media-min("MD") {
            font-size: 6rem;
            padding-bottom: $wbu-margin * 0.5;
          }
        }
        .sub_title {
          transform: translate3d(0, 20%, 0);
          transition-duration: 0.5s;
          color: #fff;
          text-shadow: 1px 0 1px #000000;
          line-height: 1.5;
          letter-spacing: 0.5px;
          @include media-min("MD") {
            font-size: 3rem;
          }
        }
        .description {
          transition-delay: 1.1s;
          //transform: scale(0.9);
          transform: translate3d(0, 10%, 0);
          font-weight: 600;
          max-width: 500px;
          margin-left: auto;
          margin-right: auto;
        }
      }
      .cover-img {
        img {
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          max-width: 1200px;
          min-height: 100%;
          min-width: 100%;
          z-index: 0;
        }
      }
    }
    &.swiper-slide-active {
      .swiper-image {
        .cover-text {
          &::before {
            background-color: rgba(#333, 0.7);
          }
          > * {
            opacity: 1;
          }
          .title {
            transform: translate3d(0, 0, 0);
          }
          .sub_title {
            transform: translate3d(0, 0, 0);
          }
          .description {
            transform: scale(1);
            transform: translate3d(0, 0, 0);
          }
        }
      }
    }
  }
}
