html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Public Sans', sans-serif;
  padding-top: 25px;
}

body::-webkit-scrollbar {
  display: none;
}

h1, h2, h3 {
  margin: 0;
  font-weight: inherit;
  font-size: inherit;
}


/* ----- HEADER ----- */


header {
  background-color: #e3ece3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 70px;
  color: white;
  height: 85px;
  box-sizing: border-box;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;

  transition: top 0.3s ease-in-out, height 0.3s ease-in-out, padding 0.4s ease-in-out;

  border-bottom: 1px solid #b9b9b9;
  box-shadow: 0 2px 5px rgba(53, 53, 53, 0.1);
}

.logo-container {
  padding: 2px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 70px;
  width: auto;
  flex-shrink: 0;
  transition: height 0.3s ease;
}

header img {
  height: 100%;
  width: auto;
  max-height: 70px;
  transition: max-height 0.3s ease;
}

.header-title {
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 1px;
  color: #124207;
  margin-left: auto;
  padding-left: 70px;
  margin-right: auto;
  white-space: nowrap;
}

nav {
  display: flex;
}

nav .btn-contact {
  display: inline-block;
  background-color: #124207;
  color: white;
  border: none;
  padding: 12px 24px;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  border-radius: 6px;
  transition: padding 0.3s ease, font-size 0.3s ease, background-color 0.3s ease, color 0.3s ease;
  text-decoration: none;
  font-family: inherit;
}

nav .btn-contact:hover {
  color: #597D2A;
}


/* ----- TITRE DE SECTION ----- */


.section-title {
  font-family: 'Roboto', sans-serif;
  font-size: 42px;
  font-weight: 900;
  text-align: left;
  margin: 140px 60px 30px 70px;
  color: #124207;
  letter-spacing: 3px;
}

.title-underline {
  width: 25%;
  height: 2px;
  background-color: #1B4B18;
  margin-left : -70px;
  margin-top: 40px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}


/* ----- NOS SERVICES ----- */


.service-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly; 
  padding: 40px; 
  gap: 15px;
  background-color: #F4F6F4;
}

.service-container {
  width: 30%;
  background-color: #D5DDD5;
  border-radius: 4px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);

  display: flex;
  flex-direction: column;
  transition: width 0.3s ease;
}

.service-container img {
  width: 95%;
  height: 250px;
  padding: 10px;
  object-fit: cover;
  border-radius: 13px;
  opacity: 0;
  transform: scale(1);
  transition: transform 0.3s ease, opacity 1.5s ease;
}

.service-container img.show {
  opacity: 1;
}

.service-container img:hover {
  transform: scale(1.1);
}

.service-underline {
  width: 95%;
  height: 1px;
  background-color: #124207;
  margin: 0 auto;
  box-shadow: 0 1px 1px rgb(0, 0, 0, 0.1);
}

.titre-service {
  font-size: 24px;
  font-weight: 500;
  margin: 15px 10px;
  color: #124207;
}

.texte-service {
  font-size: 16px;
  color: #666;
  margin: 0 10px 15px 10px;
}


/* ----- CAROUSEL ----- */


.projet-section {
  background-color: #F4F6F3 ;
  border: 8px solid#D5DDD3;
  border-right-width: 0;
  border-left-width: 0;
  padding: 52px 20px;
  overflow-x: clip;
}

.carousel {
  position: relative;
  width: 70%;
  height: 75vh;
  min-height: 250px;
  overflow: visible;
  margin: 0 auto;
}

.slides {
  display: flex;
  transition: transform 0.5s ease;
  height: 100%;
  gap: 40px;
}

.slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 8px;
}

.slide-text {
  left: 50%;
  transform: translate(-50%, 40%);
  width: 25%;
  position: absolute;
  background-color:#F4F6F3;
  color: #124207;
  text-align: center;
  padding: 8px 10px;
  font-size: clamp(14px, 1.4vw, 22px);
  border: 8px ridge #d5ddd352;
  font-weight: 600;
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: 50px;
  height: 65px;
  background-color: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-size: 1.8rem;
  user-select: none;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.prev:hover, .next:hover {
  background-color: rgba(187, 187, 187, 0.9);
}

.prev { left: 15px; }
.next { right: 15px; }


/* ----- CONTACT ----- */


.contact-section {
  width: 100%;
  position: relative;
  min-height: 500px;
  color: white;
  background-color: #333;
  overflow: hidden;
}

.contact-section.image-background {
  background-image: url('img/region.jpg');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
}

.contact-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  box-sizing: border-box;
}

.contact-content {
  display: flex;
  flex-direction: column;
  align-items: center; 
  width: 100%;
  max-width: 80%; 
  gap: 40px; 
}

.contact-content:link {
  color: white;
  text-decoration: none;
}

