/**
 * WooCommerce Luxury Notices - Styles
 *
 * Design: Minimaliste luxe noir/blanc
 * Animations: Subtiles et élégantes
 */

/* ══════════════════════════════════════════════════════════════
   CONTENEUR DES NOTIFICATIONS
   ══════════════════════════════════════════════════════════════ */

.luxury-notices-container {
    position: fixed;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    max-width: 100%;
}

/* Positions */
.luxury-notices-container--top-right {
    top: 1.5rem;
    right: 1.5rem;
}

.luxury-notices-container--top-left {
    top: 1.5rem;
    left: 1.5rem;
}

.luxury-notices-container--bottom-right {
    bottom: 1.5rem;
    right: 1.5rem;
}

.luxury-notices-container--bottom-left {
    bottom: 1.5rem;
    left: 1.5rem;
}

.luxury-notices-container--top-center {
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
}

/* ══════════════════════════════════════════════════════════════
   NOTIFICATION BASE
   ══════════════════════════════════════════════════════════════ */

.luxury-notice {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    min-width: 20rem;
    max-width: 26rem;
    background: #ffffff;
    border: 1px solid #000000;
    pointer-events: auto;
    position: relative;
    overflow: hidden;

    /* État initial pour animation */
    opacity: 0;
    transform: translateX(1.5rem);
}

/* Animation d'entrée */
.luxury-notice--entering {
    animation: luxuryNoticeEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Animation de sortie */
.luxury-notice--leaving {
    animation: luxuryNoticeLeave 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes luxuryNoticeEnter {
    from {
        opacity: 0;
        transform: translateX(1.5rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes luxuryNoticeLeave {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(1.5rem);
    }
}

/* Variantes de position pour animations */
.luxury-notices-container--top-left .luxury-notice,
.luxury-notices-container--bottom-left .luxury-notice {
    transform: translateX(-1.5rem);
}

.luxury-notices-container--top-left .luxury-notice--entering,
.luxury-notices-container--bottom-left .luxury-notice--entering {
    animation-name: luxuryNoticeEnterLeft;
}

.luxury-notices-container--top-left .luxury-notice--leaving,
.luxury-notices-container--bottom-left .luxury-notice--leaving {
    animation-name: luxuryNoticeLeaveLeft;
}

@keyframes luxuryNoticeEnterLeft {
    from {
        opacity: 0;
        transform: translateX(-1.5rem);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes luxuryNoticeLeaveLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-1.5rem);
    }
}

/* ══════════════════════════════════════════════════════════════
   ICÔNE (Font lunettesdemarque)
   ══════════════════════════════════════════════════════════════ */

.luxury-notice__icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.125rem;
    font-family: 'lunettesdemarque' !important;
    font-size: 1.125rem;
    line-height: 1;
}

/* Icônes par type */
.luxury-notice--success .luxury-notice__icon::before {
    content: '\e98e';
}

.luxury-notice--error .luxury-notice__icon::before {
    content: '\e888';
}

.luxury-notice--info .luxury-notice__icon::before {
    content: '\e8de';
}

.luxury-notice--warning .luxury-notice__icon::before {
    content: '\e870';
}

/* ══════════════════════════════════════════════════════════════
   CONTENU
   ══════════════════════════════════════════════════════════════ */

.luxury-notice__content {
    flex: 1;
    min-width: 0;
}

.luxury-notice__message {
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0.01em;
    color: #000000;
    margin: 0;
}

/* ══════════════════════════════════════════════════════════════
   BOUTON FERMER
   ══════════════════════════════════════════════════════════════ */

.luxury-notice__close {
    flex-shrink: 0;
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    opacity: 0.4;
    transition: opacity 0.2s ease;
    margin: -0.125rem -0.25rem -0.125rem 0;
}

.luxury-notice__close:hover {
    opacity: 1;
}

.luxury-notice__close svg {
    width: 0.75rem;
    height: 0.75rem;
}

/* ══════════════════════════════════════════════════════════════
   BARRE DE PROGRESSION
   ══════════════════════════════════════════════════════════════ */

.luxury-notice__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: #000000;
    transform-origin: left;
}

.luxury-notice__progress--animated {
    animation: luxuryProgressShrink var(--notice-duration, 5000ms) linear forwards;
}

@keyframes luxuryProgressShrink {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

/* Pause au hover */
.luxury-notice:hover .luxury-notice__progress--animated {
    animation-play-state: paused;
}

/* ══════════════════════════════════════════════════════════════
   NOTICE CLIQUABLE
   ══════════════════════════════════════════════════════════════ */

.luxury-notice--clickable {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.luxury-notice--clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.luxury-notice--clickable:active {
    transform: translateY(0);
}

/* ══════════════════════════════════════════════════════════════
   VARIANTES DE TYPE
   ══════════════════════════════════════════════════════════════ */

/* Success - Vert sobre */
.luxury-notice--success {
    background: #e8f5e9;
    border-color: #2e7d32;
}

.luxury-notice--success .luxury-notice__message {
    color: #1b5e20;
}

.luxury-notice--success .luxury-notice__icon {
    color: #2e7d32;
}

.luxury-notice--success .luxury-notice__close {
    color: #2e7d32;
}

.luxury-notice--success .luxury-notice__progress {
    background: #2e7d32;
}

/* Error - Rouge sobre */
.luxury-notice--error {
    background: #ffebee;
    border-color: #c62828;
}

.luxury-notice--error .luxury-notice__message {
    color: #b71c1c;
}

.luxury-notice--error .luxury-notice__icon {
    color: #c62828;
}

.luxury-notice--error .luxury-notice__close {
    color: #c62828;
}

.luxury-notice--error .luxury-notice__progress {
    background: #c62828;
}

/* Info - Noir et blanc */
.luxury-notice--info {
    background: #f5f5f5;
    border-color: #000000;
}

.luxury-notice--info .luxury-notice__message {
    color: #000000;
}

.luxury-notice--info .luxury-notice__icon {
    color: #000000;
}

.luxury-notice--info .luxury-notice__close {
    color: #000000;
}

.luxury-notice--info .luxury-notice__progress {
    background: #000000;
}

/* Warning - Jaune/Orange sobre */
.luxury-notice--warning {
    background: #fff8e1;
    border-color: #f57c00;
}

.luxury-notice--warning .luxury-notice__message {
    color: #e65100;
}

.luxury-notice--warning .luxury-notice__icon {
    color: #f57c00;
}

.luxury-notice--warning .luxury-notice__close {
    color: #f57c00;
}

.luxury-notice--warning .luxury-notice__progress {
    background: #f57c00;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .luxury-notices-container {
        left: 1rem !important;
        right: 1rem !important;
        transform: none !important;
    }

    .luxury-notice {
        min-width: 0;
        max-width: none;
        width: 100%;
    }
}

/* ══════════════════════════════════════════════════════════════
   MASQUER LES NOTICES WOOCOMMERCE NATIVES
   ══════════════════════════════════════════════════════════════ */

.woocommerce-message,
.woocommerce-error,
.woocommerce-info,
.woocommerce-notice,
.wc-block-components-notice-banner {
    display: none !important;
}