/* ============================================================================
   ADMIN MOBILE ULTRA-PROFESSIONNEL - Paris Shuttle Airlines
   Design moderne et fonctionnel pour mobile/tablet/desktop
   ============================================================================ */

/* Reset et Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables de couleurs */
:root {
    --primary: #d4af37;
    --dark: #1a1a1a;
    --darker: #0a0a0a;
    --gray: #333;
    --light-gray: #f5f5f5;
    --border: #444;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
}

/* ============================================================================
   MOBILE FIRST - Design de base pour mobile
   ============================================================================ */

@media (max-width: 768px) {
    
    /* Body */
    body {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
        background: var(--dark);
        color: #fff;
        font-size: 14px;
        padding-bottom: 70px; /* Espace pour bottom nav */
    }
    
    /* Header fixe en haut */
    .admin-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: var(--darker);
        padding: 15px 20px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.5);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .admin-header h1 {
        font-size: 16px;
        font-weight: 700;
        color: var(--primary);
        margin: 0;
    }
    
    .admin-header .logo {
        width: 35px;
        height: 35px;
        border-radius: 50%;
    }
    
    /* Bouton déconnexion en haut */
    .logout-btn {
        background: var(--danger);
        color: #fff;
        border: none;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
    }
    
    /* Contenu principal avec padding top pour header */
    .admin-content {
        padding: 80px 15px 20px 15px;
        margin: 0;
    }
    
    /* Navigation bottom (remplace sidebar) */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--darker);
        border-top: 2px solid var(--primary);
        display: flex;
        justify-content: space-around;
        padding: 8px 0;
        z-index: 999;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.5);
    }
    
    .nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 8px 5px;
        text-decoration: none;
        color: #999;
        transition: all 0.3s;
        border-radius: 8px;
    }
    
    .nav-item.active {
        color: var(--primary);
        background: rgba(212, 175, 55, 0.1);
    }
    
    .nav-item:active {
        transform: scale(0.95);
    }
    
    .nav-item i {
        font-size: 22px;
    }
    
    .nav-item span {
        font-size: 10px;
        font-weight: 600;
    }
    
    /* Cacher le sidebar desktop sur mobile */
    .admin-sidebar {
        display: none !important;
    }
    
    /* Dashboard - Stats Cards */
    .stats-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .stat-card {
        background: linear-gradient(135deg, var(--gray), var(--dark));
        border-radius: 15px;
        padding: 20px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
        border: 1px solid var(--border);
    }
    
    .stat-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 12px;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
        background: rgba(212, 175, 55, 0.2);
        color: var(--primary);
    }
    
    .stat-value {
        font-size: 32px;
        font-weight: 700;
        color: #fff;
        margin-bottom: 5px;
    }
    
    .stat-label {
        font-size: 13px;
        color: #999;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    /* Tables responsive */
    .table-container {
        background: var(--gray);
        border-radius: 12px;
        overflow: hidden;
        margin-bottom: 20px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    }
    
    .table-header {
        padding: 15px;
        background: var(--darker);
        border-bottom: 2px solid var(--primary);
    }
    
    .table-header h3 {
        font-size: 16px;
        font-weight: 700;
        color: #fff;
        margin: 0;
    }
    
    .table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        width: 100%;
        min-width: 600px;
        border-collapse: collapse;
    }
    
    thead {
        background: var(--dark);
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    thead th {
        padding: 12px 10px;
        text-align: left;
        font-size: 12px;
        font-weight: 600;
        color: var(--primary);
        text-transform: uppercase;
        letter-spacing: 0.5px;
        border-bottom: 2px solid var(--border);
    }
    
    tbody tr {
        border-bottom: 1px solid var(--border);
        transition: background 0.2s;
    }
    
    tbody tr:hover {
        background: rgba(212, 175, 55, 0.05);
    }
    
    tbody td {
        padding: 12px 10px;
        font-size: 13px;
        color: #ddd;
    }
    
    /* Badges de statut */
    .badge {
        display: inline-block;
        padding: 5px 12px;
        border-radius: 20px;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }
    
    .badge-success {
        background: var(--success);
        color: #fff;
    }
    
    .badge-warning {
        background: var(--warning);
        color: #000;
    }
    
    .badge-danger {
        background: var(--danger);
        color: #fff;
    }
    
    .badge-info {
        background: var(--info);
        color: #fff;
    }
    
    /* Boutons d'action */
    .action-buttons {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
    
    .btn-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        cursor: pointer;
        transition: all 0.3s;
    }
    
    .btn-icon:active {
        transform: scale(0.9);
    }
    
    .btn-edit {
        background: var(--info);
        color: #fff;
    }
    
    .btn-delete {
        background: var(--danger);
        color: #fff;
    }
    
    .btn-view {
        background: var(--primary);
        color: #000;
    }
    
    /* Formulaires */
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: #ddd;
        margin-bottom: 8px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 14px 16px;
        border: 2px solid var(--border);
        border-radius: 10px;
        background: var(--gray);
        color: #fff;
        font-size: 15px;
        font-family: inherit;
        transition: all 0.3s;
    }
    
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        outline: none;
        border-color: var(--primary);
        background: var(--dark);
    }
    
    .form-group textarea {
        min-height: 120px;
        resize: vertical;
    }
    
    /* Boutons de formulaire */
    .btn-primary {
        width: 100%;
        padding: 16px;
        background: var(--primary);
        color: #000;
        border: none;
        border-radius: 10px;
        font-size: 16px;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.3s;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    .btn-primary:active {
        transform: scale(0.98);
    }
    
    .btn-secondary {
        width: 100%;
        padding: 16px;
        background: transparent;
        color: #fff;
        border: 2px solid var(--border);
        border-radius: 10px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        margin-top: 10px;
    }
    
    /* Filtres et recherche */
    .filters-bar {
        background: var(--gray);
        padding: 15px;
        border-radius: 12px;
        margin-bottom: 20px;
    }
    
    .search-box {
        position: relative;
        margin-bottom: 15px;
    }
    
    .search-box input {
        width: 100%;
        padding: 12px 15px 12px 45px;
        border: 2px solid var(--border);
        border-radius: 25px;
        background: var(--dark);
        color: #fff;
        font-size: 14px;
    }
    
    .search-box i {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: #999;
        font-size: 16px;
    }
    
    /* Messages / Notifications */
    .message-card {
        background: var(--gray);
        border-radius: 12px;
        padding: 15px;
        margin-bottom: 12px;
        border-left: 4px solid var(--primary);
    }
    
    .message-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
    }
    
    .message-sender {
        font-weight: 600;
        color: #fff;
        font-size: 14px;
    }
    
    .message-time {
        font-size: 11px;
        color: #999;
    }
    
    .message-body {
        font-size: 13px;
        color: #ddd;
        line-height: 1.5;
    }
    
    /* Modals */
    .modal {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.9);
        z-index: 9999;
        display: none;
        align-items: flex-end;
    }
    
    .modal.active {
        display: flex;
    }
    
    .modal-content {
        background: var(--dark);
        border-radius: 20px 20px 0 0;
        width: 100%;
        max-height: 85vh;
        overflow-y: auto;
        padding: 20px;
        animation: slideUp 0.3s;
    }
    
    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }
    
    .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        padding-bottom: 15px;
        border-bottom: 2px solid var(--border);
    }
    
    .modal-header h3 {
        font-size: 18px;
        color: var(--primary);
    }
    
    .modal-close {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--danger);
        color: #fff;
        border: none;
        font-size: 20px;
        cursor: pointer;
    }
    
    /* Pagination */
    .pagination {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 20px;
        flex-wrap: wrap;
    }
    
    .page-link {
        min-width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--gray);
        color: #fff;
        border: 2px solid var(--border);
        border-radius: 8px;
        text-decoration: none;
        font-weight: 600;
        font-size: 14px;
        transition: all 0.3s;
    }
    
    .page-link.active {
        background: var(--primary);
        color: #000;
        border-color: var(--primary);
    }
    
    /* FAB (Floating Action Button) */
    .fab {
        position: fixed;
        bottom: 85px;
        right: 20px;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background: var(--primary);
        color: #000;
        border: none;
        box-shadow: 0 6px 20px rgba(212, 175, 55, 0.5);
        font-size: 24px;
        cursor: pointer;
        z-index: 998;
        transition: all 0.3s;
    }
    
    .fab:active {
        transform: scale(0.9);
    }
    
    /* Loading */
    .loading {
        text-align: center;
        padding: 40px 20px;
        color: #999;
    }
    
    .spinner {
        width: 40px;
        height: 40px;
        border: 4px solid var(--border);
        border-top-color: var(--primary);
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin: 0 auto 15px;
    }
    
    @keyframes spin {
        to { transform: rotate(360deg); }
    }
    
    /* Empty state */
    .empty-state {
        text-align: center;
        padding: 60px 20px;
        color: #999;
    }
    
    .empty-state i {
        font-size: 64px;
        color: var(--border);
        margin-bottom: 20px;
    }
    
    .empty-state h3 {
        font-size: 18px;
        color: #ddd;
        margin-bottom: 10px;
    }
    
    .empty-state p {
        font-size: 14px;
        color: #999;
    }
}

/* ============================================================================
   DESKTOP - Rétablir design desktop au-dessus de 768px
   ============================================================================ */

@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none !important;
    }
    
    .fab {
        display: none !important;
    }
    
    body {
        padding-bottom: 0 !important;
    }
    
    .admin-content {
        padding: 30px !important;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
    }
}
