/* Anaya — Styles PWA Centre de Plongée */

:root {
    --primary: #006994;
    --primary-dark: #004d6e;
    --accent: #00a8cc;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --bg: #f0f4f8;
    --surface: #ffffff;
    --text: #1a2b3c;
    --text-muted: #6c7a89;
    --border: #dde3ea;
    --radius: 10px;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ─── Navigation ─── */
.topnav {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: #fff;
    flex-wrap: wrap;
}
.nav-brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.2rem; }
.nav-links { display: flex; gap: 0.5rem; flex: 1; }
.nav-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
}
.nav-links a:hover, .nav-links a.active { background: rgba(255,255,255,0.15); color: #fff; }
.nav-user { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; }

.main-content { padding: 1.5rem; max-width: 1400px; margin: 0 auto; width: 100%; box-sizing: border-box; }
.footer { text-align: center; padding: 1rem; color: var(--text-muted); font-size: 0.8rem; }

/* ─── Auth pages ─── */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}
.auth-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
}
.auth-card-wide { max-width: 520px; }
.auth-logo { text-align: center; margin-bottom: 2rem; }
.logo-icon { font-size: 3rem; }
.auth-logo h1 { color: var(--primary); margin-top: 0.5rem; }
.subtitle { color: var(--text-muted); font-size: 0.9rem; }

/* ─── Forms ─── */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.3rem; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,105,148,0.15);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.hint { color: var(--text-muted); font-size: 0.8rem; margin-top: 0.25rem; display: block; }
.form-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--border); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline { background: transparent; border: 1px solid rgba(255,255,255,0.5); color: #fff; }
.topnav .btn-outline:hover { background: rgba(255,255,255,0.15); }
.btn-outline-primary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}
.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
}
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.85rem; }
.btn-block { width: 100%; }

/* ─── Alerts ─── */
.alert { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert-error { background: #fde8e8; color: var(--danger); border: 1px solid #f5c6cb; }
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.alert-warning { background: #fff8e1; color: #856404; border: 1px solid #ffecb3; }
.hidden { display: none !important; }

/* ─── Dashboard stats ─── */
.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.75rem;
}
.metric {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}
.metric-emprunts {
    text-decoration: none;
    color: inherit;
    border-left-color: var(--accent);
    transition: transform 0.2s, box-shadow 0.2s;
}
.metric-emprunts:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.metric-dispo { border-left-color: var(--success); }
.metric-maint { border-left-color: var(--text-muted); }
.metric-maint.metric-alert {
    border-left-color: var(--warning);
    background: #fffdf5;
}
.metric-icon {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}
.metric-body { min-width: 0; }
.metric-value {
    display: block;
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--primary);
}
.metric-dispo .metric-value { color: var(--success); }
.metric-maint .metric-value { color: var(--text-muted); }
.metric-maint.metric-alert .metric-value { color: #b8860b; }
.metric-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}
.metric-sub { display: block; font-size: 0.75rem; margin-top: 0.25rem; }
.metric-sub-warn { color: #b8860b; font-weight: 600; }

/* ─── Filtres ─── */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius);
}
.filter-field { margin-bottom: 0; min-width: 140px; }
.filter-field-grow { flex: 1; min-width: 180px; }
.filter-field label { font-size: 0.8rem; }

.empty-state, .empty-cell {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 1rem;
}
.cell-sub { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 0.15rem; }
.row-alert { background: #fff8e1 !important; }
.hint-alert { color: #856404; margin-top: 1rem; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-audit { background: #e8eaf6; color: #3949ab; text-transform: none; }
.audit-details { font-size: 0.85rem; max-width: 320px; word-break: break-word; }
.actions-cell { white-space: nowrap; }
.pagination {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}
.pagination-info { color: var(--text-muted); font-size: 0.9rem; }

/* ─── Dashboard ─── */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}
.dash-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: transform 0.2s, box-shadow 0.2s;
}
.dash-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.dash-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.dash-card h2 { color: var(--primary); margin-bottom: 0.5rem; }
.dash-card p { color: var(--text-muted); font-size: 0.9rem; }
.dash-card-admin { border: 2px solid var(--warning); }

