:root {
  --slider-padding: 5rem;
  --handle-size: 3rem;
  --img-gap: .3rem;
}

::-webkit-scrollbar {
    display: none;
}

.carousel-fiction {
  display: grid;
  gap: var(--img-gap);
  grid-auto-flow: column;
  grid-auto-columns: 40%;

  overflow-x: auto;
  scroll-snap-type: x proximity;

  @media (prefers-reduced-motion: no-preference) {
    scroll-behavior: smooth;
  }

  anchor-name: --carousel-fiction;

  &::scroll-button(*) {
    position: fixed;
    position-anchor: --carousel-fiction;
    font: inherit;
    border: none;
    border-radius: .7rem;
    height: clamp(4rem, 10vw, 9rem);
    width: clamp(1.8rem, 10vw, 4rem);
    padding: 0 .5rem;
    background-color: rgba(0, 0, 0, .25);
    cursor: pointer;
    font-size: 5rem;
    margin-right: clamp(.2rem, 10vw, 1.3rem);
    margin-left: clamp(.2rem, 10vw, 1.3rem);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    transition: background-color 150ms ease-in-out;
  }

  &::scroll-button(right) {
    content: ">";
    padding-bottom: 10px;
    color: white;
    position-area: center right;
  }

  &::scroll-button(right):hover {
    transform: scale(1.1);
    background-color: rgba(0, 0, 0, .5);
    transition: transform 150ms ease-in-out;
  }

  &::scroll-button(left) {
    content: "<";
    padding-bottom: 10px;
    color: white;
    position-area: center left;
  }
  &::scroll-button(left):hover {
    transform: scale(1.1);
    background-color: rgba(0, 0, 0, .5);
    transition: transform 150ms ease-in-out;
  }
}

.carousel-projets {
  display: grid;
  gap: var(--img-gap);
  grid-auto-flow: column;
  grid-auto-columns: 40%;

  overflow-x: auto;
  scroll-snap-type: x proximity;

  @media (prefers-reduced-motion: no-preference) {
    scroll-behavior: smooth;
  }

  anchor-name: --carousel-projets;

  &::scroll-button(*) {
    position: fixed;
    position-anchor: --carousel-projets;
    font: inherit;
    border: none;
    border-radius: .7rem;
    height: clamp(4rem, 10vw, 9rem);
    width: clamp(1.8rem, 10vw, 4rem);
    padding: 0 .5rem;
    background-color: rgba(0, 0, 0, .25);
    cursor: pointer;
    font-size: 5rem;
    margin-right: clamp(.2rem, 10vw, 1.3rem);
    margin-left: clamp(.2rem, 10vw, 1.3rem);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    transition: background-color 150ms ease-in-out;
  }

  &::scroll-button(right) {
    content: ">";
    padding-bottom: 10px;
    color: white;
    position-area: center right;
  }

  &::scroll-button(right):hover {
    transform: scale(1.1);
    background-color: rgba(0, 0, 0, .5);
    transition: transform 150ms ease-in-out;
  }

  &::scroll-button(left) {
    content: "<";
    padding-bottom: 10px;
    color: white;
    position-area: center left;
  }
  &::scroll-button(left):hover {
    transform: scale(1.1);
    background-color: rgba(0, 0, 0, .5);
    transition: transform 150ms ease-in-out;
  }
}

