/* Module Avis clients — front-office : slider (classes .vca-*, surchargeables) */

.vca { margin: 0 auto; max-width: 720px; }

.vca-head { display: flex; justify-content: center; margin-bottom: 18px; }
.vca-score { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.vca-score strong { font-size: 42px; line-height: 1; font-weight: 800; }
.vca-score strong em { font-style: normal; font-size: 22px; opacity: .55; }
.vca-score > span { font-size: 14px; opacity: .75; }

/* Étoiles */
.vca-stars { position: relative; display: inline-block; line-height: 0; }
.vca-stars svg { width: 17px; height: 17px; }
.vca-stars-bg svg { fill: #d9dce5; }
.vca-stars-fg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    white-space: nowrap;
}
.vca-stars-fg svg { fill: #f5a623; }

/* Slider : piste + slides */
.vca-slider { position: relative; overflow: hidden; }
.vca-track {
    display: flex;
    align-items: stretch;
    transition: transform .55s ease;
    will-change: transform;
}
.vca-slide {
    flex: 0 0 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 34px 56px 26px;
    text-align: center;
    background: #fff;
    border: 1px solid #e6e8ef;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(13, 21, 38, .06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

/* Avatar / initiale */
.vca-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.vca-avatar-init {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #1b2340;
    color: #e8c873;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: .5px;
}

/* Texte de l'avis : citation tronquée à 4 lignes + « Lire la suite » */
.vca-textwrap { max-width: 540px; }
.vca-text {
    margin: 0;
    font-size: 16px;
    font-style: italic;
    line-height: 1.65;
    max-height: 6.7em;              /* 4 lignes */
    overflow: hidden;
    transition: max-height .45s ease;
}
/* Fondu sur les dernières lignes tant que l'avis est tronqué */
.vca-text.vca-cut:not(.vca-open) {
    -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
    mask-image: linear-gradient(to bottom, #000 60%, transparent);
}
.vca-more {
    display: none;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 7px 16px;
    border: 1px solid #e6e2f7;
    border-radius: 999px;
    background: #f7f5fe;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    color: #6d5bd0;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.vca-more::after {
    content: '';
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .25s ease;
}
.vca-more.vis { display: inline-flex; }
.vca-more:hover {
    background: #efeaf9;
    border-color: #d8cff0;
    box-shadow: 0 2px 8px rgba(109, 91, 208, .15);
}
.vca-more.open::after { transform: rotate(-135deg) translateY(-1px); }

/* Auteur */
.vca-who { display: flex; flex-direction: column; gap: 3px; }
.vca-who strong { font-size: 15.5px; }
.vca-date { font-size: 12.5px; opacity: .55; }

/* Réponse du propriétaire : repliée derrière un bouton */
.vca-owner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    max-width: 540px;
    width: 100%;
}
.vca-owner-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid #e6e8ef;
    border-radius: 999px;
    background: #f7f7f9;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: #3a4060;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease;
}
.vca-owner-btn::after {
    content: '';
    width: 6px;
    height: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    transition: transform .25s ease;
}
.vca-owner-btn:hover { background: #eef0f5; }
.vca-owner.open .vca-owner-btn::after { transform: rotate(-135deg) translateY(-1px); }
.vca-owner-body {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    box-sizing: border-box;
    padding: 0 14px;
    border-left: 3px solid #e6e8ef;
    background: #fafbfd;
    border-radius: 0 8px 8px 0;
    text-align: left;
    transition: max-height .35s ease, padding .35s ease;
}
.vca-owner.open .vca-owner-body { max-height: 420px; padding: 10px 14px; }
.vca-owner-body p { margin: 0; font-size: 13px; line-height: 1.55; }

/* Flèches */
.vca-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 1px solid #e6e8ef;
    border-radius: 50%;
    background: #fff;
    color: #1b2340;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(13, 21, 38, .08);
    z-index: 2;
}
.vca-nav:hover { background: #f6f7fb; }
.vca-nav:disabled { opacity: .35; cursor: default; }
.vca-nav:disabled:hover { background: #fff; }
.vca-prev { left: 8px; }
.vca-next { right: 8px; }

/* Pastilles */
.vca-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 16px;
}
.vca-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #d5d9e3;
    cursor: pointer;
    transition: width .25s ease, background .25s ease;
}
.vca-dot.on { width: 22px; background: #e8c873; }

.vca-credit {
    margin: 14px 0 0;
    text-align: center;
    font-size: 12.5px;
    opacity: .65;
}
.vca-credit a { color: inherit; }

/* ------------------------------------------------------------------
 | Mode « cartes » : plusieurs avis côte à côte (scroll-snap, swipe
 | natif, flèches sous le bloc) — activé via le réglage « Affichage ».
 * --------------------------------------------------------------- */
.vca-mode-cards { max-width: 1200px; }
.vca-cards { overflow: visible; }
.vca-cards .vca-track {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 22px;
    padding: 4px 2px 12px;      /* laisse respirer l'ombre des cartes */
    scrollbar-width: none;
    transition: none;
}
.vca-cards .vca-track::-webkit-scrollbar { display: none; }
.vca-cards .vca-slide {
    /* --vca-cols : nombre d'avis visibles, réglé dans le back-office. */
    flex: 0 0 calc((100% - (var(--vca-cols, 3) - 1) * 22px) / var(--vca-cols, 3));
    scroll-snap-align: start;
    align-items: flex-start;
    text-align: left;
    padding: 26px 26px 22px;
    gap: 14px;
    border-radius: 10px;
    border-color: #e8e4dc;
    box-shadow: none;                     /* rendu épuré, à plat */
}
.vca-cards .vca-textwrap { max-width: none; width: 100%; }
.vca-cards .vca-text {
    font-size: 14.5px;
    line-height: 1.6;
    text-align: left;
    color: #4a4a55;
    font-style: normal;
}
.vca-cards .vca-stars svg { width: 15px; height: 15px; }
.vca-cards .vca-stars-bg svg { fill: #e6e1d8; }
.vca-cards .vca-stars-fg svg { fill: #d9a441; }
.vca-cards .vca-foot {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;                    /* identité calée en bas */
}
.vca-cards .vca-avatar { width: 44px; height: 44px; font-size: 15px; }
.vca-cards .vca-avatar-init { background: #16181d; color: #fff; }
.vca-cards .vca-who { text-align: left; }
.vca-cards .vca-who strong { font-size: 14px; }
.vca-cards .vca-date { font-size: 12px; opacity: .55; }
.vca-cards .vca-owner { max-width: none; width: 100%; align-items: flex-start; }

/* Pleine largeur : le bloc remplit son conteneur et un bout de la
   carte suivante reste visible, coupé au bord (invite au défilement). */
.vca-mode-cards.vca-full { max-width: none; }
.vca-full .vca-slide {
    flex-basis: calc((100% - (var(--vca-cols, 3) - 1) * 22px - 70px)
        / var(--vca-cols, 3));
}

/* Coins carrés */
.vca-square .vca-slide { border-radius: 2px; }

/* Flèches alignées à gauche, sous les cartes */
.vca-arrows { display: flex; gap: 10px; margin-top: 18px; }
.vca-cards .vca-nav {
    position: static;
    transform: none;
    box-shadow: none;
    border-color: #ddd8cf;
}

@media (max-width: 1100px) {
    .vca-cards .vca-slide {
        flex-basis: calc((100% - (min(var(--vca-cols, 3), 2) - 1) * 22px)
            / min(var(--vca-cols, 3), 2));
    }
    .vca-full .vca-slide {
        flex-basis: calc((100% - (min(var(--vca-cols, 3), 2) - 1) * 22px - 70px)
            / min(var(--vca-cols, 3), 2));
    }
}

@media (max-width: 640px) {
    .vca-slide { padding: 28px 20px 22px; }
    .vca-nav { display: none; }
    /* Un aperçu de la carte suivante invite au swipe. */
    .vca-cards .vca-slide { flex-basis: 84%; }
    .vca-cards .vca-arrows { display: none; }
}
