Files
PinchChat/src/index.css
Nicolas Varrot b20bf41bf4 feat: theme switcher — dark, light, OLED modes with configurable accent colors
- Add ThemeContext with CSS custom properties for all base colors
- Three theme modes: Dark (default), Light, OLED Black
- Six accent colors: Cyan, Violet, Emerald, Amber, Rose, Blue
- Theme switcher dropdown in header (palette icon)
- Persisted in localStorage
- CSS variables replace hardcoded hex colors in index.css and components
- i18n support (EN/FR) for theme labels
2026-02-12 23:51:01 +00:00

180 lines
4.3 KiB
CSS

@import "tailwindcss";
@import "highlight.js/styles/base16/material-palenight.min.css";
:root {
--pc-bg-base: #1e1e24;
--pc-bg-surface: #232329;
--pc-bg-elevated: #27272a;
--pc-bg-input: #1a1a20;
--pc-bg-sidebar: rgba(30,30,36,0.95);
--pc-bg-code: #1a1a20;
--pc-border: rgba(255,255,255,0.08);
--pc-border-strong: rgba(255,255,255,0.1);
--pc-text-primary: #d4d4d8;
--pc-text-secondary: #a1a1aa;
--pc-text-muted: #71717a;
--pc-text-faint: #52525b;
--pc-scrollbar-thumb: #52525b;
--pc-scrollbar-track: #27272a;
--pc-scrollbar-thumb-hover: #71717a;
--pc-accent: #22d3ee;
--pc-accent-light: #67e8f9;
--pc-accent-dim: rgba(34,211,238,0.3);
--pc-accent-glow: rgba(34,211,238,0.1);
--pc-accent-rgb: 34,211,238;
--pc-user-bubble: rgba(34,211,238,0.06);
--pc-user-border: rgba(34,211,238,0.15);
}
* {
scrollbar-width: thin;
scrollbar-color: var(--pc-scrollbar-thumb) var(--pc-scrollbar-track);
}
/* WebKit scrollbar styling (Chrome, Safari, Edge) */
::-webkit-scrollbar {
width: 6px;
height: 6px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: var(--pc-scrollbar-thumb);
border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
background: var(--pc-scrollbar-thumb-hover);
}
/* Textarea-specific: even thinner scrollbar, no horizontal scroll */
textarea::-webkit-scrollbar {
width: 4px;
height: 0;
}
textarea::-webkit-scrollbar:horizontal {
display: none;
}
textarea::-webkit-scrollbar-thumb {
background: #3f3f46;
border-radius: 2px;
}
textarea::-webkit-scrollbar-thumb:hover {
background: #52525b;
}
textarea {
overflow-x: hidden;
overflow-y: auto;
overflow-wrap: break-word;
word-break: break-word;
}
html, body {
margin: 0;
background: var(--pc-bg-base);
color: var(--pc-text-primary);
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
overflow-x: hidden;
max-width: 100vw;
}
@keyframes fade-in {
from { opacity: 0; transform: translateY(8px); }
to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-dot {
0%, 100% { opacity: 1; }
50% { opacity: 0.4; }
}
@keyframes bounce-dot {
0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
40% { transform: translateY(-4px); opacity: 1; }
}
.animate-fade-in {
animation: fade-in 0.3s ease-out;
}
.pulse-dot {
animation: pulse-dot 2s ease-in-out infinite;
}
.bounce-dot {
animation: bounce-dot 0.9s infinite ease-in-out;
}
.bounce-dot:nth-child(1) { animation-delay: 0s; }
.bounce-dot:nth-child(2) { animation-delay: 0.12s; }
.bounce-dot:nth-child(3) { animation-delay: 0.24s; }
/* Markdown styles */
.markdown-body pre {
background: var(--pc-bg-code) !important;
border: 1px solid rgba(255,255,255,0.06);
border-radius: 12px;
padding: 16px;
overflow-x: auto;
margin: 8px 0;
font-size: 0.82em;
line-height: 1.6;
max-width: 100%;
box-sizing: border-box;
}
.markdown-body pre code {
white-space: pre;
word-break: normal;
overflow-wrap: normal;
}
.markdown-body code {
background: rgba(255,255,255,0.07);
padding: 2px 6px;
border-radius: 6px;
font-size: 0.85em;
}
/* Override highlight.js theme bg to match */
.hljs {
background: var(--pc-bg-code) !important;
}
.markdown-body p { margin: 4px 0; }
.markdown-body ul, .markdown-body ol { margin: 4px 0; padding-left: 20px; }
.markdown-body blockquote { border-left: 3px solid rgba(34,211,238,0.4); padding-left: 12px; margin: 8px 0; opacity: 0.8; }
.markdown-body h1, .markdown-body h2, .markdown-body h3 { margin: 12px 0 4px; }
.markdown-body a { color: var(--pc-accent-light); text-decoration: underline; }
.markdown-body table { border-collapse: collapse; margin: 8px 0; display: block; overflow-x: auto; max-width: 100%; }
.markdown-body th, .markdown-body td { border: 1px solid rgba(255,255,255,0.08); padding: 6px 12px; }
.markdown-body th { background: rgba(255,255,255,0.04); }
.markdown-body img { max-width: 100%; border-radius: 8px; }
/* Accessibility: respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
.animate-fade-in {
animation: none;
}
.pulse-dot {
animation: none;
}
.bounce-dot {
animation: none;
opacity: 0.7;
}
*,
*::before,
*::after {
transition-duration: 0.01ms !important;
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
}
}