/* avoir la forme de trapeze a une image */
main .trapeze {
  clip-path: polygon(25% 0, 100% 0, 100% 100%, 0% 100%);

  transition: clip-path 0.3s ease;
}

/* bounce */
@keyframes bounceLoop {
  0% {
    transform: translateY(0);
  }

  25% {
    transform: translateY(-10px);
  }

  50% {
    transform: translateY(0);
  }

  75% {
    transform: translateY(-5px);
  }

  100% {
    transform: translateY(0);
  }
}

main .bounce {
  display: inline-block;
  animation: bounceLoop 3s ease-in-out infinite;
}

/* fade permanence */
@keyframes fadeLoop {

  0%,
  20% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  80%,
  100% {
    opacity: 0;
  }
}

main .fade {
  display: inline-block;
  animation: fadeLoop 3s ease-in-out infinite;
}

/* slide in */
/* Images qui entrent depuis la gauche ou droite */
/* Bloc caché initialement hors écran */
.slide-left,
.slide-right {
  transform: translateX(var(--translate, 0));
  opacity: 0;
  transition: transform 1s ease-out, opacity 1s ease-out;
}

/* Direction du slide */
.slide-left {
  --translate: -50px;
}

/* plus petit déplacement pour mobile */
.slide-right {
  --translate: 50px;
}

/* Quand actif */
.slide-left.active,
.slide-right.active {
  --translate: 0;
  opacity: 1;
}

/* Parent pour ne pas casser le layout */
.d-flex.flex-wrap {
  position: relative;
  /* Pas besoin de overflow: hidden si on utilise translateX petit */
}


@keyframes pulse-double {
  0% {
    transform: scale(1);
  }

  12.5% {
    transform: scale(1.2);
  }

  /* 1ère pulsation */
  25% {
    transform: scale(1);
  }

  37.5% {
    transform: scale(1.2);
  }

  /* 2ème pulsation */
  50% {
    transform: scale(1);
  }

  100% {
    transform: scale(1);
  }
}

main .pulse {
  display: inline-block;
  animation: pulse-double 4s ease-in-out infinite;
}

/* div 2 en mobile */
@media (max-width: 768px) {
  .container-fluid.text-center.mt-5 p {
    font-size: clamp(0.9rem, 3.5vw, 1.4rem) !important;
    line-height: 1.6 !important;
    white-space: normal !important;
    margin: 0.3rem 0 !important;
  }

  .container-fluid.text-center.mt-5 .d-flex {
    gap: 0.8rem !important;
    padding: 0 1rem;
  }
}

/* div 3 sur mobile */
.produits-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: end;
  text-align: center;
}

/* div 4 sur mobile */
@media (max-width: 768px) {
  .garantie-container {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    margin: 0 auto;
    gap: 1.5rem;
    /* espace harmonieux entre les blocs */
  }

  .garantie-container>div {
    width: 100%;
    max-width: 320px;
    /* limite propre */
    margin: 0 auto;
    /* force le centrage horizontal */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .garantie-container img {
    max-height: 90px !important;
    margin: 0 auto;
    /* image bien centrée */
  }

  .garantie-container p {
    font-size: 0.95rem;
    text-align: center;
    margin: 0 auto;
  }
}


.section-hero {
  width: 100%;
  box-sizing: border-box;
}

/* Bloc gauche */
.left-content {
  flex: 5;
  transform: translateY(7vw);
}

.img-group {
  transform: translateX(8vw);
}

.img-jaune {
  width: 15%;
  height: auto;
}

.img-vert {
  width: 40%;
  height: auto;
}

.titre-leader {
  font-size: clamp(1.8rem, 3.5vw, 3.5rem);
  line-height: 1;
  color: #4FA862;
  font-weight: 700;
}

.sous-titre {
  font-size: clamp(1.3rem, 2vw, 2.5rem);
  line-height: 1.1;
  color: #ceb209;
}

/* Bloc droite */
.right-image {
  flex: 6;
}

/* === Responsive Mobile === */
@media (max-width: 768px) {
  .trapeze {
    clip-path: none !important;
    transform: none !important;
  }

  .section-hero {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center;
    padding: 1.5rem 1rem;
  }

  .left-content {
    transform: none !important;
    align-items: center;
    margin-bottom: 1.5rem;
  }

  .img-group {
    transform: none !important;
    justify-content: center !important;
    margin-bottom: 1rem;
  }

  .img-jaune {
    width: 60px !important;
  }

  .img-vert {
    width: 150px !important;
  }

  .titre-leader {
    font-size: 1.8rem !important;
    line-height: 1.2;
    text-align: center;
  }

  .sous-titre {
    font-size: 1.2rem !important;
    text-align: center;
  }

  .right-image {
    width: 100%;
    justify-content: center;
  }

  .right-image img {
    width: 100%;
    max-width: 350px;
    height: auto;
    object-fit: cover;
  }
}

/* div 5 sur mobile */
@media (max-width: 768px) {
  .section-apropos {
    text-align: center;
    padding: 0rem 0rem !important;
  }

  /* Bloc texte principal */
  .section-apropos .p-4,
  .section-apropos .p-5 {
    background-color: rgba(255, 255, 255, 0.85) !important;
    width: 95% !important;
    margin: 0 auto;
    text-align: center !important;
    box-shadow: none !important;
    border: none !important;
    padding: 1.5rem !important;
  }

  .section-apropos h2 {
    font-size: 1.8rem !important;
  }

  .section-apropos p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }

  .section-apropos button {
    width: auto;
    padding: 0.6rem 1.5rem !important;
    font-size: 1rem !important;
  }

  /* Bloc statistiques */
  .section-apropos .d-flex.justify-content-between {
    justify-content: center !important;
    align-items: center !important;
    gap: 1.5rem !important;
    flex-wrap: wrap !important;
    margin: 1.5rem auto 0 auto !important;
    width: 90% !important;
    max-width: 800px !important;
  }

  .section-apropos .d-flex.flex-column.align-items-center {
    flex: 0 0 85% !important;
    max-width: 85% !important;
    text-align: center !important;
  }

  .section-apropos h3,
  .section-apropos .d-flex.flex-column.align-items-center p {
    font-size: 1.1rem !important;
    text-align: center !important;
    margin-bottom: 0.4rem !important;
  }

  /* Image */
  .section-apropos img {
    max-height: 300px !important;
    width: 100%;
    object-fit: cover;
    margin-top: 2rem;
  }
}

