/* Import d'une police moderne */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

body {
  background: linear-gradient(to right, rgba(255, 255, 255, 0.9), rgba(200, 200, 255, 0.9)), url('../img/bg.png');
  background-size: cover;
  background-attachment: fixed;
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  color: #333;
  transition: background 0.3s ease-in-out;
}
body.modal-open {
  overflow: hidden;
}

/* Navigation dynamique et améliorée */
html {
  scroll-behavior: smooth;
}
.logo {
  width: 80px;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000; 
}

/* Styles de la navigation */
.nav {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 10px;
  position: fixed;
  top: 20px;
  right: 30px;
  z-index: 1000;
  display: flex;
  justify-content: flex-end; /* Aligne l'icône à droite */
  align-items: center;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
  height: 60px;
}

/* Icône du menu */
.menu-icon {
  font-size: 30px;
  cursor: pointer;
  display: block;
  position: relative;
  z-index: 1001; /* Assure que l'icône soit au-dessus du menu */
  transition: transform 0.3s ease;
 
}
.menu-icon:hover {
  transform: rotate(180deg); /* Exemple d'animation simple */
}

nav div:hover {
  transform: scale(1.2);
}

/* Menu déroulant */
.nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 80px;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  width: 120px; /* Largeur du menu */
  height: 100%;
  transform: translateX(100%); /* Cache le menu par défaut à droite */
  transition: transform 0.3s ease-in-out;
}

.nav ul.active {
  transform: translateX(0); /* Déplie le menu à droite */
}

.nav ul li {
  margin: 0;
  padding: 15px;
  text-align: center;
}

.nav ul li a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  display: block;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background 0.3s ease-in-out, transform 0.2s;
}

nav ul li a:hover {
  background: #007cff;
  color: #fff;
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .menu-icon {
    font-size: 30px;
  }
}

/* Header */
header {
  text-align: center;
  padding: 100px 20px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  animation: fadeIn 1s ease-in-out;
}

header h1 {
  font-size: 3em;
  font-weight: 600;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.4);
}

header p {
  font-size: 1.3em;
  opacity: 0.8;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sections avec images ajustées */
main {
  max-width: 1100px;
  margin: auto;
  padding: 50px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

section {
  flex: 1 1 30%;
  background: #fff;
  padding: 20px;
  margin: 15px;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}

section:hover {
  transform: translateY(-5px);
  box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.4);
}

/* Sections avec images animées */
section img {
  width: 100%;
  height: auto;
  max-height: 300px; /* Ajuste la hauteur max */
  object-fit: cover;
  border-radius: 8px;
  transition: transform 1s ease-in-out, opacity 1s ease-in-out;
  opacity: 0.8;
  transform: scale(0.8);
  animation: fadeInZoom 2s ease-in-out forwards;
}

/* Effet au survol */
section img:hover {
  transform: scale(1.50);
  box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.3);
}

/* Animation d'apparition */
@keyframes fadeInZoom {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

section h2 {
  font-size: 1.6em;
}

section p {
  font-size: 1em;
  line-height: 1.5;
}

section button {
  display: inline-block;
  background: #007cff;;
  color: white;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background 0.3s, transform 0.2s;
}

section button:hover {
  background: #0034ff;
  transform: scale(1.05);
}

/* Footer */
footer {
  color: black;
  text-align: center;
  bottom: 0;
  width: 100%;
  font-size: 0.9em;
}


/* Responsivité améliorée */
@media (max-width: 768px) {
  nav {
    flex-direction: column;
    text-align: center;
  }
  nav ul {
    flex-direction: column;
    margin-top: 10px;
  }
  nav ul li {
    margin-bottom: 10px;
  }
  main {
    flex-direction: column;
    align-items: center;
  }
  section {
    width: 90%;
  }
  section h2 {
    font-size: 1.4em;
  }

  header h1 {
    font-size: 2.5em;
  }
}

/* Style des liens .bt */
.bt {
  display: inline-block;
  background-color: rgba(0, 0, 0, 0.6); /* Change la couleur de fond */
  color: #fff; /* Change la couleur du texte */
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 4px;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.2s;
}

/* Effet au survol */
.bt:hover {
  background-color: rgba(0, 0, 0, 0.6); /* Change la couleur de fond au survol */
  color: #fff; /* Garde la couleur du texte inchangée au survol */
  transform: scale(1.05); /* Ajoute un léger effet de zoom */
}

/* Formulaire de contact */
#contact-form {
  max-width: 600px;
  margin: 50px auto;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
  animation: fadeIn 1.2s ease-in-out;
  position: relative; /* Pour éviter des conflits avec d'autres éléments */
  display: none; /* Formulaire caché par défaut */
}

/* Effet d'animation d'apparition */
@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

#contact-form input,
#contact-form textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1em;
  transition: border 0.3s ease-in-out;
}

#contact-form input:focus,
#contact-form textarea:focus {
  border-color: #ff9800;
}

#contact-form button {
  background: #4CAF50;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  font-size: 1.1em;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

#contact-form button:hover {
  background: #45a049;
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(0, 255, 0, 0.5); /* Légère lueur verte */
}

/* Affichage du formulaire avec la classe active */
#contact-form.active {
  display: block; /* Formulaire visible lorsqu'on ajoute la classe active */
}

/* Styles de base du formulaire pour une meilleure lisibilité */
#contact-form input,
#contact-form textarea {
  font-size: 1em;
  padding: 12px;
  margin-top: 10px;
  border-radius: 5px;
  border: 1px solid #ddd;
}

/* Responsivité */
@media (max-width: 768px) {
  #contact-form {
    width: 90%;
  }
}

/* Pour le bouton d'envoi */
#contact-form button {
  background: #4CAF50;
  color: #fff;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}

#contact-form button:hover {
  background: #45a049;
  transform: scale(1.05);
}

/* Animation de fade-in pour faire apparaître le formulaire */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Modale de formulaire */
/* Fenêtre modale */
.modal {
  display: none; /* Masquée par défaut */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  max-width: 90%;
  max-height: 80%;
  overflow-y: auto;
  color: rgba(0, 0, 0, 0.6);
}


.close {
  font-size: 30px;
  color: #aaa;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: black;
}


/* Animation ou effet d'ouverture (optionnel) */
@keyframes fadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
  }
  to {
    transform: translateY(0);
  }
}
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: none;
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: opacity 0.3s ease;
}

#back-to-top:hover {
  background-color: #007cff;
}

#transport-options, #type-circuit-container {
  transition: all 0.3s ease;
}
/* Style pour la modale de confirmation */
.confirmation-modal {
  display: none;  /* Masqué par défaut */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);  /* Fond semi-transparent */
  justify-content: center;
  align-items: center;
  z-index: 1000;  /* S'assure qu'il soit au-dessus des autres éléments */
}

.confirmation-modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  width: 300px;
  text-align: center;
}

.close-confirmation {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-size: 20px;
}

#confirmation-message {
  font-size: 18px;
  color: green;
  font-weight: bold;
}
