html,
body {
  box-sizing: border-box;
  overflow-x: hidden;
  background-image: url(/img/ftuy4.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}
div#wrapp {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  height: 100vh;
  grid-template-areas:
    "header header header header header header"
    "main main main main main main"
    "footer footer footer footer footer footer";
}

/*  Header et Navigation */
header {
  grid-area: header;
  height: 100px;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10 25px;
}

header nav {
  margin-left: auto;
}
header nav ul {
  list-style: none;
  display: flex;
}
header nav ul li {
  padding: 1rem;
}
header nav ul li a {
  text-decoration: none;
  padding: 0 10px;
  color: #333;
  font-size: 1.1em;
  transition: transform 0.3s ease, color 0.3s ease;
}
header nav ul li a:hover,
header nav ul li a:focus {
  cursor: pointer;
  font-weight: bold;
  transform: scale(1.5);
  color: #000;
}
h1 a {
  text-decoration: none;
  color: black;
}
h1 {
  font-size: 2.1em;
  font-weight: bold;
  margin-right: auto;
  margin-left: 25px;
}
h1#accueil {
  font-size: 2.1em;
  font-weight: bold;
  margin-bottom: 80px;
  margin-left: auto;
}
h2 {
  font-size: 1.8em;
  margin-bottom: 50px;
  font-weight: bold;
}
/* Main */
main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 100px 0;
}
div#bienvenue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}
div p {
  font-size: 1.2em;
}
form {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
  max-width: 500px; /* Ajusté pour plus de largeur */
  margin: auto;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  background-color: #fff;
  border: 1px solid #ccc;
}
label {
  margin-top: 10px;
  margin-bottom: 8px;
  text-align: left;
}
.submit {
  font-weight: bold;
  margin-top: 15px;
  border: none;
  background-color: #007bff;
  padding: 8px;
  color: #fff;
  border-radius: 10px;
  transition: transform 0.2s ease;
}
.submit:hover,
.submit:focus {
  cursor: pointer;
  color: #007bff;
  background-color: #ccc;
}
textarea {
  resize: none;
  height: 30px;
}
.form-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 400px;
}

.error-messages {
  width: 100%;
  margin-bottom: 20px;
}

.error-messages p {
  color: red;
  text-align: center;
  margin: 5px 0;
}

/* Styles pour les interactions JavaScript */
input.active,
textarea.active {
  border: 2px solid #4caf50;
  box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

input.error,
textarea.error {
  border: 2px solid #ff0000;
  box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

/* Animation pour le feedback visuel */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-10px);
  }
  75% {
    transform: translateX(10px);
  }
}

.error-shake {
  animation: shake 0.5s ease-in-out;
}

/* Footer */
footer {
  grid-area: footer;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 200px;
  margin-top: auto;
  background-color: #fff;
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
  padding: 1rem;
}

li#li-deconnexion a {
  color: white;
  padding: 7px;
  background-color: #007bff;
  border-radius: 15px;
}

/* Adaptation smartphone */
@media screen and (max-width: 340px) {
  body {
    background-color: #f9f2e5;
    background-image: none;
  }
  div#wrapp {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "main"
      "footer";
  }

  header {
    height: auto;
    margin-bottom: 50px;
    padding: 10px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }

  nav {
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  nav ul {
    flex-direction: column;
  }
  header nav ul li {
    padding-right: 0.9rem;
  }

  h1 {
    margin: auto;
    font-size: 1.8em;
  }

  main {
    padding: 10px;
    flex-direction: column;
  }
  form {
    max-width: 80%;
  }
  footer {
    text-align: center;
    height: 180px;
  }
}

#toggle-btn {
  background-color: #000000;
  color: white;
  border: none;
  padding: 10px 15px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s ease;
}

#toggle-btn:hover {
  background-color: #ffffff;
  color: #000000;
}

/* Contenu de l'accordéon */
#toggle-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out, padding 0.4s ease-out;
  background: white;
  width: 100%;
  max-width: 600px;
  border-radius: 5px;
  margin-top: 0;
  padding: 0 15px;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

/* Lorsque l'accordéon est ouvert */
#toggle-content.active {
  max-height: 500px;
  opacity: 1;
  transform: translateY(0);
  padding: 15px;
  margin-top: 10px;
  border: 1px solid #ddd;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Style du carrousel */
.swiper {
  width: 80%;
  max-width: 1000px;
  height: 400px; /* Ajuste selon la taille de tes images */
  margin: auto;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.swiper-button-next,
.swiper-button-prev {
  color: white !important;
}

.swiper-pagination-bullet {
  background: white !important;
  opacity: 0.6;
}

.swiper-pagination-bullet-active {
  background: white !important;
  opacity: 1; /* Pleine opacité */
}

/* Style pour l'affichage météo */
.weather-display {
  background: rgba(255, 255, 255, 0.9);
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  min-width: 300px;
}

.weather-display p {
  margin: 10px 0;
}

.weather-display .temp {
  font-size: 2.5em;
  font-weight: bold;
  color: #2c3e50;
}

.weather-display .condition {
  font-size: 1.2em;
  color: #7f8c8d;
  text-transform: capitalize;
}
