/* --- Main Section Intro (Title + accroche) --- */
#acrroche1 {
  margin-top: 100px;        /* spacing under the navbar */
  width: 60%;               /* centered line width */
  margin-left: 20%;         /* centers the block */
  text-align: center;       /* centers the text */
}

#titre_first_section {
  margin-top: 5%;
  position: relative;       /* allows controlled stacking */
  z-index: 999;             /* ensures it stays above background elements */
}

/* --- Review Grid (Avis Clients) --- */
.grid_avis {
  gap: 2%;                  /* space between review cards */
  height: fit-content;      /* grows to fit its content */
}

/* Single review card */
.item_avis {
  border: 1px solid rgba(128, 128, 128, 0.39);
  width: 20%;               /* 5 cards per row on large screens */
  height: 400px;
  text-align: center;
  padding-top: 8px;
  background-color: #f1e9dc;
  padding: 5px;
}

/* Reviewer name */
.name {
  margin-top: 10px;
}

/* Reviewer profile picture */
.img_avis {
  border-radius: 50%;       /* makes the image round */
  width: 30%;
  height: auto;
  aspect-ratio: 1;          /* keeps a perfect circle */
  object-fit: cover;
}

/* Stars row */
.container_start {
  display: flex;
  gap: 1%;
  justify-content: center;
  margin-top: 10px;
}

/* Single star */
.stars {
  width: 20px;
  height: auto;
}

/* --- Responsive Adjustments --- */

/* Slight height reduction for large screens */
@media (max-width: 1366px) {
  .item_avis {
    height: 350px;
  }
}

@media (max-width: 1280px){
  .item_avis {
    height: 300px;
  }
}

/* Adjusts top margin on medium screens */
@media (max-width: 1176px) {
  #acrroche1 {
    margin-top: 100px;
  }
}

/* Review grid adapts for tablets */
@media (max-width: 1024px) {
  .grid_avis {
    width: 90%;
    margin-left: 5%;
  }
  .item_avis {
    width: 22%;             /* slightly fewer per row */
  }
}

/* Medium mobile/tablet */
@media (max-width: 950px) {
  #section_avis {
    gap: 2%;
    row-gap: 20px;          /* vertical spacing between cards */
  }

  .item_avis {
    width: 30%;             /* 3 cards per row */
  }

  .container_avis_text {
    width: 90%;
    margin-left: 5%;
  }
}

/* Small tablets */
@media (max-width: 800px) {
  #section_avis {
    margin-top: 40px;
  }

  .item_avis {
    height: 250px;
  }

  .img_avis {
    width: 25%;             /* slightly smaller avatar on small screens */
  }
}

/* Mobile screens */
@media (max-width: 600px) {
  #acrroche1 {
    width: 80%;
    margin-left: 10%;       /* keeps symmetry on mobile */
  }

  .item_avis {
    width: 45%;             /* 2 cards per row */
  }

  #section_avis {
    width: 100%;
    margin-left: 0;
    row-gap: 10%;
    gap: 10px;
  }

  .container_avis_text {
    width: 95%;
    margin-left: 2.5%;
    text-align: justify;     /* better readability on mobile */
  }
}