437 lines
8.9 KiB
CSS
437 lines
8.9 KiB
CSS
/* Styles PMOControl spécifiques */
|
|
@import './variables.css';
|
|
|
|
/* ========================================
|
|
Reset & Base Styles
|
|
======================================== */
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html {
|
|
scroll-behavior: smooth;
|
|
}
|
|
|
|
body {
|
|
font-family: var(--font-sans);
|
|
color: var(--color-text);
|
|
background-color: var(--color-bg);
|
|
line-height: 1.5;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
|
|
/* Touch-friendly tap targets on mobile */
|
|
@media (max-width: 768px) {
|
|
button, a, [role="button"] {
|
|
min-height: 44px;
|
|
min-width: 44px;
|
|
}
|
|
}
|
|
|
|
/* Focus visible for accessibility */
|
|
*:focus-visible {
|
|
outline: 2px solid var(--color-primary);
|
|
outline-offset: 2px;
|
|
border-radius: var(--radius-sm);
|
|
}
|
|
|
|
/* ========================================
|
|
Status Badge Styles
|
|
======================================== */
|
|
.status-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: var(--spacing-xs);
|
|
padding: var(--spacing-xs) var(--spacing-sm);
|
|
border-radius: var(--radius-full);
|
|
font-size: var(--text-xs);
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.status-badge.playing {
|
|
background-color: var(--status-playing-bg);
|
|
color: var(--status-playing);
|
|
border: 1px solid var(--status-playing);
|
|
}
|
|
|
|
.status-badge.paused {
|
|
background-color: var(--status-paused-bg);
|
|
color: var(--status-paused);
|
|
border: 1px solid var(--status-paused);
|
|
}
|
|
|
|
.status-badge.stopped {
|
|
background-color: var(--status-stopped-bg);
|
|
color: var(--status-stopped);
|
|
border: 1px solid var(--status-stopped);
|
|
}
|
|
|
|
.status-badge.offline {
|
|
background-color: var(--status-offline-bg);
|
|
color: var(--status-offline);
|
|
border: 1px solid var(--status-offline);
|
|
}
|
|
|
|
.status-badge.transitioning {
|
|
background-color: var(--status-transitioning-bg);
|
|
color: var(--status-transitioning);
|
|
border: 1px solid var(--status-transitioning);
|
|
animation: pulse 2s infinite;
|
|
}
|
|
|
|
/* ========================================
|
|
Card Styles
|
|
======================================== */
|
|
.pmo-card {
|
|
background-color: var(--color-bg);
|
|
border: 1px solid var(--color-border);
|
|
border-radius: var(--radius-lg);
|
|
padding: var(--spacing-lg);
|
|
box-shadow: var(--shadow-sm);
|
|
transition: box-shadow var(--transition-base), transform var(--transition-base);
|
|
}
|
|
|
|
.pmo-card:hover {
|
|
box-shadow: var(--shadow-md);
|
|
transform: translateY(-2px);
|
|
}
|
|
|
|
.pmo-card.active {
|
|
border-color: var(--status-playing);
|
|
box-shadow: 0 0 0 2px var(--status-playing-bg);
|
|
}
|
|
|
|
/* ========================================
|
|
Renderer Card Status Borders
|
|
======================================== */
|
|
.renderer-card {
|
|
position: relative;
|
|
}
|
|
|
|
.renderer-card.playing {
|
|
border-left: 4px solid var(--status-playing);
|
|
}
|
|
|
|
.renderer-card.paused {
|
|
border-left: 4px solid var(--status-paused);
|
|
}
|
|
|
|
.renderer-card.stopped {
|
|
border-left: 4px solid var(--status-stopped);
|
|
}
|
|
|
|
.renderer-card.offline {
|
|
border-left: 4px solid var(--status-offline);
|
|
opacity: 0.6;
|
|
}
|
|
|
|
/* ========================================
|
|
Queue Item Styles
|
|
======================================== */
|
|
.queue-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--spacing-md);
|
|
padding: var(--spacing-sm);
|
|
border-radius: var(--radius-md);
|
|
transition: background-color var(--transition-fast);
|
|
}
|
|
|
|
.queue-item:hover {
|
|
background-color: var(--color-bg-secondary);
|
|
}
|
|
|
|
.queue-item.current {
|
|
background-color: var(--status-playing-bg);
|
|
border: 1px solid var(--status-playing);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.queue-item.current::before {
|
|
content: '▶';
|
|
color: var(--status-playing);
|
|
font-size: var(--text-lg);
|
|
margin-right: var(--spacing-xs);
|
|
}
|
|
|
|
/* ========================================
|
|
Button Styles
|
|
======================================== */
|
|
.btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: var(--spacing-sm);
|
|
padding: var(--spacing-sm) var(--spacing-lg);
|
|
border: none;
|
|
border-radius: var(--radius-md);
|
|
font-size: var(--text-base);
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all var(--transition-fast);
|
|
background-color: var(--color-bg-secondary);
|
|
color: var(--color-text);
|
|
}
|
|
|
|
.btn:hover:not(:disabled) {
|
|
background-color: var(--color-bg-tertiary);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.btn:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.btn-primary {
|
|
background-color: var(--status-playing);
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover:not(:disabled) {
|
|
background-color: #16a34a;
|
|
}
|
|
|
|
.btn-icon {
|
|
padding: var(--spacing-sm);
|
|
aspect-ratio: 1;
|
|
}
|
|
|
|
/* ========================================
|
|
Grid Layouts (Responsive)
|
|
======================================== */
|
|
.grid-cards {
|
|
display: grid;
|
|
gap: var(--spacing-lg);
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
/* Tablet: 2 columns */
|
|
@media (min-width: 768px) {
|
|
.grid-cards {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
}
|
|
|
|
/* Desktop: 3 columns */
|
|
@media (min-width: 1024px) {
|
|
.grid-cards {
|
|
grid-template-columns: repeat(3, 1fr);
|
|
}
|
|
}
|
|
|
|
/* ========================================
|
|
Animations
|
|
======================================== */
|
|
@keyframes pulse {
|
|
0%, 100% {
|
|
opacity: 1;
|
|
}
|
|
50% {
|
|
opacity: 0.7;
|
|
}
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(10px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
@keyframes spin {
|
|
from {
|
|
transform: rotate(0deg);
|
|
}
|
|
to {
|
|
transform: rotate(360deg);
|
|
}
|
|
}
|
|
|
|
@keyframes slideInRight {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateX(20px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateX(0);
|
|
}
|
|
}
|
|
|
|
.fade-in {
|
|
animation: fadeIn var(--transition-base);
|
|
}
|
|
|
|
.spin {
|
|
animation: spin 1s linear infinite;
|
|
}
|
|
|
|
/* Reduced motion support */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
*,
|
|
*::before,
|
|
*::after {
|
|
animation-duration: 0.01ms !important;
|
|
animation-iteration-count: 1 !important;
|
|
transition-duration: 0.01ms !important;
|
|
scroll-behavior: auto !important;
|
|
}
|
|
}
|
|
|
|
/* ========================================
|
|
Performance Optimizations
|
|
======================================== */
|
|
/* Use will-change for frequently animated elements */
|
|
.progress-bar-fill,
|
|
input[type="range"]::-webkit-slider-thumb,
|
|
input[type="range"]::-moz-range-thumb {
|
|
will-change: transform;
|
|
}
|
|
|
|
.btn:hover,
|
|
.pmo-card:hover {
|
|
will-change: transform, box-shadow;
|
|
}
|
|
|
|
/* GPU acceleration for smoother animations */
|
|
.fade-in,
|
|
.spin,
|
|
.status-badge.transitioning {
|
|
transform: translateZ(0);
|
|
backface-visibility: hidden;
|
|
}
|
|
|
|
/* ========================================
|
|
Volume Slider
|
|
======================================== */
|
|
input[type="range"] {
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
width: 100%;
|
|
height: 6px;
|
|
border-radius: var(--radius-full);
|
|
background-color: var(--color-bg-tertiary);
|
|
outline: none;
|
|
}
|
|
|
|
input[type="range"]::-webkit-slider-thumb {
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
width: 16px;
|
|
height: 16px;
|
|
border-radius: 50%;
|
|
background-color: var(--status-playing);
|
|
cursor: pointer;
|
|
transition: transform var(--transition-fast);
|
|
}
|
|
|
|
input[type="range"]::-webkit-slider-thumb:hover {
|
|
transform: scale(1.2);
|
|
}
|
|
|
|
input[type="range"]::-moz-range-thumb {
|
|
width: 16px;
|
|
height: 16px;
|
|
border-radius: 50%;
|
|
background-color: var(--status-playing);
|
|
border: none;
|
|
cursor: pointer;
|
|
transition: transform var(--transition-fast);
|
|
}
|
|
|
|
input[type="range"]::-moz-range-thumb:hover {
|
|
transform: scale(1.2);
|
|
}
|
|
|
|
/* ========================================
|
|
Progress Bar (Seekbar)
|
|
======================================== */
|
|
.progress-bar {
|
|
width: 100%;
|
|
height: 6px;
|
|
background-color: var(--color-bg-tertiary);
|
|
border-radius: var(--radius-full);
|
|
overflow: hidden;
|
|
position: relative;
|
|
}
|
|
|
|
.progress-bar-fill {
|
|
height: 100%;
|
|
background-color: var(--status-playing);
|
|
transition: width 100ms linear;
|
|
}
|
|
|
|
/* ========================================
|
|
Notification Toast
|
|
======================================== */
|
|
.toast {
|
|
position: fixed;
|
|
bottom: var(--spacing-lg);
|
|
right: var(--spacing-lg);
|
|
z-index: var(--z-toast);
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--spacing-sm);
|
|
max-width: 400px;
|
|
}
|
|
|
|
.toast-item {
|
|
padding: var(--spacing-md);
|
|
border-radius: var(--radius-md);
|
|
box-shadow: var(--shadow-lg);
|
|
animation: fadeIn var(--transition-base);
|
|
}
|
|
|
|
.toast-item.success {
|
|
background-color: var(--status-playing);
|
|
color: white;
|
|
}
|
|
|
|
.toast-item.error {
|
|
background-color: var(--status-offline);
|
|
color: white;
|
|
}
|
|
|
|
.toast-item.warning {
|
|
background-color: var(--status-paused);
|
|
color: white;
|
|
}
|
|
|
|
.toast-item.info {
|
|
background-color: var(--status-transitioning);
|
|
color: white;
|
|
}
|
|
|
|
/* ========================================
|
|
Utilities
|
|
======================================== */
|
|
.text-center {
|
|
text-align: center;
|
|
}
|
|
|
|
.truncate {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.sr-only {
|
|
position: absolute;
|
|
width: 1px;
|
|
height: 1px;
|
|
padding: 0;
|
|
margin: -1px;
|
|
overflow: hidden;
|
|
clip: rect(0, 0, 0, 0);
|
|
white-space: nowrap;
|
|
border-width: 0;
|
|
}
|