.rsgr-widget {
  --rsgr-bg: #131313;
  --rsgr-panel: #191919;
  --rsgr-panel-2: #202020;
  --rsgr-text: #f7f7f7;
  --rsgr-muted: #c3c3c3;
  --rsgr-border: rgba(255, 255, 255, 0.11);
  --rsgr-accent: #d6003b;
  --rsgr-star: #FFD400;
  --rsgr-radius: 5px;
  width: 100%;
  min-width: 0;
  padding: clamp(22px, 3.4vw, 38px);
  box-sizing: border-box;
  border: 0;
  border-radius: var(--rsgr-radius);
  background: var(--rsgr-bg);
  color: var(--rsgr-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.rsgr-widget *, .rsgr-widget *::before, .rsgr-widget *::after { box-sizing: border-box; }
.rsgr-widget [hidden] { display: none !important; }
.rsgr-sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.rsgr-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 190px);
  gap: 12px 26px;
  align-items: center;
  margin-bottom: 22px;
}

.rsgr-heading { min-width: 0; max-width: 820px; }
.rsgr-heading h3 { margin: 0; color: var(--rsgr-text); font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: 0; }
.rsgr-summary { max-width: 780px; margin: 8px 0 0; color: var(--rsgr-muted); font-size: 0.94rem; line-height: 1.58; }

.rsgr-google-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  align-self: stretch;
  min-width: 0;
  padding-left: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
}
.rsgr-google-brand-label { margin-bottom: 4px; color: var(--rsgr-muted); font-size: 0.7rem; font-weight: 600; }
.rsgr-google-brand img { display: block; width: 118px; max-width: 100%; height: auto; }

.rsgr-trust-summary {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px 12px;
  align-items: center;
  margin-top: 3px;
  color: var(--rsgr-muted);
  font-size: 0.84rem;
}
.rsgr-trust-stars, .rsgr-stars { color: var(--rsgr-star); letter-spacing: 0.04em; white-space: nowrap; }
.rsgr-trust-stars { font-size: 1rem; }
.rsgr-trust-score { color: var(--rsgr-text); font-weight: 700; }

