/* ===== Section avis : V4 pile de cartes ===== */
.avis {
  position: relative;
  overflow: hidden;           /* la carte éjectée sort à droite : pas de scroll horizontal */
  isolation: isolate;
  background: var(--color-ink);
  color: #fff;
}

/* Canvas des lumières + halo cyan */
.avis__sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}
.avis::before {
  content: "";
  position: absolute;
  top: -20%;
  left: 50%;
  width: 900px;
  height: 600px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(32, 181, 242, 0.10), rgba(32, 181, 242, 0));
  z-index: -1;
  pointer-events: none;
}

/* Mise en page */
.avis__inner {
  box-sizing: border-box;
  max-width: 1440px;
  margin: 0 auto;
  padding: var(--section-pad-y) var(--section-pad-x);
  display: grid;
  gap: 48px;
}
@media (min-width: 1100px) {
  .avis__inner {
    grid-template-columns: 440px minmax(0, 1fr);
    gap: 96px;
    align-items: center;
    padding-block: 96px;
  }
  .avis__deck-wrap { justify-self: center; }
}

/* Colonne intro : .eyebrow/.eyebrow--onink et .section__title existants réutilisés dans le HTML */
.avis__intro { display: flex; flex-direction: column; gap: 22px; }
.avis__lead { margin: 0; font-size: 18px; line-height: 1.6; color: var(--color-muted-dark); }

.avis__score { display: flex; align-items: center; gap: 18px; }
.avis__note {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(48px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -1px;
}
.avis__score-meta { display: flex; flex-direction: column; gap: 6px; }
.avis__count { font-size: 15px; color: var(--color-muted-dark); }

.avis__stars { display: flex; gap: 3px; }
.avis__stars svg { width: 20px; height: 20px; fill: var(--color-cyan); }

.avis__actions { display: flex; flex-direction: column; gap: 12px; }
.avis__btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 26px;
  font-family: var(--font-text);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.avis__btn--primary { background: var(--color-cyan); color: var(--color-ink); }
.avis__btn--primary:hover { background: var(--color-cyan-hover); color: var(--color-ink); }
.avis__btn--ghost { border: 2px solid rgba(255, 255, 255, 0.8); color: #fff; }
.avis__btn--ghost:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* Pile de cartes : toutes les cartes dans la même cellule de grille,
   la pile prend la hauteur de la carte la plus haute */
.avis__deck-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 64px;
  width: min(680px, 100%);
}
.avis__deck {
  display: grid;
  width: 100%;
  touch-action: pan-y;        /* swipe horizontal géré en JS, scroll vertical conservé */
  outline: none;
}
.avis__deck:focus-visible { outline: 3px solid var(--color-cyan); outline-offset: 8px; }

.avis__card {
  grid-area: 1 / 1;
  margin: 0;
  box-sizing: border-box;
  min-height: clamp(340px, 40vw, 420px);
  padding: clamp(24px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: #0A1424;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
  user-select: none;
  transition: transform .65s cubic-bezier(.2, .7, .2, 1), opacity .5s ease;
}
.avis__card[data-pos="0"]      { transform: none; opacity: 1; z-index: 10; }
.avis__card[data-pos="1"]      { transform: translateY(20px) rotate(-2.5deg) scale(.95); opacity: 1; z-index: 9; }
.avis__card[data-pos="2"]      { transform: translateY(40px) rotate(2deg) scale(.9); opacity: .85; z-index: 8; }
.avis__card[data-pos="out"]    { transform: translate(125%, -30px) rotate(14deg); opacity: 0; z-index: 11; pointer-events: none; }
.avis__card[data-pos="hidden"] { transform: translateY(60px) scale(.85); opacity: 0; z-index: 1; pointer-events: none; }

.avis__card-head { display: flex; align-items: center; justify-content: space-between; }
.avis__quote { width: clamp(36px, 4vw, 48px); height: auto; fill: var(--color-cyan); }
.avis__text {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.3;
  color: #fff;
}
.avis__author { margin-top: auto; display: flex; align-items: center; gap: 14px; }
.avis__avatar {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-navy-deep);
  color: var(--color-cyan);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 16px;
}
.avis__who { display: flex; flex-direction: column; gap: 2px; }
.avis__name { font-weight: 600; font-size: 16px; color: #fff; }
.avis__source { font-size: 14px; color: var(--color-muted-dark); }

/* Contrôles */
.avis__controls { display: flex; align-items: center; gap: 14px; }
.avis__nav {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.8);
  color: #fff;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.avis__nav:hover { background: var(--color-cyan); border-color: var(--color-cyan); color: var(--color-ink); }
.avis__counter {
  padding-left: 8px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: #fff;
}

.avis__btn:focus-visible,
.avis__nav:focus-visible { outline: 3px solid var(--color-cyan); outline-offset: 3px; }

@media (max-width: 1099px) {
  .avis__deck-wrap { gap: 56px; }
}

@media (max-width: 720px) {
  /* Le swipe remplace les flèches sur mobile ; le compteur suffit à indiquer qu'on peut défiler */
  .avis__nav { display: none; }
  .avis__counter { padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .avis__card { transition: none; }
}
