/* ====================================================================
   AXIOM MOBILITY — Design System & SaaS UI Theme
   Style Moderne, Automobile & Mobilité Urbaine Haut de Gamme
   Compatible Desktop, Tablette et Mobile
   ==================================================================== */

:root {
    --primary: #f59e0b;        /* Jaune Taxi Urbain Moderne / Ambre */
    --primary-hover: #d97706;
    --primary-glow: rgba(245, 158, 11, 0.25);
    
    --accent: #3b82f6;         /* Bleu Mobilité */
    --accent-glow: rgba(59, 130, 246, 0.25);
    
    --bg-dark: #0f172a;        /* Fond Slate Profond */
    --bg-card: #1e293b;        /* Surface Carte Slate */
    --bg-card-hover: #273549;
    --bg-card-light: #253349;
    --bg-sidebar: #090d16;     /* Barre latérale très sombre */
    --bg-input: #151e2e;
    
    --border-color: #334155;
    --border-light: rgba(255, 255, 255, 0.08);
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --info: #06b6d4;
    --info-bg: rgba(6, 182, 212, 0.15);
    --purple: #8b5cf6;
    --purple-bg: rgba(139, 92, 246, 0.15);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px var(--primary-glow);
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--primary-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout Back-Office */
.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    position: relative;
}

/* Sidebar */
.app-sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    padding: 20px 18px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary), #d97706);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 0 12px var(--primary-glow);
    flex-shrink: 0;
}

.sidebar-brand-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #fff;
    white-space: nowrap;
}
.sidebar-brand-title span {
    color: var(--primary);
}

.sidebar-role-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    background: rgba(255,255,255,0.1);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    display: inline-block;
    margin-top: 2px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-dim);
    padding: 10px 12px 4px;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    transform: translateX(3px);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.03));
    color: var(--primary);
    border-left: 3px solid var(--primary);
    font-weight: 600;
}

.nav-icon {
    font-size: 17px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.2);
    gap: 8px;
}

.user-mini-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
    min-width: 0;
}

.user-avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}

.user-info-text {
    overflow: hidden;
    min-width: 0;
}
.user-info-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}
.user-info-role {
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Main Content Wrapper */
.app-main {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    width: calc(100% - 260px);
}

/* Topbar */
.app-topbar {
    height: 64px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.topbar-title-section h1 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* Content Area */
.app-content {
    padding: 24px;
    flex: 1;
    min-width: 0;
}

/* Public Containers */
.public-container {
    padding: 60px 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.public-hero {
    padding: 70px 24px 50px;
    background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.15), transparent 40%),
                radial-gradient(circle at 20% 80%, rgba(59, 130, 246, 0.1), transparent 40%),
                var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
}

.hero-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
}

/* Cards & Widgets */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    transition: var(--transition);
    min-width: 0;
}
.card:hover {
    border-color: rgba(245, 158, 11, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
    gap: 12px;
    flex-wrap: wrap;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Grid System */
.grid {
    display: grid;
    gap: 20px;
    width: 100%;
}
.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Filter Bar Helper */
.filter-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) 120px;
    gap: 16px;
    align-items: flex-end;
}

/* Stat Cards */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.stat-icon.primary { background: var(--primary-glow); color: var(--primary); }
.stat-icon.success { background: var(--success-bg); color: var(--success); }
.stat-icon.danger  { background: var(--danger-bg);  color: var(--danger); }
.stat-icon.accent  { background: var(--accent-glow); color: var(--accent); }
.stat-icon.purple  { background: var(--purple-bg);  color: var(--purple); }

.stat-info {
    flex: 1;
    min-width: 0;
}
.stat-label {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stat-sub {
    font-size: 11.5px;
    color: var(--text-dim);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tables & Responsive Scrolling */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
}
.table-responsive::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13.5px;
    min-width: 580px;
}

.table th {
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-muted);
    font-weight: 600;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-main);
    vertical-align: middle;
}

