/* Palenzir — thème (sombre / clair) + barre commune (menu en haut à gauche, thème + Discord en haut à droite). */
:root, :root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #111111; --bg-deep: #0a0a0a; --surface: #1a1a1a; --surface2: #262626; --glow: #232323;
    --line: rgba(255,255,255,0.12); --text: #e8e8e8; --text-strong: #ffffff; --muted: #9b9b9b; --dim: #666666;
    --accent: #f2f2f2; --accent-ink: #111111; --accent-soft: rgba(255,255,255,0.09); --shadow: rgba(0,0,0,0.6);
}
:root[data-theme="light"] {
    color-scheme: light;
    --bg: #f1e9da; --bg-deep: #e4d9c4; --surface: #faf5ea; --surface2: #eadfca; --glow: #f8f1e2;
    --line: rgba(70,50,20,0.18); --text: #3a3226; --text-strong: #1f1a12; --muted: #756a58; --dim: #9a8f7b;
    --accent: #2b2418; --accent-ink: #faf5ea; --accent-soft: rgba(70,50,20,0.09); --shadow: rgba(70,50,20,0.2);
}
body { background-color: var(--bg); color: var(--text); }

.pn-bar { position: fixed; top: 12px; left: 12px; right: 12px; z-index: 1000; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; pointer-events: none; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
.pn-bar > * { pointer-events: auto; }
.pn-menu { position: relative; }
.pn-menu-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; background: var(--surface); color: var(--text-strong); border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; transition: border-color .15s; }
.pn-menu-btn:hover, .pn-menu.is-open .pn-menu-btn { border-color: var(--muted); }
.pn-chev { width: 14px; height: 14px; color: var(--muted); transition: transform .18s; }
.pn-menu.is-open .pn-chev { transform: rotate(180deg); }
.pn-menu-liste { position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px; padding: 6px; display: none; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 34px var(--shadow); }
.pn-menu.is-open .pn-menu-liste { display: flex; }
.pn-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 12px; border-radius: 7px; color: var(--text); font-size: 13.5px; font-weight: 600; text-decoration: none; }
a.pn-item:hover { background: var(--accent-soft); color: var(--text-strong); }
.pn-item.is-current { background: var(--accent-soft); color: var(--text-strong); }
.pn-item.is-disabled { color: var(--dim); opacity: .7; cursor: not-allowed; }
.pn-soon { font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); }
.pn-ext { width: 14px; height: 14px; flex-shrink: 0; color: var(--dim); }
a.pn-item:hover .pn-ext { color: var(--text-strong); }
.pn-account { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pn-theme { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; background: var(--surface); color: var(--text-strong); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; transition: border-color .15s; }
.pn-theme:hover { border-color: var(--muted); }
.pn-theme svg { width: 17px; height: 17px; }
.pn-theme .pn-moon { display: none; }
:root[data-theme="light"] .pn-theme .pn-sun { display: none; }
:root[data-theme="light"] .pn-theme .pn-moon { display: block; }
.pn-login { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; background: #5865F2; color: #fff; border: 0; border-radius: 8px; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .15s; }
.pn-login:hover { background: #4752C4; }
.pn-avatar { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); object-fit: cover; }
.pn-logout { background: none; border: 0; color: var(--muted); font-size: 11.5px; cursor: pointer; padding: 0; }
.pn-logout:hover { color: var(--text-strong); }
@media (max-width: 520px) { .pn-logout { display: none; } .pn-account:hover .pn-logout { display: inline; } }
