/**
 * Styles modernes pour les notices WooCommerce
 */

/* Container des notices */
.woocommerce-notices-wrapper {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
    max-width: var(--content-width, 1200px);
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 1700px) {
    .woocommerce-notices-wrapper {
        margin-left: 30px;
        margin-right: 30px;
    }
}

/* Styles de base pour toutes les notices */
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    background-color: #ffffff;
    border: none;
    border-left: 4px solid;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.05);
    list-style: none;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.woocommerce-message::before{
    display: none;
}
.woocommerce-error::before{
    display: none;
}
.woocommerce-info::before{
    display: none;
}
/* Icônes avant le texte */
/* Notice d'erreur (rouge) */
.woocommerce-error {
    border-left-color: #e74c3c;
    background: linear-gradient(to right, rgba(231, 76, 60, 0.05) 0%, #ffffff 40px);
}

/* Notice de succès (vert/primary) */
.woocommerce-message {
    border-left-color: var(--e-global-color-primary, #27ae60);
    background: linear-gradient(to right, rgba(39, 174, 96, 0.05) 0%, #ffffff 40px);
}

.woocommerce-notices-wrapper ul{
    padding-left:45px;
}
.woocommerce-notices-wrapper li {
margin-right:24px !important;
}
/* Si primary est définie, utiliser la couleur dynamique */
.woocommerce-message {
    border-left-color: var(--e-global-color-primary, #27ae60);
}

/* Notice d'info (bleu) */
.woocommerce-info {
    border-left-color: #3498db;
    background: linear-gradient(to right, rgba(52, 152, 219, 0.05) 0%, #ffffff 40px);
}

/* Contenu de la notice */
.woocommerce-error li,
.woocommerce-message li,
.woocommerce-info li {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    line-height: 1.6;
    font-size: 14px;
    position: relative;
    z-index: 2;
}

/* Boutons dans les notices */
.woocommerce-error .button,
.woocommerce-message .button,
.woocommerce-info .button {
    margin-left: 10px;
    padding: 6px 16px;
    font-size: 13px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    font-weight: 500;
}


.woocommerce-message .button {
    background-color: var(--e-global-color-primary, #27ae60);
    color: #ffffff;
}

.woocommerce-message .button:hover {
    background-color: var(--e-global-color-primary-dark, #229954);
    filter: brightness(0.9);
}

.woocommerce-info .button {
    background-color: #3498db;
    color: #ffffff;
}

.woocommerce-info .button:hover {
    background-color: #2980b9;
}

/* Bouton de fermeture (si ajouté par JS) */
.woocommerce-notice-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.woocommerce-notice-close:hover {
    opacity: 1;
}

.woocommerce-notice-close::before,
.woocommerce-notice-close::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 2px;
    background-color: #333;
    border-radius: 1px;
}

.woocommerce-notice-close::before {
    transform: rotate(45deg);
}

.woocommerce-notice-close::after {
    transform: rotate(-45deg);
}

/* Animation de sortie (fade out) */
@keyframes noticeSlideOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

.woocommerce-notice-fadeout {
    animation: noticeSlideOut 0.5s ease forwards;
}

/* Animation d'entrée */
@keyframes noticeSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    animation: noticeSlideIn 0.4s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .woocommerce-error,
    .woocommerce-message,
    .woocommerce-info {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .woocommerce-error .button,
    .woocommerce-message .button,
    .woocommerce-info .button {
        margin-left: 0;
        margin-top: 8px;
        display: block;
        text-align: center;
    }
}
.woocommerce-message .button{
    margin-right: 20px;
}

.woocommerce-notices-wrapper .button{
 background-color: var(--e-global-color-primary) !important;
 color: #ffffff !important;
 font-size: 15px !important;
 font-weight: 500 !important;
 text-decoration: none !important;
 text-align: center !important;
 text-transform: none !important;
}

.woocommerce-notices-wrapper .button:hover{
    background-color: #8a3c1a !important;
}

/* Icône check vert pour les messages de succès */
.woocommerce-message .success-check-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 8px;
    vertical-align: middle;
    animation: checkPop 0.4s ease-out;
}

/* Animation du check */
@keyframes checkPop {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}


