/* ============================================================
   ParisNajaf — Podcast Player  |  CSS v2.2
   #000 · #fff · rgba(179,179,179,1) · Cutive Mono · Inter
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cutive+Mono&family=Inter:wght@300;400;500&display=swap');

/* ── Reset (scoped) ──────────────────────────────────────── */
.pnpw,.pnpw *,.pnpw *::before,.pnpw *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Root ────────────────────────────────────────────────── */
.pnpw {
    --w: #ffffff;
    --b: #000000;
    --g: rgba(179,179,179,1);
    --gd: rgba(179,179,179,.3);

    position: relative;
    width: 100%;
    max-width: 460px;
    color: var(--w);
    font-family: 'Inter', system-ui, sans-serif;
}

.pnpw--bg-black       { background: var(--b); }
.pnpw--bg-transparent { background: transparent; }

/* ── Cover Art ───────────────────────────────────────────── */
.pnpw-cover-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 14px 44px rgba(0,0,0,.65);
}

.pnpw-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter .5s ease, transform .5s ease;
}
.pnpw-cover-wrap:hover .pnpw-cover {
    filter: blur(6px) brightness(.65);
    transform: scale(1.04);
}

.pnpw-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 45%, rgba(0,0,0,.7) 100%);
    pointer-events: none;
}

/* ── Body ────────────────────────────────────────────────── */
.pnpw-body {
    padding: 20px 0 6px;
}

.pnpw--bg-black .pnpw-body {
    padding: 20px 20px 16px;
}

/* ── Header ──────────────────────────────────────────────── */
.pnpw-ep-num {
    font-family: 'Cutive Mono', monospace;
    font-size: .7rem;
    color: var(--g);
    letter-spacing: .08em;
    display: block;
    margin-bottom: 6px;
}

.pnpw-title {
    font-family: 'Cutive Mono', monospace;
    font-size: clamp(.9rem, 2.5vw, 1.1rem);
    font-weight: 400;
    color: var(--w);
    line-height: 1.35;
    letter-spacing: -.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 6px;
}

/* Shimmer pendant la lecture */
.pnpw--playing .pnpw-title {
    background: linear-gradient(90deg, var(--w) 0%, var(--g) 50%, var(--w) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pnpwShimmer 4s linear infinite;
}
@keyframes pnpwShimmer {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}
@media (prefers-reduced-motion: reduce) {
    .pnpw--playing .pnpw-title {
        animation: none;
        -webkit-text-fill-color: var(--w);
        background: none;
    }
}

.pnpw-byline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'Inter', sans-serif;
    font-size: .74rem;
    font-weight: 300;
    color: var(--g);
    letter-spacing: .03em;
}
.pnpw-dot { opacity: .4; }

/* ── Timeline ────────────────────────────────────────────── */
.pnpw-timeline {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(179,179,179,.12);
}

.pnpw-bar-wrap {
    position: relative;
    height: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    outline: none;
}

.pnpw-bar-wrap:focus-visible .pnpw-bar-track {
    outline: 1px solid var(--w);
    outline-offset: 3px;
    border-radius: 2px;
}

.pnpw-bar-track,
.pnpw-bar-fill {
    position: absolute;
    left: 0;
    height: 1px;
    border-radius: 99px;
    pointer-events: none;
    transition: height .18s ease;
}
.pnpw-bar-track { right: 0;  background: var(--gd); }
.pnpw-bar-fill  { width: 0%; background: var(--w); transition: width .1s linear; }

.pnpw-bar-wrap:hover .pnpw-bar-track,
.pnpw-bar-wrap:hover .pnpw-bar-fill,
.pnpw--dragging .pnpw-bar-track,
.pnpw--dragging .pnpw-bar-fill { height: 2px; }

/* Thumb : invisible par défaut */
.pnpw-bar-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--w);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity .2s ease, transform .15s cubic-bezier(.34,1.56,.64,1);
}
.pnpw-bar-wrap:hover .pnpw-bar-thumb,
.pnpw--dragging .pnpw-bar-thumb {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

.pnpw-times {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
}
.pnpw-cur, .pnpw-dur {
    font-family: 'Cutive Mono', monospace;
    font-size: .66rem;
    color: var(--g);
    letter-spacing: .05em;
    user-select: none;
}

/* ── Controls ────────────────────────────────────────────── */
.pnpw-controls {
    display: flex;
    align-items: center;       /* vertical center sur la même ligne */
    justify-content: center;
    gap: 28px;
    margin-top: 20px;
    height: 52px;              /* hauteur fixe : tous les boutons partagent la même baseline */
}

.pnpw-btn {
    /* flexbox colonne pour icône + label "15" empilés */
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--g);
    padding: 0;
    border-radius: 4px;
    outline: none;
    transition: color .2s, transform .15s cubic-bezier(.34,1.56,.64,1);
    -webkit-tap-highlight-color: transparent;
    font-family: inherit;
    line-height: 1;
    /* taille fixe pour que tous les boutons skip aient le même footprint */
    width: 36px;
    height: 48px;
}
.pnpw-btn:hover  { color: var(--w); transform: scale(1.1); }
.pnpw-btn:active { transform: scale(0.92); }
.pnpw-btn:focus-visible { outline: 1px solid var(--g); outline-offset: 4px; border-radius: 4px; }

/* ── Bouton Play/Pause — centré, plus grand ─────────────── */
.pnpw-play {
    color: var(--w);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    /* pas de flex-direction column ici, juste centrage */
    justify-content: center;
}
.pnpw-play:hover { color: var(--w); transform: scale(1.12); }

/* ── Labels "15" sous les icônes skip ───────────────────── */
.pnpw-skip-n {
    font-family: 'Cutive Mono', monospace;
    font-size: .55rem;
    letter-spacing: .03em;
    color: inherit;
    line-height: 1;
}

/* ── Badge vitesse ──────────────────────────────────────── */
.pnpw-speed-btn {
    width: 36px;
    height: 48px;
}
.pnpw-speed-val {
    font-family: 'Cutive Mono', monospace;
    font-size: .72rem;
    letter-spacing: .03em;
    color: inherit;
}

/* Spinner */
.pnpw-i-spin { animation: pnpwSpin .9s linear infinite; }
@keyframes pnpwSpin { to { transform: rotate(360deg); } }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 340px) {
    .pnpw-controls { gap: 18px; height: 46px; }
    .pnpw-btn      { width: 30px; height: 42px; }
    .pnpw-play     { width: 44px; height: 44px; }
    .pnpw-title    { font-size: .85rem; }
}
