Files
notytex/static/css/design-system.css

577 lines
12 KiB
CSS

/**
* NOTYTEX DESIGN SYSTEM
* Système de design unifié pour l'application
*/
/* ========================================
DESIGN TOKENS
======================================== */
:root {
/* Couleurs primaires */
--color-primary-50: #eff6ff;
--color-primary-100: #dbeafe;
--color-primary-500: #3b82f6;
--color-primary-600: #2563eb;
--color-primary-700: #1d4ed8;
--color-primary-800: #1e40af;
/* Couleurs fonctionnelles */
--color-success-50: #ecfdf5;
--color-success-100: #d1fae5;
--color-success-500: #10b981;
--color-success-600: #059669;
--color-success-700: #047857;
--color-warning-50: #fffbeb;
--color-warning-100: #fef3c7;
--color-warning-500: #f59e0b;
--color-warning-600: #d97706;
--color-warning-700: #b45309;
--color-danger-50: #fef2f2;
--color-danger-100: #fee2e2;
--color-danger-500: #ef4444;
--color-danger-600: #dc2626;
--color-danger-700: #b91c1c;
/* Couleurs neutres */
--color-gray-50: #f9fafb;
--color-gray-100: #f3f4f6;
--color-gray-200: #e5e7eb;
--color-gray-300: #d1d5db;
--color-gray-400: #9ca3af;
--color-gray-500: #6b7280;
--color-gray-600: #4b5563;
--color-gray-700: #374151;
--color-gray-800: #1f2937;
--color-gray-900: #111827;
/* Gradients standardisés */
--gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
--gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
--gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
--gradient-warning: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
--gradient-purple-blue: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
--gradient-green: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
--gradient-blue: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
/* Espacements */
--space-xs: 0.25rem; /* 4px */
--space-sm: 0.5rem; /* 8px */
--space-md: 1rem; /* 16px */
--space-lg: 1.5rem; /* 24px */
--space-xl: 2rem; /* 32px */
--space-2xl: 3rem; /* 48px */
/* Tailles de police */
--text-xs: 0.75rem; /* 12px */
--text-sm: 0.875rem; /* 14px */
--text-base: 1rem; /* 16px */
--text-lg: 1.125rem; /* 18px */
--text-xl: 1.25rem; /* 20px */
--text-2xl: 1.5rem; /* 24px */
--text-3xl: 1.875rem; /* 30px */
--text-4xl: 2.25rem; /* 36px */
/* Rayons de bordure */
--radius-sm: 0.125rem; /* 2px */
--radius-md: 0.375rem; /* 6px */
--radius-lg: 0.5rem; /* 8px */
--radius-xl: 0.75rem; /* 12px */
--radius-2xl: 1rem; /* 16px */
--radius-full: 9999px;
/* Ombres */
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
/* Transitions */
--transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
--transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
--transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
/* ========================================
CLASSES UTILITAIRES PERSONNALISÉES
======================================== */
/* Focus visible amélioré */
.focus-ring {
@apply focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500;
}
/* Layout utilitaires uniformes */
.container-responsive {
@apply max-w-7xl mx-auto px-4 py-8;
}
.container-narrow {
@apply max-w-4xl mx-auto px-4 py-6;
}
.container-wide {
@apply max-w-full mx-auto px-6 py-8;
}
/* Spacing système unifié */
.space-section {
@apply space-y-8;
}
.space-elements {
@apply space-y-6;
}
.space-items {
@apply space-y-4;
}
.space-tight {
@apply space-y-3;
}
.space-compact {
@apply space-y-2;
}
/* Tailles de texte système */
.text-display {
@apply text-4xl font-bold leading-tight;
}
.text-heading {
@apply text-2xl font-bold leading-snug;
}
.text-subheading {
@apply text-xl font-semibold leading-normal;
}
.text-body {
@apply text-base leading-relaxed;
}
.text-caption {
@apply text-sm text-gray-600 leading-normal;
}
.text-micro {
@apply text-xs text-gray-500 leading-tight;
}
/* Gradients réutilisables */
.bg-gradient-primary {
background: var(--gradient-primary);
}
.bg-gradient-success {
background: var(--gradient-success);
}
.bg-gradient-purple-blue {
background: var(--gradient-purple-blue);
}
/* Animation hover pour les cartes */
.card-hover {
@apply transition-all duration-300 hover:shadow-xl hover:scale-105;
}
/* Boutons avec styles cohérents */
.btn-base {
@apply inline-flex items-center justify-center font-semibold rounded-xl transition-all duration-300 focus-ring;
}
.btn-sm {
@apply btn-base px-3 py-2 text-sm;
}
.btn-md {
@apply btn-base px-4 py-2 text-base;
}
.btn-lg {
@apply btn-base px-6 py-3 text-lg;
}
.btn-primary {
@apply btn-base bg-blue-600 text-white hover:bg-blue-700;
}
.btn-success {
@apply btn-base bg-green-600 text-white hover:bg-green-700;
}
.btn-warning {
@apply btn-base bg-orange-600 text-white hover:bg-orange-700;
}
.btn-danger {
@apply btn-base bg-red-600 text-white hover:bg-red-700;
}
.btn-outline {
@apply btn-base bg-transparent border-2 border-gray-300 text-gray-700 hover:bg-gray-50;
}
/* États de progression standardisés */
.progress-not-started {
@apply bg-red-100 text-red-800 border border-red-200;
}
.progress-in-progress {
@apply bg-orange-100 text-orange-800 border border-orange-200;
}
.progress-completed {
@apply bg-green-100 text-green-800 border border-green-200;
}
/* Indicateurs visuels */
.indicator-badge {
@apply inline-flex items-center px-2 py-1 rounded-full text-xs font-medium;
}
/* ========================================
COMPOSANTS SPÉCIALISÉS
======================================== */
/* Hero sections */
.hero-section {
@apply bg-gradient-to-r text-white rounded-xl p-8 shadow-lg;
}
/* Cards uniformes */
.card {
@apply bg-white rounded-xl shadow-lg overflow-hidden;
}
.card-header {
@apply px-6 py-4 border-b border-gray-200 flex items-center justify-between;
}
.card-body {
@apply p-6;
}
.card-footer {
@apply px-6 py-4 border-t border-gray-200 bg-gray-50;
}
/* Grilles de statistiques */
.stats-grid {
@apply grid grid-cols-1 md:grid-cols-3 gap-6;
}
.stat-card {
@apply block bg-white rounded-lg shadow hover:shadow-lg transition-all duration-300 p-6 transform hover:scale-105 group;
}
/* Grilles système uniformes */
.grid-responsive {
@apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6;
}
.grid-actions {
@apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4;
}
.grid-cards {
@apply grid grid-cols-1 lg:grid-cols-2 gap-6;
}
.grid-list {
@apply grid grid-cols-1 gap-4;
}
/* Layouts de page standardisés */
.page-layout {
@apply min-h-screen bg-gray-100;
}
.page-content {
@apply container-responsive space-section;
}
.page-section {
@apply bg-white rounded-xl shadow-lg overflow-hidden;
}
.page-header {
@apply px-6 py-4 border-b border-gray-200 flex items-center justify-between;
}
.page-body {
@apply p-6;
}
.page-footer {
@apply px-6 py-4 border-t border-gray-200 bg-gray-50;
}
/* Filtres */
.filter-section {
@apply bg-white rounded-lg shadow p-6;
}
.filter-control {
@apply border border-gray-300 rounded-md px-3 py-1 text-sm focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-transparent;
}
/* Actions grids */
.action-grid {
@apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4;
}
.action-card {
@apply group rounded-xl p-6 transition-all duration-300 transform hover:scale-105 shadow-lg hover:shadow-xl text-white;
}
/* ========================================
ANIMATIONS ET EFFETS
======================================== */
/* Animations d'apparition standardisées */
@keyframes fadeInUp {
from {
opacity: 0;
transform: translateY(20px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
@keyframes fadeInLeft {
from {
opacity: 0;
transform: translateX(-20px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes fadeInRight {
from {
opacity: 0;
transform: translateX(20px);
}
to {
opacity: 1;
transform: translateX(0);
}
}
@keyframes scaleIn {
from {
opacity: 0;
transform: scale(0.9);
}
to {
opacity: 1;
transform: scale(1);
}
}
/* Classes d'animation standardisées */
.fade-in-up {
animation: fadeInUp 0.5s ease-out;
}
.fade-in-left {
animation: fadeInLeft 0.4s ease-out;
}
.fade-in-right {
animation: fadeInRight 0.4s ease-out;
}
.scale-in {
animation: scaleIn 0.3s ease-out;
}
/* Animations au scroll */
.animate-on-scroll {
opacity: 0;
transform: translateY(20px);
transition: all 0.6s ease-out;
}
.animate-on-scroll.in-view {
opacity: 1;
transform: translateY(0);
}
/* Micro-interactions */
.hover-lift {
transition: all var(--transition-normal);
}
.hover-lift:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-lg);
}
.hover-scale {
transition: transform var(--transition-normal);
}
.hover-scale:hover {
transform: scale(1.05);
}
/* Animation des messages flash */
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.flash-message {
animation: slideDown 0.3s ease-out;
}
/* Effet de pulsation pour les éléments en attente */
@keyframes pulse {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.7;
}
}
.pulse-animation {
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
/* Rotation pour les indicateurs de chargement */
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.spin-animation {
animation: spin 1s linear infinite;
}
/* ========================================
RESPONSIVE DESIGN
======================================== */
/* Masquer/afficher selon la taille d'écran */
@media (max-width: 768px) {
.hide-mobile {
display: none;
}
.show-mobile {
display: block;
}
/* Ajustements pour mobile */
.hero-section {
@apply p-6;
}
.hero-section h1 {
@apply text-2xl;
}
.action-grid {
@apply grid-cols-1 gap-3;
}
.stats-grid {
@apply grid-cols-1 gap-4;
}
}
@media (min-width: 769px) {
.hide-desktop {
display: none;
}
.show-desktop {
display: block;
}
}
/* ========================================
ACCESSIBILITÉ
======================================== */
/* Skip links */
.skip-link {
position: absolute;
top: -40px;
left: 6px;
background: var(--color-gray-900);
color: white;
padding: 8px;
text-decoration: none;
z-index: 1000;
border-radius: var(--radius-md);
}
.skip-link:focus {
top: 6px;
}
/* Contraste élevé */
@media (prefers-contrast: high) {
:root {
--color-gray-600: #000000;
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}
.card {
@apply border-2 border-gray-800;
}
}
/* Réduction de mouvement */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
/* Focus visible pour la navigation au clavier */
.focus-visible {
outline: 2px solid var(--color-primary-500);
outline-offset: 2px;
}
/* ========================================
DARK MODE (préparation future)
======================================== */
@media (prefers-color-scheme: dark) {
:root {
--color-gray-50: #1f2937;
--color-gray-100: #374151;
--color-gray-900: #f9fafb;
}
/* Note: Le dark mode sera implémenté dans une future phase */
}