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: background-color 0.3s ease, color 0.3s ease;
  text-decoration: none;
  font-family: inherit;
}

nav .btn-contact:hover {
  background-color: #597D2A;
  color: white;
}

/* ----- 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;
}

.section-title.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.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);
}

.section-title.center .title-underline {
  margin-left: auto;
  margin-right: auto;
}

/* ----- 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%;
  aspect-ratio: 16/9; 
  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;
}

/* ----- PROJET A LA UNE ----- */

.featured-project-section {
  padding: 40px 70px 60px 70px;
  background-color: #F4F6F4; 
}

.featured-project-container {
  display: flex;
  align-items: center;
  background-color: #f9f9f9;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.featured-project-image {
  flex: 1;
  height: 450px;
}

.featured-project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-project-content {
  flex: 1;
  padding: 50px;
}

.project-tag {
  color: #597D2A;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.featured-project-content h3 {
  font-size: 32px;
  color: #124207;
  margin: 15px 0;
  font-family: 'Roboto', sans-serif;
  font-weight: 900;
}

.featured-project-content p {
  color: #555;
  margin-bottom: 30px;
  line-height: 1.6;
}

.btn-project {
  display: inline-block;
  padding: 12px 25px;
  background-color: #124207;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background 0.3s;
}

.btn-project:hover {
  background-color: #597D2A;
}


/* ----- 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; 
  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: relative; 
  width: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column; 
  align-items: center;
  justify-content: center;
  padding: 100px 20px; 
  box-sizing: border-box;
  gap: 60px; 
}

.contact-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; 
    gap: 30px;
    width: 100%;
    max-width: 1400px;
}

.contact-box {
    border: 2px solid white;
    padding: 15px 10px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 250px; 
    height: 90px; 
    background-color: rgba(0,0,0,0.2); 
    transition: background-color 0.3s, transform 0.3s;
    text-decoration: none; 
    color: white; 
}

.contact-box:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.contact-icon {
    font-size: 20px; 
    margin-bottom: 8px;
}

.contact-detail {
    font-family: 'Public Sans', sans-serif;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 600;
}

.contact-text-bottom {
  text-align: center;
  color: white;
  line-height: 1.6;
  width: 95%; 
  max-width: 1400px; 
  box-sizing: border-box;
  font-size: 18px; 
  white-space: nowrap; 
  overflow: hidden;
  text-overflow: ellipsis;
}

.devis-text {
    margin-top: 15px;
    font-weight: bold;
    font-size: 24px; 
    color: white; 
}


/* ----- 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;
}

/* ----- PAGE DETAIL PROJET ----- */

.detail-header-section {
    background-color: #F4F6F4;
    padding: 60px 70px 20px 70px;
    text-align: center;
}

.detail-intro {
    max-width: 800px;
    margin: 0 auto 40px auto;
    font-size: 18px;
    line-height: 1.6;
    color: #555;
}

.detail-content {
    background-color: #ffffff;
    padding: 50px 0;
    display: flex;
    flex-direction: column;
    gap: 80px;
    align-items: center; 
}

.duo-row {
    display: flex;
    align-items: center;
    gap: 60px;
    justify-content: space-between;
    width: 92%; 
    max-width: 1600px; 
    margin: 0 auto;
}

.duo-row.reverse {
    flex-direction: row-reverse;
}

.duo-text {
    flex: 1;
    font-size: 18px; 
    line-height: 1.8;
    color: #444;
    text-align: justify;
}

.duo-image {
    flex: 1;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    line-height: 0;
}

.duo-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.gallery-section {
    width: 92%; 
    max-width: 1600px; 
    margin: 0 auto;
    text-align: center;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 16/10;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.02);
}

.final-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    margin-top: 40px;
    text-align: left;
}

.final-text-container {
    flex: 3;
}

.final-text {
    margin: 0;
    max-width: 1000px;
    font-size: 18px;
    color: #555;
    line-height: 1.6;
    text-align: justify; 
}

.final-btn-container {
    flex: 1;
    display: flex;
    justify-content: center; 
}


/* ------------------------- */
/* ----- MEDIA QUERIES ----- */
/* ------------------------- */

@media (min-width: 1921px) {
  .contact-overlay {
    padding: 180px 20px;
    gap: 100px;
  }
  .contact-grid {
    max-width: 1800px;
    gap: 40px;
  }
  .contact-box {
    width: 300px;
    height: 110px;
    padding: 20px;
  }
  .contact-icon {
    font-size: 24px;
  }
  .contact-detail {
    font-size: 20px;
  }
  .contact-text-bottom {
    font-size: 22px;
    max-width: 2000px; 
  }
  .devis-text {
    font-size: 28px;
    margin-top: 25px;
  }
}

@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;
  }
  
  .section-title.center {
     margin: 80px auto 40px auto;
  }

  .service-container {
    width: 31%; 
    margin-bottom: 0;
  }

  .carousel {
    width: 85%;
    height: 45vh;
  }

  .featured-project-container {
    flex-direction: column;
  }
  .featured-project-image {
    width: 100%;
    height: 300px;
  }
  .featured-project-content {
      padding: 30px;
  }
  
  .featured-project-content h3 {
      font-size: 24px;
  }

  .contact-text-bottom {
      white-space: normal;
  }
  
  .contact-box {
      width: calc(50% - 30px);
  }
}

@media (max-width: 900px) {
    .final-content-wrapper {
        flex-direction: column; 
        align-items: flex-start;
        gap: 30px;
    }
    
    .final-btn-container {
        width: 100%;
        justify-content: flex-start;
    }
}

@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;
    width: 50%;
  }

  .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: 200px; aspect-ratio: auto; } 
  .titre-service { font-size: 17px; }
  .texte-service { font-size: 12px; }
  
  .featured-project-section {
      padding-left: 0;
      padding-right: 0;
  }
  
  .featured-project-content h3 {
      font-size: 24px;
  }

  .projet-section {
    padding: 20px;
  }

  .carousel {
    width: 100%;
    height: 35vh;
    min-height: 300px;  
  }

  .slide img {
    object-fit: contain;
  }

  .prev, .next {
    width: 30px; height: 50px; font-size: 1.5rem;
  }

  .prev { left: 10px; }
  .next { right: 10px; }

  .contact-section {
    background-attachment: scroll;
  }

  .contact-overlay {
      padding: 50px 20px;
      gap: 40px;
  }
  
  .contact-grid {
      gap: 15px;
  }
  
  .contact-box {
      width: 100%; 
      max-width: 300px; 
      height: auto;
      padding: 15px;
  }

  .contact-text-bottom {
      font-size: 16px;
      width: 100%;
      white-space: normal; 
  }

  .devis-text {
      font-size: 20px;
  }

  .footer {
    padding: 15px;
    justify-content: center;
    text-align: center;
  }

  .footer-copyright, .mention-legale {
    font-size: 11px;
    width: 100%;
  }

  .mention-legale {
    margin-top: 5px;
  }

  .duo-row, .duo-row.reverse {
      flex-direction: column;
      gap: 30px;
      margin-bottom: 40px;
  }
  
  .detail-content {
      padding: 30px 20px;
  }
  
  .detail-header-section {
      padding: 40px 20px;
  }

  .gallery-grid {
      gap: 10px;
      grid-template-columns: 1fr;
  }
  
  .final-btn-container {
      width: 100%;
      justify-content: center;
  }
}