mirror of
https://github.com/R0m1k3/Regisflow.git
synced 2026-10-11 17:29:48 +02:00
Refactor UI components in NewSaleForm.tsx, SalesHistory.tsx, index.css, validation.ts, and Dashboard.tsx for improved UX. Replit-Commit-Author: Agent Replit-Commit-Session-Id: dec54137-d5a2-4406-8ad4-5f2f9fb110bf Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/c74640af-aff6-4467-98ef-6922e186fed2.jpg
464 lines
10 KiB
CSS
464 lines
10 KiB
CSS
@tailwind base;
|
|
@tailwind components;
|
|
@tailwind utilities;
|
|
|
|
:root {
|
|
/* Design system - Couleurs modernes */
|
|
--background: hsl(0, 0%, 100%);
|
|
--foreground: hsl(240, 10%, 3.9%);
|
|
--card: hsl(0, 0%, 100%);
|
|
--card-foreground: hsl(240, 10%, 3.9%);
|
|
--popover: hsl(0, 0%, 100%);
|
|
--popover-foreground: hsl(240, 10%, 3.9%);
|
|
--primary: hsl(240, 5.9%, 10%);
|
|
--primary-foreground: hsl(0, 0%, 98%);
|
|
--secondary: hsl(240, 4.8%, 95.9%);
|
|
--secondary-foreground: hsl(240, 5.9%, 10%);
|
|
--muted: hsl(240, 4.8%, 95.9%);
|
|
--muted-foreground: hsl(240, 3.8%, 46.1%);
|
|
--accent: hsl(240, 4.8%, 95.9%);
|
|
--accent-foreground: hsl(240, 5.9%, 10%);
|
|
--destructive: hsl(0, 84.2%, 60.2%);
|
|
--destructive-foreground: hsl(0, 0%, 98%);
|
|
--success: hsl(142, 76%, 36%);
|
|
--success-foreground: hsl(0, 0%, 98%);
|
|
--border: hsl(240, 5.9%, 90%);
|
|
--input: hsl(240, 5.9%, 90%);
|
|
--ring: hsl(240, 5.9%, 10%);
|
|
--radius: 8px;
|
|
|
|
/* Couleurs d'accent pour sections */
|
|
--vendor-accent: hsl(262, 83%, 58%);
|
|
--product-accent: hsl(217, 91%, 60%);
|
|
--client-accent: hsl(142, 76%, 36%);
|
|
--identity-accent: hsl(25, 95%, 53%);
|
|
}
|
|
|
|
.dark {
|
|
--background: hsl(240, 10%, 3.9%);
|
|
--foreground: hsl(0, 0%, 98%);
|
|
--card: hsl(240, 10%, 3.9%);
|
|
--card-foreground: hsl(0, 0%, 98%);
|
|
--popover: hsl(240, 10%, 3.9%);
|
|
--popover-foreground: hsl(0, 0%, 98%);
|
|
--primary: hsl(0, 0%, 98%);
|
|
--primary-foreground: hsl(240, 5.9%, 10%);
|
|
--secondary: hsl(240, 3.7%, 15.9%);
|
|
--secondary-foreground: hsl(0, 0%, 98%);
|
|
--muted: hsl(240, 3.7%, 15.9%);
|
|
--muted-foreground: hsl(240, 5%, 64.9%);
|
|
--accent: hsl(240, 3.7%, 15.9%);
|
|
--accent-foreground: hsl(0, 0%, 98%);
|
|
--destructive: hsl(0, 62.8%, 30.6%);
|
|
--destructive-foreground: hsl(0, 0%, 98%);
|
|
--success: hsl(142, 70%, 45%);
|
|
--success-foreground: hsl(0, 0%, 98%);
|
|
--border: hsl(240, 3.7%, 15.9%);
|
|
--input: hsl(240, 3.7%, 15.9%);
|
|
--ring: hsl(240, 4.9%, 83.9%);
|
|
}
|
|
|
|
* {
|
|
border-color: hsl(var(--border));
|
|
}
|
|
|
|
body {
|
|
background-color: hsl(var(--background));
|
|
color: hsl(var(--foreground));
|
|
font-feature-settings: "rlig" 1, "calt" 1;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
/* Design System Components */
|
|
|
|
/* Cards modernes avec ombres douces */
|
|
.elegant-card {
|
|
background: white;
|
|
border: 1px solid hsl(var(--border));
|
|
border-radius: 12px;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.elegant-card:hover {
|
|
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.12);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
/* Sections avec couleurs d'accent */
|
|
.section-vendor {
|
|
background: linear-gradient(135deg, hsl(var(--vendor-accent) / 0.05) 0%, hsl(var(--vendor-accent) / 0.02) 100%);
|
|
border-left: 4px solid hsl(var(--vendor-accent));
|
|
border-radius: 8px;
|
|
padding: 24px;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.section-product {
|
|
background: linear-gradient(135deg, hsl(var(--product-accent) / 0.05) 0%, hsl(var(--product-accent) / 0.02) 100%);
|
|
border-left: 4px solid hsl(var(--product-accent));
|
|
border-radius: 8px;
|
|
padding: 24px;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.section-client {
|
|
background: linear-gradient(135deg, hsl(var(--client-accent) / 0.05) 0%, hsl(var(--client-accent) / 0.02) 100%);
|
|
border-left: 4px solid hsl(var(--client-accent));
|
|
border-radius: 8px;
|
|
padding: 24px;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.section-identity {
|
|
background: linear-gradient(135deg, hsl(var(--identity-accent) / 0.05) 0%, hsl(var(--identity-accent) / 0.02) 100%);
|
|
border-left: 4px solid hsl(var(--identity-accent));
|
|
border-radius: 8px;
|
|
padding: 24px;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
/* En-têtes de section élégants */
|
|
.section-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin-bottom: 20px;
|
|
font-weight: 600;
|
|
font-size: 16px;
|
|
color: hsl(var(--foreground));
|
|
}
|
|
|
|
.section-header svg {
|
|
width: 20px;
|
|
height: 20px;
|
|
}
|
|
|
|
.section-vendor .section-header {
|
|
color: hsl(var(--vendor-accent));
|
|
}
|
|
|
|
.section-product .section-header {
|
|
color: hsl(var(--product-accent));
|
|
}
|
|
|
|
.section-client .section-header {
|
|
color: hsl(var(--client-accent));
|
|
}
|
|
|
|
.section-identity .section-header {
|
|
color: hsl(var(--identity-accent));
|
|
}
|
|
|
|
/* Inputs modernes */
|
|
.modern-input {
|
|
width: 100%;
|
|
padding: 12px 16px;
|
|
border: 1.5px solid hsl(var(--border));
|
|
border-radius: 8px;
|
|
background: hsl(var(--background));
|
|
color: hsl(var(--foreground));
|
|
font-size: 14px;
|
|
font-weight: 400;
|
|
transition: all 0.2s ease;
|
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.modern-input:focus {
|
|
outline: none;
|
|
border-color: hsl(var(--primary));
|
|
box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
|
|
}
|
|
|
|
.modern-input:hover:not(:focus) {
|
|
border-color: hsl(var(--border));
|
|
}
|
|
|
|
.modern-input::placeholder {
|
|
color: hsl(var(--muted-foreground));
|
|
}
|
|
|
|
/* Boutons élégants */
|
|
.modern-button {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
padding: 12px 24px;
|
|
border-radius: 8px;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
text-decoration: none;
|
|
transition: all 0.2s ease;
|
|
cursor: pointer;
|
|
border: none;
|
|
outline: none;
|
|
}
|
|
|
|
.modern-button-primary {
|
|
background: hsl(var(--primary));
|
|
color: hsl(var(--primary-foreground));
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.modern-button-primary:hover {
|
|
background: hsl(var(--primary) / 0.9);
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.modern-button-secondary {
|
|
background: hsl(var(--secondary));
|
|
color: hsl(var(--secondary-foreground));
|
|
border: 1px solid hsl(var(--border));
|
|
}
|
|
|
|
.modern-button-secondary:hover {
|
|
background: hsl(var(--secondary) / 0.8);
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.modern-button-success {
|
|
background: hsl(var(--success));
|
|
color: hsl(var(--success-foreground));
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.modern-button-success:hover {
|
|
background: hsl(var(--success) / 0.9);
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.modern-button-destructive {
|
|
background: hsl(var(--destructive));
|
|
color: hsl(var(--destructive-foreground));
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
}
|
|
|
|
.modern-button-destructive:hover {
|
|
background: hsl(var(--destructive) / 0.9);
|
|
transform: translateY(-1px);
|
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
/* Module de recherche */
|
|
.search-container {
|
|
background: white;
|
|
border: 1px solid hsl(var(--border));
|
|
border-radius: 12px;
|
|
padding: 20px;
|
|
margin-bottom: 24px;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
|
}
|
|
|
|
.search-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
margin-bottom: 16px;
|
|
font-weight: 600;
|
|
font-size: 16px;
|
|
color: hsl(var(--foreground));
|
|
}
|
|
|
|
.search-input {
|
|
width: 100%;
|
|
padding: 12px 16px;
|
|
border: 1.5px solid hsl(var(--border));
|
|
border-radius: 8px;
|
|
background: hsl(var(--background));
|
|
color: hsl(var(--foreground));
|
|
font-size: 14px;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.search-input:focus {
|
|
outline: none;
|
|
border-color: hsl(var(--primary));
|
|
box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
|
|
}
|
|
|
|
/* Filtres élégants */
|
|
.filters-container {
|
|
background: hsl(var(--muted) / 0.5);
|
|
border: 1px solid hsl(var(--border));
|
|
border-radius: 12px;
|
|
padding: 20px;
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.filters-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 16px;
|
|
align-items: end;
|
|
}
|
|
|
|
/* Table moderne */
|
|
.modern-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
|
|
}
|
|
|
|
.modern-table thead {
|
|
background: hsl(var(--muted));
|
|
}
|
|
|
|
.modern-table th {
|
|
padding: 16px;
|
|
text-align: left;
|
|
font-weight: 600;
|
|
font-size: 14px;
|
|
color: hsl(var(--foreground));
|
|
border-bottom: 1px solid hsl(var(--border));
|
|
}
|
|
|
|
.modern-table td {
|
|
padding: 16px;
|
|
border-bottom: 1px solid hsl(var(--border));
|
|
font-size: 14px;
|
|
}
|
|
|
|
.modern-table tbody tr:hover {
|
|
background: hsl(var(--muted) / 0.3);
|
|
}
|
|
|
|
.modern-table tbody tr:last-child td {
|
|
border-bottom: none;
|
|
}
|
|
|
|
/* Badge moderne */
|
|
.modern-badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
padding: 4px 12px;
|
|
border-radius: 6px;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.badge-success {
|
|
background: hsl(var(--success) / 0.1);
|
|
color: hsl(var(--success));
|
|
border: 1px solid hsl(var(--success) / 0.2);
|
|
}
|
|
|
|
.badge-destructive {
|
|
background: hsl(var(--destructive) / 0.1);
|
|
color: hsl(var(--destructive));
|
|
border: 1px solid hsl(var(--destructive) / 0.2);
|
|
}
|
|
|
|
.badge-secondary {
|
|
background: hsl(var(--secondary));
|
|
color: hsl(var(--secondary-foreground));
|
|
border: 1px solid hsl(var(--border));
|
|
}
|
|
|
|
/* Navigation tabs élégants */
|
|
.elegant-tabs {
|
|
border-bottom: 1px solid hsl(var(--border));
|
|
margin-bottom: 24px;
|
|
}
|
|
|
|
.elegant-tabs-list {
|
|
display: flex;
|
|
gap: 2px;
|
|
}
|
|
|
|
.elegant-tab {
|
|
padding: 12px 24px;
|
|
border: none;
|
|
background: transparent;
|
|
color: hsl(var(--muted-foreground));
|
|
font-weight: 500;
|
|
font-size: 14px;
|
|
cursor: pointer;
|
|
border-radius: 8px 8px 0 0;
|
|
transition: all 0.2s ease;
|
|
position: relative;
|
|
}
|
|
|
|
.elegant-tab:hover {
|
|
color: hsl(var(--foreground));
|
|
background: hsl(var(--muted) / 0.5);
|
|
}
|
|
|
|
.elegant-tab[data-state="active"] {
|
|
color: hsl(var(--primary));
|
|
background: hsl(var(--background));
|
|
}
|
|
|
|
.elegant-tab[data-state="active"]::after {
|
|
content: '';
|
|
position: absolute;
|
|
bottom: -1px;
|
|
left: 0;
|
|
right: 0;
|
|
height: 2px;
|
|
background: hsl(var(--primary));
|
|
}
|
|
|
|
/* Animations douces */
|
|
@keyframes slideIn {
|
|
from {
|
|
opacity: 0;
|
|
transform: translateY(10px);
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
.animate-slide-in {
|
|
animation: slideIn 0.3s ease-out;
|
|
}
|
|
|
|
/* Responsive design */
|
|
@media (max-width: 768px) {
|
|
.section-vendor,
|
|
.section-product,
|
|
.section-client,
|
|
.section-identity {
|
|
padding: 16px;
|
|
}
|
|
|
|
.filters-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.modern-table {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.modern-table th,
|
|
.modern-table td {
|
|
padding: 12px 8px;
|
|
}
|
|
}
|
|
|
|
/* Scrollbars personnalisées */
|
|
::-webkit-scrollbar {
|
|
width: 8px;
|
|
height: 8px;
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
background: hsl(var(--muted));
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background: hsl(var(--border));
|
|
border-radius: 4px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: hsl(var(--muted-foreground));
|
|
} |