.carousel-clip {
  display: grid;
  gap: var(--img-gap);
  grid-auto-flow: column;
  grid-auto-columns: 40%;

  overflow-x: auto;
  scroll-snap-type: x proximity;

  @media (prefers-reduced-motion: no-preference) {
    scroll-behavior: smooth;
  }

  anchor-name: --carousel-clip;

  &::scroll-button(*) {
    position: fixed;
    position-anchor: --carousel-clip;
    font: inherit;
    border: none;
    border-radius: .7rem;
    height: clamp(4rem, 10vw, 9rem);
    width: clamp(1.8rem, 10vw, 4rem);
    padding: 0 .5rem;
    background-color: rgba(0, 0, 0, .25);
    cursor: pointer;
    font-size: 5rem;
    margin-right: clamp(.2rem, 10vw, 1.3rem);
    margin-left: clamp(.2rem, 10vw, 1.3rem);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    transition: background-color 150ms ease-in-out;
  }

  &::scroll-button(right) {
    content: ">";
    padding-bottom: 10px;
    color: white;
    position-area: center right;
  }

  &::scroll-button(right):hover {
    transform: scale(1.1);
    background-color: rgba(0, 0, 0, .5);
    transition: transform 150ms ease-in-out;
  }

  &::scroll-button(left) {
    content: "<";
    padding-bottom: 10px;
    color: white;
    position-area: center left;
  }
  &::scroll-button(left):hover {
    transform: scale(1.1);
    background-color: rgba(0, 0, 0, .5);
    transition: transform 150ms ease-in-out;
  }
}

.row {
  padding: 5rem 0 5rem 0;
  border-style: solid;
  border-width: 0px 0px 1px 0px;
  border-color: #525252;
}

.row-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: .5rem calc(var(--img-gap) * 2 + var(--handle-size));
}

.row-title {
  font-size: 2rem;
  margin: 0;
  color: white;
}

.slider-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms;
    border-radius: .5rem;
}

.slider-img:hover img {
    transform: scale(1.2);
}


.slider-img {
  border-radius: .5rem;
  display: flex;
  justify-content: center;
  aspect-ratio: 18/9;
  padding: var(--img-gap);
  overflow: hidden;
  position: relative;
}

.img-film-image {
    display: block;
    width: 100%;
}

.image__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    color: white;
    font-family: 'Ruwundu';
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.image__overlay--blur {
    backdrop-filter: blur(2px);
}

.image__overlay * {
    transform: translateY(20px);
    transition: transform 0.3s;
}

.image__overlay:hover {
    opacity: 1;
}

.image__overlay:hover * {
    transform: translateY(0);
}

.image__title {
    font-family: 'POPPINS';
    font-weight: bold;
    font-size: clamp(1rem, 1.2vw, 2rem);
}

.image__description {
    font-family: 'Courier';
    font-size: clamp(0.7rem, 1vw, 1rem);
    margin-top: 0em;

}

@media (max-width: 1000px) {
  .slider-img {
    aspect-ratio: 16/9;
  }
}

@media (max-width: 800px) {
  .row {
    padding: 2rem 0 2rem 0;
  }
  .row-header {
    padding: .8rem;
  }
  .image__title {
        font-size: 13px;
    }
  .image__description {
        font-size: 0;
    }
  .carousel-fiction {
  
    anchor-name: --carousel-fiction;

  &::scroll-button(*) {
    height: clamp(1rem, 10vw, 2rem);
    width: clamp(1rem, 10vw, 1.4rem);
    background-color: rgba(0, 0, 0, .25);
    font-size: 2rem;
    margin-right: .7rem;
    margin-left: .7rem;
    }
  }
  .carousel-projets {
  
    anchor-name: --carousel-projets;

  &::scroll-button(*) {
    height: clamp(1rem, 10vw, 2rem);
    width: clamp(1rem, 10vw, 1.4rem);
    background-color: rgba(0, 0, 0, .25);
    font-size: 2rem;
    margin-right: .7rem;
    margin-left: .7rem;
    }
  }
  .carousel-clip {
  
    anchor-name: --carousel-clip;

  &::scroll-button(*) {
    height: clamp(1rem, 10vw, 2rem);
    width: clamp(1rem, 10vw, 1.4rem);
    background-color: rgba(0, 0, 0, .25);
    font-size: 2rem;
    margin-right: .7rem;
    margin-left: .7rem;
    }
  }
}

@media (max-width: 430px) {
  .slider {
  --items-per-screen: 2;
  }
  .slider-img {
    aspect-ratio: 12/9;
  }
  .image__description {
        font-size: 3px;
    }
  .row-title {
    font-size: 1rem;
  }
}