/* Sliders d'avis de l'accueil et des fiches produit. */
/* =========================================
   SLIDER AVIS — reviews-product-home
   Boucle infinie | peek gauche + droite
   Fondu sur les bords
   ========================================= */

/* --- Wrapper flex : flèches sur les côtés --- */
.rph-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px 0 30px;
    box-sizing: border-box;
}

/* --- Viewport : masque le débordement + fondu doux sur les bords --- */
.rph-viewport {
    flex: 1 1 0;
    overflow: hidden;
    min-width: 0;
    position: relative;
    /* Masque en fondu sur les bords gauche et droit */
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        rgba(0,0,0,.4) 3%,
        rgba(0,0,0,.85) 6%,
        black 9%,
        black 91%,
        rgba(0,0,0,.85) 94%,
        rgba(0,0,0,.4) 97%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        rgba(0,0,0,.4) 3%,
        rgba(0,0,0,.85) 6%,
        black 9%,
        black 91%,
        rgba(0,0,0,.85) 94%,
        rgba(0,0,0,.4) 97%,
        transparent 100%
    );
}

/* --- Track --- */
.rph-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(.4,0,.2,1);
    will-change: transform;
    align-items: stretch;
}

/* =========================================
   CARTES — 3 visibles + peek des côtés
   Le peek (0.5 carte) est géré par le JS
   ========================================= */
.rph-card {
    /* 3 cartes dans le viewport */
    flex: 0 0 calc(100% / 4);
    min-width: calc(100% / 4);
    box-sizing: border-box;
    padding: 8px 10px;
}

.rph-card-inner {
    background: #fff;
    border-radius: 16px;
    padding: 26px 24px 22px;
    height: 100%;
    box-sizing: border-box;
    box-shadow: 0 2px 18px rgba(0,0,0,.06);
    border: 1px solid rgba(212,194,175,.25);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: box-shadow .25s ease, transform .25s ease;
}
.rph-card-inner:hover {
    box-shadow: 0 8px 32px rgba(212,194,175,.35);
    transform: translateY(-3px);
}

/* --- Guillemet --- */
.rph-quote-icon {
    font-size: 3.2rem;
    line-height: .8;
    color: var(--lcdo-color-taupe);
    font-family: Georgia, serif;
    user-select: none;
    margin-bottom: -4px;
}

/* --- Texte de l'avis --- */
.rph-text {
    font-size: .9rem;
    line-height: 1.65;
    color: #666;
    flex-grow: 1;
    margin: 0;
    font-style: italic;
}

/* --- Étoiles --- */
.rph-stars {
    display: flex;
    gap: 3px;
}
.rph-star {
    color: var(--lcdo-color-taupe);
    font-size: 1rem;
    line-height: 1;
}

/* --- Meta --- */
.rph-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid rgba(212,194,175,.3);
}
.rph-reviewer {
    font-size: .82rem;
    font-weight: 700;
    color: #333;
    letter-spacing: .01em;
}
.rph-sep {
    color: var(--lcdo-color-taupe);
    font-size: .82rem;
}
.rph-product {
    font-size: .78rem;
    color: #aaa;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

/* =========================================
   BOUTONS FLÈCHES — sur les côtés
   ========================================= */
.rph-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1.5px solid var(--lcdo-color-taupe);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--lcdo-color-taupe);
    transition: background .2s, color .2s, transform .15s, box-shadow .2s;
    padding: 0;
    z-index: 2;
}
.rph-btn:hover:not(:disabled) {
    background: var(--lcdo-color-taupe);
    color: #fff;
    transform: scale(1.08);
    box-shadow: 0 4px 16px rgba(212,194,175,.4);
}
.rph-btn:disabled {
    opacity: .3;
    cursor: default;
}
.rph-btn svg {
    display: block;
}

/* =========================================
   RESPONSIVE
   ========================================= */

/* Tablette : 2 cartes + peek */
@media (max-width: 1023px) and (min-width: 640px) {
    .rph-card {
        flex: 0 0 calc(100% / 3);
        min-width: calc(100% / 3);
    }
    .rph-btn {
        width: 38px;
        height: 38px;
    }
    .rph-viewport {
        -webkit-mask-image: linear-gradient(
            to right,
            transparent 0%,
            rgba(0,0,0,.5) 4%,
            black 9%,
            black 91%,
            rgba(0,0,0,.5) 96%,
            transparent 100%
        );
        mask-image: linear-gradient(
            to right,
            transparent 0%,
            rgba(0,0,0,.5) 4%,
            black 9%,
            black 91%,
            rgba(0,0,0,.5) 96%,
            transparent 100%
        );
    }
}

