h1, .l-application-qui {
  font-size: clamp(1.678rem, 2.684vw, 2.349rem);
}

h2, .text-wrapper-11 {
  font-size: clamp(1.678rem, 2.684vw, 2.349rem);
}

h3, .heading-3 {
  font-size: clamp(1.007rem, 2.01vw, 1.208rem);
}

p, .text-wrapper-5, .text-wrapper-10 {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem)
}

small {
  font-size: clamp(0.587rem, 1.34vw, 0.671rem);
}

.cta-button {
  font-size: clamp(0.656rem, 2.01vw, 0.872rem);
  padding: clamp(0.671rem, 2.01vw, 0.806rem) clamp(0.671rem, 2.01vw, 1.091rem);
}

/* Scroll overflow fix for mobile */
body {
  overflow-x: hidden;
}

/* Force layout adapts flex children */
.element-light .frame-5, .element-light .section-2, .element-light .tablist {
  flex-wrap: wrap;
  justify-content: center;
}
.trombinoscope {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  justify-items: center;
  /* gap déjà en rem dans les media queries */
}

/* ----------- 1600px ----------- */
@media (max-width: 1600px) {
  .header-flex {
   flex-direction: row;
  }
  .wrapper-flex {
    gap: 3rem;
  }
  .frame img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
  }
  .header-video video {
    max-width: 18.75rem;
  }
  .l-application-qui {
    font-size: clamp(1.678rem, 2.684vw, 2.349rem);
    max-width: clamp(30rem, 60vw, 60.25rem);
  }
  .background-border .text-overlay-1 {
    font-size: clamp(1.342rem, 2.684vw, 1.879rem);
  }
  .background-border .text-overlay-1 small {
    font-size: clamp(0.738rem, 1.342vw, 1.007rem);
  }
  .background-border .text-overlay-2 {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  }

  .element-light .item img
  {
    width: 2.5rem;
    height: 2.5rem;
  }

   .localiser-cr-er-wrapper {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    width: auto;
  }

 
}

/* ----------- 1400px ----------- */
@media (max-width: 1400px) {
  .header-flex {
    gap: 2rem;
    flex-direction: column;
    align-items: stretch;
  }
 
  .header-video video {
    width: 100%;
    height: auto;
  }
  .wrapper-flex {
    flex-direction: row;
    gap: 2rem;
    align-items: flex-start;
  }
  .frame img {
    max-width: 100%;
    height: auto;
  }
}

/* ----------- 1200px ----------- */
@media (max-width: 1200px) {
  .header-flex {
    flex-direction: column;
    gap: 1rem;
  }
  .element-light .main {
    max-width: 100%;
    padding: 2rem;
  }
  .element-light .frame-5 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    padding: 1rem;
    gap: 1rem;
  }

  .explorer-left {
    align-items: flex-start !important;
    text-align: left !important;
    display: flex;
    flex-direction: column;
  }

  .header-video video {
    height: auto;
  }
  .wrapper-flex {
    flex-direction: column;
    gap: 2rem;
  }
  .frame img {
    max-width: 100%;
    height: auto;
  }
  .background-border::after {
    display: none !important;
    content: none !important;
  }
  .background-border .text-overlay-1 {
    position: static;
    transform: none;
    font-size: clamp(1.545rem, 5.455vw, 2.273rem);
    margin-bottom: 1.5rem;
    z-index: auto;
    }
    .background-border .text-overlay-1 small {
    font-size: clamp(0.909rem, 2.727vw, 1.091rem);
    }
    .background-border .activits-et-supports {
    position: static;
    width: 100%;
    max-width: 700px;
    margin: 0 auto 1.5rem auto;
    display: block;
    }
    .background-border .text-overlay-2 {
    position: static;
    transform: none;
    margin-top: 0;
    z-index: auto;
  }
  .element-light .section-2 {
    gap: 1rem !important;
  }
  .element-light .frame-5 {
    gap: 1rem;
  }
}