/* ─── Panels ─── */
.panel {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    max-width: 100%;
    box-sizing: border-box;
}
.panel h2, .panel h3 { color: var(--primary); margin-bottom: 1rem; }
.panel-header-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.panel-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.input-readonly { background: #f8f9fa; color: var(--text-muted); cursor: default; }
.qr-cell { width: 70px; }
.qr-thumb { border-radius: 4px; border: 1px solid var(--border); background: #fff; }
.inventaire-table code { font-size: 0.8rem; }
.panel-header-row h2 { margin-bottom: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }

.station-header { margin-bottom: 1rem; }
.station-badge {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ─── Comptoir équipement tout-en-un ─── */
.retard-banner {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 0.95rem;
}
.global-loans-panel {
    margin-bottom: 1rem;
    padding: 0;
    overflow: hidden;
}
.global-loans-panel summary {
    cursor: pointer;
    padding: 1rem 1.25rem;
    font-weight: 700;
    color: var(--primary);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.global-loans-panel summary::-webkit-details-marker { display: none; }
.global-loans-panel .loan-count {
    background: var(--primary);
    color: #fff;
    border-radius: 999px;
    padding: 0.15rem 0.65rem;
    font-size: 0.85rem;
}
.global-loans-list {
    list-style: none;
    padding: 0 1.25rem 1rem;
    margin: 0;
}
.global-loans-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.global-loans-list li:last-child { border-bottom: none; }
.global-loans-list li strong { display: block; }
.global-loans-list li span { color: var(--text-muted); font-size: 0.85rem; }
.global-loans-list .loan-empty { color: var(--success); font-style: italic; text-align: center; padding: 0.5rem; }
.global-loans-list .loan-retard { background: #fff8e1; margin: 0 -0.5rem; padding: 0.5rem; border-radius: 6px; }
.global-loans-list .loan-more { color: var(--text-muted); font-size: 0.85rem; }
.workflow-cmd-bar .cmd-active {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
    font-weight: 800;
}
.equipement-station .scan-message { margin: 1rem 0; }
.equipement-station .scan-message .scan-hint { font-size: 1.15rem; }

/* ─── Search ─── */
.search-bar { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.search-bar input { flex: 1; padding: 0.6rem; border: 1px solid var(--border); border-radius: 6px; }
.results-list { max-height: 400px; overflow-y: auto; }
.result-item {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}
.result-item { cursor: pointer; }
.result-item:hover { background: #f0f7fa; }
.result-item-active { background: #e0f2f8; border-left: 3px solid var(--primary); }
.result-item.result-empty { color: var(--text-muted); cursor: default; font-style: italic; }
.result-item.result-empty:hover { background: transparent; }
.result-item span { display: block; font-size: 0.85rem; color: var(--text-muted); }

/* ─── RFID ─── */
.rfid-display { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-top: 0.25rem; }
.rfid-display .btn { flex-shrink: 0; }
.rfid-tag {
    font-family: monospace;
    background: #e8f4f8;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-weight: 600;
}
.rfid-capture-indicator {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--warning);
    color: #333;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    font-weight: 600;
    z-index: 100;
    animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

/* ─── Écran 2 — Machine d'état ─── */
.equipement-station { position: relative; }

.state-bar {
    display: flex;
    gap: 1rem;
    background: var(--surface);
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.state-item { text-align: center; min-width: 100px; }
.state-item-wide { flex: 1; min-width: 200px; }
.state-label { display: block; font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.state-value { display: block; font-size: 1.3rem; font-weight: 700; margin-top: 0.2rem; }
.mode-distribution { color: var(--accent); }
.mode-retour { color: var(--warning); }
.mode-none { color: var(--text-muted); }
.session-open { color: var(--success); }
.session-closed { color: var(--text-muted); }

.scan-message {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}
.scan-hint { font-size: 1.2rem; color: var(--text-muted); }
.msg-active { color: var(--accent); font-weight: 600; }
.msg-ready { color: var(--success); font-weight: 600; }
.cmd-legend {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.cmd-legend code {
    background: #eef2f5;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

.scanned-panel {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}
.scanned-list { list-style: none; }
.scanned-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}
.scanned-list code { font-weight: 700; color: var(--primary); min-width: 120px; }

.active-loans {
    background: #fff8e1;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #ffe082;
}
.active-loans ul { list-style: none; }
.active-loans li { padding: 0.4rem 0; }

/* Flash overlay */
.flash-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    z-index: 9999;
    text-align: center;
    padding: 2rem;
}
.flash-error { background: rgba(220, 53, 69, 0.92); animation: flashIn 0.2s; }
.flash-success { background: rgba(40, 167, 69, 0.92); animation: flashIn 0.2s; }
@keyframes flashIn { from { opacity: 0; } to { opacity: 1; } }

/* ─── Tables ─── */
.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.data-table { width: 100%; border-collapse: collapse; min-width: 0; }
.data-table th, .data-table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
.data-table th { background: #f8f9fa; font-size: 0.85rem; text-transform: uppercase; color: var(--text-muted); }

/* ─── Badges ─── */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-superadmin { background: #fff3cd; color: #856404; }
.badge-admin { background: #d1ecf1; color: #0c5460; }

.statut { padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.85rem; font-weight: 600; }
.statut-disponible { background: #e8f5e9; color: #2e7d32; }
.statut-en-cours { background: #fff3e0; color: #e65100; }
.statut-maintenance { background: #fce4ec; color: #c62828; }

/* ─── Modal ─── */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}
.modal-content {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 2rem;
    width: 90%;
    max-width: 480px;
}

.invite-form { max-width: 480px; }

/* ─── Scanner QR mobile ─── */
.fab-scanner {
    display: none;
    position: fixed;
    bottom: calc(4.5rem + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 900;
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    cursor: pointer;
}
.fab-scanner:active { transform: translateX(-50%) scale(0.97); }

.qr-scanner-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #000;
    display: flex;
    flex-direction: column;
}
.qr-scanner-modal.hidden { display: none !important; }
.qr-scanner-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.qr-scanner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(0,0,0,0.6);
    color: #fff;
}
.qr-scanner-header h3 { font-size: 1rem; margin: 0; }
.qr-scanner-viewport {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #111;
    min-height: 280px;
}
.qr-scanner-viewport video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}
.qr-scanner-viewport #qr-shaded-region {
    border-color: rgba(0, 168, 204, 0.9) !important;
}
.qr-scanner-status {
    text-align: center;
    padding: 0.75rem;
    color: #fff;
    background: rgba(0,0,0,0.7);
    font-size: 0.9rem;
}
body.scanner-open { overflow: hidden; }

.mobile-cmd-bar {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.cmd-btn {
    padding: 0.85rem 0.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    min-height: 48px;
}
.cmd-dist { background: #e0f4fc; color: #006994; }
.cmd-ret { background: #fff3e0; color: #e65100; }
.cmd-val { background: #e8f5e9; color: #2e7d32; }
.cmd-reset { background: #fde8e8; color: #c62828; }

.mobile-rfid-panel { display: none; }

/* ─── Bottom nav mobile ─── */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 800;
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
}
.bottom-nav-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    min-height: 52px;
}
.bottom-nav-item:active { background: #f0f4f8; }
.bottom-nav-item.active { color: var(--primary); font-weight: 700; }
.bottom-nav-scan {
    font-size: 1.5rem;
    color: var(--primary);
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
        padding-bottom: calc(5rem + env(safe-area-inset-bottom));
        overflow-x: hidden;
    }
    .panel {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    .panel-header-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .panel-header-row h2 {
        font-size: 1.15rem;
    }
    .panel-header-row .btn,
    .panel-actions .btn { width: 100%; }
    .panel-actions { width: 100%; }

    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-field { min-width: 0; width: 100%; }

    .dashboard-metrics { grid-template-columns: 1fr; }
    .metric { padding: 1rem 1.25rem; }
    .metric-value { font-size: 1.85rem; }

    .actions-cell { display: flex; gap: 0.35rem; justify-content: flex-end; }
    .two-col { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .state-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        padding: 0.75rem;
    }
    .state-item-wide { grid-column: 1 / -1; }
    .state-value { font-size: 1.1rem; }

    .topnav {
        padding: 0.5rem 1rem;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    .nav-brand { flex-shrink: 0; }
    .nav-user {
        flex: 1 1 auto;
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 0.35rem;
    }
    .nav-links { display: none; }
    .nav-user span:not(.badge) { max-width: 6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .nav-user .btn-outline { padding: 0.35rem 0.5rem; font-size: 0.75rem; }

    .bottom-nav { display: flex; }
    .fab-scanner { display: block; }
    .mobile-cmd-bar { display: grid; }
    .mobile-rfid-panel { display: block; }

    .scan-message { padding: 1.5rem 1rem; }
    .scan-hint { font-size: 1rem; }
    .cmd-legend { flex-direction: column; gap: 0.35rem; font-size: 0.8rem; }

    .flash-overlay { font-size: 1.2rem; padding: 1rem; }

    .dashboard-grid { grid-template-columns: 1fr; }
    .dash-card { padding: 1.25rem; }

    .auth-card { margin: 1rem; padding: 1.5rem; max-width: none; }
    .auth-page { align-items: flex-start; padding-top: 2rem; }

    .data-table { font-size: 0.85rem; }
    .data-table th, .data-table td { padding: 0.5rem; }

    /* Inventaire : cartes empilées sur mobile */
    .table-wrap:has(.data-table-responsive) {
        overflow-x: visible;
    }
    .data-table-responsive thead {
        display: none;
    }
    .data-table-responsive tbody tr {
        display: block;
        background: var(--bg);
        border: 1px solid var(--border);
        border-radius: 8px;
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    .data-table-responsive tbody tr:last-child {
        margin-bottom: 0;
    }
    .data-table-responsive td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        padding: 0.45rem 0;
        border-bottom: 1px solid var(--border);
        text-align: right;
    }
    .data-table-responsive td:last-child {
        border-bottom: none;
    }
    .data-table-responsive td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.72rem;
        text-transform: uppercase;
        color: var(--text-muted);
        text-align: left;
        flex-shrink: 0;
    }

    .search-bar { flex-direction: column; }
    .search-bar input, .search-bar .btn { width: 100%; }

    .btn, .cmd-btn { min-height: 48px; }
    .form-group input, .form-group select, .form-group textarea {
        font-size: 16px; /* évite zoom iOS */
    }

    .equipement-station .fab-scanner {
        bottom: calc(5.5rem + env(safe-area-inset-bottom));
    }

    .footer { display: none; }
}

@media (min-width: 769px) {
    .mobile-cmd-bar { display: none; }
    .mobile-rfid-panel { display: none; }
    .fab-scanner { display: none; }
    .equipement-station .workflow-cmd-bar { display: grid; grid-template-columns: repeat(4, 1fr); }
    .equipement-station .mobile-rfid-panel { display: block; }
    .equipement-station .fab-scanner { display: block; }
}
