/* ===== Base ===== */
html, body {
    font-family: 'Inter', 'Roboto', 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }
* { scrollbar-width: thin; scrollbar-color: #94a3b8 transparent; }

/* ===== Accessibilite ===== */
.skip-to-content {
    position: absolute; top: -100%; left: 50%; transform: translateX(-50%);
    z-index: 9999; padding: 8px 16px; background: #4f46e5; color: #fff;
    border-radius: 0 0 4px 4px; text-decoration: none; font-weight: 600;
    transition: top 0.2s;
}
.skip-to-content:focus { top: 0; }

*:focus-visible { outline: 2px solid #4f46e5; outline-offset: 2px; }
*:focus:not(:focus-visible) { outline: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== Responsive ===== */
.mud-table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 960px) {
    .mud-drawer--open.mud-drawer-mini { width: 0 !important; }
}

@media (max-width: 600px) {
    .mud-main-content { padding: 8px !important; }
    .mud-dialog { margin: 8px !important; max-width: calc(100vw - 16px) !important; }
}

/* ===== Print ===== */
@media print {
    .mud-drawer, .mud-appbar, .mud-snackbar-provider, .skip-to-content, .no-print {
        display: none !important;
    }
    .mud-main-content { padding: 0 !important; margin: 0 !important; }
    body { background: #fff !important; color: #000 !important; }
}

/* ===== Utilitaires ===== */
.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mud-main-content { min-height: calc(100vh - 64px); }
