#categories {
  display: flex;
  flex-direction: column;
  /* ✅ chaque produit sur une ligne */
  gap: 0.8rem;
  margin-top: 1rem;
}

/* ✅ Bloc d'une catégorie */
.categorie {
  border: 1px solid black;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s ease;
}

/* En-tête (nom + +) — hauteur fixe */
.categorie-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 30px;
  padding: 0 0.8rem;
  font-weight: 600;
  color: black;
  line-height: 30px;
  transition: color 0.3s ease;
}

/* ✅ “+” par défaut noir aussi */
main .plus {
  font-size: 1.2rem;
  font-weight: bold;
  color: black;
  transition: color 0.3s ease, transform 0.3s ease;
}

/* Effet hover (ligne + symbole +) */
.categorie-header:hover {
  color: #4FA862;
}

.categorie-header:hover .plus {
  color: #4FA862;
}

main .categorie.active .plus {
  transform: rotate(45deg);
}

/* Contenu caché par défaut */
main .categorie-content {
  display: none;
  padding: 0;
  background-color: #fff;
  align-items: center;
  gap: 1rem;
}

/* Image */
main .categorie-content img {
  width: 107px;
  height: 190px;
  object-fit: cover;
}

/* Texte */
main .categorie-content p {
  font-size: 0.9rem;
  color: #333;
  line-height: 1.4;
  margin: 0;
  text-align: left;
}

/* Quand actif */
main .categorie.active .categorie-content {
  display: flex;
  padding: 1rem;
}

main .categorie.active {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Taille spéciale pour la catégorie Cloisons */
main .categorie.cloisons .categorie-content img {
  width: 154px;
  height: 138px;
  object-fit: cover;
}

@keyframes defilement {
  0% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(-100%);
  }
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px); /* plus petit sur mobile */
  transition: transform 0.7s ease-out, opacity 0.7s ease-out;
}

.slide-in-left.active {
  opacity: 1;
  transform: translateX(0);
}

/* Optionnel : réduire la translation sur mobile pour que ce soit fluide */
@media (max-width: 768px) {
  .slide-in-left {
    transform: translateX(-20px); /* animation moins grande */
  }
}

/* div 1 en mobile */
@media (max-width: 768px) {
  /* Bloc principal : colonne verticale */
  .container-fluid.py-2 > .d-flex {
    flex-direction: column !important;
    align-items: center !important;
    padding: 1.5rem 1rem !important;
    gap: 2rem !important;
  }

  /* Image principale centrée et plus grande */
  .container-fluid.py-2 > .d-flex > div:first-child {
    flex: 0 0 auto;
    width: 100% !important;
    text-align: center !important;
  }

  .container-fluid.py-2 > .d-flex > div:first-child img {
    width: 90% !important;
    height: auto !important;
    max-height: 300px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  }

  /* Texte + catégories */
  .container-fluid.py-2 > .d-flex > div:last-child {
    flex: 0 0 auto;
    width: 95% !important;
    text-align: center !important;
  }

  .container-fluid.py-2 h2 {
    font-size: 1.8rem !important;
    color: #4FA862;
    margin-bottom: 1rem !important;
    font-weight: 600;
  }

  .container-fluid.py-2 p {
    font-size: 1rem !important;
    line-height: 1.7 !important;
    color: #333;
    margin-bottom: 1rem !important;
  }

  /* Catégories */
  #categories {
    display: flex;
    flex-direction: column !important;
    gap: 1.2rem;
    align-items: center;
  }

  .categorie {
    width: 90% !important;
    text-align: center !important;
    border: 1px solid #4FA862;
    border-radius: 10px;
    padding: 1rem 1.2rem !important;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
  }

  .categorie:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.15);
  }

  .categorie-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    color: #4FA862;
    margin-bottom: 0.6rem;
  }

  .categorie-content {
    margin-top: 0.6rem;
    font-size: 0.97rem;
    line-height: 1.6;
    color: #333;
    text-align: justify;
    padding: 0 0.3rem;
  }

  /* Symbole “+” */
  .categorie-header .plus {
    font-size: 1.3rem;
    font-weight: bold;
    color: #4FA862;
  }
}

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

/* --- Mobile uniquement --- */
@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;
  }
}