.table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: var(--radius-full);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.badge-primary   { background: var(--primary-glow); color: var(--primary); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-success   { background: var(--success-bg);  color: var(--success); border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning   { background: var(--warning-bg);  color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger    { background: var(--danger-bg);   color: var(--danger);  border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-info      { background: var(--info-bg);     color: var(--info);    border: 1px solid rgba(6, 182, 212, 0.3); }
.badge-purple    { background: var(--purple-bg);   color: var(--purple);  border: 1px solid rgba(139, 92, 246, 0.3); }
.badge-orange    { background: rgba(249, 115, 22, 0.15); color: #f97316; border: 1px solid rgba(249, 115, 22, 0.3); }
.badge-secondary { background: #334155; color: var(--text-muted); }
.badge-dark      { background: #000; color: #94a3b8; border: 1px solid #334155; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 16px;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: #0f172a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.btn-primary:hover {
    background: var(--primary-hover);
    color: #0f172a;
    box-shadow: 0 0 14px var(--primary-glow);
}

.btn-accent {
    background: var(--accent);
    color: #fff;
}
.btn-accent:hover {
    background: #2563eb;
}

.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-danger:hover {
    background: #dc2626;
}

.btn-secondary {
    background: #334155;
    color: #fff;
}
.btn-secondary:hover {
    background: #475569;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

.btn-sm {
    padding: 6px 11px;
    font-size: 12px;
}
.btn-lg {
    padding: 13px 22px;
    font-size: 15px;
}
.btn-block {
    width: 100%;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.form-control, .form-select {
    width: 100%;
    padding: 10px 13px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
    min-height: 42px;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

textarea.form-control {
    min-height: 85px;
    resize: vertical;
}

/* Flash Alerts */
.alert {
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-success { background: var(--success-bg); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.alert-error, .alert-danger { background: var(--danger-bg);  color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.alert-warning { background: var(--warning-bg); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.alert-info    { background: var(--info-bg);    color: #38bdf8; border: 1px solid rgba(6, 182, 212, 0.3); }

/* Modales */
.modal-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 16px;
}
.modal-backdrop.active {
    display: flex;
}

.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 540px;
    box-shadow: var(--shadow-lg);
    animation: modalPop 0.2s ease-out;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.modal-title {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
}
.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
}
.modal-close:hover { color: #fff; }

.modal-body {
    padding: 22px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
}
.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border-light);
    background: rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

/* Toast Notifications Container */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: calc(100vw - 48px);
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 12px 18px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    color: #fff;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
    animation: toastSlide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes toastSlide {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Auth Pages (Login / Register) */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.1), transparent 50%),
                radial-gradient(circle at bottom left, rgba(59, 130, 246, 0.08), transparent 50%),
                var(--bg-dark);
}

.auth-box {
    width: 100%;
    max-width: 440px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    text-align: center;
    margin-bottom: 24px;
}
.auth-logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), #d97706);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
    box-shadow: 0 0 20px var(--primary-glow);
    margin-bottom: 12px;
}
.auth-title {
    font-size: 21px;
    font-weight: 800;
    color: #fff;
}
.auth-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Mobile Driver Navigation Bar */
.driver-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border-color);
    z-index: 900;
    justify-content: space-around;
    align-items: center;
    padding: 0 8px;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.4);
}

.driver-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: var(--text-dim);
    gap: 3px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: var(--transition);
}
.driver-nav-btn.active, .driver-nav-btn:hover {
    color: var(--primary);
    background: rgba(245, 158, 11, 0.08);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999;
}
.sidebar-overlay.active {
    display: block;
}

/* Mobile Navigation Hamburger & Drawer (Public Website) */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-color);
    color: #fff;
    font-size: 20px;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mobile-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary);
}

.mobile-menu-drawer {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 2px solid var(--primary);
    box-shadow: var(--shadow-lg);
    z-index: 990;
    padding: 16px 20px;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    animation: slideDown 0.25s ease-out;
}
.mobile-menu-drawer.active {
    display: flex;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.mobile-menu-drawer a {
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.03);
}
.mobile-menu-drawer a:hover {
    background: rgba(245, 158, 11, 0.15);
    color: var(--primary);
}

/* ====================================================================
   MEDIA QUERIES — TABLETTE (max-width: 1024px)
   ==================================================================== */
@media (max-width: 1024px) {
    .app-sidebar {
        transform: translateX(-100%);
        width: 280px;
        max-width: 85vw;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
    }
    .app-sidebar.open {
        transform: translateX(0);
    }
    .app-main {
        margin-left: 0 !important;
        width: 100% !important;
    }
    .app-topbar {
        padding: 0 16px;
    }
    .mobile-sidebar-toggle-btn {
        display: inline-flex !important;
    }
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .grid-cols-3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .hero-grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }
    .public-navbar .nav-links {
        display: none !important;
    }
    .mobile-nav-toggle {
        display: inline-flex !important;
    }
}

