/* ========================================
   EDM TASTE TOP 50
   Public chart
======================================== */

.edm-top50 {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    font-family: inherit;

    container-type: inline-size;
}

/* LOGO TOP 50 */

.edm-top50-logo {
    display: block;
    width: auto;
    height: auto;
    max-width: 50px;
    margin: 0 0 8px 0;
}

/* HEADER */

.edm-top50-header {
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(128, 128, 128, 0.25);
}

.edm-top50-header h2 {
    margin: 0;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.edm-top50-header p {
    margin: 7px 0 0;
    font-size: 14px;
    opacity: 0.65;
}


/* LISTE */

@container (min-width: 621px) {

    .edm-top50-list {
        width: calc(100% + 20px);
        max-width: none;

        margin-left: -10px;
        margin-right: -10px;
    }

}




/* UNE LIGNE DU CHART */

.edm-top50-track {
    display: grid;

grid-template-columns:
    55px
    72px
    minmax(180px, 1fr)
    minmax(250px, 310px);

gap: 12px;

padding: 10px 12px;

align-items: center;

    border: 1px solid rgba(128, 128, 128, 0.18);
    border-radius: 10px;

    background: rgba(128, 128, 128, 0.04);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}


.edm-top50-track:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}


/* POSITION */

.edm-top50-position {
    text-align: center;
}

.edm-current-position {
    display: block;

    font-size: 32px;
    font-weight: 900;
    line-height: 1;

    letter-spacing: -1px;
}


/* MOUVEMENT */

.edm-movement {
    display: inline-block;

    margin-top: 7px;

    font-size: 12px;
    font-weight: 800;

    line-height: 1;
}


.edm-movement-up {
    color: #16a34a;
}

.edm-movement-down {
    color: #dc2626;
}

.edm-movement-same {
    opacity: 0.6;
}

.edm-movement-new {
    color: #7c3aed;
}


/* POCHETTE */

.edm-top50-artwork {
    width: 72px;
    height: 72px;
}

.edm-top50-artwork img {
    width: 72px;
    height: 72px;
}


.edm-top50-no-cover {
    display: flex;

    width: 72px;
    height: 72px;

    align-items: center;
    justify-content: center;

    border-radius: 7px;

    background: rgba(128, 128, 128, 0.15);

    font-size: 28px;
}


/* ARTISTE / TITRE */

.edm-top50-info {
    min-width: 0;
}


.edm-top50-artist {
    margin-bottom: 2px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    opacity: 0.65;
}

.edm-top50-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.15;
}

.edm-top50-stats {
    display: flex;
    gap: 14px;
    margin-top: 7px;

    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.65;

    white-space: nowrap;
    flex-wrap: wrap;
}

.edm-top50-stats strong {
    font-size: 11px;
    margin-left: 3px;
}


/* PLAYER */

.edm-top50-player {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    min-width: 0;
}


.edm-preview-player {
    width: 100%;
    height: 36px;
}


/* APPLE MUSIC */

.edm-apple-link {
    display: inline-block;

    align-self: flex-end;

    font-size: 11px;
    font-weight: 700;

    text-decoration: none;

    opacity: 0.6;

    transition: opacity 0.2s ease;
}


.edm-apple-link:hover {
    opacity: 1;
}


.edm-no-preview {
    font-size: 12px;
    opacity: 0.5;
}


/* ========================================
   TOP 3
======================================== */

.edm-top50-track[data-position="1"] {
    padding-top: 12px;
    padding-bottom: 12px;
}

.edm-top50-track[data-position="1"] .edm-current-position {
    font-size: 40px;
}

.edm-top50-track[data-position="1"] .edm-top50-title {
    font-size: 23px;
}


/* ========================================
   TABLETTE
======================================== */

@container (max-width: 620px) {

    .edm-top50-track {
        grid-template-columns:
            65px
            82px
            minmax(0, 1fr);

        gap: 12px;
    }

    .edm-top50-player {
        grid-column: 3;
        width: 100%;
        margin-top: 8px;
    }

    .edm-top50-artwork,
    .edm-top50-artwork img,
    .edm-top50-no-cover {
        width: 82px;
        height: 82px;
    }
}


/* ========================================
   MOBILE
======================================== */

