/* =========================
   AVIS — FICHIER PRO (HTML ACTUEL)
   ========================= */

:root{
  --avis-vert: var(--vert-fonce, #2f6f3a);
  --avis-bg: var(--bg, #f6f7f8);
  --avis-text: #1f2937;
  --avis-muted: #6b7280;
  --avis-card: #ffffff;
  --avis-border: rgba(0,0,0,0.08);
  --avis-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* ==== CONTENEUR GLOBAL ==== */
.avis_container{
  background-color: var(--avis-bg);
  width: 100%;
  text-align: center;
  padding-bottom: 50px;
}

/* ==== TITRE ==== */
.avis_container h2{
  font-size: clamp(1.8rem, 2.2vw, 2.4rem);
  line-height: 1.1;
  margin: 50px 0 50px;
  color: var(--avis-text);
  letter-spacing: -0.5px;
}

#main-avis h2 .highlight{
  color: var(--avis-vert);
  display: block;
}

/* ======================================================
   TON HTML: logo + étoiles + paragraphe directement
   ====================================================== */

/* centre et espace les éléments du “bloc Google” */
#main-avis{
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* logo google */
#main-avis #logo-google{
  height: 40px;
  width: auto;
  display: block;
  margin: 8px auto 6px;
}

/* image étoiles */
#main-avis #note{
  width: 110px;
  height: 22px;
  display: block;
  margin: 0 auto 6px;
}

/* “Basé sur X avis” */
#main-avis > p{
  margin: 0 0 18px;
  color: var(--avis-muted);
  font-size: 0.98rem;
  text-align: center;
}

/* ==== CARROUSEL ==== */
.avis-slider-wrapper{
  position: relative;
  max-width: 980px;
  width: 100%;
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
}

.avis-slider-window{
  overflow: hidden;
  width: 100%;
}

.avis-slider{
  display: flex;
  gap: 20px; /* doit correspondre au +20 dans ton JS */
  flex-direction: row;
  transition: transform 0.45s ease;
  will-change: transform;
}

.avis-slide{
  flex: 0 0 auto;
}

/* ==== CARTES ==== */
.avis-google{
  background-color: var(--avis-card);
  border-radius: 16px;
  box-shadow: var(--avis-shadow);
  border: 1px solid var(--avis-border);
  width: 280px;
  padding: 16px;
  text-align: left;
  font-family: Arial, sans-serif;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.avis-google:hover{
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(0,0,0,0.12);
  border-color: rgba(0,0,0,0.12);
}

.avis-header{
  display: flex;
  align-items: center;
  gap: 10px;
}

.pp{
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0,0,0,0.06);
}

.avis-info{
  flex: 1;
  min-width: 0;
}

.nom-client{
  font-weight: 800;
  color: #111827;
  margin: 0;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.date-avis{
  font-size: 0.9em;
  color: var(--avis-muted);
  margin: 2px 0 0;
}

.logo-google{
  width: 18px;
  height: 18px;
  opacity: 0.95;
}

/* note / étoiles dans la carte */
.avis-note{
  display: flex;
  align-items: center;
  margin: 12px 0 10px;
  gap: 6px;
}

.etoiles{
  height: 18px;
}

.verifie{
  height: 18px;
  opacity: 0.95;
}

/* commentaire */
.commentaire-client{
  color: #374151;
  font-size: 0.95em;
  line-height: 1.45em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==== FLÈCHES ==== */
.avis-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--avis-vert);
  color: #fff;
  border: none;
  width: 54px;
  height: 54px;
  font-size: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  box-shadow: 0 10px 22px rgba(0,0,0,0.22);
  z-index: 20;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.avis-arrow-left{ left: -10px; }
.avis-arrow-right{ right: -10px; }

.avis-arrow:hover{
  background-color: #295c31;
  transform: translateY(-50%) scale(1.06);
  box-shadow: 0 14px 28px rgba(0,0,0,0.26);
}

.alert-avis_success {
    background-color: #d4edda;
    color: #155724;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.alert-avis_error {
    background-color: #f8d7da;
    color: #842029;
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid #f5c2c7;
    margin-bottom: 15px;
    font-size: 0.95rem;
    text-align: center;
}

@media (max-width: 980px){
  .avis-arrow-left{ left: 6px; }
  .avis-arrow-right{ right: 6px; }
}

/* ==== BOUTON “LAISSER UN AVIS” ==== */
.avis-leave-review{
  margin-top: 20px;
}

#btn-laisser-avis{
  background: var(--avis-vert);
  color: #fff;
  border: 1px solid transparent;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(47,111,58,0.25);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

#btn-laisser-avis:hover{
  background: #295c31;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(47,111,58,0.30);
}

/* ==== MODALS ==== */
.avis-modal-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 18px;
}

.avis-modal{
  background: #fff;
  padding: 22px;
  border-radius: 14px;
  max-width: 520px;
  width: min(520px, 100%);
  position: relative;
  text-align: left;
  box-shadow: 0 22px 60px rgba(0,0,0,0.25);
  border: 1px solid rgba(0,0,0,0.08);
}

.avis-modal-close{
  position: absolute;
  top: 8px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 26px;
  cursor: pointer;
  line-height: 1;
  color: #111827;
  opacity: 0.75;
}

.avis-modal-close:hover{ opacity: 1; }

.avis-modal .form-group{ margin-bottom: 14px; }

.avis-modal label{
  display: block;
  margin-bottom: 6px;
  font-weight: 800;
  color: #111827;
}

.avis-modal textarea,
.avis-modal select{
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.18);
  padding: 10px 12px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.avis-modal textarea:focus,
.avis-modal select:focus{
  border-color: rgba(47,111,58,0.6);
  box-shadow: 0 0 0 4px rgba(47,111,58,0.12);
}

.avis-modal form button,
#btn-go-login,
#submit-avis-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 18px auto 0;
  padding: 12px 16px;
  border-radius: 999px;
  border: none;
  background: var(--avis-vert);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  width: 100%;
}