/* -------------- *
/* div 4 en mobile */
/* ======= MOBILE SEULEMENT ======= */
@media (max-width: 768px) {
  .processus-section .row {
    display: flex;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }

  .processus-gauche {
    width: 100% !important;
    margin-bottom: 2rem !important;
  }

  .processus-gauche h2 {
    font-size: 2rem !important;
    margin-bottom: 1rem !important;
  }

  .processus-gauche img {
    width: 90% !important;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
    object-fit: cover;
    transition: transform 0.3s ease;
  }

  .processus-gauche img:hover {
    transform: scale(1.02);
  }

  .processus-droite {
    width: 95% !important;
    display: flex;
    flex-direction: column;
    gap: 1.5rem !important;
  }

  .processus-droite .etape {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 1.2rem !important;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .processus-droite .etape span {
    font-size: 1.6rem !important;
  }

  .processus-droite .etape h3 {
    font-size: 1.1rem !important;
    margin-bottom: 0.4rem;
  }

  .processus-droite .etape p {
    font-size: 1rem !important;
    color: #444;
    line-height: 1.6;
  }
}

/* -------------- *
/* div 5 en mobile */
@media (max-width: 768px) {
  .section-stats {
    padding: 2rem 1rem !important;
    text-align: center;
  }

  /* Image centrée, grand format, arrondie + ombre */
  .section-stats img {
    width: 95% !important;
    max-width: 400px !important;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    object-fit: cover;
    margin: 0 auto 2rem auto;
  }

  /* Blocs statistiques empilés verticalement, pleine largeur */
  .section-stats .d-flex.justify-content-center {
    flex-direction: column !important;
    gap: 1.5rem !important;
    align-items: center !important;
  }

  .section-stats .d-flex.justify-content-center > div {
    width: 100% !important;          /* prend toute la largeur */
    max-width: 350px;                /* limite pour pas que ce soit trop large */
    min-height: 150px;
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: inherit;
    animation: fadeSlideIn 0.8s ease forwards;
    text-align: center;               /* texte centré à l’intérieur */
    line-height: 1.4;                 /* plus aéré */
  }

  .section-stats .d-flex.justify-content-center span:first-child {
    font-size: 2.5rem !important;
    font-weight: 700;
  }

  .section-stats .d-flex.justify-content-center span:nth-child(2),
  .section-stats .d-flex.justify-content-center span:last-child {
    font-size: 1.2rem !important;
  }

  .section-stats .d-flex.justify-content-center > div:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.15);
  }

  /* Texte défilant */
  .section-stats .position-absolute {
    position: relative !important;
    bottom: 0 !important;
    margin-top: 2rem;
  }

  .section-stats .marquee-text span {
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    color: #ceb209 !important;
    white-space: nowrap;
  }

  /* Animation keyframes */
  @keyframes fadeSlideIn {
    0% {
      opacity: 0;
      transform: translateY(20px);
    }
    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* -------------- *
/* div 6 en mobile */
@media (max-width: 768px) {
  .container-fluid .d-flex.flex-column.flex-md-row {
    flex-direction: column !important;  /* texte au-dessus de l'image */
    align-items: center !important;
    padding: 1rem !important;
  }

  /* Bloc texte */
  .container-fluid > .d-flex > div:first-child {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding: 1.5rem !important;
    text-align: center !important;
  }

  .container-fluid > .d-flex > div:first-child h4 {
    font-size: 2rem !important;
    margin-bottom: 1rem;
  }

  .container-fluid > .d-flex > div:first-child p {
    font-size: 1rem !important;
    line-height: 1.6 !important;
    margin-bottom: 1.5rem;
  }

  /* Centrer les boutons sans changer leur style desktop */
  .container-fluid > .d-flex > div:first-child .d-flex.justify-content-center {
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 1rem;
  }

  /* Bloc image */
  .container-fluid > .d-flex > div:last-child {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin-top: 2rem;
    text-align: center;
  }

  .container-fluid > .d-flex > div:last-child img {
    width: 50% !important;
    max-width: 400px !important;
    height: auto !important;
    object-fit: cover !important;
  }
}

/* -------------- */
@media (max-width: 768px) {
  /* Conteneur principal : colonne verticale */
  #categories {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }

  /* Chaque catégorie */
  .categorie {
    width: 95%;
    border: 1px solid #4FA862;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 0.8rem 1rem; /* réduit padding */
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s ease;
  }

  /* Header */
  .categorie-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1rem; /* légèrement plus petit */
    color: #4FA862;
    margin-bottom: 0.5rem;
  }

  .categorie-header .plus {
    font-size: 1.2rem;
    font-weight: bold;
    transition: transform 0.3s ease;
  }

  .categorie.active .plus {
    transform: rotate(45deg);
  }

  /* Contenu : image + texte */
  .categorie-content {
    display: none; /* caché par défaut */
    flex-direction: column;
    align-items: center;
    gap: 0.8rem; /* réduit espace */
    margin-top: 0.5rem;
    text-align: center;
  }

  .categorie.active .categorie-content {
    display: flex;
  }

  /* Image responsive réduite */
  .categorie-content img {
    width: 70%;          /* réduit la largeur */
    max-width: 200px;    /* limite max */
    height: auto;
    object-fit: cover;
    border-radius: 6px;
  }

  /* Texte */
  .categorie-content p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #333;
    margin: 0;
  }

  /* Cas particulier Cloisons */
  .categorie.cloisons .categorie-content img {
    width: 75%;
    max-width: 220px;
    height: auto;
  }
}
