/* Uplix Push - Frontend modal
   Le bouton "S'abonner" est volontairement plus visible (couleur pleine, taille
   accrue, ombre, icône). Le bouton "Plus tard" reste discret en lien fantôme. */

.uplix-push-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.uplix-push-modal.is-visible {
    display: flex;
    animation: uplixPushFade .25s ease-out;
}

.uplix-push-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(2px);
    cursor: pointer;
}

.uplix-push-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 18px;
    padding: 28px 24px 22px;
    text-align: center;
    box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .35), 0 6px 16px rgba(15, 23, 42, .12);
    animation: uplixPushPop .3s cubic-bezier(.2, .9, .3, 1.1);
}

.uplix-push-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px -8px rgba(79, 70, 229, .55);
}

.uplix-push-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Variante logo : fond blanc + padding pour qu'un logo coloré reste lisible
   (le dégradé bleu/violet par défaut écraserait les couleurs du logo). */
.uplix-push-icon--logo {
    background: #fff;
    box-shadow: 0 10px 24px -8px rgba(15, 23, 42, .18);
}

.uplix-push-icon--logo img {
    object-fit: contain;
    padding: 8px;
    box-sizing: border-box;
}

.uplix-push-icon--emoji {
    background: linear-gradient(135deg, #eef2ff, #e0e7ff);
    color: #1e1b4b;
}

.uplix-push-icon--emoji span {
    font-size: 36px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-font-smoothing: antialiased;
}

.uplix-push-title {
    font-size: 20px;
    line-height: 1.3;
    margin: 0 0 8px;
    color: #0f172a;
    font-weight: 700;
}

.uplix-push-message {
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 14px;
    color: #475569;
}

.uplix-push-cta {
    font-size: 13px;
    line-height: 1.4;
    margin: 0 0 14px;
    color: #2563eb;
    font-weight: 600;
    letter-spacing: .01em;
    text-transform: uppercase;
}

.uplix-push-cta::before,
.uplix-push-cta::after {
    content: "·";
    margin: 0 8px;
    color: #cbd5e1;
}

.uplix-push-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.uplix-push-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
    font-family: inherit;
}

.uplix-push-btn:disabled {
    cursor: progress;
    opacity: .8;
}

.uplix-push-btn--primary {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #fff;
    padding: 16px 22px;
    font-size: 17px;
    box-shadow: 0 12px 28px -10px rgba(79, 70, 229, .6), 0 4px 10px rgba(37, 99, 235, .2);
    letter-spacing: .01em;
}

.uplix-push-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 32px -10px rgba(79, 70, 229, .7), 0 6px 12px rgba(37, 99, 235, .25);
}

.uplix-push-btn--primary:active {
    transform: translateY(0);
}

.uplix-push-btn--primary.is-loading::after {
    content: "";
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    animation: uplixPushSpin .7s linear infinite;
    margin-left: 6px;
}

.uplix-push-btn--ghost {
    background: transparent;
    color: #64748b;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 3px;
    box-shadow: none;
}

.uplix-push-btn--ghost:hover {
    color: #334155;
    background: transparent;
}

.uplix-push-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Conteneur des badges de réassurance (anti-spam + 100% gratuit côte à côte). */
.uplix-push-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0 0 10px;
}

.uplix-push-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    line-height: 1.2;
}

.uplix-push-badge--nospam {
    color: #15803d;
    background: #dcfce7;
}

.uplix-push-badge--free {
    color: #b45309;
    background: #fef3c7;
}

.uplix-push-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.uplix-push-badge--nospam .uplix-push-badge-icon { color: #16a34a; }
.uplix-push-badge--free   .uplix-push-badge-icon { color: #d97706; }

/* Compatibilité : les anciennes classes restent stylées pour les sites qui auraient
   personnalisé la CSS et utilisent encore .uplix-push-nospam. */
.uplix-push-nospam {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #15803d;
    background: #dcfce7;
    padding: 5px 12px;
    border-radius: 999px;
    margin: 0 0 10px;
}

.uplix-push-nospam-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #16a34a;
}

.uplix-push-fineprint {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
}

.uplix-push-error {
    font-size: 13px;
    line-height: 1.4;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 0 0 12px;
    text-align: left;
}

/* Cloche flottante de réactivation : visible quand l'utilisateur a refusé une fois,
   pour qu'il puisse revenir sur son choix sans attendre 3 jours. Discrète mais identifiable. */
.uplix-push-bell {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99998;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 0;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #fff;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 28px -10px rgba(79, 70, 229, .55), 0 4px 10px rgba(37, 99, 235, .25);
    transition: transform .15s ease, box-shadow .15s ease;
    font-family: inherit;
}

.uplix-push-bell.is-visible {
    display: inline-flex;
    animation: uplixPushBellIn .35s cubic-bezier(.2, .9, .3, 1.2);
}

.uplix-push-bell:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -10px rgba(79, 70, 229, .65), 0 6px 14px rgba(37, 99, 235, .3);
}

.uplix-push-bell:active {
    transform: translateY(0);
}

.uplix-push-bell:focus-visible {
    outline: 3px solid rgba(79, 70, 229, .35);
    outline-offset: 2px;
}

@keyframes uplixPushBellIn {
    from { transform: translateY(20px) scale(.85); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

body.uplix-push-modal-open {
    overflow: hidden;
}

@keyframes uplixPushFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes uplixPushPop {
    from { transform: translateY(12px) scale(.97); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes uplixPushSpin {
    to { transform: rotate(360deg); }
}

@media (prefers-color-scheme: dark) {
    .uplix-push-card {
        background: #0f172a;
        color: #e2e8f0;
    }
    .uplix-push-title { color: #f8fafc; }
    .uplix-push-message { color: #cbd5e1; }
    .uplix-push-cta { color: #93c5fd; }
    .uplix-push-cta::before, .uplix-push-cta::after { color: #475569; }
    .uplix-push-btn--ghost { color: #94a3b8; }
    .uplix-push-btn--ghost:hover { color: #e2e8f0; }
    .uplix-push-fineprint { color: #64748b; }
    .uplix-push-icon--emoji { background: linear-gradient(135deg, #1e293b, #312e81); color: #fff; }
    .uplix-push-nospam { background: rgba(22, 163, 74, .18); color: #86efac; }
    .uplix-push-nospam-icon { color: #4ade80; }
    .uplix-push-badge--nospam { background: rgba(22, 163, 74, .18); color: #86efac; }
    .uplix-push-badge--nospam .uplix-push-badge-icon { color: #4ade80; }
    .uplix-push-badge--free { background: rgba(217, 119, 6, .18); color: #fcd34d; }
    .uplix-push-badge--free .uplix-push-badge-icon { color: #fbbf24; }
    .uplix-push-error { color: #fecaca; background: rgba(185, 28, 28, .18); border-color: rgba(220, 38, 38, .35); }
}
