/* ==========================================================================
   ads-notifications.css — Styles publicités + notifications kelyalove.
   --------------------------------------------------------------------------
   FEUILLE DE STYLE COMPAGNON de public/js/ads-notifications.js. Couvre :
     - Bannières/publicités (footer banner, inline card, modale bloquante)
     - Toasts de notifications (MP, mention, visite) + variante "prominent"
     - Cloche de notification de la navbar (badge de compteur)
     - Mise en évidence des mentions @nom dans les bulles de chat
   Dépend des variables CSS globales (--bg-panel, --text, --text-muted, --bg).
   Les sections sont repérées par des commentaires de la forme ======= ... =======
   ========================================================================== */

/* ======= BANNIÈRE FOOTER + INLINE CARD ======= */
.ad-banner {
    margin: 0 auto 1.2rem; max-width: 1200px; width: calc(100% - 24px);
    border-radius: 14px; overflow: hidden;
    background: var(--bg-panel, #111827);
    border: 1px solid rgba(148,163,184,.28);
    box-shadow: 0 18px 38px rgba(15,23,42,.35);
}
.ad-banner-inner {
    display: grid; grid-template-columns: 72px 1fr auto; gap: 1rem;
    align-items: center; padding: .75rem 1rem;
}
.ad-banner-text { color: var(--text); min-width: 0; }
.ad-banner-text .ad-title { font-weight: 800; margin-bottom: .15rem; }
.ad-banner-text .ad-body  { font-size: .86rem; color: var(--text-muted); line-height: 1.4; }
.ad-inline-card {
    margin: 1.2rem 0; padding: 1rem;
    border-radius: 14px; overflow: hidden;
    background: linear-gradient(180deg, rgba(251,146,60,.06), transparent 70%), var(--bg-panel, #111827);
    border: 1px solid rgba(251,146,60,.25);
    box-shadow: 0 18px 36px rgba(15,23,42,.35);
}
.ad-inline-inner {
    display: grid; grid-template-columns: 92px 1fr; gap: .9rem; align-items: flex-start;
}
.ad-inline-text .ad-title { font-weight: 800; margin-bottom: .25rem; }
.ad-inline-text .ad-body  { font-size: .9rem; color: var(--text-muted); line-height: 1.45; margin-bottom: .6rem; }
.ad-inline-text .ad-cta   { font-weight: 700; }

/* ======= RESPONSIVE desktop → tablette → mobile ======= */
/* Tablette (≤1024px) : bannière 2 colonnes (image + texte/cta stackées) */
@media (max-width: 1024px) {
    .ad-modal .ad-panel { max-width: 560px; }
    .ad-banner-inner { grid-template-columns: 64px 1fr; }
    .ad-banner-inner .ad-cta { grid-column: 2 / -1; justify-self: start; margin-top: .15rem; }
    .ad-inline-inner { grid-template-columns: 80px 1fr; }
}
/* Mobile large (≤720px) : réduire paddings, plus petites fonts */
@media (max-width: 720px) {
    .ad-modal .ad-panel { max-width: 94vw; margin: 5vh auto; }
    .ad-slot { grid-template-columns: 1fr; gap: .7rem; }
    .ad-sponsor-box { min-height: 90px; font-size: .85rem; }
    .toast-stack { right: 10px; left: 10px; bottom: 10px; max-width: none; }
    .toast { grid-template-columns: auto 1fr auto; max-width: none; }
    .ad-banner-inner { grid-template-columns: 54px 1fr; padding: .65rem .75rem; gap: .7rem; }
    .ad-inline-inner { grid-template-columns: 64px 1fr; gap: .75rem; padding: .7rem; }
    .ad-inline-card { padding: .75rem; margin: .8rem 0; }
    .ad-cta-list { font-size: .85rem; line-height: 1.5; }
}
/* Mobile petit (≤380px) : plus de place pour le contenu */
@media (max-width: 380px) {
    .ad-modal .ad-panel { max-width: 96vw; border-radius: 14px; }
    .ad-modal-title { font-size: 1.15rem; }
    .cc-modal-header h2.cc-modal-title { font-size: 1.1rem; }
    .ad-banner-inner { grid-template-columns: 1fr; }
    .ad-inline-inner { grid-template-columns: 1fr; }
}
/* Desktop ultra-wide (≥1440px) : limiter largeur bannière */
@media (min-width: 1440px) {
    .ad-banner { max-width: 1320px; }
}
/* ======= ADS / NOTIFS VIP ======= */
.ad-modal .ad-panel { max-width: 620px; }
.ad-slot { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1rem; margin-top: 1rem; }
@media (max-width: 640px) { .ad-slot { grid-template-columns: 1fr; } }
.ad-cta {
    padding: 1.1rem 1.1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(251,146,60,.12), rgba(244,63,94,.14));
    border: 1px solid rgba(251,146,60,.35);
}
.ad-cta-title { font-weight: 800; font-size: 1.05rem; margin-bottom: .6rem; color: var(--text); }
.ad-cta-list { list-style: none; padding: 0; margin: 0 0 .9rem; font-size: .92rem; line-height: 1.65; color: var(--text); }
.ad-cta-btn { display: inline-flex; text-decoration: none; font-weight: 700; }
.ad-sponsor-box {
    display: flex; align-items: center; justify-content: center;
    min-height: 140px; padding: .9rem; text-align: center;
    border-radius: 14px;
    background: repeating-linear-gradient(45deg, rgba(148,163,184,.08) 0 10px, rgba(148,163,184,.03) 10px 20px);
    border: 1px dashed rgba(148,163,184,.45);
    color: var(--text-muted);
}

/* ======= TOASTS ======= */
.toast-stack {
    position: fixed; right: 18px; bottom: 18px;
    display: flex; flex-direction: column; gap: .6rem;
    z-index: 9990; max-width: 360px;
}
.toast {
    display: grid; grid-template-columns: auto 1fr auto; gap: .7rem;
    align-items: flex-start;
    padding: .75rem .85rem;
    border-radius: 14px;
    background: var(--bg-panel, #111827);
    border: 1px solid rgba(148,163,184,.28);
    color: var(--text, #e5e7eb);
    box-shadow: 0 18px 40px rgba(15,23,42,.45);
    transform: translateX(120%);
    opacity: 0;
    transition: transform .35s cubic-bezier(.22,1,.36,1), opacity .35s ease;
    backdrop-filter: blur(14px);
}
.toast-in  { transform: translateX(0); opacity: 1; }
.toast-out { transform: translateX(120%); opacity: 0; }
.toast-icon { font-size: 1.4rem; line-height: 1; margin-top: .1rem; }
.toast-title { font-weight: 700; font-size: .95rem; margin-bottom: .15rem; color: var(--text); }
.toast-text  { font-size: .86rem; color: var(--text-muted, #9aa1b5); line-height: 1.45; word-break: break-word; }
.toast-close {
    background: transparent; border: 0; color: inherit; opacity: .7;
    font-size: 1.25rem; line-height: 1; cursor: pointer; padding: 0 2px;
}
.toast-close:hover { opacity: 1; }
.toast-mp { border-color: rgba(59,130,246,.5); }
.toast-mention {
    border-color: rgba(168,85,247,.6);
    background: linear-gradient(135deg, rgba(168,85,247,.10), rgba(251,146,60,.06) 70%), var(--bg-panel, #111827);
}
.toast-visit { border-color: rgba(168,85,247,.5); }

/* Toast prominent (popup MP / mention) */
.toast-prominent {
    min-width: 320px;
    padding: 1rem 1.1rem;
    border-width: 2px;
    box-shadow: 0 22px 55px rgba(15,23,42,.65), 0 0 0 1px rgba(255,255,255,.04);
    animation: toast-pulse 2.4s ease-in-out infinite;
}
.toast-prominent .toast-icon { font-size: 1.8rem; }
.toast-prominent .toast-title { font-size: 1.05rem; margin-bottom: .35rem; }
.toast-prominent .toast-text { font-size: .92rem; }
.toast-action-btn {
    display: inline-block;
    margin-top: .65rem;
    padding: .45rem .9rem;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #f59e0b, #f43f5e);
    color: #fff;
    font-weight: 700;
    font-size: .82rem;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
    box-shadow: 0 6px 16px rgba(244,63,94,.35);
}
.toast-action-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(244,63,94,.45); }
.toast-action-btn:active { transform: translateY(0); }
@keyframes toast-pulse {
    0%, 100% { box-shadow: 0 22px 55px rgba(15,23,42,.65), 0 0 0 1px rgba(255,255,255,.04); }
    50% { box-shadow: 0 22px 55px rgba(15,23,42,.65), 0 0 0 1px rgba(255,255,255,.04), 0 0 24px rgba(251,146,60,.35); }
}
@media (max-width: 720px) {
    .toast-prominent { min-width: 0; width: 100%; }
}

/* ======= CLoche notification navbar ======= */
.nav-bell-btn {
    position: relative;
    background: transparent;
    border: 0;
    padding: .25rem .35rem;
    cursor: pointer;
    color: var(--text, #e5e7eb);
    font-size: 1.05rem;
    line-height: 1;
    border-radius: 10px;
    transition: background .2s ease, transform .2s ease;
}
.nav-bell-btn:hover { background: rgba(148,163,184,.12); transform: translateY(-1px); }
.nav-bell-btn:focus { outline: 2px solid rgba(168,85,247,.5); outline-offset: 2px; }
.nav-bell-icon { vertical-align: middle; }
.notif-count {
    position: absolute; top: -4px; right: -4px;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f43f5e, #ef4444);
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--bg, #0b1020);
    display: none;
    pointer-events: none;
}
.notif-count-visible { display: inline-block; }

/* ======= Mention @nom dans les bulles de chat ======= */
.mention {
    display: inline-block;
    padding: 1px 7px;
    margin: 0 1px;
    border-radius: 7px;
    background: linear-gradient(135deg, rgba(124,58,237,.18), rgba(59,130,246,.12));
    color: #a78bfa;
    font-weight: 700;
    border: 1px solid rgba(168,85,247,.32);
    word-break: break-word;
}

/* Modal pub bloquante : backdrop légèrement plus sombre quand active */
.ad-modal.cc-visible::before {
    content: ''; position: fixed; inset: 0; background: rgba(2,6,23,.55);
    z-index: -1; backdrop-filter: blur(3px);
}
