:root {
    --jaune: #e8b909;
    --noir: #1e1e1e;
    --blanc: #fff;
    --gris: #f4f6f7;
    --beige: #e6e1d5;
    --vert: #009900;
  }

  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  html {
    scroll-behavior: smooth;
  }
  
  body {
    font-family: 'Montserrat', sans-serif;
    color: var(--noir);
    background-color: var(--blanc);
  }
  p, .top-left a {
    font-family: "Source Sans 3", sans-serif;
    font-size: 16px;
    font-weight: 400;
    font-style: normal;
  }

  header {
    background-color: var(--gris);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    border-top: 4px solid var(--jaune)
  }
  header .top-left {
    display: flex;
    align-items: center;
    gap: 30px;
  }
  header .top-left img {
    position: relative;
    top: 3px;
    right: 3px;
  }
  header .container {
    display: flex;
    justify-content: space-between;
    align-content: center;
  }

  header .top-left a {
    color: #5f727f;
    text-decoration: none;
  }
    #logo-top {
        position: absolute;
        z-index: 20;
        top: 64px;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
    }
    #logo-top a {
        display: inline-block;
        padding: 5px 15px;
        background: white;
        position: relative;
    }
    #logo-top a:after {
      position: absolute;
      content: "";
      background: white;
      height: 103%;
      width: 30vw;
      top: -2px;
      right: -17px;
      z-index: -1;
      transform: skew(-10deg, 0deg);
      box-shadow: 0 0 4px 2px #8f8f8f54;
      border-bottom: 5px solid var(--jaune);    
      min-width: 500px;
    }
    
    #logo-top img{
      width: 160px;
    }
  .banner {
    position: relative;
    background: url('banner.jpg') no-repeat center center/cover;
    height: 700px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    color: white;
    padding-bottom: 55px;
  }
  .page-merci .banner {
    height: auto;
    min-height: 400px;
  }
 
  .swiper-button-prev, .swiper-button-next{
    width: 30px;
    height: 30px;
  }
 .swiper-button-next {
    background: url(img/arrow-right.png) center no-repeat;
    background-size: contain;
  }
  
  .swiper-button-prev {
    background: url(img/arrow-left.png) center no-repeat;
    background-size: contain;
  }
  .swiper-button-next:after, .swiper-button-prev:after {
    opacity: 0;
  }
  .banner .h1 {
    font-size: 50px;
    text-transform: uppercase;
    padding: 0px;
    font-weight: 200;
  }
  .banner .h1 strong {
    font-weight: 600;
    text-align: left;
  }
  .banner-content {
    text-align: left;
    padding: 0 30px;
    width: 1290px;
    max-width: 95vw;
    }
  .banner-content .description {
    color: var(--jaune);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 35px;
    font-family: 'Montserrat';
    margin-bottom: 20px;
    text-align: left;
  }
  .banner-content a.btn-primary {
    display: inline-flex;
    gap: 13px;
    align-content: center;
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }
  .error {
    border: 2px solid red;
    background-color: #ffe6e6;
  }
  .text-jaune {
    color: var(--jaune)
  }
  .copyright {
    padding: 30px;
    background-color: #212818;
    color:white;
    font-size: 13px;
  }
  #form-message, #popup-form-message {
    margin-top: 10px;
    color: white;
    font-weight: bold;
  }
  .cta-button {
    background: var(--jaune);
    border: none;
    padding: 12px 25px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
  }

  section {
    padding: 60px 20px;
    max-width: 1280px;
    margin: auto;
  }
  section.section-activites {
    max-width: 100%;
    background: rgb(231 231 231 / 34%);
  }
  .top-right {
    display: flex;
    gap: 20px;
    flex-direction: row;
  }
  .top-right .social svg {
    width: 14px;
    fill: white;
  }
  .top-right a.social {
    background: var(--jaune);
    width: 38px;
    height: 38px;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-right a.social.fb svg{
  width: 10px;
}
.top-right a.social:hover {
  background: black;
}
  .container {
    max-width: 1280px;
    margin: auto;
    width: 100%;
  }
  .services {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
    text-align: center;
    padding: 75px 0 0;
  }

  .service-box {
    flex: 1 1 200px;
    padding: 20px 20px 20px 0;
    border-radius: 10px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
  }
  .service-box h3 {
    text-transform: uppercase;
    font-size: 24px;
    padding: 0 110px 0 0;
    position: relative;
    margin-bottom: 10px;
    min-height: 54px;
    display: flex;
    align-items: flex-end;
  }
  .service-box h3::after {
    content: "";
    width: 100px;
    height: 100%;
    position: absolute;
    top: 0;
    right: 0;
    background: url(img/broyage_de.png) no-repeat center;
    background-size: contain;
  }
  .service-box p {
    padding-right:75px;
    margin-bottom: 15px;
  }
  .service-box:nth-child(2) h3::after {
    background: url(img/traitement_bois.png) no-repeat center;
  }
  .service-box:nth-child(3) h3::after {
    background: url(img/scierie.png) no-repeat center;
  }
  .service-box:nth-child(4) h3::after {
    background: url(img/paillis.png) no-repeat center;
  }
  .sous-titre {
    font-size: 19px;
    font-weight: 400;
    font-family: "Montserrat", sans-serif;
    line-height: 1.4;
    color: #3c3950;
    margin-bottom: 15px;
  }
  .text-center {
    text-align: center;
  }
  .text-white {
    color: white;
  }
  .icon-feuille {min-width: 100px;margin-bottom: 10px;}
  .title-h2 {
    font-size: 50px;
    text-align: center;
    font-weight: 300;
    text-transform: uppercase;
    margin-bottom: 50px;
  }
  
  .title-h2 strong {
    font-weight: 600;
  }
  .activites-images {
    display: grid;
    display: none !important;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-top: 30px;
  }
  .grid-activites {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
    max-width: 1000px;
    margin: 0 auto;
}
  .bloc-activite {
    padding: 30px;
    background: #fbfbfb;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 5px 2px #0000000a;
  }
  .bloc-activite h3 {
    margin-bottom: 15px;
    font-size: 23px;
    font-weight: 600;
  }
  .bloc-activite:after {
    content: "";
    position: absolute;
    width: 120%;
    height: 30px;
    background: var(--jaune);
    bottom: -26px;
    left: -30px;
    transform: rotate(-1deg);
  }
  .btn-primary {
        background: #e7b909;
        font-size: 14px;
        font-weight: bold;
        text-decoration: none;
        color: white;
        padding: 7px 10px;
        margin-top: auto;
        display: inline-block;
        border-radius: 3px;
        cursor:pointer;
        border: none;
    }
    .btn-primary:hover {
          background: #1a1400;
      }
  .approche {
    background: linear-gradient(to right, #208105, #e5b909);
    color: white;
    padding: 60px 20px 60px 20px;
    text-align: center;
  }
  .approche p {
    font-size: 27px;
    font-weight: 300;
  }
  .machines {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    gap: 0px;
    padding: 0px;
  }

  .machine {
    flex: 1 1 250px;
    padding: 60px 20px;
    background-color: white;
  }

  .machine:nth-child(1) {
    /* border-radius: 0  60px 0 0; */
    position: relative;
    /* padding-left: 15%; */
  }
  
  .machine:nth-child(1)::before {
    /* content: ""; */
    position: absolute;
    width: 1px;
    height: 60%;
    right: 0;
    bottom: 0;
    /* border-right: 1px dashed #5f727f; */
  }
  /* .machine:nth-child(2) {
    /* border-radius: 60px  0px 0 0; */
    /* padding-right: 15%; 
  } */
  .machine img {
    height: 170px;
    width: auto;
    object-fit: scale-down;
    object-position: center;
    max-width: 300px;
  }
  .machine h3 {
    text-transform: uppercase;
    font-size: 28px;
    margin-bottom: 25px;
  }
  footer {
    background: #000;
    color: white;
    padding: 40px 20p;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }
  footer section {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  
  .page-merci footer section {
    grid-template-columns: 1fr;
  }
  form input, form textarea {
    padding: 10px;
    margin: 0;
    width: 100%;
    background: #333530;
    border: 1px solid #565353;
    border-radius: 3px;
    font-family: "Source Sans 3", sans-serif;
    color: white;
  }
  #popup-form form input,#popup-form  form textarea {    
    background: #0000006e;
    border: 1px solid #2f2f2fa3;
  }
  form textarea {
    margin-bottom: 15px;
    min-height: 100px;
  }
  footer button {
    background: var(--jaune);
    padding: 10px 20px;
    border: none;
    margin-top: 10px;
  }
  .activites-images {
    padding: 80px 0px 40px; 
    max-width: 1200px;
    margin: auto;
  }
  
  .activites-images  .grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 290px;
    gap:0px;
  }
  
  .activites-images  .item {
    position: relative;
    overflow: hidden;
  }
  
  .activites-images  .item:before {
    content: "";
    position:absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    mix-blend-mode: multiply;
  }
  .activites-images  .item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0px;
  }
  
  /* Spécifie la disposition des blocs */
  .activites-images  .item1 {
    grid-column: span 2;
    grid-row: span 2;
  }
  
  .activites-images  .item1::before {
    background-color: #e8b909;
    opacity: 46%;
  }
  
  .activites-images .item2 {
    grid-column: span 2;
    grid-row: span 1;
  }
  
  .activites-images  .item2::before, .activites-images  .item4::before  {
    background-color: #e8b909;
  }
  .activites-images .item3 {
    grid-column: span 2;
    grid-row: span 1;
  }
  
  .activites-images  .item3::before {
    background-color: #e8b909;
    opacity: 32%;
  }
  
  .activites-images .item4 {
    grid-column: span 1;
    grid-row: span 1;
  }
  
  .activites-images .item5 {
    grid-column: span 3;
    grid-row: span 1;
  }
  
  .activites-images  .item5::before {
    background-color: #e8b909;
    opacity: 39%;
  }
  
  form .fields {
    padding: 15px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
 }
 footer h4 {
  font-size: 19px;
  margin-bottom: 15px;
}
.grecaptcha-badge {
  opacity: 0;
}
.popup-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-content {
  background: #2a2525;
  padding: 30px;
  max-width: 600px;
  width: 100%;
  position: relative;
  border-radius: 20px;

}
#popup h2 {
  color: white;
  font-size: 26px;
  padding-bottom: 10px;
  border-bottom: 1px solid #ffffff45;
  margin-bottom: 10px;
  font-weight: 200 !important;
}
#popup h2 strong{
  font-weight: 700 !important;
}
.popup-content button#close-popup {
  position: absolute;
    top: -21px;
    right: -13px;
    background: transparent;
    color: var(--jaune);
    border: none;
    font-size: 30px;
    cursor: pointer;
    transform: scale(1);
    transition: 0.3s all ease;
}

