@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Variables ────────────────────────────────────── */
:root {
  --cream:       #f7f3ee;
  --navy:        #1a2035;
  --navy-light:  #2e3a55;
  --gold:        #c9a84c;
  --gold-light:  #e8cc7a;
  --text-muted:  #7a7e8a;
  --card-bg:     #ffffff;
  --shadow:      0 8px 40px rgba(26, 32, 53, 0.10);
  --radius:      16px;
  --transition:  0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Section ──────────────────────────────────────── */
.reviews-section {
  background-color: var(--cream);
  margin-top: 50px;
  padding: 80px 24px;
  font-family: 'DM Sans', sans-serif;
  overflow: hidden;
}

/* ── Header ───────────────────────────────────────── */
.reviews-header {
  text-align: center;
  margin-bottom: 56px;
}

.reviews-header__caption {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.reviews-header__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--navy);
  font-weight: 400;
  margin: 0 0 20px;
  line-height: 1.2;
}

/* Barre de score global */
.reviews-global {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 40px;
  padding: 10px 24px;
  box-shadow: var(--shadow);
}

.reviews-global__score {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--navy);
  font-weight: 600;
}

.reviews-global__stars {
  display: flex;
  gap: 3px;
}

.reviews-global__stars svg {
  width: 16px;
  height: 16px;
}

.reviews-global__count {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 300;
}

/* ── Carousel wrapper ─────────────────────────────── */
.reviews-carousel {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.reviews-track-wrapper {
  overflow: hidden;
}

.reviews-track {
  display: flex;
  transition: transform var(--transition);
  will-change: transform;
}

/* ── Card ─────────────────────────────────────────── */
.review-card {
  flex: 0 0 100%;
  padding: 0 12px;
  box-sizing: border-box;
}

.review-card__inner {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 40px 48px;
  box-shadow: var(--shadow);
  position: relative;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Guillemet décoratif */
.review-card__inner::before {
  content: '\201C';
  font-family: 'Playfair Display', serif;
  font-size: 8rem;
  line-height: 1;
  color: var(--gold-light);
  opacity: 0.25;
  position: absolute;
  top: 8px;
  left: 32px;
  pointer-events: none;
}

.review-card__stars {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
}

.review-card__stars svg {
  width: 18px;
  height: 18px;
}

.review-card__text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--navy-light);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.review-card__footer {
  display: flex;
  align-items: center;
  gap: 14px;
}

.review-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-light);
}

.review-card__avatar--fallback {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
  font-weight: 500;
  flex-shrink: 0;
  border: 2px solid var(--gold-light);
}

.review-card__meta {
  display: flex;
  flex-direction: column;
}

.review-card__author {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--navy);
}

.review-card__date {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 300;
  margin-top: 2px;
}

/* ── Navigation ───────────────────────────────────── */
.reviews-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 36px;
}

.reviews-nav__btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(26, 32, 53, 0.2);
  background: var(--card-bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  color: var(--navy);
}

.reviews-nav__btn:hover {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
  transform: scale(1.08);
}

.reviews-nav__btn svg {
  width: 18px;
  height: 18px;
}

/* Dots */
.reviews-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.reviews-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(26, 32, 53, 0.2);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  padding: 0;
}

.reviews-dot.is-active {
  background: var(--gold);
  transform: scale(1.3);
}

/* ── Google badge ─────────────────────────────────── */
.reviews-badge {
  text-align: center;
  margin-top: 32px;
}

.reviews-badge a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.reviews-badge a:hover {
  color: var(--navy);
}

/* ── État erreur / loading ────────────────────────── */
.reviews-loading,
.reviews-error {
  text-align: center;
  padding: 60px 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 600px) {
  .reviews-section {
    padding: 56px 16px;
  }

  .review-card__inner {
    padding: 32px 24px;
    min-height: auto;
  }

  .review-card__inner::before {
    font-size: 5rem;
    left: 16px;
  }
}

/* Module avis page produit */
.product-reviews-section {
  max-width: 1180px;
  margin: 34px auto 28px;
  padding: 26px 18px 30px;
  border-top: 1px solid rgba(26, 32, 53, 0.10);
  border-bottom: 1px solid rgba(26, 32, 53, 0.10);
  font-family: 'DM Sans', sans-serif;
}

