/* ============================================================
   VirtualNostalgia — Téléviseurs rétro
   4 styles : seventies, eighties, nineties, y2k
   ============================================================ */

.retro-tv {
    position: relative;
    margin: 0 auto;
    max-width: 640px;
    width: 100%;
}

.tv-screen-wrap {
    position: relative;
    background: #000;
    overflow: hidden;
}

.tv-screen-wrap iframe,
.tv-screen-wrap video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
    background: #000;
    object-fit: contain;
}

/* ---------- Lecteur cassette (chansons) ---------- */
.cassette-player {
    max-width: 560px;
    margin: 0 auto;
    background: linear-gradient(165deg, #3d3d40, #232326 55%, #17171a);
    border-radius: 18px;
    padding: 18px 18px 16px;
    box-shadow: inset 0 2px 2px rgba(255,255,255,0.12), 0 14px 32px rgba(0,0,0,0.5);
}

.cassette-shell {
    position: relative;
    background: linear-gradient(180deg, #2e2e33, #1b1b1f);
    border: 2px solid #0c0c0e;
    border-radius: 10px;
    padding: 14px 16px 12px;
    margin-bottom: 12px;
}

.cassette-label {
    background: #f5ead1;
    border-radius: 6px;
    padding: 8px 12px 6px;
    text-align: center;
    margin-bottom: 10px;
    border-top: 12px solid #e0563e;
}

.cassette-label .song-title {
    font-family: var(--font-display);
    font-weight: 700;
    color: #2c2c31;
    font-size: 0.98rem;
    line-height: 1.25;
}

.cassette-label .song-artist { font-family: cursive; color: #6b6255; font-size: 0.85rem; }

.cassette-reels {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: #141416;
    border-radius: 20px;
    padding: 8px 14px;
    width: max-content;
    margin: 0 auto;
}

.cassette-reel {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e8e2d5;
    position: relative;
    animation: reel-spin 3.2s linear infinite;
}

.cassette-player:hover .cassette-reel { animation-duration: 1.1s; }

.cassette-reel::before, .cassette-reel::after {
    content: '';
    position: absolute;
    background: #141416;
    left: 50%;
    top: 50%;
}

.cassette-reel::before { width: 4px; height: 24px; transform: translate(-50%, -50%); }
.cassette-reel::after { width: 24px; height: 4px; transform: translate(-50%, -50%); }

@keyframes reel-spin {
    from { transform: rotate(0); }
    to { transform: rotate(360deg); }
}

.cassette-window { width: 56px; height: 18px; background: #3a3a40; border-radius: 4px; }

.cassette-meta {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-retro);
    color: var(--accent);
    font-size: 0.9rem;
    letter-spacing: 1px;
    padding: 0 4px 8px;
}

.cassette-embed { border-radius: 10px; overflow: hidden; background: #000; }
.cassette-embed iframe { width: 100%; height: 120px; border: none; display: block; }

.cassette-actions { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }

.song-card { margin-bottom: 34px; }

/* Scanlines + reflet cathodique */
.tv-screen-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(0deg, rgba(0,0,0,0.13) 0 1px, transparent 1px 3px),
        radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.07), transparent 45%);
    z-index: 2;
    border-radius: inherit;
}

.tv-brand {
    font-family: 'VT323', monospace;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.8;
    font-size: 0.9rem;
    user-select: none;
}

/* ---------- Années 70 : meuble en bois, boutons dorés ---------- */
.tv-seventies {
    background: linear-gradient(160deg, #8b5a2b, #6d4520 55%, #5a3719);
    border-radius: 22px;
    padding: 26px 116px 26px 26px;
    box-shadow:
        inset 0 2px 3px rgba(255,255,255,0.25),
        inset 0 -4px 8px rgba(0,0,0,0.4),
        0 18px 40px rgba(0,0,0,0.55);
}

.tv-seventies::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 16px;
    background: repeating-linear-gradient(95deg, transparent 0 14px, rgba(0,0,0,0.06) 14px 16px);
    pointer-events: none;
}

.tv-seventies .tv-screen-wrap {
    border-radius: 38px / 30px;
    border: 6px solid #3a2812;
    box-shadow: inset 0 0 24px rgba(0,0,0,0.9);
}

.tv-seventies .tv-panel {
    position: absolute;
    top: 26px;
    bottom: 26px;
    right: 24px;
    width: 74px;
    background: linear-gradient(180deg, #4c3316, #3a2812);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 14px 0;
}

.tv-seventies .tv-knob {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #f0d9a8, #b8923f 60%, #8a6a25);
    box-shadow: 0 3px 6px rgba(0,0,0,0.5), inset 0 1px 2px rgba(255,255,255,0.6);
    position: relative;
}

.tv-seventies .tv-knob::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 50%;
    width: 3px;
    height: 12px;
    background: #4a3410;
    border-radius: 2px;
    transform: translateX(-50%);
}

.tv-seventies .tv-speaker {
    width: 46px;
    flex: 1;
    border-radius: 8px;
    background: repeating-linear-gradient(0deg, #2c1e0d 0 3px, #46301a 3px 6px);
}

.tv-seventies .tv-brand { position: absolute; bottom: 6px; right: 30px; color: #e8cf9a; }

.tv-seventies .tv-legs {
    position: absolute;
    bottom: -26px;
    left: 40px;
    right: 40px;
    display: flex;
    justify-content: space-between;
}

.tv-seventies .tv-legs span {
    width: 16px;
    height: 28px;
    background: linear-gradient(180deg, #5a3719, #33200c);
    border-radius: 0 0 6px 6px;
    transform: perspective(40px) rotateX(12deg);
}

/* ---------- Années 80 : CRT gris, grille haut-parleur ---------- */
.tv-eighties {
    background: linear-gradient(165deg, #b9b6ad, #8f8c83 60%, #77746c);
    border-radius: 14px;
    padding: 22px 22px 62px;
    box-shadow:
        inset 0 2px 2px rgba(255,255,255,0.5),
        inset 0 -3px 6px rgba(0,0,0,0.3),
        0 16px 36px rgba(0,0,0,0.5);
}

.tv-eighties .tv-screen-wrap {
    border-radius: 22px / 18px;
    border: 5px solid #2e2d2a;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.85);
}

.tv-eighties .tv-panel {
    position: absolute;
    bottom: 14px;
    left: 22px;
    right: 22px;
    height: 38px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tv-eighties .tv-speaker {
    flex: 1;
    height: 24px;
    border-radius: 5px;
    background: repeating-linear-gradient(90deg, #55534d 0 3px, #6c6a63 3px 7px);
}

.tv-eighties .tv-knob {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #4d4b46, #262521);
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.tv-eighties .tv-brand { position: absolute; bottom: 42px; right: 30px; color: #3c3a35; }

/* ---------- Années 90 : noir arrondi ---------- */
.tv-nineties {
    background: linear-gradient(165deg, #3d3d40, #232326 55%, #17171a);
    border-radius: 26px;
    padding: 24px 24px 58px;
    box-shadow:
        inset 0 2px 2px rgba(255,255,255,0.14),
        0 16px 36px rgba(0,0,0,0.6);
}

.tv-nineties .tv-screen-wrap {
    border-radius: 18px;
    border: 4px solid #0a0a0c;
    box-shadow: inset 0 0 18px rgba(0,0,0,0.8);
}

.tv-nineties .tv-panel {
    position: absolute;
    bottom: 14px;
    left: 24px;
    right: 24px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.tv-nineties .tv-knob {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #0c0c0e;
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.15), 0 1px 2px rgba(0,0,0,0.6);
}

.tv-nineties .tv-knob.power { background: radial-gradient(circle, #e33, #900); box-shadow: 0 0 8px rgba(255,60,60,0.7); }

.tv-nineties .tv-brand { position: absolute; bottom: 18px; left: 34px; color: #8e8e94; }

/* ---------- Années 2000 : argenté, écran plat naissant ---------- */
.tv-y2k {
    background: linear-gradient(165deg, #e4e6ea, #b9bdc4 55%, #9599a1);
    border-radius: 18px;
    padding: 16px 16px 50px;
    box-shadow:
        inset 0 2px 2px rgba(255,255,255,0.8),
        inset 0 -2px 5px rgba(0,0,0,0.25),
        0 16px 34px rgba(0,0,0,0.45);
}

.tv-y2k .tv-screen-wrap {
    border-radius: 10px;
    border: 3px solid #23252a;
    box-shadow: inset 0 0 12px rgba(0,0,0,0.6);
}

.tv-y2k .tv-panel {
    position: absolute;
    bottom: 12px;
    left: 16px;
    right: 16px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.tv-y2k .tv-knob {
    width: 26px;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(180deg, #74777e, #4c4e54);
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.4);
}

.tv-y2k .tv-knob.power {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #7fd4ff, #1793d1);
    box-shadow: 0 0 8px rgba(56,189,248,0.8);
}

.tv-y2k .tv-brand { position: absolute; bottom: 14px; right: 26px; color: #565a62; }

.tv-y2k .tv-foot {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 18px;
    background: linear-gradient(180deg, #b0b4bb, #83878e);
    border-radius: 0 0 12px 12px;
}

/* ---------- Carte vidéo (titre + méta sous la TV) ---------- */
.tv-card { margin-bottom: 56px; }

.tv-caption {
    text-align: center;
    margin-top: 34px;
}

.tv-caption h3 { font-size: 1.08rem; }
.tv-caption p { color: var(--text-soft); font-size: 0.87rem; margin-top: 4px; }
.tv-caption .provider { font-family: 'VT323', monospace; color: var(--accent); font-size: 1rem; letter-spacing: 1px; text-transform: uppercase; }

/* Sélecteur de style TV */
.tv-style-picker { display: flex; gap: 10px; flex-wrap: wrap; }

.tv-style-option {
    padding: 8px 16px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-soft);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tv-style-option:hover { border-color: var(--border-strong); }
.tv-style-option.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

@media (max-width: 640px) {
    .tv-seventies { padding: 16px 72px 16px 16px; }
    .tv-seventies .tv-panel { right: 14px; width: 48px; }
    .tv-seventies .tv-knob { width: 26px; height: 26px; }
    .tv-seventies .tv-speaker { width: 30px; }
}
