/*
 * header-nav.css — Site-wide nav + mobile menu.
 */

.rpv-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: var(--z-nav);
    background: rgba(7, 9, 15, 0.92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
/* Compenser la hauteur du header fixe pour que le contenu ne parte pas dessous */
body { padding-top: var(--rpv-header-h, 56px); }
.rpv-header-inner {
    max-width: var(--app-max);
    margin: 0 auto;
    padding: var(--s-2) var(--app-gutter);
    display: flex; align-items: center; gap: var(--s-3);
}
.rpv-logo {
    display: flex; align-items: center; gap: var(--s-2);
    text-decoration: none;
}
.rpv-logo img { height: 36px; width: auto; }
.rpv-logo-text {
    font-family: var(--font-display); font-weight: 900;
    color: var(--text-1); font-size: 15px; letter-spacing: -0.5px;
}
.rpv-logo-text em {
    font-style: normal; color: var(--orange);
}
.rpv-tagline {
    font-family: var(--font-text);
    font-size: var(--fs-meta);
    font-weight: 500;
    color: var(--text-3);
    letter-spacing: 0.5px;
    white-space: nowrap;
    margin-left: 2px;
    padding-left: 8px;
    border-left: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 480px) { .rpv-tagline { display: none; } }

.rpv-nav { display: flex; gap: var(--s-1); margin-left: auto; }
.rpv-nav a {
    padding: 8px 14px; border-radius: var(--r-pill);
    color: var(--text-2); text-decoration: none;
    font-family: var(--font-text); font-weight: 600; font-size: var(--fs-small);
    display: inline-flex; align-items: center; gap: 6px;
    transition: color var(--t-fast), background var(--t-fast);
}
.rpv-nav a:hover { color: var(--text-1); background: var(--bg-2); }
.rpv-nav a.active { color: var(--orange); }
.rpv-nav a.active::after {
    content: ''; width: 4px; height: 4px; background: var(--orange);
    border-radius: 50%; display: inline-block; margin-left: 4px;
}

/* Liens DJ / Admin dans le nav */
.rpv-nav a.nav-link-dj { color: var(--cyan); }
.rpv-nav a.nav-link-dj:hover { color: var(--text-1); background: rgba(0,200,255,0.12); }
.rpv-nav a.nav-link-admin { color: var(--orange); }
.rpv-nav a.nav-link-admin:hover { color: var(--text-1); background: rgba(255,107,0,0.12); }
.rpv-mobile-nav a.nav-link-dj { color: var(--cyan); }
.rpv-mobile-nav a.nav-link-admin { color: var(--orange); }

.rpv-nav-actions { display: flex; align-items: center; gap: var(--s-2); margin-left: auto; }
@media (min-width: 1024px) { .rpv-nav-actions { margin-left: 0; } }

.rpv-burger {
    display: none;
    background: none; border: none;
    color: var(--text-1); font-size: 22px; cursor: pointer;
    padding: 8px 12px;
    min-width: var(--touch-min);
    min-height: var(--touch-min);
    align-items: center;
    justify-content: center;
}

@media (max-width: 1023px) {
    .rpv-nav { display: none; }
    .rpv-burger { display: inline-block; }
}

.rpv-mobile-nav {
    position: fixed; inset: 0 0 0 20%;
    background: var(--bg-1); border-left: 1px solid var(--border);
    padding: var(--s-5) var(--s-4);
    transform: translateX(100%); transition: transform var(--t-normal);
    z-index: 300;                /* bien au-dessus du header (95) et player bar (94) */
    display: flex; flex-direction: column; gap: var(--s-1);
    overflow-y: auto;
}
.rpv-mobile-nav.active { transform: translateX(0); }
.rpv-mobile-nav a {
    padding: 14px 16px; border-radius: var(--r-md);
    color: var(--text-1); text-decoration: none;
    font-family: var(--font-text); font-weight: 600; font-size: 16px;
    display: flex; align-items: center; gap: 12px;
    min-height: var(--touch-min);
}
.rpv-mobile-nav a:hover, .rpv-mobile-nav a.active {
    background: var(--bg-2); color: var(--orange);
}
.rpv-mobile-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55);
    z-index: 299; display: none;   /* juste sous le nav drawer */
}
.rpv-mobile-overlay.active { display: block; }

