/* Carrousel d avis de l accueil [exo_avis_carrousel] (2026-11-03).
   Reprend le style du widget Trustindex qu il remplace : carte #191919 arrondie 12 px,
   avatar rond 64 px a cheval sur le haut de la carte, texte blanc centre. */

.exo-carrousel {
  position: relative;
  max-width: 1400px;
  margin: 18px auto 0;
  /* Espace sous la legende : en padding, car le theme remet a zero la marge basse du
     dernier element d un groupe (.is-layout-constrained > :last-child). */
  padding-bottom: 32px;
  --exo-carrousel-gap: 16px;
  --exo-carrousel-visibles: 4;
}
@media (max-width: 1100px) { .exo-carrousel { --exo-carrousel-visibles: 3; } }
@media (max-width: 860px)  { .exo-carrousel { --exo-carrousel-visibles: 2; } }
@media (max-width: 560px)  { .exo-carrousel { --exo-carrousel-visibles: 1; } }
/* Mobile : carte a 82 % comme les cartes produit, le debut de l avis suivant depasse a
   droite et montre qu on peut faire glisser (2026-11-03). */
@media (max-width: 560px) {
  .exo-carrousel .exo-carrousel__carte { flex-basis: 82%; }
}
/* Mobile et tablette : piste quasi bord a bord (5 px), comme les cartes produit. On annule la
   marge generale du contenu (--wp--style--root--padding-*, calculee par le CSS du theme,
   aucun JS : rien ne bouge pendant le defilement). La legende garde sa marge normale. */
/* Aimantation mobile (2026-11-03, demande du proprietaire) : 1re carte collee a gauche,
   cartes du milieu centrees (on voit la precedente et la suivante), derniere collee a droite. */
@media (max-width: 900px) {
  .exo-carrousel .exo-carrousel__carte { scroll-snap-align: center; }
  .exo-carrousel .exo-carrousel__carte:first-child { scroll-snap-align: start; }
  .exo-carrousel .exo-carrousel__carte:last-child { scroll-snap-align: end; }
}
@media (max-width: 900px) {
  .exo-carrousel .exo-carrousel__piste {
    margin-left: calc(-1 * var(--wp--style--root--padding-left, 0px) + 5px);
    margin-right: calc(-1 * var(--wp--style--root--padding-right, 0px) + 5px);
    padding-left: 0;
    padding-right: 0;
  }
}

.exo-carrousel__piste {
  display: flex;
  gap: var(--exo-carrousel-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 34px 2px 4px; /* place pour l avatar qui deborde */
  outline: none;
}
.exo-carrousel__piste::-webkit-scrollbar { display: none; }

.exo-carrousel__carte {
  position: relative;
  flex: 0 0 calc((100% - (var(--exo-carrousel-visibles) - 1) * var(--exo-carrousel-gap)) / var(--exo-carrousel-visibles));
  scroll-snap-align: start;
  display: flex;
  margin: 0;
}

.exo-carrousel__avatar {
  position: absolute;
  top: -32px;
  left: 50%;
  transform: translateX(-50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  color: #fff;
  font-size: 30px;
  font-weight: 500;
  line-height: 64px;
  text-align: center;
  z-index: 1;
}
.exo-carrousel__source {
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 2px #fff;
}

.exo-carrousel__interieur {
  flex: 1;
  background: #191919;
  color: #fff;
  border-radius: 12px;
  padding: 44px 20px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.exo-carrousel__nom {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}
.exo-carrousel__date {
  margin: 2px 0 10px;
  font-size: 13px;
  color: #8a8a8a;
}
.exo-carrousel__note {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 2px;
}
.exo-carrousel__etoile {
  font-size: 19px;
  line-height: 1;
  color: #555;
}
.exo-carrousel__etoile.est-pleine { color: #f6bb06; }
.exo-carrousel__note .exo-avis-coche { margin-left: 6px; vertical-align: 0; }

.exo-carrousel__texte {
  font-size: 15px;
  line-height: 1.45;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.exo-carrousel__texte p { margin: 0; }
.exo-carrousel__texte p + p { margin-top: 4px; }
.exo-carrousel__carte.est-ouverte .exo-carrousel__texte {
  -webkit-line-clamp: unset;
  display: block;
}
.exo-carrousel__suite {
  margin-top: auto;
  padding: 12px 0 0;
  background: none;
  border: 0;
  color: #9a9a9a;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.exo-carrousel__suite:hover { color: #fff; }
.exo-carrousel__suite[hidden] { display: none; }

/* Fleches : meme rond blanc que les carrousels produit du site */
.exo-carrousel__fleche {
  position: absolute;
  top: calc(50% + 15px);
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: #111;
  box-shadow: 0 3px 10px rgba(17, 17, 17, .18);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
}
.exo-carrousel__fleche:hover { background: #f5f5f5; }
.exo-carrousel__fleche[hidden] { display: none; }
.exo-carrousel__fleche--prec { left: -22px; }
.exo-carrousel__fleche--suiv { right: -22px; }
.exo-carrousel__fleche[aria-busy="true"] { opacity: .6; cursor: progress; }
@media (max-width: 860px) {
  .exo-carrousel__fleche { display: none !important; } /* glissement du doigt */
}

.exo-carrousel__legende {
  margin: 14px 0 0;
  font-size: .8rem;
  color: #666;
  text-align: center;
}
.exo-carrousel__legende .exo-avis-coche { margin-right: 4px; }
.exo-carrousel__legende a { color: inherit; text-decoration: underline; }