/* div 6 sur mobile */
@media (max-width: 768px) {

  /* On inverse la colonne Bootstrap */
  .section-realisations .row {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* Bloc texte d'abord */
  .section-realisations .col-md-6:first-child {
    order: 1;
  }

  /* Bloc images ensuite */
  .section-realisations .col-md-6:last-child {
    order: 2;
  }

  /* Centrer tout le texte */
  .section-realisations .bloc-texte {
    text-align: center;
    padding: 1rem 0;
  }

  .section-realisations .bloc-texte h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }

  .section-realisations .bloc-texte p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
  }

  /* Conteneur global d’images */
  .section-realisations .col-md-6:last-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
  }

  /* Supprime la marge du 2e bloc (celui avec mt-3 sur desktop) */
  .section-realisations .bloc-images.mt-3 {
    margin-top: 0 !important;
  }

  /* Colonne d’images gauche (2 images) */
  .section-realisations .bloc-images {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.2rem !important; /* espacement harmonieux entre les images */
    margin: 0 auto 1.2rem auto !important;
    padding: 0 !important;
    width: 100%;
  }

  /* Chaque image */
  .section-realisations .bloc-images img {
    width: 90% !important;
    max-width: 350px;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  /* Bouton : centré, large et texte bien centré */
  .section-realisations a {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .section-realisations .bouton-realisations {
    display: block;
    width: 80%;
    max-width: 250px;
    margin: 1rem auto 0;
    font-size: 1rem;
    border-radius: 6px;
    text-align: center;
  }
}

/* div 7 en mobile */
@media (max-width: 991px) {
  .logo-carousel-mobile {
    overflow: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  .logo-carousel-mobile .carousel-line {
    display: flex;
    gap: 2rem;
    width: max-content;
    animation: scroll-left 40s linear infinite;
  }

  .logo-carousel-mobile .carousel-line.line2 {
    animation: scroll-right 40s linear infinite;
  }

  .logo-carousel-mobile img {
    flex: 0 0 auto;
    max-height: 120px;
    width: auto;
  }

  @keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
  }

  @keyframes scroll-right {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
  }
}

/* css uniquement sur mobile (fleche,caroussel) */
@media (max-width: 768px) {
  .produits-scroll-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
  }

  .produits-container {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 1.5rem;
    padding: 1rem;
    justify-content: flex-start;
    scroll-behavior: smooth;
  }

  .produit-item {
    flex: 0 0 75%;
    max-width: 75%;
    scroll-snap-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem;
  }

  .produit-item img {
    max-height: 200px !important;
    width: auto !important;
  }

  /* Masquer la scrollbar sur mobile */
  .produits-container::-webkit-scrollbar {
    display: none;
  }

  /* Flèches (visibles seulement sur mobile) */
  .scroll-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: #4FA862;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    z-index: 10;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  }

  .scroll-btn.left {
    left: 5px;
  }

  .scroll-btn.right {
    right: 5px;
  }

  .scroll-btn:hover {
    background: #fff;
  }
}

/* Desktop : flèches invisibles */
@media (min-width: 769px) {
  .scroll-btn {
    display: none !important;
  }

}

/* enleve l espacement entre le bloc droite et gauche img */
@media (max-width: 768px) {
  .mobile-parent-gap-0 {
    gap: 0 !important;
  }
}