body {
  margin: 0;
  overflow-x: hidden;
}

#titre-projet {
  display: flex;
  position: fixed;
  width: 100vw;
  padding-top: 5px;
  justify-content: center;
  align-items: center;
  line-height: 100%;
  font-family: var(--font-1);
  font-size: 13pt;
  text-transform: none;
  z-index: 2;
}

#scroll-text {
  display: flex;
  position: fixed;
  bottom: 6px;
  width: 100vw;
  justify-content: center;
  align-self: center;
  background: none;
  font-size: 11pt;
  font-family: var(--font-1);
  font-size: 13pt;
  text-transform: none;
  z-index: 2;
}

.container {
  height: 100vh;
  display: flex;
  overflow: hidden;
  position: relative;
}

.gallery {
  margin: 0px;
  display: flex;
  gap: 0;
  will-change: transform;
}

img {
  transition: ease 5s;
  transform: translateX(0);
}

img.in-view {
  transform: translateX(-150px);
}

#img-XL {
  max-width: 70vw;
  max-height: 70vh;
}

#img-L {
  max-width: 50vw;
  max-height: 50vh;
}

#img-M {
  max-width: 40vw;
  max-height: 40vh;
}

#img-S {
  max-width: 35vw;
  max-height: 35vh;
}

#img-XS {
  max-width: 25vw;
  max-height: 25vh;
}

.img-top {
  align-self: start;
}

.img-center {
  align-self: center;
}

.cover {
  align-self: center;
}

.img-bottom {
  align-self: end;
}

.spacer-start img {
  max-width: 50vw;
  max-height: 50vh;
}

.spacer-start {
  width: 100vw;
  height: 100vh;
  background: none;
  display: flex;
  font-display: flex;
  flex-direction: column;
  align-items: center;
  align-content: center;
  align-self: center;
  justify-content: center;
  justify-self: center;
  justify-items: center;
}

.spacer-5 {
  width: 5vw;
}

.spacer-10 {
  width: 10vw;
}

.spacer-15 {
  width: 15vw;
}

.spacer-20 {
  width: 20vw;
}

.spacer-25 {
  width: 25vw;
}

.spacer-30 {
  width: 30vw;
}

.spacer-35 {
  width: 35vw;
}

.spacer-40 {
  width: 40vw;
}

.spacer-45 {
  width: 45vw;
}

.spacer-50 {
  width: 50vw;
}

.text-15 {
  display: flex;
  align-items: center;
  width: 16vw;
  height: 100vh;
  text-align: justify;
  transition: ease, 2s;
}

.text-20 {
  display: flex;
  align-content: center;
  align-items: center;
  width: 20vw;
  height: 100vh;
  text-align: justify;
  transition: ease, 2s;
}

.credits p a,
.text-15 p a,
.text-20 p a {
  text-decoration: underline;
}

.container-carrousel {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

.image-container {
  position: relative;
  width: 70vw;
  height: 70vh;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.image-container img {
  position: static !important;
  transform: none !important;
  transition: none !important;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: none;
  object-fit: contain;
}

.image-container img.active {
  display: block;
}

.left-zone,
.right-zone {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50vw;
  display: flex;
  align-items: center;
  z-index: 10;
  pointer-events: auto;
}

.left-zone {
  left: 0;
  justify-content: flex-start;
}

.right-zone {
  right: 0;
  justify-content: flex-end;
}

.arrow {
  margin: 0 7.5vw;
  transition: transform 1s ease;
}

.left-zone:hover .arrow {
  transform: scale(1.5) translateX(-15px);
}

.right-zone:hover .arrow {
  transform: scale(1.5) translateX(15px);
}

.end-trigger {
  height: 100vh;
  width: 110vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: left;
}

.end-trigger a {
  text-decoration: underline;
}

.credits {
  display: flex;
  flex-direction: column;
  width: 40vw;
  gap: 5px;

}

.credit {
  display: flex;
  flex-direction: row;
  gap: 15px;
  margin: 0;
  padding: 0;
}

.credit-L {
  flex: 1;
  text-align: right;
  margin: 0;
  padding: 0;
}

.credit-R {
  flex: 1;
  text-align: left;
  margin: 0;
  padding: 0;
}

#mobile {
  display: none;
}

@media (max-width: 768px) {

  /* 1. On nettoie le conteneur pour le scroll vertical */
  body,
  .container {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: auto !important;
  }

  .gallery {
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0px 0;
    /* Espace en haut et en bas de la page */
    transform: none !important;
  }

  /* 2. Suppression des spacers comme demandé */
  .gallery>div[class^="spacer-"]:not(.spacer-start) {
    display: none !important;
  }

  .text-15,
  .text-20 {
    width: calc(100vw - 125px) !important;
    height: calc(100vh + 20px) !important;
  }

  #titre-projet {
    display: flex;
    position: fixed;
    width: 50vw;
    height: auto;
    justify-content: center;
    justify-items: center;
    justify-self: center;
    align-items: center;
    line-height: 100%;
    font-family: var(--font-1);
    text-transform: none;
    z-index: 2;
  }

  /* 3. Images Full Bleed avec 10px de marge */
  img,
  #img-XL,
  #img-L,
  #img-M,
  #img-S,
  #img-XS,
  .spacer-start img {
    /* Calcul : 100% de largeur moins 10px de chaque côté */
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    height: auto !important;
    max-height: none !important;
    margin: 5px auto !important;
    /* 10px haut/bas pour l'espacement entre images */
    align-self: center !important;
    object-fit: contain;
  }

  .container-carrousel {
    display: none;
  }

  /* 4. Ajustement de la transition (Slide up au lieu de horizontal) */
  img {
    transform: translateY(0px);
    transition: transform 1s ease;
  }

  img.in-view {
    transform: translateY(0) !important;
    opacity: 1;
  }

  /* 5. On s'assure que la section de fin prend toute la place */
  .end-trigger {
    width: 100vw !important;
    height: 100vh !important;
  }

  .credits {
    width: calc(100vw - 60px) !important;
  }

  .credit-L {
    flex: .4;
  }

  img.cover {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: none !important;
    /* Pas d'animation au chargement pour la cover */
  }

  #mobile {
    display: block;
  }
}