/* ==========================================================================
   PEE.CHAT · POP-UP DES MESSAGES PRIVES (js/pm-notify.js) — 7/10/2026
   Carte de verre centree : avatar pentagone en haut, [LV] pseudo · heure, apercu.
   Haut-centre sur telephone, haut-droite sur ordinateur (bas-centre = toasts).
   --cd-push (call-dock.js) : la pile descend sous la carte d'appel qui sonne.
   ========================================================================== */
.pmn-stack {
    position: fixed; z-index: 200500; pointer-events: none;
    top: max(calc(env(safe-area-inset-top, 0px) + 8px), var(--cd-push, 0px));
    left: 50%; transform: translateX(-50%);
    width: min(380px, calc(100vw - 16px));
    display: flex; flex-direction: column; align-items: stretch; gap: 8px;
    transition: top .3s ease;
}
@media (min-width: 769px) {
    .pmn-stack { left: auto; right: 16px; transform: none; width: 340px; top: max(calc(var(--top-bar-h, 60px) + 12px), var(--cd-push, 0px)); }
}
.pmn {
    position: relative; pointer-events: auto; cursor: pointer; touch-action: none;
    display: flex; flex-direction: column; align-items: center; text-align: center;
    padding: 12px 42px 12px; border-radius: 20px; color: #fff; overflow: hidden;
    background:
        linear-gradient(160deg, rgba(30, 30, 30, .86), rgba(12, 12, 12, .9)) padding-box,
        linear-gradient(150deg, rgba(255, 107, 53, .7), rgba(247, 201, 72, .35) 55%, rgba(255, 255, 255, .08)) border-box;
    border: 1px solid transparent;
    -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .55), 0 0 20px rgba(255, 107, 53, .12), inset 0 1px 0 rgba(255, 255, 255, .07);
    animation: pmnIn .36s cubic-bezier(.2, .9, .3, 1.15);
    transition: opacity .3s ease, transform .3s ease;
    -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.pmn:focus-visible { outline: 2px solid #F7C948; outline-offset: 2px; }
@keyframes pmnIn { from { opacity: 0; transform: translateY(-16px) scale(.96); } }
.pmn.pmn-drag { transition: none; }
.pmn.pmn-out { opacity: 0; transform: translateY(-12px) scale(.97); pointer-events: none; }
.pmn.pmn-gone { opacity: 0; transform: translate3d(var(--pmn-fx, 0px), var(--pmn-fy, -160px), 0) !important; pointer-events: none; }
.pmn.pmn-bump { animation: pmnBump .4s ease; }
@keyframes pmnBump { 40% { transform: scale(1.03); } }

.pmn-ic, .pmn-x { position: absolute; top: 10px; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.pmn-ic { left: 10px; color: #FF8C5A; background: rgba(255, 107, 53, .12); border: 1px solid rgba(255, 107, 53, .28); }
.pmn-x { right: 10px; padding: 0; cursor: pointer; color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); transition: color .2s, border-color .2s; }
.pmn-x:hover, .pmn-x:focus-visible { color: #fff; border-color: rgba(255, 107, 53, .6); outline: none; }

.pmn-av { display: block; width: 44px; height: 44px; padding: 2px; flex: 0 0 auto;
    clip-path: var(--pee-penta, polygon(50% 0%, 100% 37.2%, 84.1% 100%, 15.9% 100%, 0% 37.2%));
    background: linear-gradient(135deg, #FF6B35, #F7C948); }
.pmn-av > i { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; padding-top: 12%; font-style: normal;
    clip-path: var(--pee-penta, polygon(50% 0%, 100% 37.2%, 84.1% 100%, 15.9% 100%, 0% 37.2%));
    background: #161210 center / cover no-repeat; color: #FF6B35; font: 800 1.05rem/1 'Orbitron', sans-serif; }
.pmn-av > i.pmn-img { padding-top: 0; }
.pmn-who { margin-top: 6px; max-width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; }
.pmn-lv { display: inline-flex; flex: 0 0 auto; line-height: 0; }
.pmn-lv:empty { display: none; }
.pmn-lv svg { height: 14px; width: auto; }
.pmn-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 .98rem/1.15 var(--font-sub, 'Rajdhani', sans-serif); letter-spacing: .2px; }
.pmn-time { flex: 0 0 auto; font: 500 .72rem/1 'Inter', sans-serif; color: rgba(255, 255, 255, .5); }
.pmn-txt { margin-top: 3px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 .82rem/1.35 'Inter', sans-serif; color: rgba(255, 255, 255, .84); }
.pmn-txt img { height: 1.15em; width: auto; vertical-align: -.2em; }
.pmn-count { margin-top: 7px; padding: 3px 10px; border-radius: 99px; background: linear-gradient(135deg, #FF6B35, #F7C948); color: #0A0A0A;
    font: 800 .7rem/1.2 var(--font-sub, 'Rajdhani', sans-serif); letter-spacing: .4px; text-transform: uppercase; box-shadow: 0 3px 10px rgba(255, 107, 53, .3); }
.pmn-count[hidden] { display: none; }

/* petite carte : autoriser les alertes du navigateur (une seule fois) */
.pmn.pmn-ask { cursor: default; padding: 14px 16px 14px; }
.pmn-bell { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #0A0A0A; background: linear-gradient(135deg, #FF6B35, #F7C948); box-shadow: 0 4px 14px rgba(255, 107, 53, .35); }
.pmn-ask-t { margin-top: 8px; font: 800 .95rem/1.2 var(--font-sub, 'Rajdhani', sans-serif); }
.pmn-ask-d { margin-top: 2px; font: 500 .76rem/1.4 'Inter', sans-serif; color: rgba(255, 255, 255, .6); }
.pmn-pair { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.pmn-b { height: 38px; border-radius: 11px; cursor: pointer; font: 700 .88rem/1 var(--font-sub, 'Rajdhani', sans-serif); letter-spacing: .3px; transition: filter .2s, transform .15s; }
.pmn-b:active { transform: scale(.96); }
.pmn-later { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); color: rgba(255, 255, 255, .82); }
.pmn-yes { background: linear-gradient(135deg, #FF6B35, #F7C948); border: 0; color: #0A0A0A; box-shadow: 0 4px 14px rgba(255, 107, 53, .3); }
.pmn-b:hover { filter: brightness(1.08); }
.pmn-b:focus-visible { outline: 2px solid #F7C948; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    .pmn, .pmn.pmn-bump { animation: none; }
    .pmn-stack { transition: none; }
}
