/* ========================================
   EDM TASTE - DANCE POP 50
   Public Chart
======================================== */

.edm-dance-pop-50 {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    font-family: inherit;
    container-type: inline-size;
}


/* ========================================
   HEADER
======================================== */

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

.edm-dance-pop-50-header h2 {
    margin: 0;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
}

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


/* ========================================
   LISTE
======================================== */

.edm-dance-pop-50-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}


/* ========================================
   UNE LIGNE DU CHART
======================================== */

.edm-dance-pop-50 .edm-dance-pop-50-track {
    display: grid !important;

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

    gap: 12px !important;
    align-items: center !important;

    padding: 10px 12px !important;

    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-dance-pop-50-track:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}


/* ========================================
   POSITION
======================================== */

.edm-dance-pop-50-position {
    text-align: center;
}

.edm-dance-pop-current-position {
    display: block;
    font-size: 32px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -1px;
}


/* ========================================
   MOUVEMENT
======================================== */

.edm-dance-pop-movement {
    display: inline-block;
    margin-top: 7px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

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

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

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

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


/* ========================================
   POCHETTE
======================================== */

.edm-dance-pop-50 .edm-dance-pop-50-artwork,
.edm-dance-pop-50 .edm-dance-pop-50-artwork img {
    width: 72px !important;
    height: 72px !important;
}

.edm-dance-pop-50 .edm-dance-pop-50-artwork img {
    display: block !important;
    object-fit: cover !important;
    border-radius: 7px !important;
}

.edm-dance-pop-50-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-dance-pop-50-info {
    min-width: 0;
}

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

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edm-dance-pop-50-title {
    font-size: 23px;
    font-weight: 800;
    line-height: 1.15;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* ========================================
   PEAK / WEEKS
======================================== */

.edm-dance-pop-50-stats {
    display: flex;
    gap: 14px;
    margin-top: 7px;

    font-size: 10px;
    text-transform: uppercase;
    opacity: 0.65;
    white-space: nowrap;
    flex-wrap: wrap;
}

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


/* ========================================
   PLAYER
======================================== */

.edm-dance-pop-50-player {
    width: 100%;
    min-width: 0;
}


/* ========================================
   PLAYER PREVIEW
======================================== */

.edm-dance-pop-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 PREVIEW
======================================== */

.edm-dance-pop-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;

    box-sizing: border-box;

    /* même positionnement que EDM Top 50 */
    text-indent: -11.7px;
}

.edm-dance-pop-preview-button:hover {
    opacity: 0.9;
}

.edm-dance-pop-preview-button.is-playing {
    opacity: 0.8;
}


/* ========================================
   TIMELINE
======================================== */

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

    display: flex;
    align-items: center;

    gap: 5px;

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

.edm-dance-pop-preview-current,
.edm-dance-pop-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-dance-pop-preview-current {
    text-align: right;
}

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


/* ========================================
   BARRE DE LECTURE
======================================== */

.edm-dance-pop-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-dance-pop-apple-link {
    grid-area: apple;

    align-self: center;
    justify-self: start;

    margin: 0;

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

    white-space: nowrap;
    text-decoration: none;

    opacity: 0.7;

    transition: opacity 0.2s ease;
}

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


/* ========================================
   PAS DE PREVIEW
======================================== */

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


/* ========================================
   NUMÉRO 1
======================================== */

.edm-dance-pop-50-track[data-position="1"] {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

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

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


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

@container (max-width: 620px) {

    .edm-dance-pop-50-header h2 {
        font-size: 27px;
    }

    .edm-dance-pop-50-list {
        gap: 10px;
    }

    .edm-dance-pop-50 .edm-dance-pop-50-track {
        grid-template-columns:
            48px
            64px
            minmax(0, 1fr) !important;

        gap: 10px !important;

        padding: 10px !important;

        border-radius: 8px;
    }

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

    .edm-dance-pop-50-track[data-position="1"] .edm-dance-pop-current-position {
        font-size: 30px;
    }

    .edm-dance-pop-50 .edm-dance-pop-50-artwork,
    .edm-dance-pop-50 .edm-dance-pop-50-artwork img,
    .edm-dance-pop-50-no-cover {
        width: 64px !important;
        height: 64px !important;
    }

    .edm-dance-pop-50-artist {
        font-size: 11px;
    }

    .edm-dance-pop-50-title {
        font-size: 16px;
    }

    .edm-dance-pop-50-track[data-position="1"] .edm-dance-pop-50-title {
        font-size: 18px;
    }

    .edm-dance-pop-50-stats {
        gap: 10px;
        margin-top: 6px;
        font-size: 9px;
    }

    .edm-dance-pop-50-stats strong {
        font-size: 10px;
    }

/* ========================================
   PLAYER DANCE POP 50 - MOBILE
======================================== */

.edm-dance-pop-50-player {
    grid-column: 2 / 4;

    width: 100%;
    min-width: 0;

    margin-top: 8px;
}

.edm-dance-pop-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 PLUS FIN */

.edm-dance-pop-preview-button {
    width: 65px !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-dance-pop-preview-timeline {
    grid-area: timeline;

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

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

    gap: 3px !important;
}

.edm-dance-pop-preview-current,
.edm-dance-pop-preview-duration {
    flex: 0 0 27px !important;

    width: 27px !important;

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

    white-space: nowrap !important;
}

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

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

.edm-dance-pop-preview-progress {
    flex: 1 1 0 !important;

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

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


}
/* ========================================
   LOGO DANCE POP 50
======================================== */

.edm-dance-pop-50-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.edm-dance-pop-50-logo img {
    display: block !important;
    width: 220px !important;
    max-width: 100% !important;
    height: auto !important;
}


/* MOBILE */

@container (max-width: 620px) {

    .edm-dance-pop-50-logo img {
        width: 170px;
    }

}

.edm-dance-pop-50 .edm-dance-pop-50-artist {
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
}

.edm-dance-pop-50 .edm-dance-pop-50-title {
    font-size: 23px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
}

.edm-dance-pop-50-track[data-position="1"] .edm-dance-pop-50-title {
    font-size: 23px !important;
}

/* ========================================
   PANIER DANCE POP = EDM TOP 50
======================================== */

.edm-dance-pop-apple-link {
    color: #202744 !important;
    opacity: 0.7 !important;
}

/* =========================================================
   DANCE POP 50 — WEEK OF : CENTRÉ, PLUS GRAND ET PLUS GRAS
   ========================================================= */
.edm-dance-pop-50-header > p,
.edm-dance-pop-50-header p {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin: 14px auto 0 !important;
    text-align: center !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    opacity: 0.8 !important;
}

@container (max-width: 620px) {
    .edm-dance-pop-50-header > p,
    .edm-dance-pop-50-header p {
        margin-top: 10px !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        text-align: center !important;
    }
}

/* =========================================================
   CORRECTIF V2 — DANCE POP 50
   #1 = dimensions actuelles
   #2 à #50 = légèrement plus petits
   Logo = agrandi
   ========================================================= */

/* IMPORTANT :
   On cible la POSITION RÉELLE dans la liste avec :first-child,
   au lieu de dépendre de data-position.
*/

/* ---- #1 : on conserve les dimensions actuelles ---- */
.edm-dance-pop-50-list > .edm-dance-pop-50-track:first-child .edm-dance-pop-50-artist {
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
}

.edm-dance-pop-50-list > .edm-dance-pop-50-track:first-child .edm-dance-pop-50-title {
    font-size: 23px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
}

/* ---- #2 à #50 : légèrement plus petits ---- */
.edm-dance-pop-50-list > .edm-dance-pop-50-track:not(:first-child) .edm-dance-pop-50-artist {
    font-size: 10.5px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
}

.edm-dance-pop-50-list > .edm-dance-pop-50-track:not(:first-child) .edm-dance-pop-50-title {
    font-size: 19px !important;
    font-weight: 800 !important;
    line-height: 1.15 !important;
}

/* ---- LOGO : couvre les deux structures HTML possibles ---- */
.edm-dance-pop-50-logo img,
img.edm-dance-pop-50-logo,
.edm-dance-pop-50-header .edm-dance-pop-50-logo img,
.edm-dance-pop-50-header img.edm-dance-pop-50-logo {
    width: 300px !important;
    max-width: 100% !important;
    height: auto !important;
}

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

    .edm-dance-pop-50-list > .edm-dance-pop-50-track:first-child .edm-dance-pop-50-artist {
        font-size: 12px !important;
    }

    .edm-dance-pop-50-list > .edm-dance-pop-50-track:first-child .edm-dance-pop-50-title {
        font-size: 23px !important;
    }

    .edm-dance-pop-50-list > .edm-dance-pop-50-track:not(:first-child) .edm-dance-pop-50-artist {
        font-size: 10px !important;
    }

    .edm-dance-pop-50-list > .edm-dance-pop-50-track:not(:first-child) .edm-dance-pop-50-title {
        font-size: 16px !important;
    }

    .edm-dance-pop-50-logo img,
    img.edm-dance-pop-50-logo,
    .edm-dance-pop-50-header .edm-dance-pop-50-logo img,
    .edm-dance-pop-50-header img.edm-dance-pop-50-logo {
        width: 230px !important;
        max-width: 100% !important;
        height: auto !important;
    }
}
