* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #F8F4EF;
  color: #292522;
}

#accueil {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px;
  gap: 20px;
}

#accueil img {
  width: 100%;
  max-width: 700px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

#accueil h2 {
  font-size: 40px;
  font-weight: 700;
  margin: 0px;
}

#accueil p {
  font-size: 18px;
  margin: 0;
  max-width: 500px;
}

#accueil a {
  background-color: #8F5E61;
  color: white;
  text-decoration: none;
  padding: 15px 25px;
  border-radius: 30px;
  font-weight: bold;
  transition: 0.3s;
}

#accueil a:hover {
  transform: scale(1.05);
  background-color: #70484A;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background-color: white;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  display: flex;
  align-items: center;
  gap: 25px;
}

nav a {
  color: #292522;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: 0.3s;
}

nav a:hover {
  color: #8F5E61;
}

header h1 {
  color: #8F5E61;
  font-size: 24px;
  margin: 0;
}

#histoire {
  padding: 100px 40px;
  text-align: center;
}

#histoire h2 {
  font-size: 40px;
  margin-bottom: 60px;
}

.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: "";
  position: absolute;
  width: 4px;
  height: 100%;
  background-color: #8F5E61;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.evenement {
  background-color: white;
  padding: 25px;
  margin-bottom: 30px;
  border-radius: 20px;
  text-align: left;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  width: 45%;
  position: relative;
}

.evenement::before {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: #8F5E61;
  right: -32px;
  top: 30px;
}

.evenement:nth-child(even) {
  margin-left: auto;
  text-align: right;
}

.evenement:nth-child(even)::before {
  right: auto;
  left: -32px;
}

.date {
  color: #8F5E61;
  font-weight: bold;
}

.evenement h3 {
  font-size: 24px;
  margin: 10px 0;
}

#souvenirs {
  padding: 100px 40px;
  text-align: center;
}

#souvenirs h2 {
  font-size: 40px;
  margin-bottom: 10px;
}

#souvenirs > p {
  font-size: 18px;
  margin-bottom: 50px;
}

.galerie {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.souvenir {
  background-color: white;
  padding: 10px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.souvenir img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 15px;
  transition: 0.4s;
}

.souvenir:hover img {
  transform: scale(1.05);
}

#lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%
  height: 100%;
  background-color: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 2000;
}

#lightbox.active {
  display: flex;
}

#image-lightbox {
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 20px;
  display: block;
}

#fermer {
  position: absolute;
  top: 20px;
  right: 25px;

  background: none;
  border: none;

  color: white;
  font-size: 40px;
  cursor: pointer;

  z-index: 2100;
}

#chiffres {
  padding: 100px 40px;
  text-align: center;
}

#chiffres h2 {
  font-size: 40px;
  margin-bottom: 50px;
}

.liste-chiffres {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat (3, 1fr);
  gap: 25px;
}

.chiffre {
  background-color: white;
  padding: 35px 20px;
  border-radius: 20px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.chiffre span {
  font-size: 40px;
  color: #8F5E61;
  transition: 0.3s;
}

.chiffre:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.18);
}

#message {
  padding 100px 40px;
  text-align: center;
}

#message h2 {
  font-size: 40px;
  margin-bottom: 40px;
}

#bouton-message {
  background-color: #8F5E61;
  color: white;
  border: none;
  padding: 15px 25px;
  border-radius: 30px;
  font-size: 16px;
  cursor: pointer;
  transition: 0.3s;
}

#bouton-message:hover {
  transform: scale(1.05);
  background-color: #70484A;
}

#texte-message {
  max-width: 700px;
  margin: 40px auto 0;
}

.paragraphe-message {
  opacity: 0;
  transform: translateY(20px);
  transition: 0.8s;
}

.paragraphe-message.visible {
  opacity: 1;
  transform: translateY(O);
}

#finale {
  min-height: 100vh;
  padding: 100px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

#finale h2 {
  font-size: 40px;
  max-width: 700px;
}

.choix {
  position: relative;
  width: 500px;
  max-width : 90vw;
  height: 180px;
  margin: 30px auto 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 30px;
}

#oui,
#non {
  background-color: #8F5E61;
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 30px;
  font-size: 18px;
  cursor: pointer;
  transition: 0.3s;
}

#reponse-finale {
  opacity: 0;
  transform: translateY(20px);
  transition: 0.8s;
}

#reponse-finale.visible {
  opacity: 1;
  transform: translateY(0);
}

#fin {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

#fin img {
  width: 100%;
  height: 100vh;
  object-fit: cover;
}

#fin::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.texte-fin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  width: 90%;
  z-index: 2;
}

.texte-fin h2 {
  font-size: 40px;
  max-width: 700px;
  text-shadow: 2px 2px 5px #000;
}

.texte-fin p {
  font-size: 18px;
  margin-bottom: 50px;
  text-shadow: 2px 2px 5px #000;
}

#histoire,
#chiffres,
#finale {
  background-color: #FFFDFC;
}

footer {
  text-align: center;
  padding: 25px;
  background-color: #292522;
  color: white;
}

footer p {
  margin: 0;
  font-size: 14px;
}

@media (max-width: 768px) {
  .timeline:before {
    left: 10px;
  }

  .evenement {
    width: calc(100% - 40%);
    margin-left: 40px;
    text-align: left;
  }

  .evenement:nth-child(even) {
    margin-left: 40px;
    text-align: left;
  }

  .evenement::before {
    right: auto;
    left: -37px;
  }

  .evenement:nth-child(even)::before {
    left: -37px;
    right: auto;
  }

  header {
    flex-direction: column;
    gap: 15px;
  }

  nav {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 10px;
  }

  nav a {
  font-size: 13px;
  }
  
  #image-lightbox {
  max-width: 95vw;
  max-height: 75vh;
}

#fermer {
  top: 15px;
  right: 15px;
  font-size: 35px;
}

  .galerie {
    grid-template-columns: 1fr;
  }

  .liste-chiffres {
    grid-template-columns: 1fr;
  }

  #accueil,
  #histoire,
  #souvenirs,
  #chiffres,
  #message,
  #finale {
    padding-left: 20px;
    padding-right: 20px;
  }

  #accueil h2,
  #histoire h2,
  #souvenirs h2,
  #chiffres h2,
  #message h2,
  #finale h2 {
    font-size: 32px;
  }
}