/* ==========================================================================
   POPUPS & TOASTS DYNAMIQUES - SHOWAURORA (VERSION AUTHENTIQUE & RÉELLE)
   ========================================================================== */

/* --- Neutralisation définitive des anciens faux toasts des thèmes Anon --- */
.notification-toast:not(.aurora-toast),
.mat-notification-toast {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* --- Overlay de fond avec flou moderne --- */
.aurora-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.35s ease;
}

.aurora-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- Modal Newsletter Popup --- */
.aurora-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -45%) scale(0.95);
    width: 90%;
    max-width: 780px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(226, 232, 240, 0.8);
    z-index: 99999;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease, visibility 0.35s ease;
}

.aurora-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.aurora-modal-wrapper {
    display: flex;
    flex-direction: row;
    position: relative;
}

/* Image de gauche */
.aurora-modal-banner {
    flex: 1.1;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    padding: 30px;
}

.aurora-modal-banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.4;
    transition: transform 0.8s ease;
}

.aurora-modal:hover .aurora-modal-banner-bg {
    transform: scale(1.05);
}

.aurora-modal-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.35);
    z-index: 2;
}

.aurora-modal-banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #ffffff;
}

.aurora-modal-discount-big {
    font-size: 64px;
    font-weight: 900;
    line-height: 1;
    color: #fbbf24;
    text-shadow: 0 4px 20px rgba(251, 191, 36, 0.4);
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
}

.aurora-modal-discount-subtitle {
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #e2e8f0;
}

/* Contenu de droite (Formulaire) */
.aurora-modal-body {
    flex: 1.3;
    padding: 40px 35px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background: #ffffff;
}

.aurora-modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 20px;
    transition: all 0.2s ease;
    z-index: 10;
}

.aurora-modal-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

.aurora-modal-tag {
    font-size: 12px;
    font-weight: 700;
    color: #2563eb;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    display: inline-block;
}

.aurora-modal-title {
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    margin-bottom: 10px;
    font-family: 'Poppins', sans-serif;
}

.aurora-modal-desc {
    font-size: 14px;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 22px;
}

.aurora-modal-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.aurora-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.aurora-input-icon {
    position: absolute;
    left: 15px;
    color: #94a3b8;
    font-size: 18px;
}

.aurora-modal-input {
    width: 100%;
    padding: 13px 15px 13px 44px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f8fafc;
}

.aurora-modal-input:focus {
    border-color: #2563eb;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.aurora-modal-submit-btn {
    padding: 14px 20px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.aurora-modal-submit-btn:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

.aurora-modal-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.aurora-modal-feedback {
    display: none;
    margin-top: 15px;
    padding: 14px;
    border-radius: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 13px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.aurora-promo-code-box {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #ffffff;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px dashed #22c55e;
}

.aurora-promo-code {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #15803d;
}

.aurora-copy-code-btn {
    background: #22c55e;
    color: #ffffff;
    border: none;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.aurora-copy-code-btn:hover {
    background: #16a34a;
}

.aurora-modal-footer-note {
    font-size: 11px;
    color: #94a3b8;
    text-align: center;
    margin-top: 14px;
}


/* ==========================================================================
   NOTIFICATION TOAST DYNAMIQUE (DÉCOUVERTE & BONS PLANS DU CATALOGUE)
   ========================================================================== */

.aurora-toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 99990;
    pointer-events: none;
}

.aurora-toast {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 12px 14px;
    max-width: 380px;
    box-shadow: 0 12px 30px -6px rgba(15, 23, 42, 0.16), 0 4px 10px -2px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(226, 232, 240, 0.95);
    position: relative;
    pointer-events: auto;
    cursor: pointer;
    transform: translateX(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease, visibility 0.4s ease, box-shadow 0.25s ease;
    text-decoration: none !important;
}

.aurora-toast.show {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

.aurora-toast:hover {
    box-shadow: 0 18px 35px -5px rgba(37, 99, 235, 0.22), 0 0 0 1.5px #2563eb;
    transform: translateY(-2px);
}

.aurora-toast-thumb-box {
    width: 66px;
    height: 66px;
    border-radius: 12px;
    overflow: hidden;
    background: #f8fafc;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid #e2e8f0;
}

.aurora-toast-thumb {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
    transition: transform 0.35s ease;
}

.aurora-toast:hover .aurora-toast-thumb {
    transform: scale(1.1);
}

.aurora-toast-discount-badge {
    position: absolute;
    top: 2px;
    left: 2px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 9.5px;
    font-weight: 800;
    padding: 1.5px 5px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(220, 38, 38, 0.4);
}

.aurora-toast-content {
    flex: 1;
    min-width: 0;
}

.aurora-toast-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}

/* Badge pilule de statut réel */
.aurora-toast-pill {
    display: inline-flex;
    align-items: center;
    gap: 4.5px;
    font-size: 11px;
    font-weight: 700;
    padding: 2.5px 8px;
    border-radius: 20px;
    letter-spacing: 0.2px;
}

.aurora-toast-pill.tag-trending {
    background: rgba(249, 115, 22, 0.12);
    color: #ea580c;
}

.aurora-toast-pill.tag-flash {
    background: rgba(225, 29, 72, 0.12);
    color: #e11d48;
}

.aurora-toast-pill.tag-favorite {
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
}

.aurora-toast-pill.tag-new {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
}

.aurora-toast-pill.tag-order {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}

.aurora-toast-action {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 3px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.aurora-toast-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    font-family: 'Poppins', system-ui, sans-serif;
}

.aurora-toast-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    gap: 8px;
}

.aurora-toast-pricing {
    display: flex;
    align-items: center;
    gap: 6px;
}

.aurora-toast-price {
    font-weight: 800;
    color: #2563eb;
    font-size: 13px;
}

.aurora-toast-old-price {
    font-size: 11px;
    color: #94a3b8;
    text-decoration: line-through;
}

.aurora-toast-cta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 700;
    transition: gap 0.2s ease;
}

.aurora-toast:hover .aurora-toast-cta {
    gap: 7px;
    color: #1d4ed8;
}

.aurora-toast-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    transition: all 0.2s;
}

.aurora-toast-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* --- Responsive Mobile --- */
@media (max-width: 768px) {
    .aurora-modal {
        max-width: 92%;
        border-radius: 16px;
    }
    .aurora-modal-wrapper {
        flex-direction: column;
    }
    .aurora-modal-banner {
        min-height: 150px;
        padding: 20px;
    }
    .aurora-modal-discount-big {
        font-size: 42px;
    }
    .aurora-modal-body {
        padding: 25px 20px;
    }
    .aurora-toast-container {
        bottom: 16px;
        left: 12px;
        right: 12px;
    }
    .aurora-toast {
        max-width: 100%;
    }
}