/* Mobile : 1 carte + peek */
@media (max-width: 639px) {
    .rph-wrapper {
        gap: 8px;
        padding: 12px 0 20px;
    }
    .rph-card {
        flex: 0 0 calc(100% / 2);
        min-width: calc(100% / 2);
        padding: 6px 6px;
    }
    .rph-card-inner {
        padding: 20px 18px 16px;
        border-radius: 12px;
        gap: 10px;
    }
    .rph-quote-icon { font-size: 2.6rem; }
    .rph-text { font-size: .85rem; }
    .rph-btn {
        width: 34px;
        height: 34px;
    }
    .rph-btn svg {
        width: 16px;
        height: 16px;
    }
    .rph-viewport {
        -webkit-mask-image: linear-gradient(
            to right,
            transparent 0%,
            rgba(0,0,0,.5) 5%,
            black 11%,
            black 89%,
            rgba(0,0,0,.5) 95%,
            transparent 100%
        );
        mask-image: linear-gradient(
            to right,
            transparent 0%,
            rgba(0,0,0,.5) 5%,
            black 11%,
            black 89%,
            rgba(0,0,0,.5) 95%,
            transparent 100%
        );
    }
}

/* =========================================
   SLIDER AVIS PRODUIT — reviews-product-slider
   ========================================= */

.rps-wrapper {
  display: flex; align-items: center; gap: 12px;
  width: 100%; max-width: 1300px;
  margin: 0 auto; padding: 20px 0 30px;
  box-sizing: border-box;
}
.rps-viewport {
  flex: 1 1 0; overflow: hidden; min-width: 0; position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.4) 3%, rgba(0,0,0,.85) 6%, black 9%, black 91%, rgba(0,0,0,.85) 94%, rgba(0,0,0,.4) 97%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.4) 3%, rgba(0,0,0,.85) 6%, black 9%, black 91%, rgba(0,0,0,.85) 94%, rgba(0,0,0,.4) 97%, transparent 100%);
}
.rps-track { display: flex; transition: transform 0.5s cubic-bezier(.4,0,.2,1); will-change: transform; align-items: stretch; }

.rps-card { flex: 0 0 calc(100% / 4); min-width: calc(100% / 4); box-sizing: border-box; padding: 8px 10px; }
.rps-card-inner {
  background: #fff; border-radius: 16px; padding: 26px 24px 22px;
  height: 100%; box-sizing: border-box;
  box-shadow: 0 2px 18px rgba(0,0,0,.06);
  border: 1px solid rgba(212,194,175,.25);
  display: flex; flex-direction: column; gap: 12px;
  transition: box-shadow .25s ease, transform .25s ease;
}
.rps-card-inner:hover { box-shadow: 0 8px 32px rgba(212,194,175,.35); transform: translateY(-3px); }

