/* ========================================
   CCBB Avis Slider - Styles
   ======================================== */

.ccbb-avis-slider {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 50px;
    box-sizing: border-box;
}

.ccbb-slider-viewport {
    overflow: hidden;
    width: 100%;
    padding: 1px;
}

.ccbb-slider-track {
    display: flex;
    align-items: stretch;
    gap: 20px;
    transition: transform 0.4s ease;
    will-change: transform;
}

/* ---- Carte ---- */
.ccbb-card {
    flex: 0 0 calc((100% - 40px) / 3);
    background: #fff;
    border-radius: 8px;
    /*box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);*/
    border:1px solid #bb9f70;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    text-align: left;
}

/* ---- En-tête de carte (avatar + nom) ---- */
.ccbb-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ccbb-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    background-size: cover;
    background-position: center;
}

.ccbb-avatar-letter {
    background: #b0b0b0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 500;
}

.ccbb-meta {
    flex: 1;
    min-width: 0;
}

.ccbb-nom {
    font-weight: 600;
    color: #222;
    font-size: 15px;
    line-height: 1.2;
}

.ccbb-date {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

/* ---- Notation étoiles ---- */
.ccbb-rating {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-bottom: 12px;
}

.ccbb-rating .star {
    color: #ddd;
    font-size: 16px;
    line-height: 1;
}

.ccbb-rating .star.filled {
    color: #f5a623;
}

.ccbb-note-value {
    margin-left: 6px;
    font-weight: 600;
    font-size: 13px;
    color: #444;
}

/* ---- Titre ---- */
.ccbb-titre {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

/* ---- Contenu avec troncature ---- */
.ccbb-contenu {
    display: flex;
    flex-direction: column;
}

.ccbb-texte {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: var(--ccbb-clamp, 5);
    line-clamp: var(--ccbb-clamp, 5);
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.ccbb-contenu.expanded .ccbb-texte {
    display: block;
    -webkit-line-clamp: unset;
    line-clamp: unset;
    overflow: visible;
}

/* ---- Bouton "En savoir plus" ---- */
.ccbb-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0;
    margin-top: 8px;
    color: #222;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px solid #222;
    align-self: flex-start;
    line-height: 1.4;
    font-family: inherit;
}

.ccbb-toggle:hover {
    color: #bb9f70;
    border-bottom-color: #bb9f70;
}

.ccbb-toggle.visible {
    display: inline-block;
}

/* ---- Lien externe (optionnel) ---- */
.ccbb-lien-externe {
    margin-top: 8px;
    color: #888;
    font-size: 12px;
    text-decoration: none;
}

.ccbb-lien-externe:hover {
    color: #f5a623;
}

/* ---- Galerie ---- */
.ccbb-galerie {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.ccbb-galerie-item {
    position: relative;
    flex: 1;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
}

.ccbb-galerie-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ccbb-galerie-plus {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

/* ---- Flèches de navigation ---- */
.ccbb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: #555;
    transition: all 0.2s ease;
    padding: 0;
}

.ccbb-arrow:hover {
    background: #f5a623;
    color: #fff;
    border-color: #f5a623;
}

.ccbb-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.ccbb-arrow-prev { left: 0; }
.ccbb-arrow-next { right: 0; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .ccbb-card {
        flex: 0 0 calc((100% - 20px) / 2);
    }
    .ccbb-avis-slider {
        padding: 0 40px;
    }
}

@media (max-width: 600px) {
    .ccbb-card {
        flex: 0 0 100%;
    }
    .ccbb-avis-slider {
        padding: 0 35px;
    }
    .ccbb-arrow {
        width: 32px;
        height: 32px;
    }
}
