/**
 * H2J Reviews - Badge widget CSS (Panther Reviews multi-surface)
 *
 * v1.0.8 Sprint 2 -- Charge globalement (toute page FO) car le badge sticky
 * et le footer ne dependent pas d'un controller specifique. Les autres
 * surfaces (megamenu / checkout / homepage) sont rendues server-side via les
 * hooks H2J et heritent du meme CSS.
 *
 * Scope strict : .h2jrb-* (h2jreviews badge) -- isole du scope .h2jr- de la
 * page /avis-boutique pour eviter toute collision.
 *
 * Palette : noir + or H2J alignee logo Panther Reviews.
 *   --h2jrb-bg-dark    : #1a1a1a (fond bouclier)
 *   --h2jrb-accent     : #c9a55b (or H2J, --cubx-accent)
 *   --h2jrb-text       : #1a1a1a (texte sur fond clair)
 *   --h2jrb-text-light : couleur secondaire sur fond clair
 *
 * @author    H2J Ecosystem <info@2klove.fr>
 * @copyright 2024-2026 H2J sas RCS 978391720
 * @license   Commercial license
 *
 * @version   v1.0.8 (Sprint 2 widget Panther Reviews)
 */

:root {
  --h2jrb-bg-dark:    #1a1a1a;
  --h2jrb-bg-card:    #ffffff;
  --h2jrb-accent:     var(--cubx-accent, #c9a55b);
  --h2jrb-text:       #1a1a1a;
  --h2jrb-text-light: #6b6b6b;
  --h2jrb-text-muted: #9b9b9b;
  --h2jrb-star-full:  #f5a623;
  --h2jrb-star-empty: #e0e0e0;
  --h2jrb-border:     rgba(0, 0, 0, 0.08);
  --h2jrb-shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.08);
  --h2jrb-shadow-md:  0 4px 14px rgba(0, 0, 0, 0.10);
  --h2jrb-shadow-lg:  0 8px 28px rgba(0, 0, 0, 0.14);
}

/* =================================================================== *
 * SHARED -- Stars Material Icons                                      *
 * =================================================================== */
.h2jrb-star {
  font-size: 16px !important;
  line-height: 1;
}
.h2jrb-star--full,
.h2jrb-star--half { color: var(--h2jrb-star-full); }
.h2jrb-star--empty { color: var(--h2jrb-star-empty); }

/* =================================================================== *
 * STICKY BUBBLE -- Bottom-right corner FO (Trustpilot-style)          *
 * =================================================================== */
.h2jrb-sticky {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9998; /* below CUBX flash notif (9999) but above content */
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 12px 12px;
  background: var(--h2jrb-bg-card);
  border: 1px solid var(--h2jrb-border);
  border-radius: 12px;
  box-shadow: var(--h2jrb-shadow-md);
  text-decoration: none;
  color: var(--h2jrb-text);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.3;
  min-width: 220px;
  max-width: 280px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}

.h2jrb-sticky:hover,
.h2jrb-sticky:focus {
  text-decoration: none;
  color: var(--h2jrb-text);
  transform: translateY(-2px);
  box-shadow: var(--h2jrb-shadow-lg);
}

.h2jrb-sticky__logo-wrap {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.h2jrb-sticky__logo {
  max-width: 52px;
  max-height: 52px;
  object-fit: contain;
}

.h2jrb-sticky__logo-fallback {
  font-size: 36px !important;
  color: var(--h2jrb-accent);
}

.h2jrb-sticky__content {
  flex: 1;
  min-width: 0;
}

.h2jrb-sticky__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--h2jrb-text);
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.h2jrb-sticky__stars {
  display: flex;
  gap: 1px;
  margin-bottom: 4px;
}

.h2jrb-sticky__stars .h2jrb-star {
  font-size: 14px !important;
}

.h2jrb-sticky__score {
  font-size: 14px;
  color: var(--h2jrb-text);
  font-weight: 500;
  line-height: 1.2;
}

.h2jrb-sticky__score strong {
  font-size: 18px;
  color: var(--h2jrb-accent);
  font-weight: 700;
}

.h2jrb-sticky__max {
  color: var(--h2jrb-text-light);
  font-size: 13px;
}

.h2jrb-sticky__count {
  font-size: 11px;
  color: var(--h2jrb-text-muted);
  margin-top: 2px;
}