@container (max-width: 620px) {

    .edm-top50-header h2 {
        font-size: 27px;
    }


    .edm-top50-list {
        gap: 10px;
    }


    .edm-top50-track {

        grid-template-columns:
            48px
            64px
            minmax(0, 1fr);

        gap: 10px;

        padding: 10px;

        border-radius: 8px;

    }


    .edm-current-position {
        font-size: 25px;
    }


    .edm-top50-track[data-position="1"]
    .edm-current-position {

        font-size: 30px;

    }


    .edm-top50-artwork,
    .edm-top50-artwork img,
    .edm-top50-no-cover {

        width: 64px;
        height: 64px;

    }


    .edm-top50-artist {
        font-size: 11px;
    }


    .edm-top50-title {
        font-size: 16px;
    }


    .edm-top50-track[data-position="1"]
    .edm-top50-title {

        font-size: 18px;

    }


    .edm-top50-stats {

        gap: 10px;

        margin-top: 6px;

        font-size: 9px;

    }


    .edm-top50-stats strong {
        font-size: 10px;
    }

    .edm-preview-player {
        height: 34px;
        width: 70px;
    padding: 8px 4px;
    }
    
    .edm-preview-button {
    font-size: 8px;
}

}
/* ========================================
   PLAYER PREVIEW PERSONNALISÉ
======================================== */

.edm-top50-player {
    width: 100%;
    min-width: 0;
}


/* Player compact */

.edm-preview-wrapper {
    display: grid;

    grid-template-columns:
        82px
        minmax(0, 1fr)
        max-content;

    grid-template-areas:
        "button timeline apple";

    align-items: center;

    width: 100%;
    min-width: 0;

    column-gap: 8px;
}

/* Bouton */

.edm-preview-button {
    grid-area: button;

    width: 82px;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;

    border: 0;
    border-radius: 4px;

    padding: 10px 4px;

    cursor: pointer;

    background: #202744;
    color: #fff;

    font-size: 10px;
    font-weight: 800;
    line-height: 1;

    letter-spacing: 0.2px;

    white-space: nowrap;
    text-align: center;
}

.edm-preview-button {
    text-indent: -11.7px;
}

/* Timeline */

.edm-preview-timeline {
    grid-area: timeline;

    display: flex;
    align-items: center;

    gap: 5px;

    width: 100%;
    min-width: 0;
}


.edm-preview-current,
.edm-preview-duration {
    flex: 0 0 31px;

    width: 31px;

    font-size: 9px;
    line-height: 1;

    white-space: nowrap;

    font-variant-numeric: tabular-nums;

    opacity: 0.65;
}


.edm-preview-current {
    text-align: right;
}


.edm-preview-duration {
    text-align: left;
}


/* Barre */

.edm-preview-progress {
    flex: 1 1 0;

    width: 0;
    min-width: 45px;

    height: 4px;

    margin: 0;
    padding: 0;

    cursor: pointer;

    accent-color: #202744;
}


/* Apple Music */

.edm-apple-link {
    grid-area: apple;
    align-self: center;
    justify-self: center;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0;

    color: #202744;
    text-decoration: none;

    opacity: 0.7;
}

.edm-apple-link .material-icons {
    font-size: 20px;
    line-height: 1;
}

.edm-apple-link:hover {
    opacity: 1;
}
@container (max-width: 620px) {
    .edm-preview-button {
        width: 9px;
        font-size: 7px;
        padding: 7px 4px;
    }
}

/* BOUTON PREVIEW - MOBILE UNIQUEMENT */
@container (max-width: 620px) {

    .edm-preview-button {
        width: 100px !important;
        min-width: 100px !important;

        padding: 9px 5px !important;

        font-size: 8px !important;
        line-height: 1 !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        white-space: nowrap !important;
        box-sizing: border-box;
    }

}
/* ========================================
   PLAYER - MOBILE UNIQUEMENT
======================================== */

