/* GLOBAL FIX - éviter que les bordures rétrécissent les éléments */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    height: 100dvh;
    --bg: rgb(33, 34, 44);
    --text: rgb(255, 255, 255);
    --ghost-contrast: rgb(120, 120, 120);
    --faint-contrast: rgb(15, 17, 19);
    --faint-contrast-trans: rgba(15, 17, 19, 0.50);
    --mild-contrast: rgb(150, 150, 150);
    --good-contrast: rgb(255, 255, 255);
    --button-bg: rgb(180, 180, 180);
    --button-bg-hover: rgb(210, 210, 210);
    --button-text: rgb(255, 255, 255);
    --focus-color: rgb(170, 170, 170);
    --gradient-start: rgb(100, 100, 100);
    --gradient-end: rgb(160, 160, 160);
}

:root .theme-dark {
    color-scheme: dark;
    --bg: rgb(13, 13, 17);
    --text: rgb(255, 255, 255);
    --good-contrast: rgba(255, 255, 255, 0.98);
    --button-bg: rgb(120, 120, 120);
    --button-bg-hover: rgb(170, 170, 170);
    --button-text: rgb(255, 255, 255);
    --focus-color: rgb(145, 145, 145);
    --gradient-start: rgb(70, 70, 70);
    --gradient-end: rgb(130, 130, 130);
}

:root .theme-dark a {
    color: var(--button-text);
}

body {
    background-size: contain;
    color: var(--text);
    background-color: var(--bg);
}

/* HEADER avec bordure blanche */
header {
    background-image: linear-gradient(to bottom, var(--gradient-start) 30%, var(--gradient-end) 100%);
    background-repeat: no-repeat;
    filter: none;
    position: sticky;
    padding: 0.7em;
    top: 0;
    z-index: 1;
    border-radius: 8px;
    border: 2px solid white;
    background-color: rgba(255, 255, 255, 0.03);
    text-shadow: 1px 1px 4px rgb(0 0 0 / 70%);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.05);
}

/* ROOT CONTAINER avec encadrement blanc supprimé */
#root {
    margin: auto;
    max-width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#root > div {
    max-width: 100%;
    border: none;           /* suppression du cadre */
    border-radius: 10px;
    padding: 0.1em;
    margin: 0.1em auto;
    background-color: rgba(255, 255, 255, 0.02);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.05);
    width: 100%;
}

/* BREADCRUMB avec encadrement blanc */
.breadcrumb {
    padding: .3em .8em;
    line-height: 1.8em;
    border-radius: .7em;
    background-color: rgba(255, 255, 255, 0.05);
    border: 2px solid white;
    margin: 2px 4px;
    display: inline-block;
    min-width: 60px;
    text-align: center;
    text-shadow: 0px 0px 4px rgb(0 0 0 / 40%);
    word-break: break-word;
    transition: all 0.25s ease;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.03);
}

.breadcrumb:hover {
    background-color: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
    text-shadow: 0px 0px 4px rgba(255, 255, 255, 0.4);
}

/* LIST WRAPPER */
.list-wrapper {
    max-width: 100%;
}

/* Liste avec cadre blanc */
ul.dir {
    flex: 1;
    padding: 1em;
    margin-top: 1em;
    border: 2px solid white;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.02);
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.05);
    width: 100%;
    text-shadow: 1px 1px 4px rgb(0 0 0 / 70%);
}

ul.dir li {
    display: block;
    min-height: 2em;
    list-style-type: none;
    margin: 1px auto;
    padding: .3em .3em .4em;
    border: 1px solid white;
    border-radius: 8px;
    transition: all 0.25s ease;
}

ul.dir li:hover {
    background-color: rgb(0, 0, 0);
    border: 1px solid white;
    color: rgb(255, 255, 255);
}

/* Boutons hover en noir et blanc */
button:hover {
    background-color: rgb(0, 0, 0);
    color: rgb(255, 255, 255);
    text-shadow: 1px 1px 4px rgba(255, 255, 255, 0.7);
}

/* Liens hover */
a:hover {
    color: rgb(255, 255, 255);
    background-color: rgb(0, 0, 0);
    text-decoration: underline;
}

/* Titre du player */
#player-title {
    color: var(--button-text);
    padding: .5em 1em;
    text-decoration: none;
    border-radius: .3em;
    vertical-align: middle;
    text-shadow: 1px 1px 4px rgb(0 0 0 / 70%);
    font-size: 18px;
    font-weight: bold;
}

/* PLAYER encadré blanc */
@media (min-width: 1200px) {
    #player {
        position: fixed;
        top: auto;
        bottom: 2px;
        left: 2px;
        padding: 1em;
        min-width: calc((100vw - 800px) / 1.2);
        box-sizing: border-box;
        background: rgba(15, 17, 17, 0.50);
        border-radius: 8px;
        border: 2px solid white;
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.05);
        z-index: 1;
    }
}