/* ===== BOUTON CONNEXION (non connecté) ===== */
.rpv-btn-login {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: var(--r-pill);
    background: var(--orange); color: #fff;
    font-family: var(--font-text); font-weight: 700; font-size: 13px;
    text-decoration: none; white-space: nowrap;
    transition: background var(--t-fast);
}
.rpv-btn-login:hover { background: #e05800; }
.rpv-btn-login span { display: none; }
@media (min-width: 480px) { .rpv-btn-login span { display: inline; } }

/* ===== BOUTON UTILISATEUR ===== */
.rpv-user-btn {
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--bg-2); border: 1px solid var(--border);
    border-radius: var(--r-pill); padding: 5px 10px 5px 6px;
    color: var(--text-1); font-family: var(--font-text);
    font-weight: 600; font-size: 13px; cursor: pointer;
    transition: background var(--t-fast), border-color var(--t-fast);
    white-space: nowrap; max-width: 200px;
}
.rpv-user-btn:hover { background: var(--bg-2); border-color: var(--orange); }
.rpv-user-btn[aria-expanded="true"] { border-color: var(--orange); }
.rpv-user-avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.rpv-user-icon { font-size: 20px; color: var(--orange); line-height: 1; flex-shrink: 0; }
.rpv-user-pseudo { overflow: hidden; text-overflow: ellipsis; max-width: 100px; }
@media (max-width: 479px) { .rpv-user-pseudo { display: none; } }
.rpv-user-caret { font-size: 9px; color: var(--text-3); flex-shrink: 0; transition: transform .2s; }
.rpv-user-btn[aria-expanded="true"] .rpv-user-caret { transform: rotate(180deg); }

