/* Reset */
* {
  box-sizing: border-box;
  margin: 0; padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  line-height: 1.5;
  color: #222;
  background: #f9f9f9;
}

header {
  background: #004d00;
  padding: 1rem;
  color: white;
  position: relative;
  z-index: 1000;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  height: 80px;
  background-color: white;  /* fond blanc */
  border-radius: 5px;
}

/* Nav links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: large;
}

.nav-links a:hover {
  text-decoration: underline;
}

/* Burger menu button */
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 25px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.burger:focus {
  outline: none;
}

.burger-bar {
  width: 25px;
  height: 3px;
  background-color: white;
  border-radius: 2px;
}

/* Quand menu actif (sur mobile) */
.nav-links.nav-active {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 60px;
  right: 1rem;
  background-color: #004d00;
  border-radius: 5px;
  padding: 1rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  z-index: 999;
}

/* Main content */
main {
  padding: 1.5rem;
  max-width: 1200px;
  margin: auto;
}

section {
  margin-bottom: 3rem;
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 0 10px #ccc;
}

/* Hero section */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: nowrap;  /* pour garder texte et image sur la même ligne */
  align-items: center;
  gap: 2rem;
  justify-content: space-between;
  background: white;
  padding: 2rem;
  box-sizing: border-box;
  margin-bottom: 2rem; /* augmente l’espace sous la section1 */

}


.hero-image {
  flex: 1 1 65%;  /* image prend environ l’autre moitié */
}

.hero-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}


.hero-text h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #004d00;
}

.hero-text {
  flex: 1 1 20%;
  display: flex;
  flex-direction: column;
  align-items: center; /* centre le contenu horizontalement */
  text-align: center;  /* centre le texte à l'intérieur */
}

.btn-vert {
  background-color: #4CAF50;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 5px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 1rem;
  text-align: center;
  font-size: 1rem; /* taille par défaut */
}

/* Augmenter la taille sur écrans >= 768px (tablettes) */
@media (min-width: 768px) {
  .btn-vert {
    font-size: 1.25rem;
    padding: 1rem 2rem;
  }
}

/* Encore plus grand sur écrans >= 1024px (ordinateurs) */
@media (min-width: 1024px) {
  .btn-vert {
    font-size: 1.2rem;
    padding: 1.25rem 2.5rem;
  }
}


.btn-vert:hover {
  background-color: #3e8e41;
}

.hero-image {
  flex: 1 1 300px;
}

.hero-image img {
  max-width: 100%;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}

.hero-image img:not(.lazy) {
  opacity: 1;
  transform: translateY(0);
}

/* Réalisations */
/* Limiter la taille des images dans la section réalisations */
/* Styles généraux pour les images dans la section réalisations */
#section2 .swiper-slide img {
  width: 100%;
  height: auto;
  border-radius: 8px; /* optionnel, coins arrondis */
  display: block;
  margin: 0 auto;
  max-width: 100%; /* par défaut, 100% du conteneur */
  max-height: none;
}

/* Sur écrans moyens et plus larges, limite la taille max */
@media (min-width: 768px) {
  #section2 .swiper-slide img {
    max-width: 250px;
    max-height: 180px;
    object-fit: cover;
  }
}

/* Sur grand écran, limite encore plus */
@media (min-width: 1024px) {
  #section2 .swiper-slide img {
    max-width: calc(50vw - 50px);
    max-height: calc(40vw - 50px);
  }
}

.realisations h2 {
  margin-bottom: 1rem;
  text-align: center;
  color: #004d00;
}

.swiper-slide img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Secteurs et contact */
.secteurs {
  max-width: 100%;
  overflow-wrap: break-word;
}

.secteurs-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.secteurs, .contact-form {
  flex: 1 1 300px;
  background: #e8f5e9;
  padding: 1.5rem;
  border-radius: 8px;
}

.secteurs img {
  max-width: 100%;
  margin-bottom: 1rem;
}

.secteurs h2 {
  margin-bottom: 1rem;
  color: #004d00;
}

.secteurs button {
  display: block;
  width: 100%;
  margin-bottom: 0.5rem;
}

.contact-form {
  max-width: 100%;
  overflow-wrap: break-word;
}
.contact-form h2 {
  color: #004d00;
  margin-bottom: 1rem;
}

.contact-form p {
  margin-bottom: 1rem;
}

.mail {
  color: #4CAF50;
  font-weight: 700;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form label {
  font-weight: 600;
}

.contact-form input[type="text"],
.contact-form input[type="tel"],
.contact-form input[type="email"],
.contact-form textarea {
  padding: 0.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
}

.contact-form textarea {
  min-height: 100px;
}

.submitbtn {
  background-color: #4CAF50;
  color: white;
  padding: 0.75rem;
  border: none;
  border-radius: 5px;
  font-weight: 700;
  cursor: pointer;
}

.submitbtn:hover {
  background-color: #3e8e41;
}

/* Section rejoindre */
.join-us {
  text-align: center;
  background: #e8f5e9;
  padding: 2rem;
  border-radius: 8px;
}

.join-us h2 {
  color: #004d00;
  margin-bottom: 1rem;
}

.join-us img {
  max-width: 70%;
  margin-top: 1rem;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s ease, transform 1s ease;
}


.join-us img:not(.lazy) {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
  /* Afficher burger, cacher nav links par défaut */
  .burger {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  /* Quand menu actif */
  .nav-links.nav-active {
    display: flex;
  }

  .hero {
    flex-direction: column;
  }

  .secteurs-contact {
    flex-direction: column;
  }
}
