/* ============================================================
   Xibar Native — modules/xn-radio.css
   Module « Radio » : barre radio fixe en bas de page et bouton flottant.
   Feuille enfilée seulement si le module est actif (handle
   xibar-module-radio, inc/enqueue.php, lot L10). Règles extraites de
   xn.css, dans leur ordre d'origine.
   ============================================================ */

/* ── BARRE RADIO FIXE BAS ─────────────────────────────────── */
.xn-radio-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 1000;
    height: 52px;
    display: flex;
    align-items: center;
    gap: var(--xn-space-md);
    padding: 0 var(--xn-space-md);
    background: var(--xn-color-dark);
    color: var(--xn-color-white);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, .25);
    font-size: 13px;
}
.xn-radio-bar.is-hidden { display: none; }

.xn-radio-bar__play {
    width: 36px; height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--xn-color-blue);
    color: var(--xn-color-white);
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--xn-transition);
}
.xn-radio-bar__play:hover { background: var(--xn-color-blue-dark); }
.xn-radio-bar__icon-pause { display: none; }
.xn-radio-bar.is-playing .xn-radio-bar__icon-play  { display: none; }
.xn-radio-bar.is-playing .xn-radio-bar__icon-pause { display: inline; }

.xn-radio-bar__label {
    flex-shrink: 0;
    font-weight: 600;
    letter-spacing: .02em;
}
.xn-radio-bar__progress {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, .18);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    min-width: 60px;
}
.xn-radio-bar__progress-bar {
    position: absolute;
    inset: 0;
    width: 30%;
    background: var(--xn-color-blue);
    border-radius: inherit;
    animation: xn-radio-pulse 2.5s ease-in-out infinite;
}
.xn-radio-bar:not(.is-playing) .xn-radio-bar__progress-bar { animation: none; opacity: .4; }
@keyframes xn-radio-pulse {
    0%   { width: 10%; }
    50%  { width: 75%; }
    100% { width: 10%; }
}

.xn-radio-bar__volume-icon { font-size: 16px; flex-shrink: 0; }
.xn-radio-bar__volume {
    width: 100px;
    flex-shrink: 0;
    accent-color: var(--xn-color-blue);
    cursor: pointer;
}
.xn-radio-bar__close {
    margin-left: auto;
    width: 32px; height: 32px;
    border: none;
    background: transparent;
    color: var(--xn-color-white);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    opacity: .7;
    transition: opacity var(--xn-transition);
    flex-shrink: 0;
}
.xn-radio-bar__close:hover { opacity: 1; }

/* Eviter que le contenu page soit masque par la barre radio */
body:has(.xn-radio-bar:not(.is-hidden)) { padding-bottom: 52px; }

/* FAB radio (bouton flottant bottom-right, visible quand barre cachee) */
.xn-radio-fab {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--xn-color-blue);
    color: var(--xn-color-white);
    border: none;
    cursor: pointer;
    box-shadow: var(--xn-shadow-md);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: transform var(--xn-transition), background var(--xn-transition);
}
.xn-radio-fab:hover {
    background: var(--xn-color-blue-dark);
    transform: scale(1.1);
}
.xn-radio-fab.is-visible { display: flex; }
/* Icone Tabler « radio » (lot L14, D14-14) : 24 px, taille de l'ancien SVG en ligne. */
.xn-scope .xn-radio-fab .xn-icon { width: 24px; height: 24px; }

@media (max-width: 600px) {
    .xn-radio-bar { gap: var(--xn-space-sm); padding: 0 var(--xn-space-sm); font-size: 12px; }
    .xn-radio-bar__volume { width: 70px; }
    .xn-radio-bar__label { display: none; }
}
