* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  height: 100vh;
  background-color: #d7ccc8;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 150px;
  left: 0;
  width: 100%;
  background-color: #d7ccc8;
  padding: 20px;
  z-index: 1000;
}

.mobile-nav a {
  font-family: 'BritannicBold';
  font-size: 1.5em;
  margin: 10px 0;
  text-decoration: none;
  color: black;
}

.mobile-nav.active {
  display: flex;
}

.hero-content {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 150px);
  overflow: hidden;
}

.photo-section {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 80px 40px;
  overflow: hidden;
  position: relative;
  width: 100%;
  height: 100%;
}

.photo-section img {
  max-width: 22%;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.title-section {
  flex: 0.6;
  display: flex;
  justify-content: center;
  font-family: 'Caladea', serif;
  align-items: center;
  color: #3e2723;
  border-top: 2px solid #3e2723;
  padding: 20px;
}

.title-section h1 {
  font-size: 3em;
  text-align: center;
  line-height: 1.4;
}

.photo-wrapper {
  display: flex;
  gap: 20px;
  padding: 0 60px;
  animation: scrollLoop 30s linear infinite;
  will-change: transform;
}

.photo-wrapper img {
  height: auto;
  width: 100%;
  max-height: 60vh;
  aspect-ratio: 9/16;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  transition: transform 0.5s ease;
  opacity: 0;
  transform: translateY(-20px);
  animation: fadeIn 0.8s ease forwards;
  flex-shrink: 0;
}

@keyframes scrollLoop {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-100vw * 1.2));
  }
}

.photo-wrapper img:nth-child(1) { animation-delay: 0.3s; }
.photo-wrapper img:nth-child(2) { animation-delay: 0.6s; }
.photo-wrapper img:nth-child(3) { animation-delay: 0.9s; }
.photo-wrapper img:nth-child(4) { animation-delay: 1.2s; }
.photo-wrapper img:nth-child(5) { animation-delay: 1.5s; }
.photo-wrapper img:nth-child(6) { animation-delay: 1.8s; }
.photo-wrapper img:nth-child(7) { animation-delay: 2.0s; }
@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.photo-section img {
  max-width: 22%;
}

@media (max-width: 768px) {
  .photo-section {
    padding: 20px 10px; 
    gap: 10px;
  }

  .photo-wrapper {
    padding: 0 20px;
    animation: scrollLoop 20s linear infinite; 
  }

  .photo-wrapper img {
    max-width: 80%;   
    max-height: 70vh;
    aspect-ratio: auto; 
  }

  .title-section h1 {
    font-size: 1.8em; 
  }
}

/* Sur mobile (moins de 768px de large) */
@media (max-width: 768px) {
  .photo-wrapper img {
    max-width: 45%;   /* réduit la largeur des images */
    max-height: 40vh; /* limite la hauteur */
    aspect-ratio: auto; /* évite de forcer un format trop grand */
  }

  .photo-section {
    gap: 10px;       /* réduit l’espace entre les photos */
    padding: 20px;   /* moins de marge autour */
  }

  .title-section h1 {
    font-size: 1.6em; /* texte plus petit pour mobile */
  }
}
