/* BIG BROTHER IS RAVING YOU — style.css */

:root {
    --red:      #e60000;
    --red-dim:  #2e0000;
    --text:     #ddd8d0;
    --muted:    #5a5050;
    --font-head: Impact, 'Arial Black', 'Franklin Gothic Heavy', sans-serif;
    --font-mono: 'Courier New', Courier, monospace;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body { width: 100%; height: 100%; background: #000; }

button { font-family: inherit; cursor: pointer; }

/* ── BORDURES LATÉRALES ─────────────────────────── */
body::before,
body::after {
    content: '';
    position: fixed;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--red);
    z-index: 10;
    pointer-events: none;
}
body::before { left: 0; }
body::after  { right: 0; }

/* ── PAGE ───────────────────────────────────────── */
.page {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100dvh;
    padding: 28px 20px;
}

/* ── LOGO WRAP ──────────────────────────────────── */
/*
  Idle   : margin-top auto → logo centré verticalement
  Active : margin-top 0 → logo collé en haut
*/
.logo-wrap {
    margin-top: auto;
    transition: margin-top 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo {
    display: block;
    width: min(380px, 65vw, 52vh);
    height: auto;
    transition: width 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── IDLE ZONE ──────────────────────────────────── */
.idle-zone {
    margin-bottom: auto; /* avec logo-wrap margin-top:auto → centrage vertical */
    margin-top: 28px;
    transition: opacity 0.25s;
}

.cta-btn {
    padding: 13px 38px;
    font-family: var(--font-head);
    font-size: clamp(12px, 2.2vw, 16px);
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--text);
    background: transparent;
    border: 1.5px solid var(--red);
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.18s, color 0.18s;
}

.cta-btn:hover, .cta-btn:focus-visible { background: var(--red); color: #000; }
.cta-btn:active { transform: scale(0.97); }

/* ── ÉTAT ACTIF (body.active) ───────────────────── */
body.active .logo-wrap { margin-top: 0; }

body.active .logo { width: min(110px, 22vw, 14vh); }

body.active .idle-zone {
    display: none;
}

/* ── LECTEUR ────────────────────────────────────── */
.player-panel {
    width: 100%;
    max-width: 520px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;

    /* Caché au départ */
    opacity: 0;
    pointer-events: none;
    transform: translateY(18px);
    transition: opacity 0.45s 0.25s, transform 0.45s 0.25s;
}

body.active .player-panel {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    flex: 1;
    justify-content: center;
}

/* ─ Live ─ */
.player-live {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.player-live #listenerCount {
    color: var(--red);
    font-size: 15px;
}

.live-dot {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    flex-shrink: 0;
    animation: blink 1.3s ease-in-out infinite;
}

.player-sep { color: var(--red-dim); }

/* ─ Infos piste ─ */
.player-track {
    border-left: 2px solid var(--red);
    padding-left: 14px;
}

.player-name {
    font-family: var(--font-head);
    font-size: clamp(16px, 4vw, 26px);
    color: var(--text);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
}

.player-pos {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.1em;
    margin-top: 5px;
}

/* ─ Égaliseur ─ */
.player-eq {
    height: 32px;
    transition: opacity 0.4s;
}

.player-eq.inactive { opacity: 0.12; }

.eq-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 100%;
}

.eq-bar {
    flex: 1;
    background: var(--red);
    min-height: 2px;
    height: 2px;
    border-radius: 1px 1px 0 0;
}

@keyframes eq-dance {
    0%, 100% { height: 2px;   opacity: 0.3; }
    50%       { height: 100%; opacity: 1; }
}

.player-eq:not(.inactive) .eq-bar {
    animation: eq-dance var(--dur, 0.5s) ease-in-out var(--delay, 0s) infinite alternate;
}

/* ─ Progression boucle ─ */
.player-loop {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.player-segments {
    display: flex;
    gap: 4px;
    height: 8px;
}

.progress-segment {
    flex: 1;
    background: var(--red-dim);
    border: 1px solid #1e0000;
    transition: background 0.25s;
}

.progress-segment.filled {
    background: var(--red);
    border-color: var(--red);
}

.player-loop-time {
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--muted);
    letter-spacing: 0.1em;
}

/* ─ Contrôles ─ */
.player-controls {
    display: flex;
    justify-content: center;
    padding: 4px 0;
}

.player-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid var(--red);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.18s, box-shadow 0.18s;
}

.player-btn:hover, .player-btn:focus-visible {
    background: rgba(230, 0, 0, 0.1);
    box-shadow: 0 0 24px rgba(230, 0, 0, 0.2);
}

.player-btn:active { transform: scale(0.93); }

.btn-icon {
    width: 26px;
    height: 26px;
    fill: var(--red);
}

/* ── ANIMATIONS ─────────────────────────────────── */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.08; }
}

/* ── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 767px) {
    .page { padding: 20px 16px; }
    .player-panel { gap: 16px; }
}