/* Mobile : passe en compact, garde discrete en bottom-right */
@media (max-width: 600px) {
  .h2jrb-sticky {
    bottom: 12px;
    right: 12px;
    padding: 10px 14px 10px 10px;
    min-width: 0;
    max-width: 240px;
    gap: 10px;
  }
  .h2jrb-sticky__logo-wrap {
    width: 40px;
    height: 40px;
  }
  .h2jrb-sticky__logo,
  .h2jrb-sticky__logo-fallback {
    max-width: 40px;
    max-height: 40px;
    font-size: 28px !important;
  }
  .h2jrb-sticky__label {
    font-size: 11px;
  }
  .h2jrb-sticky__score strong {
    font-size: 16px;
  }
}

/* =================================================================== *
 * MEGAMENU -- Mini-card dans drawer sidebar                            *
 * =================================================================== */
.h2jrb-mm {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--h2jrb-bg-card);
  border: 1px solid var(--h2jrb-border);
  border-radius: 8px;
  text-decoration: none;
  color: var(--h2jrb-text);
  font-size: 13px;
  line-height: 1.3;
  margin: 8px 12px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.h2jrb-mm:hover,
.h2jrb-mm:focus {
  background: rgba(201, 165, 91, 0.06);
  border-color: var(--h2jrb-accent);
  text-decoration: none;
  color: var(--h2jrb-text);
}

.h2jrb-mm__logo-wrap {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.h2jrb-mm__logo {
  max-width: 44px;
  max-height: 44px;
  object-fit: contain;
}

.h2jrb-mm__logo-fallback {
  font-size: 32px !important;
  color: var(--h2jrb-accent);
}

.h2jrb-mm__content {
  flex: 1;
  min-width: 0;
}

.h2jrb-mm__stars {
  display: flex;
  gap: 2px;
  margin-bottom: 4px;
}

.h2jrb-mm__stars .h2jrb-star {
  font-size: 15px !important;
}

.h2jrb-mm__score {
  font-size: 12px;
  color: var(--h2jrb-text-light);
  line-height: 1.4;
}

.h2jrb-mm__score strong {
  color: var(--h2jrb-accent);
  font-weight: 700;
  font-size: 15px;
}

/* =================================================================== *
 * CHECKOUT SIDEBAR (v1.0.9) -- colonne droite tunnel /order             *
 * Affiche sous le bouton ORDER dans la card cubx-cart-page__summary-card *
 * Pattern Trustpilot-style compact, sans position:fixed                 *
 * =================================================================== */
.h2jrb-cs {
  display: block;
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--h2jrb-bg-card);
  border: 1px solid var(--h2jrb-border);
  border-radius: 12px;
  box-shadow: var(--h2jrb-shadow-sm);
  text-decoration: none;
  color: var(--h2jrb-text);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.3;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.h2jrb-cs:hover,
.h2jrb-cs:focus {
  text-decoration: none;
  color: var(--h2jrb-text);
  transform: translateY(-1px);
  box-shadow: var(--h2jrb-shadow-md);
  border-color: var(--h2jrb-accent);
}

.h2jrb-cs__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.h2jrb-cs__logo-wrap {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.h2jrb-cs__logo {
  max-width: 48px;
  max-height: 48px;
  object-fit: contain;
}

.h2jrb-cs__logo-fallback {
  font-size: 36px !important;
  color: var(--h2jrb-accent);
}

.h2jrb-cs__label-wrap {
  flex: 1;
  min-width: 0;
}

.h2jrb-cs__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--h2jrb-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.h2jrb-cs__stars {
  display: flex;
  gap: 2px;
}

.h2jrb-cs__stars .h2jrb-star {
  font-size: 16px !important;
}

.h2jrb-cs__bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--h2jrb-border);
}

.h2jrb-cs__score {
  font-size: 14px;
  color: var(--h2jrb-text-light);
  font-weight: 500;
  line-height: 1.1;
}

.h2jrb-cs__score strong {
  font-size: 22px;
  color: var(--h2jrb-accent);
  font-weight: 700;
  margin-right: 2px;
}

.h2jrb-cs__max {
  color: var(--h2jrb-text-light);
  font-size: 13px;
}

.h2jrb-cs__count {
  font-size: 11px;
  color: var(--h2jrb-text-muted);
  text-align: right;
  flex-shrink: 0;
}