.contact-info {
  font-family: 'Bahnschrift', sans-serif;
  text-align: left;
  padding-left: 200px;
  color: white;
  line-height: 1.4;
  width: 100%;
  box-sizing: border-box;
  font-size: clamp(8px, 2.5vw, 28px);
}

.contact-ville {
  font-family: 'Bahnschrift', sans-serif;
  text-align: left;
  padding-left: 32px;
  color: white;
  line-height: 0;
  width: 100%;
  box-sizing: border-box;
  font-size: clamp(6px, 2.5vw, 22px);
}

.contact-info p {
  margin-bottom: 20px;
}

.contact-text {
  text-align: center;
  color: white;
  line-height: 1.6;
  width: 80%;
  box-sizing: border-box;
  font-size: clamp(8px, 2.5vw, 22px);
}


/* ----- FOOTER ----- */


.footer {
  background-color: #124207cb;
  min-height: 40px;
  padding: 10px 80px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.footer-copyright {
  color: white;
  font-size: 14px;
  flex-grow: 1;
}

.mention-legale {
  color: white;
  font-size: 14px; 
  text-decoration: none; 
  transition: color 0.3s;
  white-space: nowrap;
}

.mention-legale:hover {
  color: #124207;
  text-decoration: underline;
}


/* ------------------------- */
/* ----- MEDIA QUERIES ----- */
/* ------------------------- */


/* Tablettes et petits ordinateurs */

@media (max-width: 1200px) {

  .header-title {
    font-size: 14px; 
  }

  header {
    padding: 10px 20px;
    height: 70px;
  }

  body { padding-top: 20px; }

  .logo-container { height: 50px; }
  header img { max-height: 50px; }

  nav .btn-contact {
    padding: 8px 20px;
    font-size: 13px;
  }

  .section-title {
    font-size: 32px;
    margin: 100px 30px 40px 40px;
  }

  .service-container {
    width: calc(28% - 10px);
  }

  .carousel {
    width: 85%;
    height: 65vh;
  }

  .slide-text {
    font-size: 18px;
    width: 40%;
  }

  .contact-content {
    flex-direction: column;
    align-items: center;
  }

  .contact-info {
    text-align: left;
    padding: 15px;
    font-size: 26px;
  }

  .contact-ville {
    font-size: 20px;
  }

  .contact-text {
    padding: 15px;
    font-size: 18px;
    width: 120%;
  }
}

/* Mobiles */

@media (max-width: 768px) {
  body {
    padding-top: 20px;
    font-size: 14px;
  }

  header {
    height: 60px;
    padding: 5px 30px;
  }

  .header-title {
    display: none;
  }

  .logo-container { height: 40px; }
  header img { max-height: 40px; }

  nav { gap: 10px; }
  nav .btn-contact {
    padding: 2px 10px 6px; 
    font-size: 20px; 
    border-radius: 6px;
  }

  nav .btn-contact {
    font-size: 0;
  }
  
  nav .btn-contact::after {
    content: "✉";
    font-size: 20px;
    display: block;
  }

  .section-title {
    font-size: 26px; 
    margin: 100px 20px 20px 30px;
    letter-spacing: 2px;
    text-align: center; 
  }

  .title-underline {
    margin: 20px auto;
  }

  .service-section {
    flex-direction: column; 
    align-items: center; 
    padding: 15px;
    gap: 15px; 
  }

  .service-container {
    width: 95%; 
    max-width: 400px; 
    margin-bottom: 15px; 
  }

  .service-container img { height: 180px; } 
  .titre-service { font-size: 17px; }
  .texte-service { font-size: 12px; }

  .projet-section {
    padding: 20px;
  }

  .carousel {
    width: 100%;
    height: 35vh;
    min-height: 300px;  
  }

  .slide img {
    object-fit: contain;
  }

  .slide-text {
    left: 50%;
    transform: translateX(-50%);
    width: 75%;
    max-width: none;
    padding: 8px 10px;
    font-size: 13px;
  }

  .prev, .next {
    width: 30px; height: 50px; font-size: 1.5rem;
  }

  .prev { left: 10px; }
  .next { right: 10px; }

  .contact-section {
    background-attachment: scroll;
  }

  .contact-content { gap: 0px;
    margin: auto;
  }

  .contact-info {
    font-size: 20px;
    padding: 0px;
    text-align: left;
  }

  .contact-ville {
    font-size: 17px;
    padding-left: 24px;
  }

  .contact-text {
    margin-top: 50px;
    padding: 0px;
    font-size: 16px;
    text-align: left;
    width: 120%;
  }

  .footer {
    padding: 15px;
    justify-content: center;
    text-align: center;
  }

  .footer-copyright, .mention-legale {
    font-size: 11px;
    width: 100%;
  }

  .mention-legale {
    margin-top: 5px;
  }
}