.rps-quote-icon { font-size: 3.2rem; line-height: .8; color: var(--lcdo-color-taupe); font-family: Georgia, serif; user-select: none; margin-bottom: -4px; }
.rps-text { font-size: .9rem; line-height: 1.65; color: #666; flex-grow: 1; margin: 0; font-style: italic; }
.rps-stars { display: flex; gap: 3px; }
.rps-star  { color: var(--lcdo-color-taupe); font-size: 1rem; line-height: 1; }
.rps-star--empty { color: #e8e0d8; }
.rps-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding-top: 10px; border-top: 1px solid rgba(212,194,175,.3); }
.rps-reviewer { font-size: .82rem; font-weight: 700; color: #333; letter-spacing: .01em; }
.rps-sep      { color: var(--lcdo-color-taupe); font-size: .82rem; }
.rps-date     { font-size: .78rem; color: #aaa; font-style: italic; }

.rps-btn {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--lcdo-color-taupe);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--lcdo-color-taupe);
  transition: background .2s, color .2s, transform .15s, box-shadow .2s;
  padding: 0; z-index: 2;
}
.rps-btn:hover:not(:disabled) { background: var(--lcdo-color-taupe); color: #fff; transform: scale(1.08); box-shadow: 0 4px 16px rgba(212,194,175,.4); }
.rps-btn:disabled { opacity: .3; cursor: default; }
.rps-btn svg { display: block; }

/* =========================================
   ÉTAT VIDE
   ========================================= */
.rps-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 0 16px; text-align: center; }
.rps-empty-icon { font-size: 2rem; line-height: 1; }
.rps-empty-text { font-size: .9rem; color: #888; margin: 0; font-style: italic; }

/* =========================================
   BOUTON DÉCLENCHEUR
   ========================================= */
.rps-trigger-wrap { text-align: center; padding: 16px 0 4px; }

.rps-trigger-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 28px;
  border-radius: 50px;
  background: transparent;
  border: 1.5px solid var(--lcdo-color-taupe);
  color: var(--lcdo-color-taupe);
  font-size: .88rem; font-weight: 600;
  letter-spacing: .03em;
  cursor: pointer; font-family: inherit;
  transition: background .2s, color .2s, transform .15s, box-shadow .2s;
}
.rps-trigger-btn:hover {
  background: var(--lcdo-color-taupe); color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(212,194,175,.4);
}
.rps-trigger-btn svg { flex-shrink: 0; }

/* =========================================
   MODAL OVERLAY
   ========================================= */
.rps-modal-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.rps-modal-overlay.rps-modal--open {
  opacity: 1; pointer-events: auto;
}

/* Boîte modale */
.rps-modal-box {
  background: #fff;
  border-radius: 20px;
  padding: 32px 32px 28px;
  width: 100%; max-width: 500px;
  box-sizing: border-box;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  transform: translateY(20px) scale(.97);
  transition: transform .28s cubic-bezier(.34,1.56,.64,1), opacity .25s ease;
  opacity: 0;
  max-height: 90vh;
  overflow-y: auto;
}
.rps-modal-overlay.rps-modal--open .rps-modal-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Croix de fermeture */
.rps-modal-close {
  position: absolute; top: 14px; right: 18px;
  background: none; border: none;
  font-size: 1.6rem; line-height: 1;
  color: #ccc; cursor: pointer;
  padding: 0; transition: color .15s;
  font-family: inherit;
}
.rps-modal-close:hover { color: #999; }

/* Scroll body bloqué quand modal ouvert */
body.rps-no-scroll { overflow: hidden; }

/* =========================================
   FORMULAIRE D'AVIS (dans le modal)
   ========================================= */
.rps-form-title {
  font-size: 1.1rem; font-weight: 700; color: #333;
  margin: 0 0 20px; text-align: center; letter-spacing: .01em;
}
.rps-form { display: flex; flex-direction: column; gap: 14px; }

.rps-field { display: flex; flex-direction: column; gap: 5px; }
.rps-field label { font-size: .75rem; font-weight: 700; color: #666; letter-spacing: .05em; text-transform: uppercase; }
.rps-req { color: var(--lcdo-color-taupe); }

.rps-field input[type="text"],
.rps-field input[type="email"],
.rps-field textarea {
  width: 100%; box-sizing: border-box;
  padding: 9px 12px;
  border: 1.5px solid rgba(212,194,175,.45);
  border-radius: 10px;
  font-size: .88rem; color: #333;
  background: #faf9f7; font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
  outline: none; resize: none;
}
.rps-field input:focus,
.rps-field textarea:focus {
  border-color: var(--lcdo-color-taupe);
  box-shadow: 0 0 0 3px rgba(212,194,175,.15);
  background: #fff;
}
.rps-field textarea { min-height: 80px; }

.rps-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Étoiles */
.rps-field--stars .rps-stars-input { display: flex; gap: 6px; margin-top: 2px; }
.rps-star-btn {
  background: none; border: none;
  font-size: 1.9rem; line-height: 1;
  color: #ddd; cursor: pointer; padding: 0;
  transition: color .15s, transform .1s;
  -webkit-text-stroke: 1.5px var(--lcdo-color-taupe);
}
.rps-star-btn.rps-star-on,
.rps-star-btn.rps-star-hover { color: var(--lcdo-color-taupe); -webkit-text-stroke: 0; transform: scale(1.18); }

/* Bouton soumettre */
.rps-submit-btn {
  width: 100%; padding: 12px;
  border-radius: 50px;
  background: var(--lcdo-color-taupe); border: none; color: #fff;
  font-size: .9rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  cursor: pointer; font-family: inherit;
  transition: background .2s, transform .15s, box-shadow .2s;
  margin-top: 4px;
}
.rps-submit-btn:hover { background: #c4ae99; transform: translateY(-2px); box-shadow: 0 4px 16px rgba(212,194,175,.4); }

.rps-logged-as { font-size: .8rem; color: #aaa; margin: 0; font-style: italic; }
.rps-form-closed { text-align: center; color: #aaa; font-style: italic; font-size: .9rem; }

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1023px) and (min-width: 640px) {
  .rps-card { flex: 0 0 calc(100% / 3); min-width: calc(100% / 3); }
  .rps-btn  { width: 38px; height: 38px; }
  .rps-viewport {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.5) 4%, black 9%, black 91%, rgba(0,0,0,.5) 96%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.5) 4%, black 9%, black 91%, rgba(0,0,0,.5) 96%, transparent 100%);
  }
}

@media (max-width: 639px) {
  .rps-wrapper { gap: 8px; padding: 12px 0 20px; }
  .rps-card    { flex: 0 0 calc(100% / 2); min-width: calc(100% / 2); padding: 6px; }
  .rps-card-inner { padding: 20px 18px 16px; border-radius: 12px; gap: 10px; }
  .rps-quote-icon { font-size: 2.6rem; }
  .rps-text       { font-size: .85rem; }
  .rps-btn        { width: 34px; height: 34px; }
  .rps-btn svg    { width: 16px; height: 16px; }
  .rps-viewport {
    -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.5) 5%, black 11%, black 89%, rgba(0,0,0,.5) 95%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.5) 5%, black 11%, black 89%, rgba(0,0,0,.5) 95%, transparent 100%);
  }
  .rps-modal-box  { padding: 24px 18px 20px; border-radius: 16px; }
  .rps-field-row  { grid-template-columns: 1fr; }
  .rps-star-btn   { font-size: 1.6rem; }
}
