From 8f548afb179c04aed6ac023ad0deb46906a3ab27 Mon Sep 17 00:00:00 2001 From: Yvv Date: Sat, 14 Mar 2026 16:41:23 +0100 Subject: [PATCH] Palette dynamique dans BookPlayer et admin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - BookPlayer : toutes les couleurs HSL en dur remplacées par variables CSS palette - Admin (sidebar, formulaires, pages, book, songs, messages, media, login) : idem - L'ambiance graphique suit maintenant la palette active partout Co-Authored-By: Claude Opus 4.6 (1M context) --- app/components/admin/AdminFieldList.vue | 14 ++--- app/components/admin/AdminFieldText.vue | 8 +-- app/components/admin/AdminFieldTextarea.vue | 8 +-- app/components/admin/AdminFormSection.vue | 6 +-- app/components/admin/AdminMarkdownEditor.vue | 20 ++++---- app/components/admin/AdminMediaBrowser.vue | 30 +++++------ app/components/admin/AdminMediaUpload.vue | 10 ++-- app/components/admin/AdminSaveButton.vue | 4 +- app/components/admin/AdminSidebar.vue | 18 +++---- app/components/book/BookPlayer.vue | 38 +++++++------- app/pages/admin/book/[slug].vue | 32 ++++++------ app/pages/admin/book/index.vue | 54 ++++++++++---------- app/pages/admin/index.vue | 8 +-- app/pages/admin/login.vue | 24 ++++----- app/pages/admin/messages.vue | 22 ++++---- app/pages/admin/pages/[...path].vue | 8 +-- app/pages/admin/pages/index.vue | 8 +-- app/pages/admin/site.vue | 6 +-- app/pages/admin/songs.vue | 22 ++++---- 19 files changed, 170 insertions(+), 170 deletions(-) diff --git a/app/components/admin/AdminFieldList.vue b/app/components/admin/AdminFieldList.vue index 93706cf..e9cab60 100644 --- a/app/components/admin/AdminFieldList.vue +++ b/app/components/admin/AdminFieldList.vue @@ -58,7 +58,7 @@ function addItem() { .field-label { font-size: 0.8rem; font-weight: 500; - color: hsl(20 8% 60%); + color: hsl(var(--color-text-muted)); } .list-item { @@ -66,9 +66,9 @@ function addItem() { align-items: flex-start; gap: 0.5rem; padding: 0.5rem; - border: 1px solid hsl(20 8% 14%); + border: 1px solid hsl(var(--color-surface-light)); border-radius: 0.5rem; - background: hsl(20 8% 5%); + background: hsl(var(--color-bg)); } .list-item > :deep(*:first-child) { @@ -101,9 +101,9 @@ function addItem() { gap: 0.375rem; padding: 0.375rem 0.75rem; border-radius: 0.5rem; - border: 1px dashed hsl(20 8% 22%); + border: 1px dashed hsl(var(--color-surface-light)); background: none; - color: hsl(20 8% 50%); + color: hsl(var(--color-text-muted)); font-size: 0.8rem; cursor: pointer; transition: all 0.2s; @@ -111,7 +111,7 @@ function addItem() { } .list-add:hover { - border-color: hsl(12 76% 48% / 0.4); - color: hsl(12 76% 68%); + border-color: hsl(var(--color-primary) / 0.4); + color: hsl(var(--color-primary)); } diff --git a/app/components/admin/AdminFieldText.vue b/app/components/admin/AdminFieldText.vue index 5d3ee62..2f18ada 100644 --- a/app/components/admin/AdminFieldText.vue +++ b/app/components/admin/AdminFieldText.vue @@ -36,14 +36,14 @@ const id = computed(() => `field-${props.label.toLowerCase().replace(/\s+/g, '-' .field-label { font-size: 0.8rem; font-weight: 500; - color: hsl(20 8% 60%); + color: hsl(var(--color-text-muted)); } .field-input { padding: 0.5rem 0.75rem; border-radius: 0.5rem; - border: 1px solid hsl(20 8% 18%); - background: hsl(20 8% 6%); + border: 1px solid hsl(var(--color-surface-light)); + background: hsl(var(--color-bg)); color: white; font-size: 0.875rem; transition: border-color 0.2s; @@ -51,6 +51,6 @@ const id = computed(() => `field-${props.label.toLowerCase().replace(/\s+/g, '-' .field-input:focus { outline: none; - border-color: hsl(12 76% 48% / 0.5); + border-color: hsl(var(--color-primary) / 0.5); } diff --git a/app/components/admin/AdminFieldTextarea.vue b/app/components/admin/AdminFieldTextarea.vue index 6d209b8..afddc12 100644 --- a/app/components/admin/AdminFieldTextarea.vue +++ b/app/components/admin/AdminFieldTextarea.vue @@ -37,14 +37,14 @@ const id = computed(() => `field-${props.label.toLowerCase().replace(/\s+/g, '-' .field-label { font-size: 0.8rem; font-weight: 500; - color: hsl(20 8% 60%); + color: hsl(var(--color-text-muted)); } .field-textarea { padding: 0.5rem 0.75rem; border-radius: 0.5rem; - border: 1px solid hsl(20 8% 18%); - background: hsl(20 8% 6%); + border: 1px solid hsl(var(--color-surface-light)); + background: hsl(var(--color-bg)); color: white; font-size: 0.875rem; resize: vertical; @@ -55,6 +55,6 @@ const id = computed(() => `field-${props.label.toLowerCase().replace(/\s+/g, '-' .field-textarea:focus { outline: none; - border-color: hsl(12 76% 48% / 0.5); + border-color: hsl(var(--color-primary) / 0.5); } diff --git a/app/components/admin/AdminFormSection.vue b/app/components/admin/AdminFormSection.vue index 891ab6a..bf87921 100644 --- a/app/components/admin/AdminFormSection.vue +++ b/app/components/admin/AdminFormSection.vue @@ -19,7 +19,7 @@ defineProps<{ diff --git a/app/components/admin/AdminMediaBrowser.vue b/app/components/admin/AdminMediaBrowser.vue index 865a41e..9417ccc 100644 --- a/app/components/admin/AdminMediaBrowser.vue +++ b/app/components/admin/AdminMediaBrowser.vue @@ -102,18 +102,18 @@ function formatSize(bytes: number): string { .filter-btn { padding: 0.25rem 0.625rem; border-radius: 9999px; - border: 1px solid hsl(20 8% 18%); + border: 1px solid hsl(var(--color-surface-light)); background: none; - color: hsl(20 8% 55%); + color: hsl(var(--color-text-muted)); font-size: 0.75rem; cursor: pointer; transition: all 0.2s; } .filter-btn--active { - background: hsl(12 76% 48% / 0.15); - border-color: hsl(12 76% 48% / 0.3); - color: hsl(12 76% 68%); + background: hsl(var(--color-primary) / 0.15); + border-color: hsl(var(--color-primary) / 0.3); + color: hsl(var(--color-primary)); } .media-grid { @@ -123,7 +123,7 @@ function formatSize(bytes: number): string { } .media-card { - border: 1px solid hsl(20 8% 14%); + border: 1px solid hsl(var(--color-surface-light)); border-radius: 0.5rem; overflow: hidden; cursor: pointer; @@ -131,18 +131,18 @@ function formatSize(bytes: number): string { } .media-card:hover { - border-color: hsl(20 8% 22%); + border-color: hsl(var(--color-surface-light)); } .media-card--selected { - border-color: hsl(12 76% 48%); - box-shadow: 0 0 0 1px hsl(12 76% 48% / 0.3); + border-color: hsl(var(--color-primary)); + box-shadow: 0 0 0 1px hsl(var(--color-primary) / 0.3); } .media-thumb { aspect-ratio: 1; overflow: hidden; - background: hsl(20 8% 6%); + background: hsl(var(--color-bg)); } .media-thumb img { @@ -156,8 +156,8 @@ function formatSize(bytes: number): string { display: flex; align-items: center; justify-content: center; - background: hsl(20 8% 6%); - color: hsl(20 8% 40%); + background: hsl(var(--color-bg)); + color: hsl(var(--color-text-muted)); } .media-info { @@ -177,7 +177,7 @@ function formatSize(bytes: number): string { .media-size { font-size: 0.65rem; - color: hsl(20 8% 40%); + color: hsl(var(--color-text-muted)); } .media-actions { @@ -186,9 +186,9 @@ function formatSize(bytes: number): string { justify-content: space-between; margin-top: 1rem; padding: 0.75rem; - border: 1px solid hsl(20 8% 14%); + border: 1px solid hsl(var(--color-surface-light)); border-radius: 0.5rem; - background: hsl(20 8% 5%); + background: hsl(var(--color-bg)); } .delete-btn { diff --git a/app/components/admin/AdminMediaUpload.vue b/app/components/admin/AdminMediaUpload.vue index a210dc9..d73941c 100644 --- a/app/components/admin/AdminMediaUpload.vue +++ b/app/components/admin/AdminMediaUpload.vue @@ -73,7 +73,7 @@ async function upload(files: FileList) { diff --git a/app/pages/admin/book/index.vue b/app/pages/admin/book/index.vue index 6e34e74..aae4343 100644 --- a/app/pages/admin/book/index.vue +++ b/app/pages/admin/book/index.vue @@ -249,9 +249,9 @@ async function removeChapter(slug: string) { .pdf-section { margin-bottom: 1.5rem; padding: 1rem; - border: 1px solid hsl(20 8% 14%); + border: 1px solid hsl(var(--color-surface-light)); border-radius: 0.5rem; - background: hsl(20 8% 5%); + background: hsl(var(--color-bg)); } .save-pdf-btn { @@ -260,9 +260,9 @@ async function removeChapter(slug: string) { gap: 0.5rem; padding: 0.5rem 1rem; border-radius: 0.5rem; - border: 1px solid hsl(20 8% 25%); + border: 1px solid hsl(var(--color-surface-light)); background: none; - color: hsl(20 8% 55%); + color: hsl(var(--color-text-muted)); font-size: 0.8rem; cursor: pointer; transition: all 0.15s; @@ -270,8 +270,8 @@ async function removeChapter(slug: string) { } .save-pdf-btn:hover:not(:disabled) { - border-color: hsl(12 76% 48% / 0.5); - color: hsl(12 76% 68%); + border-color: hsl(var(--color-primary) / 0.5); + color: hsl(var(--color-primary)); } .save-pdf-btn:disabled { @@ -284,14 +284,14 @@ async function removeChapter(slug: string) { align-items: center; gap: 0.75rem; padding: 0.75rem 1rem; - border: 1px solid hsl(20 8% 14%); + border: 1px solid hsl(var(--color-surface-light)); border-radius: 0.5rem; transition: all 0.2s; } .chapter-item:hover { - border-color: hsl(12 76% 48% / 0.3); - background: hsl(20 8% 6%); + border-color: hsl(var(--color-primary) / 0.3); + background: hsl(var(--color-bg)); } .chapter-item--dragging { @@ -299,13 +299,13 @@ async function removeChapter(slug: string) { } .chapter-item--over { - border-top: 2px solid hsl(12 76% 48%); + border-top: 2px solid hsl(var(--color-primary)); } .drag-handle { cursor: grab; padding: 0.25rem; - color: hsl(20 8% 35%); + color: hsl(var(--color-text-muted)); flex-shrink: 0; } @@ -316,7 +316,7 @@ async function removeChapter(slug: string) { .chapter-order { font-family: var(--font-mono, monospace); font-size: 0.85rem; - color: hsl(12 76% 48% / 0.5); + color: hsl(var(--color-primary) / 0.5); font-weight: 600; width: 1.75rem; } @@ -334,7 +334,7 @@ async function removeChapter(slug: string) { } .chapter-title:hover { - color: hsl(12 76% 68%); + color: hsl(var(--color-primary)); } .chapter-songs { @@ -348,9 +348,9 @@ async function removeChapter(slug: string) { font-size: 0.65rem; padding: 0.1rem 0.5rem; border-radius: 9999px; - background: hsl(12 76% 48% / 0.1); - color: hsl(12 76% 60%); - border: 1px solid hsl(12 76% 48% / 0.2); + background: hsl(var(--color-primary) / 0.1); + color: hsl(var(--color-primary)); + border: 1px solid hsl(var(--color-primary) / 0.2); } .page-select { @@ -358,16 +358,16 @@ async function removeChapter(slug: string) { max-width: 14rem; padding: 0.25rem 0.4rem; border-radius: 0.375rem; - border: 1px solid hsl(20 8% 18%); - background: hsl(20 8% 6%); - color: hsl(20 8% 65%); + border: 1px solid hsl(var(--color-surface-light)); + background: hsl(var(--color-bg)); + color: hsl(var(--color-text-muted)); font-size: 0.7rem; cursor: pointer; } .page-select:focus { outline: none; - border-color: hsl(12 76% 48% / 0.5); + border-color: hsl(var(--color-primary) / 0.5); } .delete-btn { @@ -388,15 +388,15 @@ async function removeChapter(slug: string) { .admin-input { padding: 0.375rem 0.5rem; border-radius: 0.375rem; - border: 1px solid hsl(20 8% 18%); - background: hsl(20 8% 6%); + border: 1px solid hsl(var(--color-surface-light)); + background: hsl(var(--color-bg)); color: white; font-size: 0.8rem; } .admin-input:focus { outline: none; - border-color: hsl(12 76% 48% / 0.5); + border-color: hsl(var(--color-primary) / 0.5); } .add-btn { @@ -405,9 +405,9 @@ async function removeChapter(slug: string) { gap: 0.5rem; padding: 0.5rem 1rem; border-radius: 0.5rem; - border: 1px solid hsl(20 8% 25%); + border: 1px solid hsl(var(--color-surface-light)); background: none; - color: hsl(20 8% 55%); + color: hsl(var(--color-text-muted)); font-size: 0.85rem; cursor: pointer; transition: all 0.15s; @@ -415,8 +415,8 @@ async function removeChapter(slug: string) { } .add-btn:hover:not(:disabled) { - border-color: hsl(12 76% 48% / 0.5); - color: hsl(12 76% 68%); + border-color: hsl(var(--color-primary) / 0.5); + color: hsl(var(--color-primary)); } .add-btn:disabled { diff --git a/app/pages/admin/index.vue b/app/pages/admin/index.vue index 8a61106..21584ad 100644 --- a/app/pages/admin/index.vue +++ b/app/pages/admin/index.vue @@ -53,14 +53,14 @@ definePageMeta({ .dash-card { padding: 1.5rem; border-radius: 0.75rem; - border: 1px solid hsl(20 8% 14%); - background: hsl(20 8% 6%); + border: 1px solid hsl(var(--color-surface-light)); + background: hsl(var(--color-bg)); text-decoration: none; transition: all 0.2s; } .dash-card:hover { - border-color: hsl(12 76% 48% / 0.3); - background: hsl(20 8% 8%); + border-color: hsl(var(--color-primary) / 0.3); + background: hsl(var(--color-surface)); } diff --git a/app/pages/admin/login.vue b/app/pages/admin/login.vue index a2e866d..3ca3996 100644 --- a/app/pages/admin/login.vue +++ b/app/pages/admin/login.vue @@ -72,16 +72,16 @@ async function login() { display: flex; align-items: center; justify-content: center; - background: hsl(20 8% 3.5%); + background: hsl(var(--color-bg)); } .login-form { width: 100%; max-width: 24rem; padding: 2.5rem; - border: 1px solid hsl(20 8% 14%); + border: 1px solid hsl(var(--color-surface-light)); border-radius: 1rem; - background: hsl(20 8% 6%); + background: hsl(var(--color-bg)); } .login-error { @@ -97,7 +97,7 @@ async function login() { display: block; font-size: 0.8rem; font-weight: 500; - color: hsl(20 8% 60%); + color: hsl(var(--color-text-muted)); margin-bottom: 0.375rem; } @@ -105,8 +105,8 @@ async function login() { width: 100%; padding: 0.625rem 0.75rem; border-radius: 0.5rem; - border: 1px solid hsl(20 8% 18%); - background: hsl(20 8% 4%); + border: 1px solid hsl(var(--color-surface-light)); + background: hsl(var(--color-bg)); color: white; font-size: 0.9rem; margin-bottom: 1.25rem; @@ -114,7 +114,7 @@ async function login() { .login-input:focus { outline: none; - border-color: hsl(12 76% 48% / 0.5); + border-color: hsl(var(--color-primary) / 0.5); } .login-btn { @@ -126,7 +126,7 @@ async function login() { padding: 0.625rem; border-radius: 0.5rem; border: none; - background: hsl(12 76% 48%); + background: hsl(var(--color-primary)); color: white; font-weight: 600; font-size: 0.9rem; @@ -135,7 +135,7 @@ async function login() { } .login-btn:hover:not(:disabled) { - background: hsl(12 76% 42%); + background: hsl(var(--color-primary)); } .login-btn:disabled { @@ -147,12 +147,12 @@ async function login() { margin-top: 1rem; text-align: center; font-size: 0.75rem; - color: hsl(20 8% 40%); + color: hsl(var(--color-text-muted)); } .dev-hint code { - color: hsl(12 76% 60%); - background: hsl(20 8% 10%); + color: hsl(var(--color-primary)); + background: hsl(var(--color-surface)); padding: 0.125rem 0.375rem; border-radius: 0.25rem; } diff --git a/app/pages/admin/messages.vue b/app/pages/admin/messages.vue index 2eb3837..f268bda 100644 --- a/app/pages/admin/messages.vue +++ b/app/pages/admin/messages.vue @@ -130,14 +130,14 @@ function formatDate(iso: string) { diff --git a/app/pages/admin/pages/index.vue b/app/pages/admin/pages/index.vue index 4b3ff01..1ddcbdb 100644 --- a/app/pages/admin/pages/index.vue +++ b/app/pages/admin/pages/index.vue @@ -84,14 +84,14 @@ const sections = computed(() => { flex-direction: column; padding: 1rem; border-radius: 0.5rem; - border: 1px solid hsl(20 8% 14%); - background: hsl(20 8% 6%); + border: 1px solid hsl(var(--color-surface-light)); + background: hsl(var(--color-bg)); text-decoration: none; transition: all 0.2s; } .page-card:hover { - border-color: hsl(12 76% 48% / 0.3); - background: hsl(20 8% 8%); + border-color: hsl(var(--color-primary) / 0.3); + background: hsl(var(--color-surface)); } diff --git a/app/pages/admin/site.vue b/app/pages/admin/site.vue index feaab07..4764a44 100644 --- a/app/pages/admin/site.vue +++ b/app/pages/admin/site.vue @@ -103,14 +103,14 @@ async function save() { .admin-input { padding: 0.375rem 0.5rem; border-radius: 0.375rem; - border: 1px solid hsl(20 8% 18%); - background: hsl(20 8% 6%); + border: 1px solid hsl(var(--color-surface-light)); + background: hsl(var(--color-bg)); color: white; font-size: 0.8rem; } .admin-input:focus { outline: none; - border-color: hsl(12 76% 48% / 0.5); + border-color: hsl(var(--color-primary) / 0.5); } diff --git a/app/pages/admin/songs.vue b/app/pages/admin/songs.vue index c32ce50..f979744 100644 --- a/app/pages/admin/songs.vue +++ b/app/pages/admin/songs.vue @@ -163,7 +163,7 @@ async function save() { align-items: flex-start; gap: 0.75rem; padding: 0.75rem 0.5rem; - border-bottom: 1px solid hsl(20 8% 10%); + border-bottom: 1px solid hsl(var(--color-surface)); transition: background 0.15s; } @@ -172,13 +172,13 @@ async function save() { } .song-row--over { - border-top: 2px solid hsl(12 76% 48%); + border-top: 2px solid hsl(var(--color-primary)); } .drag-handle { cursor: grab; padding: 0.25rem; - color: hsl(20 8% 35%); + color: hsl(var(--color-text-muted)); flex-shrink: 0; margin-top: 0.25rem; } @@ -190,7 +190,7 @@ async function save() { .song-num { font-family: var(--font-mono, monospace); font-size: 0.8rem; - color: hsl(20 8% 40%); + color: hsl(var(--color-text-muted)); width: 1.25rem; text-align: right; flex-shrink: 0; @@ -200,8 +200,8 @@ async function save() { .admin-input { padding: 0.375rem 0.5rem; border-radius: 0.375rem; - border: 1px solid hsl(20 8% 18%); - background: hsl(20 8% 6%); + border: 1px solid hsl(var(--color-surface-light)); + background: hsl(var(--color-bg)); color: white; font-size: 0.8rem; width: 100%; @@ -209,7 +209,7 @@ async function save() { .admin-input:focus { outline: none; - border-color: hsl(12 76% 48% / 0.5); + border-color: hsl(var(--color-primary) / 0.5); } .lyrics-textarea { @@ -240,16 +240,16 @@ async function save() { margin-top: 1rem; padding: 0.5rem 1rem; border-radius: 0.5rem; - border: 1px dashed hsl(20 8% 25%); + border: 1px dashed hsl(var(--color-surface-light)); background: none; - color: hsl(20 8% 55%); + color: hsl(var(--color-text-muted)); font-size: 0.85rem; cursor: pointer; transition: all 0.15s; } .add-btn:hover { - border-color: hsl(12 76% 48% / 0.5); - color: hsl(12 76% 68%); + border-color: hsl(var(--color-primary) / 0.5); + color: hsl(var(--color-primary)); }