/* ===== DROPDOWN UTILISATEUR (position:fixed via JS, hors stacking context) ===== */
.rpv-user-dropdown {
    position: fixed;           /* sort du stacking context du header */
    z-index: 9999;             /* au-dessus de tout */
    background: #111720;
    border: 1px solid rgba(255,107,0,0.25);
    border-radius: 12px; padding: 6px;
    min-width: 200px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.04);
    display: none;
    transform-origin: top right;
}
.rpv-user-dropdown.open {
    display: block;
    animation: dropOpen .15s ease;
}
@keyframes dropOpen {
    from { opacity: 0; transform: scale(.95) translateY(-4px); }
    to   { opacity: 1; transform: scale(1)  translateY(0);    }
}
.rpv-user-dropdown a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 13px; border-radius: 8px;
    color: var(--text-1); text-decoration: none;
    font-family: var(--font-text); font-weight: 600; font-size: 13.5px;
    transition: background .15s, color .15s;
}
.rpv-user-dropdown a:hover { background: rgba(255,255,255,0.06); color: var(--orange); }
.rpv-user-dropdown a.nav-link-dj  { color: #00c8ff; }
.rpv-user-dropdown a.nav-link-dj:hover  { background: rgba(0,200,255,.08); color: #00d8ff; }
.rpv-user-dropdown a.nav-link-admin { color: #ff8c42; }
.rpv-user-dropdown a.nav-link-admin:hover { background: rgba(255,107,0,.08); color: var(--orange); }
.rpv-user-dropdown .rpv-user-logout { color: #ff5555; }
.rpv-user-dropdown .rpv-user-logout:hover { background: rgba(255,60,60,.1); color: #ff3333; }
.rpv-user-sep { height: 1px; background: rgba(255,255,255,0.07); margin: 5px 0; }

/* ===== MOBILE USER INFO ===== */
.rpv-mobile-user-info {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px 14px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 6px;
    font-family: var(--font-text); font-weight: 700;
    font-size: 15px; color: var(--text-1);
}
.rpv-mobile-sep { height: 1px; background: var(--border); margin: 8px 0; }

/* ================================================================
   LAYOUT 2 NIVEAUX — nav + player bar (refonte 2026-05-01)
   ================================================================ */
:root {
    --rpv-header-h:  56px;   /* hauteur nav */
    --rpv-player-h:  52px;   /* hauteur player bar */
}
@media (min-width: 1025px) {
    :root {
        --rpv-header-h: 60px;
        --rpv-player-h: 56px;
    }
}

/* ── CLOCHE — disparaît une fois les notifications activées ── */
.notif-bell.active { display: none !important; }

/* ── PLAYER BAR (niveau 2 — sous la nav) ── */
.rpv-player-bar {
    position: sticky;
    top: var(--rpv-header-h);
    z-index: calc(var(--z-nav) - 1);
    background: rgba(10, 8, 6, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 107, 0, 0.18);
    height: var(--rpv-player-h);
}

/* Layout compact centré — pas de flex:1 sur l'info pour éviter l'espace perdu */
.rpv-player-inner {
    max-width: var(--app-max);
    margin: 0 auto;
    padding: 0 var(--app-gutter);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;   /* centré horizontalement */
    gap: 10px;
}

/* Pochette */
.rpv-player-cover {
    width: 38px; height: 38px;
    border-radius: var(--r-md);
    background: var(--bg-3) center/cover no-repeat;
    flex-shrink: 0; cursor: pointer;
    transition: transform var(--t-fast);
    position: relative; overflow: hidden;
}
.rpv-player-cover:hover { transform: scale(1.05); }
@media (max-width: 479px) { .rpv-player-cover { display: none; } }
/* Placeholder icône quand aucune pochette n'est chargée */
.rpv-player-cover:not([style*="url("])::after {
    content: '\f001'; /* fa-music */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 14px;
    color: rgba(255,255,255,0.2);
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
}

/* Info titre + artiste — largeur bornée, pas d'expansion illimitée */
.rpv-player-info {
    flex: 0 1 300px;      /* max 300px, peut réduire */
    min-width: 100px;
    cursor: pointer;
    display: flex; flex-direction: column; justify-content: center;
    overflow: hidden;      /* nécessaire pour le défilement du titre */
}
@media (min-width: 1025px) { .rpv-player-info { flex-basis: 380px; } }

/* Titre avec défilement si trop long */
.rpv-player-title-wrap {
    overflow: hidden;
    width: 100%;
}
.rpv-player-title {
    display: inline-block;
    font-size: 13px; font-weight: 700; color: var(--text-1);
    white-space: nowrap; line-height: 1.2;
    will-change: transform;
}
/* Classe ajoutée par JS quand le titre déborde */
.rpv-player-title.is-scrolling {
    animation: rpv-title-scroll 14s ease-in-out infinite;
}
@keyframes rpv-title-scroll {
    0%, 12%  { transform: translateX(0); }
    45%, 58% { transform: translateX(var(--rpv-scroll, -60px)); }
    91%, 100% { transform: translateX(0); }
}

.rpv-player-artist {
    font-size: 11px; color: var(--text-3);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2;
}
.rpv-player-live { color: var(--red); font-weight: 700; font-size: 10px; margin-right: 4px; }
#wow-mp-artist { color: var(--orange); font-weight: 600; }
#wow-mp-next   { color: rgba(255,255,255,0.35); margin-left: 4px; }

/* Auditeurs */
.rpv-player-listeners {
    display: none; align-items: center; gap: 5px;
    font-size: 11px; color: var(--text-3); flex-shrink: 0;
}
@media (min-width: 768px) { .rpv-player-listeners { display: flex; } }

/* Volume */
.rpv-player-vol {
    display: none; align-items: center; gap: 6px; flex-shrink: 0;
}
@media (min-width: 600px) { .rpv-player-vol { display: flex; } }
.rpv-player-vol i { font-size: 13px; color: var(--text-3); }
#wow-mp-vol { width: 80px; accent-color: var(--orange); cursor: pointer; }
@media (min-width: 1025px) { #wow-mp-vol { width: 110px; } }

/* Bouton Play/Pause */
.rpv-player-play {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--orange); border: none; color: #fff;
    cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    transition: background var(--t-fast), transform var(--t-fast);
    min-width: var(--touch-min); min-height: var(--touch-min);
}
.rpv-player-play:hover { background: var(--orange-hi); transform: scale(1.05); }
.rpv-player-play .ic-pause { display: none; }
body.wow-playing .rpv-player-play .ic-play  { display: none; }
body.wow-playing .rpv-player-play .ic-pause { display: inline; }

/* Bouton expand */
.rpv-player-expand {
    height: 32px; border-radius: var(--r-md);
    background: rgba(255,107,0,0.12); border: 1px solid rgba(255,107,0,0.25);
    color: var(--orange); cursor: pointer; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; gap: 4px;
    padding: 0 10px;
    font-size: 13px; transition: color var(--t-fast), background var(--t-fast);
    white-space: nowrap;
}
.rpv-player-expand:hover { color: #fff; background: rgba(255,107,0,0.25); }
@media (max-width: 360px) { .rpv-player-expand { display: none; } }
.rpv-expand-label { font-size: 11px; font-weight: 700; display: none; }
@media (min-width: 520px) { .rpv-expand-label { display: inline; } }

/* Temps de lecture */
.rpv-player-time {
    display: none; font-size: 10px; color: var(--text-3);
    font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0;
    letter-spacing: 0.3px;
}
@media (min-width: 640px) { .rpv-player-time { display: block; } }

/* Barre de progression (read-only, au bas de la barre player) */
.rpv-progress-bar {
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 3px; background: rgba(255,255,255,0.07); overflow: hidden;
}
.rpv-progress-fill {
    height: 100%; width: 0%;
    background: var(--orange);
    transition: width 1s linear;
}

/* Avatar photo dans le badge fan JS (showFanBadge) */
.rpv-fan-badge .fan-avatar-img {
    width: 24px; height: 24px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
    border: 1.5px solid rgba(255,255,255,0.2);
    vertical-align: middle;
}