@container (max-width: 620px) {

    /* Le player prend toute la largeur disponible */
    .edm-top50-player {
        grid-column: 2 / 4;
        width: 100%;
        min-width: 0;
        margin-top: 8px;
    }


    /* Une seule ligne :
       PREVIEW | timeline | panier
    */
    .edm-preview-wrapper {
        display: grid !important;

        grid-template-columns:
            76px
            minmax(0, 1fr)
            24px !important;

        grid-template-areas:
            "button timeline apple" !important;

        align-items: center !important;

        width: 100% !important;
        min-width: 0 !important;

        column-gap: 5px !important;
    }


    /* BOUTON PREVIEW */
    .edm-preview-button {
        grid-area: button;

        width: 43px !important;
        min-width: 65px !important;
        height: 20px !important;

        padding: 0 5px !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        font-size: 9px !important;
        font-weight: 800 !important;
        line-height: 1 !important;

        white-space: nowrap !important;

        box-sizing: border-box !important;
        
        text-indent: -6px !important;
    }
    

    /* TIMELINE */
    .edm-preview-timeline {
        grid-area: timeline;

        display: flex !important;
        align-items: center !important;

        width: 100% !important;
        min-width: 0 !important;

        gap: 3px !important;
    }


    /* 00:00 et 00:30 */
    .edm-preview-current,
    .edm-preview-duration {
        flex: 0 0 27px !important;

        width: 27px !important;

        font-size: 8px !important;
        line-height: 1 !important;

        white-space: nowrap !important;
    }


    .edm-preview-current {
        text-align: right;
    }

    .edm-preview-duration {
        text-align: left;
    }


    /* BARRE DE LECTURE */
    .edm-preview-progress {
        flex: 1 1 0 !important;

        width: 0 !important;
        min-width: 25px !important;

        margin: 0 !important;
        padding: 0 !important;
    }


    /* ICÔNE ACHAT */
    .edm-apple-link {
        grid-area: apple;

        width: 24px !important;

        display: flex !important;
        align-items: center !important;
        justify-content: center !important;

        margin: 0 !important;
        padding: 0 !important;

        font-size: 18px !important;
        line-height: 1 !important;
    }

}

@container (max-width: 620px) {

    .edm-top50-logo {
        width: auto;
        max-width: 280px;
        height: auto;
    }

}
/* LOGO TOP 50 - ORDINATEUR */
.edm-top50-header .edm-top50-logo {
    display: block !important;
    width: 300px !important;
    max-width: 300px !important;
    height: auto !important;
    margin: 0 auto 8px auto !important;
    object-fit: contain;
}

@container (min-width: 621px) {

    .edm-top50 {
        width: calc(100% + 20px);
        max-width: none;

        margin-left: -10px;
        margin-right: -10px;
    }

}

/* ========================================
   EDM TOP 50 - HOMEPAGE PREVIEW V2
======================================== */

.edm-top50-home-preview {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 22px;
    background: #202744;
    border-radius: 14px;
    box-sizing: border-box;
    color: #fff;
    font-family: inherit;
}

/* HEADER */
.edm-top50-home-preview-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.edm-top50-home-preview-label {
    margin-bottom: 3px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
    opacity: 0.7;
}

.edm-top50-home-preview-header h2 {
    margin: 0;
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.8px;
    color: #fff;
}

.edm-top50-home-preview-header p {
    margin: 7px 0 0;
    font-size: 12px;
    opacity: 0.65;
    color: #fff;
}

/* LISTE */
.edm-top50-home-preview-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* TRACK */
.edm-top50-home-preview-track {
    display: grid;
    grid-template-columns: 52px 72px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 9px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.edm-top50-home-preview-track:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.09);
}

/* POSITION */
.edm-top50-home-preview-position {
    text-align: center;
}

.edm-top50-home-preview-position strong {
    display: block;
    font-size: 26px;
    font-weight: 900;
    line-height: 1;
    color: #fff;
}

.edm-top50-home-preview-position span {
    display: inline-block;
    margin-top: 6px;
    font-size: 10px;
    font-weight: 800;
}

