* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: 'Lato', sans-serif;
  height: 100%;
  width: 100%;
  scroll-snap-type: y mandatory;
  overflow-x: hidden;
}

section {
  scroll-snap-align: start;
  height: 100vh;
  width: 100vw;
}

.home .main-nav {
  position: absolute;
  top: 0;
  width: 100%;
  padding: 20px 40px;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
}

.home .main-nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
}

.home .main-nav li a {
  color: white;
  text-decoration: none;
  font-size: 1.1em;
  font-weight: 400;
  transition: color 0.2s ease;
}

.home .main-nav li a:hover {
  color: #AF1B3F;
}

/* Accueil */
.home {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #000;
  text-align: center;
  overflow: hidden;
}

.background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0.6;
}

.home .content {
  position: relative;
  z-index: 1;
  color: white;
  padding: 2vh 4vw;
}

.home h1 {
  font-size: 15vh;
  margin-bottom: 10px;
}

.home h2 {
  font-size: 5vh;
  margin-bottom: 100px;
}

.home a {
  padding: 10px 20px;
  font-size: 2vh;
  color: white;
  background-color: #AF1B3F;
  text-decoration: none;
  border-radius: 5px;
}

.home a:hover {
  background-color: #CC4F6E;
}

/* Diaporama */
.grid {
  position: relative;
  height: 100vh;
}

.slider {
  display: flex;
  transition: transform 0.4s ease;
}

.grid-item {
  flex: 0 0 100vw;
  height: 100vh;
  box-sizing: border-box;
  background-color: #eee;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  padding: 5vh 5vh;
  gap: 20px;
  align-items: center;
}

/* Média : image ou vidéo */
.grid-item img,
.grid-item video {
  width: 40vw;
  height: calc(40vw * 9 / 16);
  object-fit: cover;  /* remplit tout, même si ça déforme */
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  align-self: center;
  border-radius: 10px;
  background-color: #000;
}

/* Titre */
.grid-item h2 {
  align-self: center;
  justify-self: start;
  font-size: 6vh;
  text-decoration: none;
  color: #333;
  grid-column: 2;
  grid-row: 1;
}

/* Description */
.grid-item p {
  grid-column: 1 / span 2;
  grid-row: 2;
  font-size: 2vh;
  color: #333;
  max-width: 90%;
  align-self: start;
  text-align: justify;
  overflow-y: auto;
  margin-top: 5vh;
}

.grid-item .copyright p {
  position: absolute;
  bottom: 10px;
  width: 100%;
  text-align: justify;
  font-size: 0.8em;
  color: #000;
  font-style: italic;
  padding: 5px;
  border-radius: 5px;
}

/* Bouton de contact */
.contact-button {
  margin-top: 2vh;
  display: inline-block;
  padding: 10px 20px;
  font-size: 2vh;
  color: white;
  background-color: #AF1B3F;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.2s ease;
}

.contact-button:hover {
  background-color: #CC4F6E;
}

/* Flèches de navigation */
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3em;
  color: #111;
  background: none;
  border: none;
  padding: 0 15px;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s ease;
}

.arrow.left {
  left: 30px; /* Ajout d'une marge */
}

.arrow.right {
  right: 30px; /* Ajout d'une marge */
}

.arrow:hover {
  transform: translateY(-50%) scale(1.2);
}

.arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Responsive : mobile et petits écrans */
@media (max-width: 1200px) {

  .home h1 {
    font-size: 10vh;
    margin-bottom: 10px;
  }

  .home h2 {
    font-size: 2.5vh;
    margin-bottom: 100px;
  }

  .home a {
    padding: 10px 20px;
    font-size: 2vh;
    color: white;
    background-color: #AF1B3F;
    text-decoration: none;
    border-radius: 5px;
  }
  .grid-item {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    padding: 4vh 4vw;
    align-items: center;
    text-align: center;
  }

  .grid-item img,
  .grid-item video {
    width: 80vw;
    height: calc(80vw * 9 / 16);
    object-fit: cover;  /* rogne si besoin, sans déformation */
    grid-column: 1;
    grid-row: 1;
    justify-self: center;
      margin-left: 0vh;
  }

  .grid-item h2 {
    grid-column: 1;
    grid-row: 2;
    font-size: 4vh;
    text-align: center;
    justify-self: center;
    margin: 0 50px 0 50px;
  }

  .grid-item p {
    grid-column: 1;
    grid-row: 3;
    font-size: 1.5vh;
    margin: 0 1vh 1vh 3vh;
    text-align: center;
  }
  .arrow {
    top: 50%; /* Décale légèrement les flèches si besoin */
  }
  .arrow.left {
    left: 5px; /* Ajout d'une marge */
  }
  .arrow.right {
    right: 5px; /* Ajout d'une marge */
  }
}
