/* ============================================
   WASelni - Design System Modernisé
   Améliorations : UI, UX, Typographie, Animations
   ============================================ */

/* ============================================
   1. TYPOGRAPHIE MODERNE
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Palette de couleurs principale */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --primary-light: #8e9ef0;
    --primary-dark: #4a5bb5;
    
    /* Palette secondaire */
    --success-color: #10b981;
    --success-light: #34d399;
    --success-dark: #059669;
    
    --warning-color: #f59e0b;
    --warning-light: #fbbf24;
    --warning-dark: #d97706;
    
    --danger-color: #ef4444;
    --danger-light: #f87171;
    --danger-dark: #dc2626;
    
    --info-color: #3b82f6;
    --info-light: #60a5fa;
    --info-dark: #2563eb;
    
    /* Neutres */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* 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);
    --shadow-primary: 0 8px 20px rgba(102, 126, 234, 0.3);
    --shadow-primary-hover: 0 12px 28px rgba(102, 126, 234, 0.4);
    
    /* Arrondis */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom, #f8fafc 0%, #f1f5f9 100%);
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   2. NAVBAR AMÉLIORÉE
   ============================================ */
.navbar {
    background: var(--primary-gradient);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.875rem 0;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(102, 126, 234, 0.35);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    transition: all var(--transition-fast);
}

.navbar-brand:hover {
    transform: scale(1.02);
}

.navbar-brand i {
    background: rgba(255, 255, 255, 0.2);
    padding: 8px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.nav-link {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all var(--transition-base);
    transform: translateX(-50%);
}

.nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.nav-link:hover::before {
    width: 60%;
}

.nav-link.active::before {
    width: 100%;
}

/* ============================================
   3. BOUTONS MODERNISÉS
   ============================================ */
.btn {
    font-family: inherit;
    font-weight: 600;
    letter-spacing: 0.25px;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width var(--transition-slow), height var(--transition-slow);
}

.btn:active::after {
    width: 200px;
    height: 200px;
}

.btn-primary {
    background: var(--primary-gradient);
    box-shadow: var(--shadow-primary);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary-hover);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.4);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-outline-danger {
    background: transparent;
    border: 2px solid var(--danger-color);
    color: var(--danger-color);
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    color: white;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    border-radius: var(--radius-lg);
}

/* ============================================
   4. CARDS ET PANNEAUX AMÉLIORÉS
   ============================================ */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
    transition: all var(--transition-base);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--gray-100);
    padding: 1.5rem;
    font-weight: 600;
    color: var(--gray-700);
}

.card-body {
    padding: 1.75rem;
}

.trip-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
    transition: all var(--transition-base);
    overflow: hidden;
}

.trip-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
}

.trip-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1.75rem;
    text-align: center;
    position: relative;
}

.trip-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, rgba(255,255,255,0.3), transparent);
}

.trip-body {
    padding: 1.75rem;
}

.trip-info {
    display: flex;
    align-items: center;
    margin: 0.75rem 0;
    color: var(--gray-600);
    font-size: 0.95rem;
}

.trip-info i {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: 8px;
    margin-right: 0.75rem;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.trip-price {
    font-size: 2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 1.25rem 0;
}

.driver-info {
    display: flex;
    align-items: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
    border: 1px solid var(--gray-100);
}

.driver-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: var(--shadow-md);
}

/* ============================================
   5. STAT CARDS AMÉLIORÉES
   ============================================ */
.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-100);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-6px);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-md);
}

.stat-icon.bg-primary {
    background: var(--primary-gradient);
}

.stat-icon.bg-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-icon.bg-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.stat-icon.bg-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stat-content h3 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-content p {
    color: var(--gray-500);
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.stat-trend {
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   6. FORMULAIRES AMÉLIORÉS
   ============================================ */
.form-control, .form-select {
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 400;
    transition: all var(--transition-base);
    background: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-text {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ============================================
   7. ONGLES AMÉLIORÉS
   ============================================ */
.nav-tabs {
    border-bottom: 2px solid var(--gray-100);
    gap: 0.5rem;
    padding: 0 0.5rem;
}

.nav-tabs .nav-link {
    color: var(--gray-500) !important;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    transition: all var(--transition-base);
    position: relative;
    margin-bottom: -2px;
}

.nav-tabs .nav-link i {
    margin-right: 0.5rem;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color) !important;
    background: var(--gray-50);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color) !important;
    background: white;
    border-bottom: 3px solid var(--primary-color);
    font-weight: 600;
    box-shadow: 0 -2px 8px rgba(102, 126, 234, 0.1);
}

/* ============================================
   8. ALERTES AMÉLIORÉES
   ============================================ */
.alert {
    border-radius: var(--radius-md);
    border: none;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    color: var(--success-dark);
    border-left: 4px solid var(--success-color);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    color: var(--danger-dark);
    border-left: 4px solid var(--danger-color);
}

.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.1) 100%);
    color: var(--info-dark);
    border-left: 4px solid var(--info-color);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
    color: var(--warning-dark);
    border-left: 4px solid var(--warning-color);
}

/* ============================================
   9. TABLES AMÉLIORÉES
   ============================================ */
.table {
    background: white;
}

.table thead th {
    background: var(--gray-50);
    color: var(--gray-600);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

.table tbody tr {
    transition: all var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

.badge {
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    letter-spacing: 0.25px;
}

/* ============================================
   10. FOOTER AMÉLIORÉ
   ============================================ */
footer {
    background: linear-gradient(180deg, #1f2937 0%, #111827 100%);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 5rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
}

footer h5 {
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: white;
}

footer a {
    color: var(--gray-400);
    text-decoration: none;
    display: block;
    margin: 0.75rem 0;
    padding: 0.5rem 0;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

footer a:hover {
    color: white;
    padding-left: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
}

/* ============================================
   11. MICRO-ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* ============================================
   12. RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .navbar {
        padding: 0.75rem 0;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .nav-link {
        padding: 0.625rem 0.75rem !important;
    }
    
    .card-body {
        padding: 1.25rem;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-content h3 {
        font-size: 1.75rem;
    }
}

/* ============================================
   13. UTILITAIRES
   ============================================ */
.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient {
    background: var(--primary-gradient);
}

.shadow-soft {
    box-shadow: var(--shadow-md);
}

.shadow-medium {
    box-shadow: var(--shadow-lg);
}

.shadow-strong {
    box-shadow: var(--shadow-xl);
}

.rounded-custom {
    border-radius: var(--radius-lg);
}

.transition-smooth {
    transition: all var(--transition-base);
}
