/**
 * Social Proof - Styles CSS
 * Version éco-responsable - Design doux et naturel
 * Adapté au thème sans-bpa.com
 * PrestaShop 1.6
 */

/* === VARIABLES DE COULEURS (inspirées du thème) === */
:root {
    --sp-green: #7ab55c;
    /* Vert principal du site */
    --sp-green-light: #e8f5e0;
    /* Vert très clair */
    --sp-green-dark: #5a9a42;
    /* Vert foncé */
    --sp-teal: #5a9aa9;
    /* Bleu-vert des liens */
    --sp-teal-light: #e5f2f4;
    /* Bleu-vert clair */
    --sp-beige: #f7f4ef;
    /* Fond beige du site */
    --sp-brown: #8b7355;
    /* Marron naturel */
    --sp-brown-light: #f5f0e8;
    /* Beige chaud */
    --sp-text: #555555;
    /* Texte principal */
    --sp-text-light: #777777;
    /* Texte secondaire */
    --sp-terracotta: #c17f59;
    /* Terracotta doux */
    --sp-terracotta-light: #faf3ee;
}

/* Container principal */
.socialproof-container {
    margin: 12px 0;
    padding: 0;
    font-family: inherit;
}

/* Mode lazy load - skeleton loader */
.socialproof-container.lazy-load {
    min-height: 40px;
}

.socialproof-loading {
    padding: 8px 0;
}

.socialproof-skeleton {
    height: 36px;
    background: linear-gradient(90deg, var(--sp-beige) 25%, #ebe7e0 50%, var(--sp-beige) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.8s infinite ease-in-out;
    border-radius: 6px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Chaque indicateur - Style discret et naturel */
.socialproof-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 400;
    color: var(--sp-text);
    background: var(--sp-beige);
    border: 1px solid rgba(139, 115, 85, 0.15);
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(8px);
}

.socialproof-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.socialproof-item:last-child {
    margin-bottom: 0;
}

.socialproof-item:hover {
    background: #f3efe8;
}

/* Icône - Pastille colorée minimaliste */
.socialproof-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 8px;
    height: 8px;
    margin-right: 10px;
    border-radius: 50%;
    font-size: 0;
    flex-shrink: 0;
    background: var(--sp-green);
}

/* Masquer l'icône font (utiliser seulement la pastille) */
.socialproof-icon i {
    display: none;
}

/* Texte */
.socialproof-text {
    flex: 1;
    line-height: 1.4;
    color: var(--sp-text);
}

.socialproof-text strong {
    font-weight: 600;
    color: var(--sp-green-dark);
}

/* === TYPES SPÉCIFIQUES - Style naturel === */

/* Stock faible - Doux mais informatif */
.socialproof-item.type-low_stock {
    background: var(--sp-terracotta-light);
    border-color: rgba(193, 127, 89, 0.25);
}

.socialproof-item.type-low_stock .socialproof-icon {
    background: var(--sp-terracotta);
}

.socialproof-item.type-low_stock .socialproof-text strong {
    color: var(--sp-terracotta);
}

/* Stock critique - Légèrement plus visible */
.socialproof-item.type-low_stock.critical {
    border-color: rgba(193, 127, 89, 0.4);
}

.socialproof-item.type-low_stock.critical .socialproof-icon {
    background: var(--sp-terracotta);
    color: #fff;
}

/* Commandes récentes - Vert naturel */
.socialproof-item.type-orders {
    background: var(--sp-green-light);
    border-color: rgba(122, 181, 92, 0.25);
}

.socialproof-item.type-orders .socialproof-icon {
    background: var(--sp-green);
}

.socialproof-item.type-orders .socialproof-text strong {
    color: var(--sp-green-dark);
}

/* Visiteurs temps réel - Bleu-vert du site */
.socialproof-item.type-viewers {
    background: var(--sp-teal-light);
    border-color: rgba(90, 154, 169, 0.25);
}

.socialproof-item.type-viewers .socialproof-icon {
    background: var(--sp-teal);
}

