/* ========================================
   MABROUK FOMO & URGENCE - STYLES OPTIMISÉS
   Version 1.0.1 - Design discret et élégant
   ======================================== */

/* ========================================
   1. BANDEAU DÉFILANT (TICKER)
   ======================================== */

.fomo-ticker-wrapper {
    background: #1a1a1a;
    overflow: hidden;
    padding: 12px 0;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.fomo-ticker {
    display: flex;
    animation: scroll-ticker 30s linear infinite;
    white-space: nowrap;
}

.fomo-ticker-item {
    display: inline-block;
    padding: 0 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: white;
    letter-spacing: 0.5px;
}

@keyframes scroll-ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.fomo-ticker-wrapper:hover .fomo-ticker {
    animation-play-state: paused;
}

/* ========================================
   2. BADGE STOCK LIMITÉ
   ======================================== */

.stock-urgency-badge {
    display: inline-block;
    padding: 8px 16px;
    background: linear-gradient(135deg, #ff5722 0%, #ff9800 100%);
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    margin: 10px 0 15px 0;
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.3);
    animation: shake 3s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-2px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(2px);
    }
}

/* Barre de progression du stock */
.stock-progress-wrapper {
    margin: 15px 0 20px 0;
}

.stock-progress-label {
    display: flex;
    justify-content: space-between;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    margin-bottom: 8px;
    color: #666;
}

.stock-progress-label span:last-child {
    font-weight: 600;
    color: #ff5722;
}

.stock-progress-bar {
    width: 100%;
    height: 8px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.stock-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff5722 0%, #ff9800 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
    animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
    }
}

/* ========================================
   3. COMPTEUR DE VIEWERS (VERSION DISCRÈTE)
   Position: Après la description
   ======================================== */

.viewers-counter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    margin: 15px 0;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    color: #666;
    transition: all 0.3s ease;
}

.viewers-counter:hover {
    background: #f0f0f0;
    border-color: #d0d0d0;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: #4caf50;
    border-radius: 50%;
    animation: blink-subtle 1.5s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes blink-subtle {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.9);
    }
}

.viewer-count {
    font-weight: 600;
    color: #1a1a1a;
    transition: all 0.2s ease;
}

/* ========================================
   4. NOTIFICATIONS FOMO (BAS GAUCHE)
   ======================================== */

#mabrouk-fomo-notification {
    position: fixed;
    bottom: 20px;
    left: 20px;
    max-width: 350px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    padding: 16px;
    display: none;
    z-index: 99999;
    animation: slideInLeft 0.5s ease-out;
    font-family: 'Poppins', sans-serif;
    border-left: 4px solid #ff9c81;
}

#mabrouk-fomo-notification.show {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.fomo-notification-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.fomo-notification-content {
    flex: 1;
}

.fomo-notification-text {
    font-size: 12px;
    color: #666;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.fomo-notification-product {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 4px 0;
    line-height: 1.3;
}

.fomo-notification-time {
    font-size: 11px;
    color: #999;
    margin: 4px 0 0 0;
}

.fomo-notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    transition: color 0.3s ease;
}

.fomo-notification-close:hover {
    color: #333;
}

/* Animations des notifications */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100px);
    }
}

#mabrouk-fomo-notification.hiding {
    animation: slideOutLeft 0.3s ease-out forwards;
}

#mabrouk-fomo-notification .live-dot {
    position: absolute;
    top: 16px;
    right: 40px;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    /* Ticker */
    .fomo-ticker-item {
        font-size: 11px;
        padding: 0 30px;
    }
    
    /* Stock badge */
    .stock-urgency-badge {
        font-size: 11px;
        padding: 6px 14px;
    }
    
    /* Viewers counter */
    .viewers-counter {
        font-size: 11px;
        padding: 6px 12px;
    }
    
    .live-dot {
        width: 5px;
        height: 5px;
    }
    
    /* Notifications */
    #mabrouk-fomo-notification {
        max-width: 280px;
        bottom: 15px;
        left: 15px;
        padding: 12px;
    }
    
    .fomo-notification-image {
        width: 50px;
        height: 50px;
    }
    
    .fomo-notification-text {
        font-size: 11px;
    }
    
    .fomo-notification-product {
        font-size: 12px;
    }
    
    .fomo-notification-time {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    /* Ticker ultra compact */
    .fomo-ticker-item {
        font-size: 10px;
        padding: 0 20px;
    }
    
    /* Compteur viewers encore plus petit */
    .viewers-counter {
        font-size: 10px;
        padding: 5px 10px;
    }
    
    .live-dot {
        width: 4px;
        height: 4px;
    }
}
/* ========================================
   OPTIMISATIONS FINALES
   ======================================== */

/* 1. Réduire l'espace après la galerie produit */
.woocommerce-product-gallery {
    margin-bottom: 30px !important;
}

/* 2. Réduire l'espace avant "S'assortit parfaitement" */
.related.products,
.upsells.products,
section[class*="assort"],
.product-content-bottom,
.product-related-wrapper {
    margin-top: 30px !important;
    padding-top: 20px !important;
}

/* 3. Améliorer le compteur viewers (espacement) */
.viewers-counter {
    padding: 8px 14px;
    margin: 12px 0 8px 0;
}

/* 4. Style des tailles en rupture (si besoin) */
.variations_form .value select option:disabled {
    opacity: 0.4;
}

/* 5. Espacer légèrement les onglets Matière/Composition */
.woocommerce-tabs {
    margin-top: 20px !important;
}

/* ========================================
   POLISH GÉNÉRAL
   ======================================== */

/* Assurer que tout est bien aligné */
.summary.entry-summary {
    padding-bottom: 20px;
}

/* Éviter les doubles marges */
.product_meta {
    margin-bottom: 15px !important;
}
/* Badge "Nouveau" */
.new-badge-mabrouk {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #1a1a1a;
    color: white;
    padding: 5px 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 3px;
    z-index: 10;
    font-family: 'Poppins', sans-serif;
}

.new-badge-mabrouk.single {
    top: 15px;
    left: 15px;
    font-size: 11px;
    padding: 6px 14px;
}