/* Styles généraux */
body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  color: #333;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Styles généraux pour l'en-tête */
header {
  background-color: #00468C; /* Couleur de fond principale */
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Logo */
.logo h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  margin: 0;
  color: white;
}

.logo h1:hover {
  color: #FFD700; /* Couleur au survol */
  transition: color 0.3s ease;
}

/* Supprimer le soulignement du lien autour du logo */
.logo a {
  text-decoration: none; /* Enlève le soulignement */
  color: inherit; /* Prend la couleur du texte du parent (h1) */
}

.logo a:hover {
  text-decoration: none; /* Enlève également le soulignement au survol */
}

/* Navigation principale */
nav ul.main-nav {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.main-nav li {
  position: relative;
  margin-left: 20px;
}

.main-nav a {
  text-decoration: none;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  padding: 10px 15px;
  border-radius: 5px;
  transition: background-color 0.3s, color 0.3s;
}

.main-nav a:hover {
  background-color: #FFD700; /* Couleur au survol */
  color: #00468C; /* Contraste au survol */
}

/* Dropdown (sous-menu) */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  color: #00468C;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  display: none;
  list-style: none;
  margin: 0;
  padding: 10px 0;
  z-index: 100;
}

.dropdown li {
  margin: 0;
  padding: 0;
}

.dropdown a {
  color: #00468C;
  padding: 10px 20px;
  display: block;
}

.dropdown a:hover {
  background-color: #00468C;
  color: white;
}

/* Affichage du sous-menu au survol */
.main-nav li:hover .dropdown {
  display: block;
}

/* Responsivité */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Menu de navigation caché sur mobile */
  .main-nav {
    flex-direction: column;
    width: 100%;
    display: none; /* Caché par défaut */
    background-color: #00468C;
    position: absolute;
    top: 60px;
    left: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  }

  /* Afficher le menu lorsque l'élément .active est ajouté */
  .main-nav.active {
    display: flex;
  }

  .menu-toggle {
    display: block;
    font-size: 30px;
    cursor: pointer;
    color: white;
    margin-right: 20px;
  }

  /* Style des éléments de navigation en mobile */
  nav ul.main-nav li {
    width: 100%;
    text-align: center;
    padding: 15px;
  }

  nav ul.main-nav li a {
    font-size: 1.2rem;
  }

  /* Gérer le comportement du dropdown sur mobile */
  nav ul.main-nav .dropdown {
    position: static;
    display: none;
  }

  nav ul.main-nav li:hover .dropdown {
    display: block;
  }
}

/* En-tête principal */
.main-header {
  background: linear-gradient(90deg, #0077B6, #023E8A);
  color: white;
  text-align: center;
  padding: 100px 20px;
}

.main-header h1 {
  font-size: 2.5em;
  margin-bottom: 20px;
}

.main-header p {
  font-size: 1.2em;
  margin-bottom: 20px;
}

.main-header .btn {
  display: inline-block;
  padding: 10px 20px;
  background: #00B4D8;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
}

.main-header .btn:hover {
  background: #0077B6;
}

/* Section À propos */
.about {
  padding: 50px 20px;
  text-align: center;
  background: #f9f9f9;
}

.about h2 {
  color: #0077B6;
  margin-bottom: 20px;
}

.about p {
  margin-bottom: 20px;
}

.about .btn {
  background: #023E8A;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
}

.about .btn:hover {
  background: #03045E;
}

/* Section Services */
.services {
  padding: 50px 20px;
}

.services h2 {
  text-align: center;
  color: #0077B6;
  margin-bottom: 30px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.service-item {
  background: #f9f9f9;
  border-radius: 8px;
  text-align: center;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.service-item img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 15px;
}

.service-item h3 {
  color: #023E8A;
  margin-bottom: 10px;
}

.service-item p {
  margin-bottom: 15px;
}

.service-item .btn {
  background: #0077B6;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
}

.service-item .btn:hover {
  background: #03045E;
}

/* Section Contact */
.contact {
  padding: 50px 20px;
  text-align: center;
  background: #0077B6;
  color: white;
}

.contact h2 {
  margin-bottom: 20px;
}

.contact p {
  margin-bottom: 20px;
}

.contact .btn {
  background: #00B4D8;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
}

.contact .btn:hover {
  background: #023E8A;
}

/* Footer */
footer {
  padding: 20px 0;
  text-align: center;
  background: #f9f9f9;
  color: #555;
}

/* Styles pour les écrans de moins de 768px */
@media (max-width: 768px) {
  body {
    font-size: 16px; /* Texte plus lisible sur mobile */
    padding: 10px;
  }

  header {
    flex-direction: column; /* Empile les éléments dans l'en-tête */
    align-items: center;
  }

  nav ul {
    flex-direction: column; /* Affiche le menu en colonne */
    gap: 10px;
  }

  .service, .realisation, .testimonial {
    flex-direction: column; /* Empile les éléments */
    align-items: center;
    text-align: center;
  }

  img {
    width: 100%; /* Images ajustées à l'écran */
    height: auto;
  }
}
