/* =====================================================================
   Widget slider d'avis (clé en main). Fonctionnel d'origine, thémable :
   surcharger les variables --rw-* sur .rw pour coller à la maquette.
   ex :  .rw { --rw-cols: 4; --rw-accent: #c0392b; --rw-card-radius: 8px; }
   ===================================================================== */
.rw {
    --rw-cols: 3;                 /* cartes visibles (desktop) */
    --rw-gap: 20px;
    --rw-card-bg: #ffffff;
    --rw-card-radius: 16px;
    --rw-card-pad: 24px;
    --rw-text: #3a4150;
    --rw-ink: #14181f;
    --rw-muted: #828a99;
    --rw-star: #f5b50a;
    --rw-star-off: #d7dbe3;
    --rw-accent: #16202e;
    --rw-shadow: 0 1px 2px rgba(20, 24, 31, .04), 0 12px 30px -18px rgba(20, 24, 31, .26);
    --rw-maxw: 1200px;
    --rw-clamp: 6;                /* lignes de texte avant troncature */

    max-width: var(--rw-maxw);
    margin-inline: auto;
    font-family: inherit;
    color: var(--rw-text);
}
.rw *, .rw *::before, .rw *::after { box-sizing: border-box; }

.rw-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 22px; }
.rw-title { margin: 0; font-size: 1.5rem; font-weight: 800; color: var(--rw-ink); }
.rw-agg { display: flex; align-items: center; gap: 8px; }
a.rw-agg { color: inherit; text-decoration: none; cursor: pointer; transition: opacity .15s ease; }
a.rw-agg:hover { opacity: .72; }
a.rw-agg:hover .rw-count { text-decoration: underline; }
.rw-score { font-size: 1.5rem; font-weight: 800; color: var(--rw-ink); line-height: 1; }
.rw-agg .rw-stars { font-size: 1.05rem; }
.rw-count { color: var(--rw-muted); font-size: .9rem; }

.rw-stars { display: inline-flex; gap: 2px; line-height: 1; white-space: nowrap; }
.rw-star { color: var(--rw-star-off); }
.rw-star.on { color: var(--rw-star); }

/* Piste scrollable (snap natif = swipe tactile fluide) */
.rw-viewport { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.rw-viewport::-webkit-scrollbar { display: none; }
/* padding genereux : evite que l'ombre des cartes soit rognee par l'overflow du carrousel */
.rw-track { display: flex; gap: var(--rw-gap); margin: 0; padding: 12px 10px 32px; list-style: none; }
.rw-slide { flex: 0 0 calc((100% - (var(--rw-cols) - 1) * var(--rw-gap)) / var(--rw-cols)); scroll-snap-align: start; }

.rw-card { height: 100%; background: var(--rw-card-bg); border-radius: var(--rw-card-radius); padding: var(--rw-card-pad); box-shadow: var(--rw-shadow); display: flex; flex-direction: column; gap: 13px; }
.rw-text { margin: 0; color: var(--rw-text); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: var(--rw-clamp); -webkit-box-orient: vertical; overflow: hidden; }
.rw-meta { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.rw-avatar { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; object-fit: cover; }
.rw-avatar-txt { display: grid; place-items: center; font-weight: 700; font-size: .95rem; color: var(--rw-accent); background: color-mix(in srgb, var(--rw-accent) 12%, #fff); }
.rw-id { display: flex; flex-direction: column; min-width: 0; }
.rw-author { font-weight: 700; color: var(--rw-ink); }
.rw-date { color: var(--rw-muted); font-size: .82rem; }
/* Logo Google (fichier dans /images/google-g.svg ; retire proprement si absent) */
.rw-glogo { width: 22px; height: 22px; object-fit: contain; flex: 0 0 auto; display: block; }
.rw-glogo-sm { width: 18px; height: 18px; margin-left: auto; }

/* Navigation */
.rw-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 8px; }
.rw-arrow { appearance: none; border: 0; cursor: pointer; width: 42px; height: 42px; border-radius: 50%; background: var(--rw-card-bg); box-shadow: var(--rw-shadow); color: var(--rw-ink); font-size: 22px; line-height: 1; display: grid; place-items: center; transition: transform .15s ease, box-shadow .15s ease; }
.rw-arrow:hover { transform: translateY(-1px); }
.rw-dots { display: flex; gap: 8px; }
.rw-dot { appearance: none; border: 0; cursor: pointer; width: 8px; height: 8px; padding: 0; border-radius: 50%; background: var(--rw-star-off); transition: background .15s ease, width .15s ease; }
.rw-dot.on { background: var(--rw-accent); width: 22px; border-radius: 5px; }

/* Bandeau d'avis au-dessus du footer (placement auto par le layout) */
.rw-band { display: block; padding: 56px 20px; }

@media (max-width: 980px) { .rw { --rw-cols: 2; } }
@media (max-width: 620px) { .rw { --rw-cols: 1; } }

@media (prefers-reduced-motion: reduce) {
    .rw-viewport { scroll-behavior: auto; }
    .rw-arrow { transition: none; }
}
