/* GuardSync - Alertes d'expiration d'abonnement */

/* Bannière d'alerte d'expiration (7 jours avant) */
.subscription-warning-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.95rem;
    animation: slideDown 0.4s ease-out;
}

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

.subscription-warning-banner.critical {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

.subscription-warning-banner.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.subscription-warning-banner.info {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.subscription-warning-banner.info.subtle {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    padding: 0.75rem 1.5rem;
}

.subscription-warning-banner.info.subtle .banner-icon {
    font-size: 1.25rem;
}

.subscription-warning-banner.info.subtle .banner-title {
    font-size: 0.9rem;
}

.subscription-warning-banner.info.subtle .banner-message {
    font-size: 0.8rem;
}

.subscription-warning-banner .banner-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.subscription-warning-banner .banner-icon {
    font-size: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.subscription-warning-banner .banner-text {
    flex: 1;
}

.subscription-warning-banner .banner-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.subscription-warning-banner .banner-message {
    font-size: 0.875rem;
    opacity: 0.95;
}

.subscription-warning-banner .banner-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.subscription-warning-banner .btn-renew {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
}

.subscription-warning-banner .btn-renew:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}

.subscription-warning-banner .btn-dismiss {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all 0.2s ease;
}

.subscription-warning-banner .btn-dismiss:hover {
    color: #ffffff;
    transform: scale(1.1);
}

/* Décalage du contenu principal quand la bannière est affichée */
body.has-subscription-banner {
    padding-top: 80px;
}

body.has-subscription-banner .navbar {
    top: 80px;
}

/* Responsive */
@media (max-width: 768px) {
    .subscription-warning-banner {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }

    .subscription-warning-banner .banner-content {
        flex-direction: column;
        text-align: center;
    }

    .subscription-warning-banner .banner-actions {
        width: 100%;
        justify-content: center;
    }

    .subscription-warning-banner .btn-renew {
        flex: 1;
        justify-content: center;
    }

    body.has-subscription-banner {
        padding-top: 140px;
    }

    body.has-subscription-banner .navbar {
        top: 140px;
    }
}

/* Style pour la modal SweetAlert2 personnalisée */
.swal2-popup.subscription-expired-modal {
    border-radius: 1rem;
    padding: 2rem;
}

.swal2-popup.subscription-expired-modal .swal2-icon.swal2-error {
    border-color: #dc2626;
    color: #dc2626;
}

.swal2-popup.subscription-expired-modal .swal2-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #dc2626;
}

.swal2-popup.subscription-expired-modal .swal2-html-container {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #475569;
}

.swal2-popup.subscription-expired-modal .swal2-actions {
    gap: 1rem;
}

.swal2-popup.subscription-expired-modal .swal2-confirm {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
}

.swal2-popup.subscription-expired-modal .swal2-confirm:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}

/* Mode sombre */
[data-theme="dark"] .subscription-warning-banner {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .swal2-popup.subscription-expired-modal .swal2-html-container {
    color: #e2e8f0; /* WCAG AA - ratio 10.5:1 (était #cbd5e1) */
}