/* ----------- 992px ----------- */
@media (max-width: 992px) {
  .element-light .heading {
    font-size: clamp(2rem, 6vw, 3rem);
  }
  .element-light .l-application-qui,
  .element-light .text-wrapper-11 {
    width: auto;
  }

  .element-light .section-2 {
    gap: 1rem;
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .element-light .frame-5 {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    width: 100%;
    gap: 0rem;
    padding: 1rem;
  }
  .element-light .container-2 {
    width: 100%;
  }
  .element-light .image-2 {
   width: 2.5rem;
  height: 2.5rem;
  }
  .element-light .logo-color-svg {
    width: clamp(7rem, 28vw, 12rem);
    height: clamp(4rem, 16vw, 8rem);
  }
  .logo-color-svg img {
    max-width: 14rem;
    height: 12rem;
  }
  .element-light .list {
    display: block;
  }
  
  .element-light .section-5 {
    padding: clamp(1rem, 4vw, 2rem);
  }
  .wrapper-flex {
    flex-direction: column;
    gap: 2rem;
  }
  .frame img {
    max-width: 100%;
    height: auto;
  }
  
}

/* ----------- 768px ----------- */
@media (max-width: 768px) {
  .element-light .header-video video {
    width: 100%;
    height: auto;
  }
  .element-light .tablist {
    gap: 1rem;
  }
  .element-light .section-4 {
    padding: clamp(1rem, 4vw, 2rem);
  }
  .element-light .div-4 {
    width: 100%;
    padding: 0;
  }
  .element-light .frame-5 {
    flex-direction: column;
    align-items: center;
  }
  .wrapper-flex {
    flex-direction: column;
    gap: 2rem;
    align-items: center;
  }
  .frame img {
    max-width: 100%;
    height: auto;
  }
  .element-light .section-2 {
    display: block;
  }
  .element-light .logo-color-svg {
    width: clamp(4rem, 30vw, 7rem);
    height: clamp(2rem, 12vw, 4rem);
  }
  .logo-color-svg img {
    max-width: 100%;
    height: auto;
  }
  .element-light .list {
    display: block;
  }

   .trombinoscope {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }


  .trombinoscope-section {
    padding: clamp(0.5rem, 3vw, 1.5rem) 0;
  }
}

/* ----------- 576px ----------- */
@media (max-width: 576px) {
  .element-light .cta-button {
    width: 100%;
    padding: clamp(0.336rem, 2.01vw, 0.671rem);
  }
  .element-light .section-3 .list {
    flex-direction: column;
    width: 100%;
  }
  .element-light .item {
    width: 100%;
  }
 
  .frame img {
    max-width: 100%;
    height: auto;
  }
  .element-light .section-4 {
    padding: clamp(0.5rem, 3vw, 1.5rem);
  }
  .element-light .tablist .button,
  .element-light .tablist .button-wrapper .button {
    min-width: 100%;
    width: 100%;
    padding: clamp(0.336rem, 1.01vw, 0.671rem);
  }
  /* --- Ajout pour rendre section-4 et ses enfants fluides --- */
  .section-4 {
    padding-left: clamp(0.5rem, 3vw, 1.5rem) !important;
    padding-right: clamp(0.5rem, 3vw, 1.5rem) !important;
  }
  .div-4 {
    width: 100% !important;
    max-width: clamp(12rem, 90vw, 18rem);
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .line, .line-2 {
    width: 100% !important;
    max-width: clamp(12rem, 90vw, 18rem);
    min-width: 0 !important;
  }
  .text-wrapper-9 {
    font-size: clamp(1.2rem, 7vw, 2.2rem) !important;
    width: auto !important;
    height: auto !important;
    line-height: 1.2;
  }
  .frame-2 .detaille {
    font-size: clamp(0.8rem, 3vw, 1.1rem) !important;
  }
  .text-wrapper-10 {
    font-size: clamp(0.671rem, 3vw, 1rem) !important;
    white-space: normal !important;
  }

  .trombinoscope {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

/* ----------- 400px ----------- */
@media (max-width: 400px) {
  .section-4 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  .div-4 {
    width: 100% !important;
    min-width: 0 !important;
    margin-left: 0.2rem !important;
    margin-right: 0.2rem !important;
  }
  .line, .line-2 {
    width: 100% !important;
    min-width: 0 !important;
  }
   .trombinoscope {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
}