/* Barre Sticky WC Plus */
.wcplus-sticky-bar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #ffffff;
    border-top: 1px solid #e1e1e1;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 99999 !important;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    opacity: 0;
    visibility: hidden;
    width: 100% !important;
    box-sizing: border-box !important;
}

.wcplus-sticky-bar.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.wcplus-sticky-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 16px;
    position: relative;
}

.wcplus-sticky-content {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 16px;
}

.wcplus-sticky-image {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    overflow: hidden;
    border-radius: 4px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wcplus-sticky-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.wcplus-sticky-text-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 12px;
}

.wcplus-sticky-text {
    flex: 1;
}

.wcplus-sticky-action {
    flex-shrink: 0;
}

.wcplus-sticky-button {
    display: inline-block;
    background: #0073aa;
    color: #ffffff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.wcplus-sticky-button:hover,
.wcplus-sticky-button:focus {
    background: #005a87;
    color: #ffffff;
    text-decoration: none;
}


/* Code promo */
.wcplus-promo-code {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 3px;
    margin-left: 8px;
    font-family: monospace;
    font-size: 13px;
}

.wcplus-code-label {
    font-weight: 500;
    color: #666;
}

.wcplus-code-value {
    font-weight: bold;
    color: #333;
}

.wcplus-copy-code {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
}

.wcplus-copy-code:hover {
    background: #e0e0e0;
    color: #333;
}

.wcplus-copy-code .dashicons {
    width: 14px;
    height: 14px;
    font-size: 14px;
}

/* Animation de copie */
.wcplus-copy-code.copied {
    color: #4caf50;
}

.wcplus-copy-feedback {
    position: absolute;
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    animation: fadeInOut 2s ease-in-out;
    pointer-events: none;
    white-space: nowrap;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; transform: translateX(-50%) translateY(5px); }
    20%, 80% { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    /* Force position sur mobile pour WP Rocket */
    .wcplus-sticky-bar {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        transform: translateY(100%) !important;
        z-index: 999999 !important;
        width: 100vw !important;
    }
    
    .wcplus-sticky-bar.active {
        transform: translateY(0) !important;
    }
    
    .wcplus-sticky-container {
        padding: 10px 12px;
        flex-direction: column;
        gap: 10px;
    }
    
    .wcplus-sticky-content {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;
        width: 100%;
        margin-bottom: 8px;
    }
    
    /* Image à gauche sur mobile */
    .wcplus-sticky-image {
        flex-shrink: 0;
        width: 50px;
        height: 50px;
        margin-top: 2px;
    }
    
    /* Container pour texte + code à droite */
    .wcplus-sticky-text-container {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }
    
    /* Texte aligné à gauche */
    .wcplus-sticky-text {
        margin-right: 0;
        text-align: left;
        font-size: 13px;
        line-height: 1.3;
        width: 100%;
    }
    
    /* Code promo sous le texte, aligné à gauche */
    .wcplus-promo-code {
        justify-content: flex-start;
        margin: 0;
        align-self: flex-start;
    }
    
    /* Bouton pleine largeur en bas */
    .wcplus-sticky-action {
        width: 100%;
        margin-top: 8px;
    }
    
    .wcplus-sticky-button {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px 16px;
        font-size: 14px;
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    .wcplus-sticky-bar {
        font-size: 13px;
    }
    
    .wcplus-sticky-text {
        font-size: 12px;
    }
    
    .wcplus-promo-code {
        font-size: 11px;
        padding: 3px 6px;
    }
}

/* Animation d'entrée */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.wcplus-sticky-bar.animate-in {
    animation: slideUp 0.4s ease-out forwards;
}

/* Personnalisations par défaut */
.wcplus-sticky-bar.wcplus-sticky-product {
    /* Styles spécifiques aux produits */
}

.wcplus-sticky-bar.wcplus-sticky-post {
    /* Styles spécifiques aux articles/pages */
}

/* Cache la barre quand elle est fermée */
.wcplus-sticky-bar.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}