.product-reviews-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.product-reviews-caption {
  display: block;
  margin-bottom: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.product-reviews-title {
  margin: 0;
  color: var(--navy);
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 600;
}

.product-reviews-global {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 9px;
  padding: 8px 14px;
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 999px;
  background: #fff;
}

.product-reviews-score {
  color: var(--navy);
  font-size: 1.15rem;
  font-weight: 700;
}

.product-reviews-stars,
.product-review-card__stars {
  display: flex;
  gap: 3px;
}

.product-reviews-stars svg,
.product-review-card__stars svg {
  width: 15px;
  height: 15px;
}

.product-reviews-count {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.product-reviews-carousel {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
}

.product-reviews-viewport {
  overflow: hidden;
}

.product-reviews-track {
  display: flex;
  gap: 16px;
  transition: transform var(--transition);
  will-change: transform;
}

.product-review-card {
  flex: 0 0 calc((100% - 32px) / 3);
  min-width: 0;
}

.product-review-card__inner {
  height: 100%;
  min-height: 188px;
  padding: 20px;
  border: 1px solid rgba(26, 32, 53, 0.08);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(26, 32, 53, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-review-card__text {
  margin: 14px 0 18px;
  color: var(--navy-light);
  font-size: 0.92rem;
  line-height: 1.55;
}

.product-review-card__footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-review-card__avatar,
.product-review-card__avatar--fallback {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
}

.product-review-card__avatar {
  object-fit: cover;
}

.product-review-card__avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.product-review-card__meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.product-review-card__author {
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-review-card__date {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.product-reviews-btn {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(26, 32, 53, 0.16);
  border-radius: 50%;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.product-reviews-btn:hover {
  background: var(--navy);
  color: #fff;
}

.product-reviews-btn svg {
  width: 17px;
  height: 17px;
}

.product-reviews-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
}

.product-reviews-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(26, 32, 53, 0.20);
  cursor: pointer;
}

.product-reviews-dot.is-active {
  background: var(--gold);
}

.product-reviews-loading,
.product-reviews-error {
  margin: 0;
  padding: 24px 0;
  text-align: center;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .product-review-card {
    flex-basis: calc((100% - 16px) / 2);
  }
}

@media (max-width: 640px) {
  .product-reviews-section {
    padding-right: 12px;
    padding-left: 12px;
  }

  .product-reviews-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-reviews-carousel {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 8px;
  }

  .product-review-card {
    flex-basis: 100%;
  }

  .product-reviews-btn {
    width: 36px;
    height: 36px;
  }
}

/* Theme review tech */
:root {
  --review-bg: #f5f8fc;
  --review-surface: #ffffff;
  --review-surface-soft: #edf8f2;
  --review-border: #cfe7db;
  --review-text: #111827;
  --review-text-soft: #4b5563;
  --review-muted: #6b7280;
  --review-blue: #14804a;
  --review-blue-dark: #0f6b3d;
  --review-yellow: #ffd400;
  --review-shadow: 0 14px 34px rgba(15, 81, 55, 0.10);
}

.reviews-section {
  background:
    linear-gradient(180deg, #ffffff 0%, #f2faf5 100%);
  margin-top: 42px;
  padding: 64px 24px;
  font-family: 'DM Sans', Arial, sans-serif;
}

.reviews-header {
  margin-bottom: 34px;
}

.reviews-header__caption,
.product-reviews-caption {
  color: var(--review-blue);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.reviews-header__title {
  font-family: 'DM Sans', Arial, sans-serif;
  color: var(--review-text);
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  font-weight: 800;
  letter-spacing: 0;
}

.reviews-global,
.product-reviews-global {
  border: 1px solid var(--review-border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.reviews-global__score,
.product-reviews-score {
  font-family: 'DM Sans', Arial, sans-serif;
  color: var(--review-text);
  font-weight: 800;
}

.reviews-global__count,
.product-reviews-count,
.review-card__date,
.product-review-card__date {
  color: var(--review-muted);
  font-weight: 500;
}

.reviews-carousel {
  max-width: 980px;
}

.reviews-track-wrapper,
.product-reviews-viewport {
  border-radius: 12px;
}

.review-card__inner {
  border: 1px solid var(--review-border);
  border-radius: 12px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: var(--review-shadow);
}

.review-card__inner::before {
  content: '';
}

.review-card__stars,
.product-review-card__stars {
  margin-bottom: 12px;
}

.reviews-global__stars svg,
.review-card__stars svg,
.product-reviews-stars svg,
.product-review-card__stars svg {
  filter: drop-shadow(0 1px 1px rgba(255, 196, 0, 0.25));
}

.review-card__text {
  font-family: 'DM Sans', Arial, sans-serif;
  font-style: normal;
  color: var(--review-text-soft);
  font-size: 1rem;
  line-height: 1.65;
}

.review-card__author,
.product-review-card__author {
  color: var(--review-text);
  font-weight: 800;
  text-decoration: none;
  font-size: inherit;
  line-height: inherit;
  transform: none;
}

.review-card__author:hover,
.product-review-card__author:hover {
  color: var(--review-blue);
  font-size: inherit;
  transform: none;
}

.reviews-global__stars a,
.review-card__stars,
.product-reviews-stars a,
.product-review-card__stars {
  display: inline-flex;
  color: inherit;
  text-decoration: none;
  transform: none;
}

.reviews-global__stars a:hover,
.review-card__stars:hover,
.product-reviews-stars a:hover,
.product-review-card__stars:hover {
  transform: none;
}

.review-card__avatar-link,
.product-review-card__avatar-link {
  display: inline-flex;
  width: max-content;
  height: max-content;
  flex-shrink: 0;
  color: inherit;
  text-decoration: none;
  transform: none;
}

.review-card__avatar-link:hover,
.product-review-card__avatar-link:hover {
  transform: none;
}

.review-card__avatar,
.review-card__avatar--fallback,
.product-review-card__avatar,
.product-review-card__avatar--fallback {
  border: 1px solid var(--review-border);
}

.review-card__avatar--fallback,
.product-review-card__avatar--fallback {
  background: #111827;
}

.reviews-nav__btn,
.product-reviews-btn {
  border: 1px solid var(--review-border);
  background: var(--review-surface);
  color: var(--review-blue);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.reviews-nav__btn:hover,
.product-reviews-btn:hover {
  border-color: var(--review-blue);
  background: var(--review-blue);
  color: #fff;
  transform: translateY(-1px);
}

.reviews-dot,
.product-reviews-dot {
  width: 20px;
  height: 4px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: all var(--transition);
}

.reviews-dot.is-active,
.product-reviews-dot.is-active {
  width: 32px;
  background: var(--review-blue);
  transform: none;
}

.reviews-badge a {
  color: var(--review-muted);
  font-weight: 700;
}

.product-reviews-section {
  max-width: 1600px;
  margin: 34px auto 30px;
  padding: 24px;
  border: 1px solid var(--review-border);
  border-radius: 14px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fcfffe 100%);
  box-shadow: 0 10px 30px rgba(15, 81, 55, 0.07);
  font-family: 'DM Sans', Arial, sans-serif;
}

.product-reviews-header {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--review-border);
}

.product-reviews-title {
  color: var(--review-text);
  font-size: 1.28rem;
  font-weight: 800;
}

.product-reviews-carousel {
  margin-top: 20px;
}

.product-reviews-viewport {
  padding: 2px 2px 18px;
  margin: -2px -2px -18px;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}

.product-reviews-viewport.is-dragging {
  cursor: grabbing;
}

.product-reviews-track {
  gap: 14px;
  align-items: stretch;
  padding: 2px 0 10px;
}

.product-review-card {
  flex-basis: calc((100% - 28px) / 3);
  display: flex;
}

.product-review-card__inner {
  width: 100%;
  min-height: 0;
  height: auto;
  padding: 18px;
  border: 1px solid var(--review-border);
  border-radius: 12px;
  background: var(--review-surface);
  box-shadow: 0 8px 22px rgba(15, 81, 55, 0.08);
}

.product-review-card__text {
  color: var(--review-text-soft);
  font-size: 0.94rem;
  line-height: 1.58;
}

@media (max-width: 900px) {
  .product-review-card {
    flex-basis: calc((100% - 14px) / 2);
  }
}

@media (max-width: 640px) {
  .reviews-section {
    padding: 48px 14px;
  }

  .reviews-global,
  .product-reviews-global {
    flex-wrap: wrap;
    justify-content: center;
  }

  .product-reviews-section {
    margin-right: 10px;
    margin-left: 10px;
    padding: 18px 12px;
  }

  .product-review-card {
    flex-basis: 100%;
  }
}

/* Module principal plus dense */
.reviews-section {
  position: relative;
  padding: 44px 24px 48px;
  background: #f5fbf7;
}

.reviews-section::before {
  content: none;
}

.reviews-header,
.reviews-carousel,
.reviews-badge {
  position: relative;
  z-index: 1;
}

.reviews-header {
  width: min(980px, 100%);
  margin: 0 auto 18px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  text-align: left;
}

.reviews-header__title {
  margin: 0;
  font-size: clamp(1.45rem, 2.2vw, 1.9rem);
}

.reviews-header__caption {
  margin-bottom: 8px;
}

.reviews-global {
  min-width: 0;
  padding: 9px 14px;
  border-radius: 999px;
  display: inline-flex;
  gap: 9px;
  align-items: center;
}

.reviews-global__score {
  grid-row: auto;
  font-size: 1.25rem;
  line-height: 1;
}

.reviews-global__stars {
  align-self: end;
}

.reviews-global__count {
  align-self: start;
}

.review-card__inner {
  min-height: 0;
  padding: 26px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: #ffffff;
}

.review-card__inner::before {
  content: none;
}

.review-card__inner > div:first-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.review-card__text {
  margin: 0;
  font-size: 1rem;
  line-height: 1.58;
}

.review-card__footer {
  align-self: auto;
  padding-left: 0;
  padding-top: 18px;
  border-left: 0;
  border-top: 1px solid var(--review-border);
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
}

.review-card__avatar,
.review-card__avatar--fallback {
  width: 42px;
  height: 42px;
}

.review-card__meta {
  gap: 3px;
}

.review-card__author {
  font-size: 1rem;
}

.review-card__date {
  font-size: 0.82rem;
}

.reviews-nav {
  margin-top: 18px;
}

@media (max-width: 720px) {
  .reviews-header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .reviews-global {
    justify-self: center;
  }

  .review-card__inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .review-card__footer {
    padding-left: 0;
    padding-top: 18px;
    border-left: 0;
    border-top: 1px solid var(--review-border);
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }
}

.review-card__inner {
  grid-template-columns: none;
}
