/* HaikoRadio — composants propres à ce site (le thème de base est dans style.css, repris d'omgacraft.fr) */

a.brand {
    color: inherit;
    text-decoration: none;
}

.nav-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 999px;
    transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-link:hover { color: var(--text); background: var(--surface); }

@media (max-width: 640px) {
    .nav-link-out { display: none; }
}

.inline-link {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--border-strong);
    text-underline-offset: 3px;
}

.hero-small { padding-bottom: 8px; }

.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6);
    animation: live-pulse 2s infinite;
}

@keyframes live-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.55); }
    70%  { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ---- Lecteur ---- */

.player {
    position: relative;
    max-width: 620px;
    margin: 28px auto 18px;
    padding: 34px 28px 28px;
    border-radius: var(--radius-lg, 24px);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--card-shadow);
    text-align: center;
    overflow: hidden;
}

.player::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 420px 220px at 50% 0%, rgba(var(--accent-glow), 0.22), transparent 70%);
    pointer-events: none;
}

.player > * { position: relative; }

.equalizer {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    height: 64px;
    margin-bottom: 22px;
}

.equalizer span {
    width: 8px;
    height: 12%;
    border-radius: 4px;
    background: var(--btn-gradient);
    opacity: 0.55;
    transition: height 0.4s var(--ease), opacity 0.4s var(--ease);
}

.player.is-playing .equalizer span {
    opacity: 1;
    animation: eq 1.1s ease-in-out infinite;
}

.equalizer span:nth-child(1) { animation-delay: -0.9s; }
.equalizer span:nth-child(2) { animation-delay: -0.3s; }
.equalizer span:nth-child(3) { animation-delay: -0.7s; }
.equalizer span:nth-child(4) { animation-delay: -0.1s; }
.equalizer span:nth-child(5) { animation-delay: -0.5s; }
.equalizer span:nth-child(6) { animation-delay: -0.8s; }
.equalizer span:nth-child(7) { animation-delay: -0.2s; }

@keyframes eq {
    0%, 100% { height: 18%; }
    50%      { height: 100%; }
}

.player.is-loading .equalizer span {
    opacity: 0.8;
    animation: eq-load 1.2s ease-in-out infinite;
}

@keyframes eq-load {
    0%, 100% { height: 12%; }
    50%      { height: 34%; }
}

.play-btn {
    display: inline-grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border: 0;
    border-radius: 50%;
    background: var(--btn-gradient);
    color: var(--btn-text);
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(var(--accent-glow), 0.35);
    transition: transform 0.2s var(--ease), filter 0.2s var(--ease);
}

.play-btn:hover:not(:disabled) { transform: scale(1.06); filter: brightness(1.1); }
.play-btn:active:not(:disabled) { transform: scale(0.97); }
.play-btn:disabled { opacity: 0.5; cursor: default; }
.play-btn:focus-visible { outline: 3px solid rgba(var(--accent-glow), 0.7); outline-offset: 4px; }

.play-btn .icon-pause { display: none; }
.player.is-playing .play-btn .icon-play,
.player.is-loading .play-btn .icon-play { display: none; }
.player.is-playing .play-btn .icon-pause,
.player.is-loading .play-btn .icon-pause { display: block; }

.player-status {
    min-height: 1.5em;
    margin: 18px 0 22px;
    color: var(--muted);
    font-size: 0.95rem;
}

.player.is-playing .player-status { color: var(--text); font-weight: 600; }

.player-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 18px 28px;
}

.volume {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 0.88rem;
}

.volume input[type="range"] {
    width: 150px;
    accent-color: rgb(var(--accent-glow));
}

.quality {
    display: inline-flex;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--input-bg);
}

.quality-btn {
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.86rem;
    cursor: pointer;
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.quality-btn:hover { color: var(--text); }

.quality-btn[aria-pressed="true"] {
    background: var(--btn-gradient);
    color: var(--btn-text);
}

@media (prefers-reduced-motion: reduce) {
    .live-dot,
    .player.is-playing .equalizer span,
    .player.is-loading .equalizer span { animation: none; }
    .player.is-playing .equalizer span { height: 60%; }
}

/* ---- Textes et panneau « Écouter ailleurs » ---- */

.note {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 14px 0 0;
}

.note-top { margin: 0 0 16px; }

.center-note {
    max-width: 620px;
    margin: 0 auto 28px;
    text-align: center;
}

.panel {
    max-width: 620px;
    margin: 0 auto 18px;
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--card-shadow);
}

.panel h2 {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: 1.15rem;
}

.stream-links { display: grid; gap: 16px; }

.stream-link { display: grid; gap: 6px; font-size: 0.88rem; font-weight: 600; }

.copy-row { display: flex; gap: 8px; }

.copy-row input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.82rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--surface);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    width: auto;
    box-shadow: none;
    cursor: pointer;
    transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.btn:hover { background: var(--surface-hover); transform: translateY(-2px); box-shadow: none; }
.btn-small { padding: 8px 16px; font-size: 0.85rem; flex: none; }

.btn-primary {
    background: var(--btn-gradient);
    border-color: transparent;
    color: var(--btn-text);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 28px;
}

.center { justify-content: center; text-align: center; }

/* ---- Morceau en cours ---- */

.nowplaying {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 620px;
    margin: 0 auto 18px;
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: var(--card-shadow);
}

.np-cover {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    width: 96px;
    height: 96px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--btn-gradient);
    color: var(--btn-text);
    font-size: 2.4rem;
}

.np-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.np-cover.has-image .np-cover-fallback { visibility: hidden; }

.np-text { min-width: 0; }

.np-label {
    display: flex;
    align-items: center;
    margin: 0 0 6px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.np-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 3.4vw, 1.4rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.np-artist {
    margin: 4px 0 0;
    color: var(--text);
    opacity: 0.85;
    overflow-wrap: anywhere;
}

.np-artist:empty { display: none; }

.np-meta {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.np-meta:empty { display: none; }

@media (max-width: 480px) {
    .nowplaying { gap: 14px; padding: 16px; }
    .np-cover { width: 72px; height: 72px; font-size: 1.8rem; border-radius: 14px; }
}

/* ---- Historique ---- */

.history {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: grid;
}

.history li {
    display: flex;
    align-items: baseline;
    gap: 14px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
}

.history li:first-child { border-top: 0; }

.history-time {
    flex: none;
    width: 3.2em;
    color: var(--muted);
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.history-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.history-text strong { display: block; font-size: 0.93rem; font-weight: 600; }
.history-text small { display: block; color: var(--muted); font-size: 0.82rem; margin-top: 2px; }

.history-duration {
    flex: none;
    color: var(--muted);
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}

/* ---- Pochettes et album ---- */

.np-album {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.86rem;
    overflow-wrap: anywhere;
}

.np-album:empty { display: none; }

.history li { align-items: center; }

.history-cover {
    display: grid;
    place-items: center;
    flex: none;
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--input-bg);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 1.1rem;
}

.history-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 480px) {
    .history li { gap: 10px; }
    .history-time { width: 2.9em; }
    .history-cover { width: 38px; height: 38px; }
}

/* ---- Œuvre (anime, jeu, série…) ---- */

.np-work {
    display: inline-block;
    margin: 8px 0 0;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: var(--input-bg);
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.np-work:empty { display: none; }
