:root {
    --Light-Cyan: #52F3FF;
    --Cyan: #00E5FF;
    --Cyan-25: rgba(0, 238, 255, 0.25);
    --Cyan-50: rgba(0, 238, 255, 0.5);
    --Dark-Cyan: #335B68;
    --Dark-Cyan-50: #335b6880;
    --Pink: #FF5CF1;
    --Pink-25: rgba(255, 92, 241, 0.25);
    --Pink-50: rgba(255, 92, 241, 0.5);
    --Light-Pink: #ff69f2;
    --Super-Light-Pink: #ffb0f8;

    --White: #FFFFFF;
    --White-5: rgba(255, 255, 255, 0.05);
    --White-12: rgba(255, 255, 255, 0.125);
    --White-25: rgba(255, 255, 255, 0.25);
    --White-50: rgba(255, 255, 255, 0.50);
    --Black: #23232a;
    --Black-50: rgba(31, 31, 38, 0.5);
    --Black-25: rgba(31, 31, 38, 0.25);
    --Black-12: rgba(31, 31, 38, 0.125);
    --Black-5: rgba(31, 31, 38, 0.05);
    --Dark-Grey: #4f525d;
    --Grey: #666979;
    --Mid-Grey: #6c707f;
    --Light-Grey: #84889b;
    --Super-Light-Grey: #dfe0e2;

    --Grid-Margin: 8rem;
    --Grid-Gutter: 2.5rem;
    --Spacing-S: 3.5rem;
    --Spacing-M: 25svh;
    --Spacing-L: 18.75svh;

    --Heading-Font: 'Unbounded', system-ui, sans-serif;
    --Body-Font: 'Vercetti', system-ui, sans-serif;
    --Display-Font: 'Geist Mono', monospace;
}

#song-duration {
    background-color: var(--Black);
}

/* Global */

@font-face {
    font-family: Vercetti;
    src: url(../assets/fonts/Vercetti-Regular.woff2);
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--Heading-Font);
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 100%;
    letter-spacing: -1.92px;
    text-wrap: balance;
}

h2 {
    font-size: 3rem;
    font-weight: 700;
    /* line-height: 120%;*/
    letter-spacing: -1.6px;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    text-wrap: balance;
}

h3 {
    font-size: 2.25rem;
    font-weight: 500;
    line-height: 120%;
    letter-spacing: -0.28px;
    margin: 0;
    text-wrap: balance;
}

h4 {
    font-size: 1.75rem;
    font-weight: 500;
    line-height: 120%;
    letter-spacing: -0.28px;
    margin: 0;
}

.big-data {
    font-variant-numeric: lining-nums tabular-nums;
    font-size: 2.5rem;
}

a {
    color: var(--White);
}

.pill a {
    color: var(--Black);
}

.reference {
    text-decoration: dotted;
}

html {
    scroll-behavior: smooth;
}

body {
    color: white;
    font-family: var(--Body-Font);
    font-size: 1rem;
    font-weight: 400;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--Cyan);
    width: 100svw;
    overflow-x: hidden;
}

/* Prévenir le FOUC : masquer le contenu si JavaScript est désactivé */
body.no-js {
    opacity: 1;
    visibility: visible;
}

main {
    padding: 0px 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    position: relative;
}

article {
    width: 100%;
    max-width: 1376px;
    border-radius: 40px 40px 0 0;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* gap: var(--Spacing-L); */
    border-top: 2px solid var(--White-12);
    border-left: 2px solid var(--White-12);
    border-right: 2px solid var(--White-12);
    box-sizing: border-box;
    box-shadow: 0 48px 64px 0 var(--Black-12);
}

article > section {
    padding: var(--Spacing-L) 0;
}

p {
    margin: 0;
    color: var(--Super-Light-Grey);
    /* text-wrap: balance; */
    line-height: 2.125ch;
}

.hidden {
    display: none;
}

.chapter-number,
.window-titlebar,
.pill,
.scroll-down p, .nav-link {
    font-family: var(--Display-Font);
    text-transform: uppercase;
    font-weight: 600;
    line-height: 100%;
}

.chart-window, .trackhead,
.controller-window, .intro-window,
.trivia-card, .popup-overlay, .track-bg {
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
}

/* POUR TOUS LES CHAPITRES */

/* Classes à appliquer aux textes */

.chapter-number {
    color: var(--Pink);
    font-size: 1.5rem;
    letter-spacing: -0.96px;
    grid-column: 2 / 3;
}

.description h2 {
    margin-top: .5rem;
    grid-column: 4 / 10;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    text-align: center;
}

.chart h3 {
    grid-column: 2 / 9;
    text-wrap: balance;
}

.chapter {
    display: flex;
    flex-direction: column;
    gap: var(--Spacing-M);
    /* margin-bottom: var(--Spacing-L); */
    scroll-margin-top: 96px;
}

.chapter > section, section.intro, section.conclusion .content {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: var(--Grid-Gutter);
    row-gap: var(--Spacing-S);
}