/* =================================================================== *
 * CHECKOUT -- Bloc reassurance dans tunnel /order                      *
 * (legacy v1.0.8 -- pour hook PS displayReassurance si utilise un jour) *
 * =================================================================== */
.h2jrb-co {
  margin: 8px 0;
}

.h2jrb-co__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--h2jrb-bg-card);
  border: 1px solid var(--h2jrb-border);
  border-radius: 8px;
  box-shadow: var(--h2jrb-shadow-sm);
}

.h2jrb-co__logo-wrap {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.h2jrb-co__logo {
  max-width: 48px;
  max-height: 48px;
  object-fit: contain;
}

.h2jrb-co__logo-fallback {
  font-size: 32px !important;
  color: var(--h2jrb-accent);
}

.h2jrb-co__content {
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}

.h2jrb-co__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--h2jrb-text);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}

.h2jrb-co__stars {
  display: flex;
  gap: 1px;
  margin-bottom: 4px;
}

.h2jrb-co__score {
  font-size: 13px;
  color: var(--h2jrb-text-light);
}

.h2jrb-co__score strong {
  color: var(--h2jrb-accent);
  font-size: 15px;
  font-weight: 700;
}

.h2jrb-co__score a {
  color: var(--h2jrb-text-light);
  text-decoration: underline;
}

.h2jrb-co__score a:hover {
  color: var(--h2jrb-accent);
}

/* =================================================================== *
 * FOOTER -- Ligne sobre                                                *
 * =================================================================== */
.h2jrb-footer {
  display: flex;
  justify-content: center;
  padding: 12px 0;
}

.h2jrb-footer__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--h2jrb-border);
  background: var(--h2jrb-bg-card);
  color: var(--h2jrb-text);
  font-size: 13px;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.h2jrb-footer__link:hover,
.h2jrb-footer__link:focus {
  border-color: var(--h2jrb-accent);
  color: var(--h2jrb-text);
  text-decoration: none;
}

.h2jrb-footer__stars {
  display: inline-flex;
  gap: 1px;
}

.h2jrb-footer__score strong {
  color: var(--h2jrb-accent);
  font-weight: 700;
}

.h2jrb-footer__count {
  color: var(--h2jrb-text-light);
  font-size: 12px;
}

/* =================================================================== *
 * HOMEPAGE -- Card large                                               *
 * =================================================================== */
.h2jrb-home {
  margin: 24px auto;
  max-width: 720px;
  padding: 0 16px;
}

.h2jrb-home__card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px 28px;
  background: linear-gradient(135deg, #fbf8f3 0%, #ffffff 100%);
  border: 1px solid var(--h2jrb-border);
  border-radius: 16px;
  box-shadow: var(--h2jrb-shadow-md);
  text-decoration: none;
  color: var(--h2jrb-text);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.h2jrb-home__card:hover,
.h2jrb-home__card:focus {
  text-decoration: none;
  color: var(--h2jrb-text);
  transform: translateY(-2px);
  box-shadow: var(--h2jrb-shadow-lg);
}

.h2jrb-home__logo-wrap {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.h2jrb-home__logo {
  max-width: 90px;
  max-height: 90px;
  object-fit: contain;
}

.h2jrb-home__logo-fallback {
  font-size: 60px !important;
  color: var(--h2jrb-accent);
}

.h2jrb-home__content {
  flex: 1;
  min-width: 0;
}

.h2jrb-home__label {
  font-size: 16px;
  font-weight: 700;
  color: var(--h2jrb-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.h2jrb-home__stars {
  display: flex;
  gap: 2px;
  margin-bottom: 8px;
}

.h2jrb-home__stars .h2jrb-star {
  font-size: 22px !important;
}

.h2jrb-home__score {
  font-size: 24px;
  color: var(--h2jrb-text);
  margin-bottom: 4px;
}

.h2jrb-home__score strong {
  color: var(--h2jrb-accent);
  font-size: 36px;
  font-weight: 700;
  margin-right: 4px;
}

.h2jrb-home__count {
  font-size: 13px;
  color: var(--h2jrb-text-light);
}

.h2jrb-home__count strong {
  color: var(--h2jrb-text);
  font-weight: 600;
}

@media (max-width: 600px) {
  .h2jrb-home__card {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    padding: 20px 16px;
  }
  .h2jrb-home__stars {
    justify-content: center;
  }
}
