/* * Rôle : feuille de style unique du site, c'est-à-dire de la page du jukebox (public/index.html), * y compris les éléments créés par public/scripts/jukebox.js (morceaux, sections, icônes). * Chargé par : public/index.html. * Attention : servie telle quelle, sans compilation. Les couleurs viennent des variables de :root ; * leurs versions transparentes en dérivent avec color-mix() au lieu d'être recopiées en rgba(). * Chaque paire texte/fond des variables dépasse un contraste de 4,5 : le vérifier avant d'en * changer une. La mise en page passe sur deux colonnes à partir de 1000 px ; en dessous, le * mini-lecteur (.mini-player) prend le relais du lecteur hors de vue. */ /* ------------------------------------------------------------------------------------------------ * Variables */ :root { color-scheme: dark; --bg: #0b0712; /* Panneaux, puis éléments posés dessus (champs, boutons, listes déroulantes), puis survol. */ --surface: #140e1d; --surface-raised: #1d1529; --surface-hover: #281d38; --border: rgba(255, 255, 255, 0.07); --border-strong: rgba(255, 255, 255, 0.13); --text: #f4effa; --muted: #b9aecb; --muted-dark: #8f82a6; /* Fond des boutons principaux (avec --on-accent dessus), et accent utilisé comme texte. */ --accent: #b47aff; --accent-hover: #c493ff; --on-accent: #12041f; --accent-text: #cfa8ff; --danger: #ff7a93; --success: #6ee7a8; --shadow: rgba(0, 0, 0, 0.5); --radius: 12px; --radius-lg: 18px; --topbar-height: 60px; --mini-player-height: 64px; } /* ------------------------------------------------------------------------------------------------ * Base */ * { box-sizing: border-box; } [hidden] { display: none !important; } /* Masqué à l'écran mais lu par les lecteurs d'écran. Les !important l'emportent sur les règles des champs (largeur 100 %, marges intérieures), qui ont une spécificité plus forte. */ .visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } html { scroll-padding-top: calc(var(--topbar-height) + 1rem); } body { margin: 0; min-height: 100vh; font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif; line-height: 1.45; background: radial-gradient(ellipse 70% 45% at 50% -5%, color-mix(in srgb, var(--accent) 18%, transparent), transparent), var(--bg); background-attachment: fixed; color: var(--text); /* Cases à cocher et barres de progression natives aux couleurs du site. */ accent-color: var(--accent); } /* Place pour le mini-lecteur, fixé en bas de l'écran quand il est affiché. */ body.has-mini-player { padding-bottom: calc(var(--mini-player-height) + 1rem); } h1, h2, h3 { margin: 0; line-height: 1.2; } p { margin-top: 0; } code { background: var(--surface-hover); border-radius: 6px; padding: 0.1rem 0.35rem; } /* Icônes SVG insérées par jukebox.js (fonction icon). */ .icon { width: 1.2em; height: 1.2em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; } .icon--fill { fill: currentColor; stroke: none; } .hint { color: var(--muted-dark); font-size: 0.85rem; margin: 0.4rem 0 0; } .empty { color: var(--muted-dark); text-align: center; margin: 1rem 0 0.5rem; } .eyebrow { color: var(--accent-text); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.75rem; } /* ------------------------------------------------------------------------------------------------ * Barre du haut */ .topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-height); background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); } .topbar__inner { display: flex; align-items: center; gap: 1rem; max-width: 1280px; height: 100%; margin: 0 auto; padding: 0 1.25rem; } .brand { display: flex; align-items: center; gap: 0.6rem; color: var(--text); font-weight: 700; font-size: 1.05rem; text-decoration: none; white-space: nowrap; } .topbar__account { display: flex; align-items: center; gap: 0.75rem; margin-left: auto; min-width: 0; } .topbar__user { color: var(--muted); font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .live-indicator { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.8rem; color: var(--muted-dark); white-space: nowrap; &::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--muted-dark); } &[data-live="true"] { color: var(--success); } &[data-live="true"]::before { background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 15%, transparent); } } /* ------------------------------------------------------------------------------------------------ * Écran de connexion */ .welcome { display: flex; align-items: center; justify-content: center; gap: 3rem; max-width: 1000px; min-height: calc(100vh - var(--topbar-height)); margin: 0 auto; padding: 2rem 1.5rem; } .welcome__visual { width: 100%; max-width: 300px; height: auto; filter: drop-shadow(0 25px 45px var(--shadow)); } .welcome__content { flex: 1; max-width: 460px; & h1 { font-size: 2.3rem; margin-bottom: 1rem; } & .btn--discord { margin-top: 0.5rem; } } .welcome__text { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.5rem; } /* Mot de passe : replié sous le bouton Discord, ou seul moyen de se connecter. */ .key-login { margin-top: 1.25rem; & summary { cursor: pointer; color: var(--muted); } } .key-login__form { margin-top: 1rem; padding: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); } /* ------------------------------------------------------------------------------------------------ * Mise en page de l'application */ .layout { display: grid; gap: 1.25rem; max-width: 1280px; margin: 0 auto; padding: 1.25rem 1.25rem 3rem; } .layout__side, .layout__main { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; } /* Deux colonnes : bibliothèque à gauche ; lecteur et file à droite, fixés pendant le défilement, la file défilant dans son panneau. */ @media (min-width: 1000px) { .layout { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } .layout__main { grid-column: 1; grid-row: 1; } .layout__side { grid-column: 2; grid-row: 1; position: sticky; top: calc(var(--topbar-height) + 1.25rem); max-height: calc(100vh - var(--topbar-height) - 2.5rem); } .queue { min-height: 0; overflow-y: auto; } } /* ------------------------------------------------------------------------------------------------ * Panneaux */ .panel { border-radius: var(--radius-lg); padding: 1.25rem 1.5rem; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 12px 30px var(--shadow); } /* Fichiers glissés au-dessus de la section d'ajout. */ .panel--dragover { border-color: var(--accent); border-style: dashed; } .panel__header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; } .panel__title { font-size: 1.15rem; } .panel__subtitle { color: var(--muted); font-size: 0.92rem; margin: 0.25rem 0 0; } #uploadSection .panel__subtitle { margin-bottom: 1rem; } .badge { padding: 0.25rem 0.7rem; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-text); border-radius: 999px; font-size: 0.8rem; white-space: nowrap; } /* ------------------------------------------------------------------------------------------------ * Formulaires */ label { display: block; font-size: 0.9rem; color: var(--muted); margin-bottom: 0.35rem; } input[type="text"], input[type="password"], input[type="url"], input[type="search"], input[type="file"], select, textarea { width: 100%; padding: 0.65rem 0.9rem; border-radius: var(--radius); border: 1px solid var(--border-strong); background: var(--surface-raised); color: var(--text); font: inherit; font-size: 0.95rem; } ::placeholder { color: var(--muted-dark); } /* Fond plein, options comprises : le navigateur dessine sinon la liste ouverte sur du blanc. */ select { cursor: pointer; } select option, select optgroup { background-color: var(--surface-raised); color: var(--text); } input[type="file"] { padding: 0.45rem; color: var(--muted); cursor: pointer; &::file-selector-button { margin-right: 0.75rem; padding: 0.35rem 0.9rem; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface-hover); color: var(--text); font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer; } &:hover::file-selector-button { border-color: var(--accent); } } input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 1px; border-color: transparent; } .form-checkbox { display: flex; align-items: flex-start; gap: 0.5rem; color: var(--muted); cursor: pointer; } .form-checkbox__input { margin-top: 0.2rem; } .form-actions { margin-top: 1rem; display: flex; justify-content: flex-end; } /* Zone de dépôt : le vrai champ de fichiers est masqué, la zone en est l'étiquette. */ .dropzone { display: flex; align-items: center; justify-content: center; gap: 0.75rem; min-height: 96px; margin: 0; padding: 1rem; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface-raised); color: var(--muted); text-align: center; cursor: pointer; transition: border-color 0.15s ease, background 0.15s ease; &:hover, .panel--dragover & { border-color: var(--accent); background: var(--surface-hover); } & strong { color: var(--accent-text); } input:focus-visible + & { outline: 2px solid var(--accent); outline-offset: 2px; } } .dropzone__icon { display: inline-flex; font-size: 1.4rem; color: var(--accent-text); } .dropzone__text { overflow-wrap: anywhere; } /* ------------------------------------------------------------------------------------------------ * Boutons */ .btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; border: 1px solid var(--border-strong); border-radius: 999px; padding: 0.55rem 1.2rem; font: inherit; font-size: 0.92rem; font-weight: 600; line-height: 1.2; cursor: pointer; background: var(--surface-raised); color: var(--text); text-decoration: none; white-space: nowrap; transition: background 0.15s ease, border-color 0.15s ease; &:hover { background: var(--surface-hover); } &:disabled { opacity: 0.45; cursor: not-allowed; } &:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; } } .btn--primary { background: var(--accent); border-color: transparent; color: var(--on-accent); &:hover { background: var(--accent-hover); } } .btn--ghost { background: transparent; } .btn--danger { background: color-mix(in srgb, var(--danger) 12%, transparent); border-color: color-mix(in srgb, var(--danger) 35%, transparent); color: var(--danger); &:hover { background: color-mix(in srgb, var(--danger) 22%, transparent); } } .btn--small { padding: 0.35rem 0.85rem; font-size: 0.85rem; } /* Bouton aux couleurs de Discord (blurple), avec son logo. */ .btn.btn--discord { gap: 0.55rem; width: 100%; min-height: 48px; border: 1px solid #6f7bff; border-radius: var(--radius); background: #5865f2; box-shadow: 0 6px 16px rgba(35, 39, 96, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.14); color: #fff; font-weight: 700; & svg { flex: 0 0 24px; width: 24px; height: 24px; } &:hover { border-color: #7c86ff; background: #4752c4; } } /* Bouton rond à icône seule ; son nom passe par aria-label. */ .icon-btn { display: inline-grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; padding: 0; border: none; border-radius: 50%; background: transparent; color: var(--muted); font-size: 1rem; cursor: pointer; transition: background 0.15s ease, color 0.15s ease; &:hover { background: var(--surface-hover); color: var(--text); } &:disabled { opacity: 0.3; cursor: not-allowed; background: transparent; } &:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; } /* Bouton à bascule activé (boucle). */ &[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-text); } } .icon-btn--primary { background: var(--accent); color: var(--on-accent); &:hover { background: var(--accent-hover); color: var(--on-accent); } } .icon-btn--large { width: 56px; height: 56px; font-size: 1.35rem; } .icon-btn--danger:hover { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); } .toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; } /* ------------------------------------------------------------------------------------------------ * Lecteur : morceau en cours, position, commandes */ .player__track { display: flex; align-items: center; gap: 1rem; margin: 1rem 0 0.75rem; min-height: 96px; } .player__track--empty { justify-content: center; color: var(--muted-dark); text-align: center; } .player__title { font-weight: 700; font-size: 1.05rem; overflow-wrap: anywhere; } .player__controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 0.5rem; } .player__stop { display: flex; margin: 1rem auto 0; } /* Barre de position : un curseur natif, dont la partie jouée est peinte d'après --progress. */ .seek__input { --progress: 0%; appearance: none; -webkit-appearance: none; display: block; width: 100%; height: 18px; margin: 0; background: transparent; cursor: pointer; &::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: linear-gradient( to right, var(--accent) var(--progress), var(--surface-hover) var(--progress) ); } &::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -4px; border-radius: 50%; background: var(--text); opacity: 0; transition: opacity 0.15s ease; } &::-moz-range-track { height: 6px; border-radius: 999px; background: var(--surface-hover); } &::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--accent); } &::-moz-range-thumb { width: 14px; height: 14px; border: none; border-radius: 50%; background: var(--text); opacity: 0; transition: opacity 0.15s ease; } &:hover::-webkit-slider-thumb, &:focus-visible::-webkit-slider-thumb, &:active::-webkit-slider-thumb, &:hover::-moz-range-thumb, &:focus-visible::-moz-range-thumb, &:active::-moz-range-thumb { opacity: 1; } &:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 4px; border-radius: 4px; } } .seek__times { display: flex; justify-content: space-between; color: var(--muted-dark); font-size: 0.8rem; margin-top: 0.2rem; font-variant-numeric: tabular-nums; } /* Mini-lecteur des petits écrans, en bas de l'écran. Jamais affiché sur deux colonnes. */ .mini-player { position: fixed; left: 0.75rem; right: 0.75rem; bottom: 0.75rem; z-index: 15; display: flex; align-items: center; gap: 0.5rem; height: var(--mini-player-height); padding: 0 0.6rem; overflow: hidden; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: color-mix(in srgb, var(--surface-raised) 92%, transparent); backdrop-filter: blur(12px); box-shadow: 0 12px 30px var(--shadow); @media (min-width: 1000px) { display: none !important; } & .icon-btn--primary { width: 42px; height: 42px; } } .mini-player__info { display: flex; align-items: center; gap: 0.65rem; flex: 1; min-width: 0; padding: 0; border: none; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; & .cover { width: 44px; height: 44px; border-radius: 10px; } } .mini-player__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 0.92rem; } .mini-player__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; & > div { height: 100%; width: 0; background: var(--accent); transition: width 0.9s linear; } } /* ------------------------------------------------------------------------------------------------ * Ajout de morceaux : envois en cours, ajout par lien */ .upload-list { margin-top: 1rem; } .upload-list__item { display: grid; grid-template-columns: minmax(0, 1fr) 140px minmax(0, 1fr); align-items: center; gap: 0.75rem; padding: 0.4rem 0; font-size: 0.9rem; & progress { width: 100%; } &[data-state="ok"] .upload-list__state { color: var(--success); } &[data-state="error"] .upload-list__state { color: var(--danger); } } .upload-list__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .upload-list__state { color: var(--muted); } .url-form { border-top: 1px solid var(--border); padding-top: 1.25rem; margin-top: 1.5rem; } .url-form__row { display: flex; gap: 0.75rem; } /* ------------------------------------------------------------------------------------------------ * Messages d'état (voir createStatusManager dans common.js) : bulle en bas de l'écran */ .toast { position: fixed; left: 50%; bottom: 1.25rem; z-index: 30; transform: translateX(-50%); width: max-content; max-width: min(560px, calc(100% - 1.5rem)); padding: 0.75rem 1.15rem; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface-raised); box-shadow: 0 12px 30px var(--shadow); font-size: 0.92rem; color: var(--accent-text); &[data-type="error"] { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); } &[data-type="success"] { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, transparent); } .has-mini-player & { bottom: calc(var(--mini-player-height) + 1.5rem); } } /* ------------------------------------------------------------------------------------------------ * Listes de morceaux (file d'attente, bibliothèque) */ .list { list-style: none; padding: 0; margin: 0; } .list--stack > li + li { border-top: 1px solid var(--border); } .media-item { display: flex; gap: 0.85rem; align-items: center; padding: 0.7rem 0; } .media-item__info { flex: 1; min-width: 0; } .media-item__title { font-weight: 600; font-size: 0.95rem; overflow-wrap: anywhere; } .media-item__meta { color: var(--muted-dark); font-size: 0.82rem; } .media-item__actions { display: flex; align-items: center; gap: 0.15rem; } .media-item__actions .btn { margin-right: 0.35rem; } /* File d'attente : lignes plus serrées, numéro devant le titre. */ .media-item--queue { gap: 0.7rem; padding: 0.55rem 0; & .cover { width: 44px; height: 44px; border-radius: 10px; } & .icon-btn { width: 30px; height: 30px; font-size: 0.9rem; } } .media-item__position { color: var(--muted-dark); font-variant-numeric: tabular-nums; margin-right: 0.25rem; } /* Pochette d'un morceau : , ou
vide (note de musique) ou à image de fond (aperçu). */ .cover { flex-shrink: 0; width: 56px; height: 56px; border-radius: var(--radius); object-fit: cover; background: var(--surface-raised) center / cover no-repeat; border: 1px solid var(--border); } /* Lecteur et fenêtre de modification. */ .cover--large { width: 96px; height: 96px; border-radius: 16px; } .cover--empty { display: grid; place-items: center; color: var(--muted-dark); &::after { content: "♪"; font-size: 1.4rem; } &.cover--large::after { font-size: 2.6rem; } } /* ------------------------------------------------------------------------------------------------ * Bibliothèque : outils, sections repliables, étiquettes, fenêtre de modification */ .library-tools { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; & input[type="search"] { flex: 1 1 300px; width: auto; } } .library { margin-top: 1rem; } .library-section { border: 1px solid var(--border); border-radius: 16px; padding: 0 1rem; margin-bottom: 0.75rem; background: color-mix(in srgb, var(--surface-raised) 55%, transparent); } .library-section__summary { display: flex; align-items: center; gap: 0.85rem; padding: 0.85rem 0; cursor: pointer; list-style: none; &::-webkit-details-marker { display: none; } &::before { content: "▸"; color: var(--accent-text); transition: transform 0.15s ease; } [open] > &::before { transform: rotate(90deg); } } /* Nom et nombre de morceaux : restent à côté de l'image, quitte à passer sur deux lignes. */ .library-section__heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.75rem; min-width: 0; } /* Image de la section, entre la flèche et le nom. */ .cover--section { width: 80px; height: 80px; border-radius: 14px; } .library-section__name { font-weight: 700; font-size: 1.05rem; } .library-section__count { color: var(--muted-dark); font-size: 0.85rem; } /* Ajout en bloc à gauche, gestion de la section (icônes) à droite. */ .library-section__toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--border); } .library-section__manage { display: flex; gap: 0.1rem; margin-left: auto; } .library-section__empty { padding: 0.75rem 0 1rem; } /* Étiquettes : sous un morceau, en barre de filtre au-dessus de la bibliothèque, ou en suggestions dans la fenêtre de modification. Celle du filtre actif est pressée. */ .tag-list { display: flex; flex-wrap: wrap; gap: 0.35rem; &:not(:empty) { margin-top: 0.35rem; } } .tag-list--filter:not(:empty) { margin-top: 0.75rem; } .tag { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.15rem 0.65rem; border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--text); font: inherit; font-size: 0.78rem; cursor: pointer; &:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); } &[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: transparent; } &:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; } } .tag__count { opacity: 0.7; font-size: 0.72rem; } .dialog { width: min(520px, calc(100% - 2rem)); padding: 1.5rem; border-radius: var(--radius-lg); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); box-shadow: 0 20px 38px var(--shadow); &::backdrop { background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(4px); } & h2 { font-size: 1.25rem; margin-bottom: 1.25rem; } } .cover-editor { display: flex; gap: 1rem; align-items: flex-start; } .cover-editor__fields { flex: 1; min-width: 0; } /* ------------------------------------------------------------------------------------------------ * Petits écrans */ @media (max-width: 760px) { .welcome { flex-direction: column; gap: 1.5rem; min-height: 0; text-align: center; } .welcome__visual { max-width: 170px; } .welcome__content h1 { font-size: 1.8rem; } .key-login__form { text-align: left; } } @media (max-width: 600px) { .topbar__inner { padding: 0 0.9rem; gap: 0.6rem; } .brand span, .topbar__user { display: none; } .layout { padding: 0.9rem 0.75rem 2rem; gap: 0.9rem; } .layout__side, .layout__main { gap: 0.9rem; } .panel { padding: 1rem; } .panel__header { flex-direction: column; } /* File d'attente : le compteur reste à côté du titre. */ .queue .panel__header { flex-direction: row; align-items: center; } .url-form__row { flex-direction: column; } .upload-list__item { grid-template-columns: 1fr; gap: 0.25rem; } .library-section { padding: 0 0.75rem; } .cover--section { width: 64px; height: 64px; } .media-item { gap: 0.7rem; } /* Bibliothèque : titre sur toute la largeur, boutons en dessous. */ .media-item--library { flex-wrap: wrap; & .cover { width: 48px; height: 48px; } & .media-item__info { flex: 1 1 0; } & .media-item__actions { flex-basis: 100%; justify-content: flex-end; } } .cover-editor { flex-direction: column; } } /* ------------------------------------------------------------------------------------------------ * Utilitaires de mise en page */ .grid { display: grid; gap: 0.75rem 1rem; } .grid--two { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } .u-mt-1 { margin-top: 1rem; }