/* « Moments » du joueur (2026-10-17) : rapport « Pendant ton absence » et célébrations. Voir js/player-moments.js. */
:root {
    --pm-bg: #0d1a2e;
    --pm-card: #12233d;
    --pm-border: rgba(96, 165, 250, .35);
    --pm-text: #e8f0fb;
    --pm-muted: #a9bad1;
    --pm-accent: #3b82f6;
    --pm-urgent: #f97316;
    --pm-good: #22c55e;
    --pm-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
:root[data-theme="light"] { --pm-bg: #f4f7fb; --pm-card: #ffffff; --pm-border: rgba(37, 99, 235, .3); --pm-text: #0f1b2d; --pm-muted: #4b5d75; }

.pm-absence { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 16px; background: rgba(2, 6, 18, .66); backdrop-filter: blur(3px); animation: pm-fade .25s ease; }
.pm-absence-card { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-sizing: border-box; padding: 20px; border-radius: 18px; border: 1px solid var(--pm-border); background: var(--pm-card); color: var(--pm-text); box-shadow: var(--pm-shadow); animation: pm-rise .35s cubic-bezier(.2, .9, .3, 1.2); }
.pm-absence-card header { margin-bottom: 10px; }
.pm-kicker { margin: 0; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--pm-accent); font-weight: 700; }
.pm-absence-card h2 { margin: 2px 0 4px; font-size: 1.35rem; }
.pm-absence-card header small { color: var(--pm-muted); }
.pm-section { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--pm-bg); border-left: 4px solid var(--pm-border); }
.pm-section.is-urgent { border-left-color: var(--pm-urgent); }
.pm-section.is-good { border-left-color: var(--pm-good); }
.pm-section h3 { margin: 0 0 6px; font-size: .92rem; }
.pm-section ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pm-section li { display: grid; grid-template-columns: 22px 1fr; gap: 6px 8px; align-items: start; font-size: .9rem; line-height: 1.4; }
.pm-section li .pm-action { grid-column: 2; justify-self: start; }
.pm-action, .pm-secondary, .pm-primary { display: inline-block; padding: 7px 12px; border-radius: 9px; font-weight: 700; font-size: .86rem; text-decoration: none; cursor: pointer; border: 0; }
.pm-action { background: var(--pm-urgent); color: #fff; }
.pm-secondary { background: transparent; color: var(--pm-text); border: 1px solid var(--pm-border); }
.pm-primary { background: var(--pm-accent); color: #fff; padding: 9px 18px; font-size: .95rem; }
.pm-absence-card footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 16px; }

.pm-celebration { position: fixed; left: 50%; top: 18px; z-index: 100001; transform: translateX(-50%); width: min(420px, calc(100vw - 32px)); pointer-events: none; }
.pm-celebration-card { pointer-events: auto; cursor: pointer; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(250, 204, 21, .6); background: linear-gradient(135deg, #1e3a8a, #0f1b33); color: #fff; box-shadow: 0 18px 50px rgba(0, 0, 0, .45), 0 0 0 4px rgba(250, 204, 21, .15); animation: pm-pop .5s cubic-bezier(.2, 1.4, .4, 1); }
.pm-celebration.is-big .pm-celebration-card { padding: 18px 20px; }
.pm-celebration-icon { font-size: 2rem; line-height: 1; animation: pm-bounce 1s ease .3s 2; }
.pm-celebration.is-big .pm-celebration-icon { font-size: 2.6rem; }
.pm-celebration strong { display: block; font-size: 1.1rem; }
.pm-celebration small { display: block; margin-top: 2px; color: #dbe7ff; }
.pm-sound { pointer-events: auto; border: 0; background: rgba(255, 255, 255, .12); color: #fff; border-radius: 8px; padding: 4px 6px; cursor: pointer; font-size: 1rem; }
.pm-celebration.is-leaving { transition: opacity .35s ease, transform .35s ease; opacity: 0; transform: translate(-50%, -12px); }
.pm-confetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.pm-confetti i { position: absolute; top: -12px; width: 8px; height: 13px; border-radius: 2px; opacity: .95; animation-name: pm-fall; animation-timing-function: cubic-bezier(.3, .6, .5, 1); animation-fill-mode: forwards; }

@keyframes pm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pm-rise { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes pm-pop { from { opacity: 0; transform: translateY(-16px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes pm-bounce { 0%, 100% { transform: none; } 40% { transform: translateY(-6px) rotate(-8deg) scale(1.15); } }
@keyframes pm-fall { to { transform: translate(var(--pm-drift, 0), 105vh) rotate(720deg); opacity: .9; } }
@media (prefers-reduced-motion: reduce) {
    .pm-absence, .pm-absence-card, .pm-celebration-card, .pm-celebration-icon { animation: none; }
}
@media (max-width: 480px) {
    .pm-absence-card { padding: 16px; }
    .pm-absence-card footer { justify-content: stretch; }
    .pm-absence-card footer > * { flex: 1; text-align: center; }
}