/* MOUVEMENTS */
.edm-home-movement-up { color: #22c55e; }
.edm-home-movement-down { color: #ef4444; }
.edm-home-movement-new { color: #c084fc; }
.edm-home-movement-same { color: rgba(255,255,255,0.55); }

/* ARTWORK */
.edm-top50-home-preview-artwork,
.edm-top50-home-preview-artwork img,
.edm-top50-home-preview-no-cover {
    width: 72px;
    height: 72px;
}

.edm-top50-home-preview-artwork img {
    display: block;
    object-fit: cover;
    border-radius: 7px;
}

.edm-top50-home-preview-no-cover {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: rgba(255,255,255,0.08);
    color: #fff;
}

/* INFOS */
.edm-top50-home-preview-info {
    min-width: 0;
}

.edm-top50-home-preview-artist {
    margin-bottom: 3px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255,255,255,0.65);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edm-top50-home-preview-title {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edm-top50-home-preview-stats {
    display: flex;
    gap: 14px;
    margin-top: 7px;
    font-size: 9px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
}

.edm-top50-home-preview-stats strong {
    margin-left: 2px;
    font-size: 10px;
    color: #fff;
}

/* BOUTON */
.edm-top50-home-preview-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    background: #0d17db;
    color: #fff !important;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.edm-top50-home-preview-link:hover {
    transform: translateY(-1px);
    opacity: 0.9;
}

.edm-top50-home-preview-link-bottom {
    display: none;
    margin-top: 14px;
}

/* ========================================
   MOBILE
======================================== */
@media (max-width: 620px) {
    .edm-top50-home-preview {
        padding: 14px;
        border-radius: 10px;
    }

    .edm-top50-home-preview-header {
        margin-bottom: 14px;
    }

    .edm-top50-home-preview-header h2 {
        font-size: 27px;
    }

    .edm-top50-home-preview-link-desktop {
        display: none;
    }

    .edm-top50-home-preview-link-bottom {
        display: flex;
        width: 100%;
        box-sizing: border-box;
    }

    .edm-top50-home-preview-track {
        grid-template-columns: 40px 58px minmax(0, 1fr);
        gap: 9px;
        padding: 9px;
    }

    .edm-top50-home-preview-position strong {
        font-size: 22px;
    }

    .edm-top50-home-preview-artwork,
    .edm-top50-home-preview-artwork img,
    .edm-top50-home-preview-no-cover {
        width: 58px;
        height: 58px;
    }

    .edm-top50-home-preview-title {
        font-size: 15px;
    }

    .edm-top50-home-preview-artist {
        font-size: 9px;
    }

    .edm-top50-home-preview-stats {
        gap: 8px;
        font-size: 8px;
    }
}


/* =========================================================
   V1.3 — CORRECTION HEADER
   Centre la semaine sous le logo du Top 50.
   ========================================================= */

.edm-top50-header {
    text-align: center !important;
}

.edm-top50-header > div {
    width: 100% !important;
    text-align: center !important;
}

.edm-top50-header p {
    width: 100% !important;
    margin: 7px auto 0 !important;
    text-align: center !important;
}


/* =========================================================
   V1.3.1 — TITRE DE SEMAINE PLUS VISIBLE
   Agrandit et met en gras le texte "Week of ..." pour
   l'aligner visuellement sur le rendu Dance Pop 50.
   ========================================================= */

.edm-top50-header p {
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    opacity: 0.8 !important;
}


/* =========================================================
   V1.3.4 — BOUTON PREVIEW RESTAURÉ DANS LE TOP 5 HOMEPAGE
   ========================================================= */

@media (min-width: 621px) {

    .edm-top50-home-preview-track {
        grid-template-columns:
            52px
            72px
            minmax(0, 1fr)
            82px !important;
        column-gap: 10px !important;
    }

    .edm-top50-home-preview-action {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;

        width: 82px !important;
        min-width: 82px !important;
    }

    .edm-top50-home-preview-play {
        width: 78px !important;
        min-width: 78px !important;
        height: 31px !important;

        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 5px !important;

        padding: 0 8px !important;

        border: 0 !important;
        border-radius: 5px !important;

        cursor: pointer !important;

        background: rgba(255,255,255,0.11) !important;
        color: #fff !important;

        font-size: 8px !important;
        font-weight: 800 !important;
        line-height: 1 !important;

        white-space: nowrap !important;
    }
}

.edm-top50-home-preview-play:hover {
    background: rgba(255,255,255,0.18) !important;
}

.edm-top50-home-preview-play.is-playing {
    background: #0d17db !important;
}

.edm-top50-home-preview-play-icon {
    font-size: 9px !important;
    line-height: 1 !important;
}

.edm-top50-home-preview-play-text {
    white-space: nowrap !important;
}

.edm-top50-home-preview-audio {
    display: none !important;
}

.edm-top50-home-preview-no-audio {
    color: rgba(255,255,255,0.38) !important;
    font-size: 7px !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}


/* Mobile : conserve le Top 5 compact avec PREVIEW à droite. */
@media (max-width: 620px) {

    .edm-top50-home-preview-track {
        grid-template-columns:
            40px
            58px
            minmax(0, 1fr)
            64px !important;
        gap: 7px !important;
    }

    .edm-top50-home-preview-action {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        width: 64px !important;
        min-width: 64px !important;
    }

    .edm-top50-home-preview-play {
        width: 62px !important;
        min-width: 62px !important;
        height: 28px !important;

        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 3px !important;

        padding: 0 5px !important;

        border: 0 !important;
        border-radius: 5px !important;

        background: rgba(255,255,255,0.11) !important;
        color: #fff !important;

        font-size: 7.5px !important;
        font-weight: 800 !important;
        line-height: 1 !important;

        white-space: nowrap !important;
    }

    .edm-top50-home-preview-play-icon,
    .edm-top50-home-preview-play-text {
        font-size: 7.5px !important;
        white-space: nowrap !important;
    }
}