.rsgr-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.rsgr-filter, .rsgr-load-more {
  appearance: none;
  border: 1px solid var(--rsgr-border);
  border-radius: var(--rsgr-radius);
  background: var(--rsgr-panel);
  color: var(--rsgr-text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 150ms ease;
}
.rsgr-filter { padding: 9px 13px; font-size: 0.84rem; }
.rsgr-filter:hover, .rsgr-load-more:hover { border-color: transparent; background: rgba(214, 0, 59, 0.12); }
.rsgr-filter[aria-pressed="true"] { border-color: var(--rsgr-accent); background: var(--rsgr-accent); color: #fff; }
.rsgr-filter:focus-visible, .rsgr-load-more:focus-visible, .rsgr-read-more:focus-visible, .rsgr-review a:focus-visible {
  outline: 3px solid #ff5b87;
  outline-offset: 3px;
}

.rsgr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.rsgr-review {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 220px;
  padding: 17px;
  overflow-wrap: anywhere;
  border: 1px solid var(--rsgr-border);
  border-radius: var(--rsgr-radius);
  background: linear-gradient(180deg, var(--rsgr-panel) 0%, #171717 100%);
}
.rsgr-review.is-featured { border-color: rgba(214, 0, 59, 0.62); box-shadow: inset 0 2px 0 var(--rsgr-accent); }
.rsgr-review-top { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 11px; align-items: start; }
.rsgr-avatar { display: grid; place-items: center; width: 42px; height: 42px; overflow: hidden; border: 1px solid var(--rsgr-border); border-radius: 50%; background: var(--rsgr-panel-2); color: #fff; font-size: 0.74rem; font-weight: 700; }
.rsgr-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rsgr-author { display: block; margin: 0; color: #fff; font-size: 0.94rem; font-weight: 700; line-height: 1.3; }
.rsgr-review-meta { display: flex; flex-wrap: wrap; gap: 6px 9px; align-items: center; margin-top: 4px; color: var(--rsgr-muted); font-size: 0.73rem; }
.rsgr-featured-badge { padding: 4px 7px; border-radius: var(--rsgr-radius); background: rgba(214, 0, 59, 0.12); color: #ff8fac; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }

.rsgr-review-body { margin: 15px 0 0; }
.rsgr-review-text { margin: 0; color: #e8e8e8; font-size: 0.92rem; line-height: 1.66; white-space: normal; }
.rsgr-review-text > p { margin: 0; white-space: pre-line; }
.rsgr-translation-block + .rsgr-original-block { margin-top: 13px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
.rsgr-text-label { display: inline-block; margin-bottom: 5px; color: #cfcfcf; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.01em; }
.rsgr-read-more {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-top: 10px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--rsgr-radius);
  background: #202020;
  color: #f2f2f2;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease, color 150ms ease;
}
.rsgr-read-more:hover {
  border-color: rgba(214, 0, 59, 0.72);
  background: #242424;
  color: #fff;
}

.rsgr-media { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.rsgr-media-item { position: relative; display: block; flex: 0 0 92px; width: 92px; height: 70px; overflow: hidden; margin: 0; border: 1px solid var(--rsgr-border); border-radius: var(--rsgr-radius); background: var(--rsgr-panel-2); text-decoration: none; }
.rsgr-media-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.rsgr-media-play { position: absolute; inset: 50% auto auto 50%; display: grid; place-items: center; width: 30px; height: 30px; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(19, 19, 19, 0.86); color: #fff; font-size: 0.72rem; }

.rsgr-reply { margin-top: 14px; padding: 11px; border-left: 2px solid var(--rsgr-accent); border-radius: 0 var(--rsgr-radius) var(--rsgr-radius) 0; background: var(--rsgr-panel-2); color: #d0d0d0; font-size: 0.84rem; line-height: 1.62; }
.rsgr-reply > strong { color: #f2f2f2; }
.rsgr-reply p { margin: 6px 0 0; white-space: pre-line; }
.rsgr-reply-more { margin-top: 7px; }
.rsgr-review-source { margin-top: auto; padding-top: 14px; color: #c7c7c7; font-size: 0.73rem; }
.rsgr-review-source a { color: inherit; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.48); text-underline-offset: 3px; }
.rsgr-review-source a:hover { color: #fff; text-decoration-color: var(--rsgr-accent); }

.rsgr-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.rsgr-load-more { min-width: 180px; padding: 10px 17px; }

.rsgr-trust-footer { display: flex; gap: 9px; align-items: flex-start; margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.08); color: #c3c3c3; font-size: 0.75rem; }
.rsgr-trust-footer-icon { display: grid; place-items: center; flex: 0 0 20px; width: 20px; height: 20px; border: 1px solid rgba(214, 0, 59, 0.55); border-radius: 50%; color: var(--rsgr-accent); font-size: 0.68rem; font-weight: 800; line-height: 1; }
.rsgr-trust-footer p { margin: 0; line-height: 1.55; }
.rsgr-trust-footer strong { display: block; margin-bottom: 2px; color: var(--rsgr-text); font-weight: 700; }

.rsgr-layout-compact .rsgr-grid { grid-template-columns: 1fr; }
.rsgr-layout-compact .rsgr-review { min-height: 0; }

@media (max-width: 980px) {
  .rsgr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .rsgr-widget { padding: 20px 16px; }
  .rsgr-header { grid-template-columns: 1fr; gap: 12px; align-items: start; }
  .rsgr-google-brand { align-items: flex-start; align-self: auto; padding: 11px 0 0; border-left: 0; border-top: 1px solid var(--rsgr-border); }
  .rsgr-google-brand img { width: 106px; }
  .rsgr-trust-summary { grid-column: 1; margin-top: 0; }
  .rsgr-grid { grid-template-columns: 1fr; }
  .rsgr-review { min-height: 0; }
  .rsgr-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rsgr-filter { width: 100%; min-width: 0; text-align: center; white-space: normal; }
  .rsgr-filter[data-rsgr-filter="all"] { grid-column: 1 / -1; }
}

@media (max-width: 420px) {
  .rsgr-heading h3 { font-size: 16px; }
  .rsgr-summary { font-size: 0.9rem; }
  .rsgr-media-item { flex-basis: 88px; width: 88px; height: 67px; }
}

@media (prefers-reduced-motion: reduce) {
  .rsgr-filter, .rsgr-load-more, .rsgr-read-more { transition: none; }
}


/* Modale média Reponse Studio — amélioration progressive.
   Sans JavaScript, les liens média conservent leur href normal. */
.rsgr-lightbox {
  width: min(1100px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--rsgr-radius);
  background: #131313;
  color: var(--rsgr-text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.rsgr-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.rsgr-lightbox-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100vh - 32px);
}

.rsgr-lightbox-header {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: #171717;
}

.rsgr-lightbox-header strong {
  color: #f7f7f7;
  font-size: 0.82rem;
  font-weight: 700;
}

.rsgr-widget .rsgr-lightbox .rsgr-lightbox-close {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-grid !important;
  place-items: center !important;
  flex: 0 0 34px !important;
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 4px !important;
  background: #D6003B !important;
  color: #ffffff !important;
  box-shadow: none !important;
  text-shadow: none !important;
  cursor: pointer !important;
  line-height: 1 !important;
  transform: none !important;
  transition: background-color 150ms ease !important;
}

.rsgr-widget .rsgr-lightbox .rsgr-lightbox-close svg {
  display: block;
  width: 18px;
  height: 18px;
  pointer-events: none;
}

.rsgr-widget .rsgr-lightbox .rsgr-lightbox-close:hover {
  background: #b50031 !important;
  border: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

.rsgr-widget .rsgr-lightbox .rsgr-lightbox-close:focus {
  outline: none;
}

.rsgr-widget .rsgr-lightbox .rsgr-lightbox-close:focus-visible {
  outline: 2px solid #ffffff !important;
  outline-offset: 2px !important;
  box-shadow: none !important;
}

.rsgr-widget .rsgr-lightbox:focus {
  outline: none;
}

.rsgr-lightbox-stage {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 16px;
  overflow: auto;
  background: #0f0f0f;
}

.rsgr-lightbox-stage img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 110px);
  width: auto;
  height: auto;
  object-fit: contain;
}

@media (max-width: 700px) {
  .rsgr-lightbox {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  .rsgr-lightbox-panel {
    max-height: calc(100vh - 20px);
  }

  .rsgr-lightbox-stage {
    padding: 10px;
  }
}


.rsgr-show-less {
  background: transparent;
}

@media (max-width: 420px) {
  .rsgr-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .rsgr-actions .rsgr-load-more {
    width: 100%;
  }
}