/* ====================================================================
   MEDIA QUERIES — MOBILE & PETIT TABLETTE (max-width: 768px)
   ==================================================================== */
@media (max-width: 768px) {
    html {
        font-size: 13.5px;
    }

    .form-control, .form-select {
        font-size: 16px; /* Empêche le zoom automatique sur iOS */
    }

    .app-content {
        padding: 16px 12px !important;
    }
    
    .public-container {
        padding: 32px 16px !important;
    }

    .public-hero {
        padding: 40px 16px 30px !important;
    }
    .public-hero h1 {
        font-size: 28px !important;
        line-height: 1.25 !important;
    }
    .public-hero p {
        font-size: 14px !important;
    }

    .card {
        padding: 16px 14px !important;
        margin-bottom: 16px !important;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
    }

    .grid-cols-4, .grid-cols-3, .grid-cols-2 {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }

    .filter-form-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .stat-card {
        padding: 14px !important;
    }
    .stat-value {
        font-size: 20px !important;
    }
    .stat-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 19px !important;
    }

    .topbar-title-section h1 {
        font-size: 15px !important;
        max-width: 170px;
    }

    .topbar-actions .btn {
        padding: 6px 10px !important;
        font-size: 11.5px !important;
    }

    .driver-bottom-nav {
        display: flex;
    }
    .driver-page-container {
        padding-bottom: 70px;
    }

    .modal-card {
        max-width: 95vw !important;
        margin: 10px auto !important;
    }
    .modal-body {
        padding: 16px !important;
    }
    .modal-header {
        padding: 14px 16px !important;
    }
    .modal-footer {
        padding: 12px 16px !important;
        flex-wrap: wrap;
    }

    .auth-box {
        padding: 24px 16px !important;
    }

    #toast-container {
        right: 12px;
        bottom: 16px;
        left: 12px;
        max-width: calc(100vw - 24px);
    }
    .toast {
        min-width: unset;
        width: 100%;
    }
}

/* ====================================================================
   MEDIA QUERIES — PETIT SMARTPHONE (max-width: 480px)
   ==================================================================== */
@media (max-width: 480px) {
    .public-navbar {
        padding: 12px 14px !important;
    }
    .sidebar-brand-title {
        font-size: 15px;
    }
    
    .btn-block-xs {
        width: 100% !important;
        margin-bottom: 6px;
    }
    
    .table th, .table td {
        padding: 8px 10px !important;
        font-size: 12px !important;
    }
}

/* ====================================================================
   PWA INSTALLATION BANNER & MODAL (ANDROID & IOS)
   ==================================================================== */
.pwa-install-banner {
    position: fixed;
    bottom: 24px;
    left: 20px;
    right: 20px;
    max-width: 480px;
    margin: 0 auto;
    background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(12px);
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7), 0 0 20px var(--primary-glow);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    z-index: 9998;
    animation: slideUpBanner 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUpBanner {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.driver-page-container .pwa-install-banner {
    bottom: 74px !important; /* Position au-dessus de la barre de navigation chauffeur */
}

.pwa-install-content {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.pwa-install-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary), #d97706);
    color: #0f172a;
    font-weight: 800;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 10px var(--primary-glow);
}

.pwa-install-text {
    min-width: 0;
}
.pwa-install-text strong {
    color: #fff;
    font-size: 13.5px;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pwa-install-text p {
    color: var(--text-muted);
    font-size: 11.5px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-install-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-install-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 4px 6px;
    line-height: 1;
    border-radius: 4px;
}
.pwa-install-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