.description-content {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 16px;
    flex-shrink: 0;
    grid-column: 4 / 10;
}

/* ============== Classes à appliquer aux widgets (graphiques, contrôleurs, etc.) ======================  */

/* Fenêtres */

.aside {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    place-self: stretch stretch;
}

.chart-window {
    overflow: hidden;
    border-radius: 16px;
    box-sizing: border-box;
    transform-origin: top center;
}

.chart canvas {
    height: 100%;
    width: 100%;
    flex: 1 1 auto;
}
.chart {
    perspective: 850px;
}

.controller-window {
    overflow: hidden;
    border-radius: 16px;
    box-sizing: border-box;
    transform-origin: top center;
}

/* Barre de titre de fenêtre */
.window-titlebar {
    font-size: 1rem;
    letter-spacing: -0.64px;
    position: relative;
    display: flex;
    width: 100%;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 24px;
    overflow: hidden;
    gap: 16px;
    color: var(--White-25);
}

.chart-window .window-titlebar {
    padding: 8px 0 24px 0;
}

/* Classes à appliquer au Trivia */
.trivia h3 {
    grid-column: 2 / 7;
}

.trivia-card h4 {
    font-variant-numeric: lining-nums tabular-nums;
}

.trivia-card {
    background-color: var(--Black-25);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    grid-column: 2 / span 8;
    overflow: hidden;
    border: 2px solid var(--Black-25);
    box-sizing: border-box;
}

.trivia-card .info {
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
    gap: 16px;
    height: auto;
}

.trivia-card .preview {
    overflow: clip;
    box-sizing: border-box;
    flex-grow: 0;
    align-self: stretch;
    padding: 0 1.25rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trivia-card.right {
    grid-column: 4 / 12;
}

.trivia-card .preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    aspect-ratio: 2.35 / 1;
}

.pill {
    background-color: var(--Light-Pink);
    color: var(--Black);
    padding: 4px 8px;
    border-radius: 4px;
    width: fit-content;
}



/*** FOOTER ***/
footer {
    height: 50svh;
    box-sizing: border-box;
    position: relative;
    display: flex;
    align-items: end;
    background: linear-gradient(0deg, var(--Cyan) 0% , var(--Pink) 100%);
    justify-content: space-between;
    align-items: end;
    padding: 80px;
    width: 100%;
    color: var(--Black);
}

footer > * {
    color: inherit;
}

/* Logo à gauche */
.footer-logo img {
    height: 48px;
    width: auto;
}

.footer-text {
    display: flex;
    justify-content: right;
    align-items: right;
    gap: 40px;
    flex: 1;
    text-align: right;
}



/********POPUP DERNIERS CHANGEMENTS**********/
#mentions-popup {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 9999;
    overflow: hidden;
}
.popup {
    width: 100%;
    height: 100vh;
    padding-top: 20px;
    padding-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}
.popup-content h3:first-of-type {
    background: #2b2b2b;
    margin: 0;
    padding: 20px 30px;
    font-size: 1.8rem;
    border-radius: 18px 18px 0 0;
}
.popup-content h3 {
    margin-top: 25px;
    padding: 0 30px;
    font-size: 1.3rem;
}
.popup-content p,
.popup-content ul {
    padding: 0 30px;
    line-height: 1.6;
    font-size: 1rem;
}
.popup-content ul {
    margin-top: 5px;
    margin-bottom: 15px;
}
.popup-content::-webkit-scrollbar {
    width: 10px;
}
.popup-content::-webkit-scrollbar-track {
    background: #2e2e2e;
    border-radius: 10px;
}
.popup-content::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 10px;
}
.popup-content::-webkit-scrollbar-thumb:hover {
    background: #979797;
    border-radius: 10px;
}
.close-popup {
    position: absolute;
    top: 25px;
    right: 210px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: white;
    font-size: 22px;
    z-index: 99999;
}
.close-popup:hover {
    opacity: 0.7;
}
.popup-content {
    width: 90%;
    max-width: 1100px;
    max-height: 90vh;
    overflow-y: auto;
    background: #4a4a4a;
    color: white;
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
}
.popup-mentions {
    cursor: pointer;
}





/***NAV***/

.menu {
    display: flex;
    align-items: center;
    background-color: var(--Black);
    border: 2px solid var(--White-5);
    border-radius: 12px;
    padding: 4px;
    gap: 8px;
    position: fixed;
    z-index: 100;
    right: 16px;
    bottom: 16px;
}

.menu li {
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(var(--White), var(--Cyan));
    height: 48px;
    width: 48px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(var(--White), var(--Pink));
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
}

.menu a {
    color: black;
    text-decoration: none;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: color 0.3s ease;
    font-size: 0.75rem;
    position: relative;
}

.menu li:hover::before,
.menu li.active::before {
    opacity: 1;
}

.menu li:hover {
    box-shadow: 0 0 8px 0 var(--Light-Pink);
}

.menu li.active {
    box-shadow: 0 0 12px 0 var(--Light-Pink);
}

.menu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}