.popup-content button#close-popup:hover {
  transform: scale(0.8);
  transition: 0.3s all ease;
}
footer img {
  width: 200px;
}
  /* Responsive */

  @media (max-width: 1024px) {
    footer img {
      max-width: 150px;
    }
  }
  @media (max-width: 768px) {
    .grid-activites {
      grid-template-columns: 1fr;
      padding: 0;
    }  
    .machine {
      padding: 30px 20px;
    }
    
    #logo-top img{
      width: 100px;
    }
    .popup-content {
      max-width: 93%;
    }
    .banner {
      height: 480px;
    }
    .banner .h1 {
      font-size: 40px;
    }
    .banner-content .description {
      font-size: 15px;
    }
    .machine:nth-child(1), .machine:nth-child(2) {
      padding-left: 0;
      padding-right: 0;
    }
    .machine:nth-child(1)::before {display: none;}
    header .top-left a:first-child {
      display: none;
    }
    .machine img {
        width: auto;
        margin-bottom: 0px;
    }
    .activites-images {
      padding: 40px 0;
      max-width: 1200px;
      margin: auto;
  }
    .activites-images  .grid {
      grid-template-columns: repeat(2, 1fr);
      grid-auto-rows: 150px;
    }
    .title-h2 {
      font-size: 30px;
    }
    footer img {
      max-width: 190px;
      margin: 25px auto;
    }
    .activites-images  .item1,
    .activites-images  .item2,
    .activites-images  .item3,
    .activites-images  .item4,
    .activites-images  .item5 {
      grid-column: span 2 !important;
      grid-row: auto !important;
    }
    header {
      flex-direction: column;
      text-align: center;
    }
    
    footer section{
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 30px;
      padding: 20px 15px;
    }

    form input, form textarea{
      width: 100%;
    }

    .banner h1 {
      font-size: 24px;
      padding: 10px;
    }
  }