/* ─── Topo Usage Limits — Popup styles ──────────────────────────────────────
   La couleur du bouton CTA est définie dynamiquement via :
   :root { --topo-cta: #f5a623; --topo-cta-hover: #f5a623dd; }
   (injecté par Topo_Usage::enqueue_assets() depuis l'option admin)
   ─────────────────────────────────────────────────────────────────────────── */

:root {
    --topo-cta:       #f5a623;
    --topo-cta-hover: #e09615;
}

/* ── Overlay backdrop ──────────────────────────────────────────────────────── */

.topo-usage-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.65);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.topo-usage-overlay.is-active {
    display: flex;
}

/* ── Carte popup ───────────────────────────────────────────────────────────── */

.topo-usage-popup {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    padding: 48px 40px 40px;
    max-width: 460px;
    width: 100%;
    text-align: center;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.07),
        0 20px 60px rgba(0, 0, 0, 0.25);
    animation: topo-popup-in 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes topo-popup-in {
    from { transform: scale(0.88); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

/* ── Icône ─────────────────────────────────────────────────────────────────── */

.topo-usage-popup__icon {
    font-size: 52px;
    line-height: 1;
    margin-bottom: 18px;
    display: block;
}

/* ── Titre ─────────────────────────────────────────────────────────────────── */

.topo-usage-popup__title {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    line-height: 1.3 !important;
    border: none !important;
}

/* ── Message ───────────────────────────────────────────────────────────────── */

.topo-usage-popup__message {
    font-size: 15px !important;
    color: #555555 !important;
    margin: 0 0 28px !important;
    line-height: 1.65 !important;
}

.topo-usage-popup__extra { margin: -18px 0 26px !important; color: #777 !important; font-size: 13px !important; line-height: 1.5 !important; }
.topo-usage-popup__actions { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.topo-usage-popup__secondary { display: inline-block; padding: 13px 24px; color: #334155 !important; font-weight: 600; text-decoration: underline; }

/* ── Bouton CTA ────────────────────────────────────────────────────────────── */

.topo-usage-popup__cta {
    display: inline-block;
    background: var(--topo-cta);
    color: #ffffff !important;
    padding: 14px 36px;
    border-radius: 50px;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.topo-usage-popup__cta:hover,
.topo-usage-popup__cta:focus {
    background: var(--topo-cta-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: #ffffff !important;
    outline: none;
}

.topo-usage-popup__cta:active {
    transform: translateY(0);
}

/* ── Bouton fermer (×) ─────────────────────────────────────────────────────── */

.topo-usage-popup__close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: transparent;
    border: none;
    color: #aaaaaa;
    font-size: 20px;
    line-height: 1;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    transition: background 0.15s ease, color 0.15s ease;
}

.topo-usage-popup__close:hover,
.topo-usage-popup__close:focus {
    background: #f2f2f2;
    color: #333333;
    outline: none;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */

@media (max-width: 500px) {
    .topo-usage-popup {
        padding: 36px 24px 30px;
        border-radius: 12px;
    }
    .topo-usage-popup__title {
        font-size: 19px !important;
    }
    .topo-usage-popup__cta {
        display: block;
        text-align: center;
    }
}