.socialproof-item.type-viewers .socialproof-text strong {
    color: var(--sp-teal);
}

/* Point discret pour "en direct" */
.socialproof-item.type-viewers .live-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: var(--sp-teal);
    border-radius: 50%;
    margin-left: 5px;
    animation: live-pulse-soft 2s infinite ease-in-out;
}

@keyframes live-pulse-soft {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

/* Paniers actifs - Bleu-vert */
.socialproof-item.type-carts {
    background: var(--sp-teal-light);
    border-color: rgba(90, 154, 169, 0.25);
}

.socialproof-item.type-carts .socialproof-icon {
    background: var(--sp-teal);
}

.socialproof-item.type-carts .socialproof-text strong {
    color: var(--sp-teal);
}

/* Dernière vente - Beige naturel */
.socialproof-item.type-last_sale {
    background: var(--sp-brown-light);
    border-color: rgba(139, 115, 85, 0.2);
}

.socialproof-item.type-last_sale .socialproof-icon {
    background: var(--sp-brown);
}

.socialproof-item.type-last_sale .socialproof-text strong {
    color: var(--sp-brown);
}

/* Tendance - Vert principal */
.socialproof-item.type-trending {
    background: var(--sp-green-light);
    border-color: rgba(122, 181, 92, 0.3);
}

.socialproof-item.type-trending .socialproof-icon {
    background: var(--sp-green);
    color: #fff;
}

.socialproof-item.type-trending .socialproof-text strong {
    color: var(--sp-green-dark);
}

/* === ANIMATIONS D'ENTRÉE - Subtiles === */

/* Slide doux */
.socialproof-container.animation-slide .socialproof-item {
    transform: translateX(-10px);
    opacity: 0;
}

.socialproof-container.animation-slide .socialproof-item.visible {
    transform: translateX(0);
    opacity: 1;
}

/* Fade simple */
.socialproof-container.animation-fade .socialproof-item {
    transform: none;
    opacity: 0;
}

.socialproof-container.animation-fade .socialproof-item.visible {
    opacity: 1;
}

/* Bounce léger */
.socialproof-container.animation-bounce .socialproof-item {
    transform: scale(0.95);
    opacity: 0;
}

.socialproof-container.animation-bounce .socialproof-item.visible {
    transform: scale(1);
    opacity: 1;
}

/* Sans animation */
.socialproof-container.animation-none .socialproof-item {
    opacity: 1;
    transform: none;
    transition: none;
}

/* === COMPTEUR - Style épuré === */
.socialproof-count {
    font-weight: 600;
    transition: color 0.3s ease;
}

/* === TOAST NOTIFICATIONS - Style naturel === */
.socialproof-toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    max-width: 320px;
    background: #fff;
    border: 1px solid rgba(139, 115, 85, 0.2);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.4s ease;
}

.socialproof-toast.visible {
    transform: translateY(0);
    opacity: 1;
}

.socialproof-toast-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--sp-text-light);
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.socialproof-toast-close:hover {
    color: var(--sp-text);
}

.socialproof-toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--sp-green-light);
    color: var(--sp-green);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.socialproof-toast-content {
    flex: 1;
    padding-right: 16px;
}

.socialproof-toast-title {
    font-weight: 600;
    color: var(--sp-text);
    font-size: 13px;
    margin-bottom: 2px;
}

.socialproof-toast-message {
    font-size: 12px;
    color: var(--sp-text-light);
    line-height: 1.4;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .socialproof-container {
        margin: 8px 0;
    }

    .socialproof-item {
        padding: 7px 10px;
        font-size: 11.5px;
    }

    .socialproof-icon {
        width: 22px;
        height: 22px;
        font-size: 10px;
        margin-right: 8px;
    }

    .socialproof-toast {
        left: 10px;
        right: 10px;
        max-width: none;
        bottom: 10px;
    }
}

/* === PRINT === */
@media print {

    .socialproof-container,
    .socialproof-toast {
        display: none;
    }
}