Files
librodrome/app/assets/css/main.css
Yvv 2f438d9d7a Refactoring complet : contenu livre, config unique, routes, admin et light mode
- Source unique : supprime app/data/librodrome.config.yml, renomme site/ en bookplayer.config.yml
- Morceaux : renommés avec slugs lisibles, fichiers audio renommés, inversion ch2↔ch3 corrigée
- Chapitres : 11 fichiers .md réécrits avec le vrai contenu du livre (synthèse fidèle du PDF)
- Routes : /lire → /modele-eco, /ecouter → /en-musique, redirections 301
- Admin chapitres : champs structurés (titre, description, temps lecture), compteur mots
- Éditeur markdown : mode split, plein écran, support Tab, meilleur rendu aperçu
- Admin morceaux : drag & drop, ajout/suppression, gestion playlist
- Light mode : palettes printemps/été plus saturées et contrastées, teintes primary
- Raccourcis clavier player : espace, flèches gauche/droite
- Paroles : toggle supprimé, toujours visibles et scrollables
- Nouvelles pages : autonomie, evenement

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 20:20:52 +01:00

218 lines
5.9 KiB
CSS

@import './fonts.css';
@import './animations.css';
@import './typography.css';
:root {
--color-primary: 18 80% 45%;
--color-accent: 32 85% 50%;
--color-bg: 20 10% 7%;
--color-surface: 20 10% 12%;
--color-surface-light: 20 8% 17%;
--color-text: 0 0% 100%;
--color-text-muted: 0 0% 65%;
--header-height: 4rem;
--player-height: 0rem;
--sidebar-width: 280px;
--font-display: 'Outfit', sans-serif;
--font-sans: 'Inter', sans-serif;
--font-mono: 'JetBrains Mono', monospace;
--ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
--ease-in-out-expo: cubic-bezier(0.87, 0, 0.13, 1);
}
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
font-family: var(--font-sans);
background-color: hsl(var(--color-bg));
color: hsl(var(--color-text));
color-scheme: dark;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
body {
margin: 0;
min-height: 100dvh;
}
button {
border: none;
background: none;
cursor: pointer;
font: inherit;
color: inherit;
}
a {
text-decoration: none;
color: inherit;
}
::selection {
background-color: hsl(var(--color-primary) / 0.3);
color: hsl(var(--color-text));
}
:focus-visible {
outline: 2px solid hsl(var(--color-primary));
outline-offset: 2px;
}
/* Scrollbar styling */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: hsl(var(--color-text) / 0.15);
border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
background: hsl(var(--color-text) / 0.25);
}
/* ═══ Light mode overrides ═══ */
.palette-light {
color-scheme: light;
}
/* Force all white text → adaptive text color in light mode.
Using !important to override scoped component styles and UnoCSS utilities. */
.palette-light,
.palette-light .text-white {
color: hsl(var(--color-text)) !important;
}
/* white with opacity → dark text with boosted opacity for punch */
.palette-light .text-white\/20 { color: hsl(var(--color-text) / 0.28) !important; }
.palette-light .text-white\/30 { color: hsl(var(--color-text) / 0.38) !important; }
.palette-light .text-white\/40 { color: hsl(var(--color-text) / 0.48) !important; }
.palette-light .text-white\/45 { color: hsl(var(--color-text) / 0.52) !important; }
.palette-light .text-white\/50 { color: hsl(var(--color-text) / 0.58) !important; }
.palette-light .text-white\/60 { color: hsl(var(--color-text) / 0.68) !important; }
.palette-light .text-white\/70 { color: hsl(var(--color-text) / 0.78) !important; }
.palette-light .text-white\/80 { color: hsl(var(--color-text) / 0.88) !important; }
.palette-light .text-white\/85 { color: hsl(var(--color-text) / 0.92) !important; }
/* white backgrounds → surface tones with more contrast */
.palette-light .bg-white\/5 { background-color: hsl(var(--color-primary) / 0.05) !important; }
.palette-light .bg-white\/8 { background-color: hsl(var(--color-primary) / 0.07) !important; }
.palette-light .bg-white\/10 { background-color: hsl(var(--color-primary) / 0.09) !important; }
/* borders with primary tint */
.palette-light .border-white\/8 { border-color: hsl(var(--color-primary) / 0.15) !important; }
/* hover overrides */
.palette-light .hover\:text-white:hover,
.palette-light .hover\:text-white\/70:hover,
.palette-light .hover\:text-white\/80:hover {
color: hsl(var(--color-text)) !important;
}
.palette-light .hover\:text-white\/60:hover {
color: hsl(var(--color-text) / 0.7) !important;
}
.palette-light .hover\:bg-white\/5:hover {
background-color: hsl(var(--color-primary) / 0.08) !important;
}
.palette-light .hover\:bg-white\/10:hover {
background-color: hsl(var(--color-primary) / 0.12) !important;
}
/* group-hover overrides */
.palette-light .group:hover .group-hover\:text-primary\/60 {
color: hsl(var(--color-primary) / 0.7) !important;
}
/* placeholder overrides */
.palette-light .placeholder\:text-white\/30::placeholder {
color: hsl(var(--color-text) / 0.35) !important;
}
/* Prose/content in light mode */
.palette-light .prose { color: hsl(var(--color-text)); }
.palette-light .prose :where(h1,h2,h3,h4,h5,h6) { color: hsl(var(--color-text)); }
/* text-gradient in light mode — vivid gradient */
.palette-light .text-gradient {
background-image: linear-gradient(135deg, hsl(var(--color-primary)), hsl(var(--color-accent)));
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent !important;
}
/* card surfaces — subtle shadow for depth */
.palette-light .card-surface {
background: hsl(var(--color-surface)) !important;
border-color: hsl(var(--color-primary) / 0.12) !important;
box-shadow: 0 1px 3px hsl(var(--color-text) / 0.06);
}
/* btn-primary text stays white on colored bg */
.palette-light .btn-primary {
color: white !important;
}
/* input fields — cleaner contrast */
.palette-light input,
.palette-light textarea {
color: hsl(var(--color-text));
background-color: white;
border-color: hsl(var(--color-text) / 0.18);
}
.palette-light input:focus,
.palette-light textarea:focus {
border-color: hsl(var(--color-primary) / 0.5);
box-shadow: 0 0 0 3px hsl(var(--color-primary) / 0.1);
}
/* Ecouter view toggle buttons */
.palette-light .bg-white\/10 {
background-color: hsl(var(--color-primary) / 0.1) !important;
}
/* Light mode scrollbar — tinted with primary */
.palette-light ::-webkit-scrollbar-thumb {
background: hsl(var(--color-primary) / 0.2);
}
.palette-light ::-webkit-scrollbar-thumb:hover {
background: hsl(var(--color-primary) / 0.35);
}
/* Light mode selection — vivid */
.palette-light ::selection {
background-color: hsl(var(--color-accent) / 0.25);
}
/* Page transitions */
.page-enter-active,
.page-leave-active {
transition: opacity 300ms var(--ease-out-expo),
transform 300ms var(--ease-out-expo);
}
.page-enter-from {
opacity: 0;
transform: translateY(8px);
}
.page-leave-to {
opacity: 0;
transform: translateY(-8px);
}