/**
 * Syro Réassort Récent - Styles Front-end
 * Préfixé pour éviter les collisions
 */

/* ============================================
   TOAST - Notification discrète
   ============================================ */
.syro-reassort-toast {
    position: fixed;
    bottom: 20px;
    left: 20px;
    max-width: 380px;
    background: linear-gradient(135deg, #1a3a1a 0%, #0d1f0d 100%);
    border: 1px solid #338A18;
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 9990;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: syroToastSlideIn 0.4s ease-out;
}

@keyframes syroToastSlideIn {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.syro-reassort-toast.hiding {
    animation: syroToastSlideOut 0.3s ease-in forwards;
}

@keyframes syroToastSlideOut {
    to {
        transform: translateY(100px);
        opacity: 0;
    }
}

.syro-reassort-toast__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.syro-reassort-toast__text {
    color: #fff;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
}

.syro-reassort-toast__cta {
    display: inline-block;
    color: #4CAF50;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.syro-reassort-toast__cta:hover {
    color: #66BB6A;
    text-decoration: underline;
}

.syro-reassort-toast__close {
    background: transparent;
    border: none;
    color: #888;
    font-size: 22px;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    line-height: 1;
    border-radius: 50%;
    transition: all 0.2s;
    flex-shrink: 0;
}

.syro-reassort-toast__close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* ============================================
   BANDEAU - En haut de page
   ============================================ */
.syro-reassort-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, #338A18 0%, #2E7D32 50%, #338A18 100%);
    padding: 10px 20px;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    animation: syroBannerSlideDown 0.4s ease-out;
}

@keyframes syroBannerSlideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.syro-reassort-banner.hiding {
    animation: syroBannerSlideUp 0.3s ease-in forwards;
}

@keyframes syroBannerSlideUp {
    to {
        transform: translateY(-100%);
    }
}

.syro-reassort-banner__content {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.syro-reassort-banner__text {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.syro-reassort-banner__cta {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.syro-reassort-banner__cta:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.syro-reassort-banner__close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
    transition: color 0.2s;
}

.syro-reassort-banner__close:hover {
    color: #fff;
}

/* Ajuster le body quand le bandeau est visible */
body.syro-banner-visible {
    padding-top: 44px !important;
}

/* ============================================
   BADGE PRODUIT
   ============================================ */
.syro-reassort-badge {
    display: inline-block;
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

/* Badge sur page produit unique */
.single-product .syro-reassort-badge {
    position: relative;
    top: auto;
    left: auto;
    margin-bottom: 10px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 600px) {
    .syro-reassort-toast {
        left: 10px;
        right: 10px;
        max-width: none;
        bottom: 70px; /* Au-dessus des boutons flottants mobiles */
    }
    
    .syro-reassort-banner {
        padding: 8px 40px 8px 15px;
        flex-wrap: wrap;
    }
    
    .syro-reassort-banner__content {
        flex-direction: column;
        gap: 8px;
    }
    
    .syro-reassort-banner__text {
        font-size: 13px;
        text-align: center;
    }
    
    .syro-reassort-badge {
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* ============================================
   ACCESSIBILITÉ
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .syro-reassort-toast,
    .syro-reassort-banner {
        animation: none;
    }
    
    .syro-reassort-toast.hiding,
    .syro-reassort-banner.hiding {
        animation: none;
        display: none;
    }
}
