/* ============================================================
   AMATOTECH — MUDBLAZOR OVERRIDES
   Aligne les composants MudBlazor sur le design system
   (voir css/theme.css).
============================================================ */

/* ── Base ── */
.mud-dialog,
.mud-card,
.mud-paper {
  font-family: var(--brand-font);
}

html .mud-typography,
html .mud-button,
html .mud-input,
html .mud-table,
html .mud-list,
html .mud-nav-link {
  font-family: var(--brand-font);
}

/* ============================================================
   APPBAR
============================================================ */

.amato-appbar {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--brand-border) !important;
  color: var(--brand-neutral-800) !important;
  box-shadow: var(--brand-shadow-xs) !important;
}

.amato-appbar .mud-button-root:hover {
  background: var(--brand-neutral-100);
}

/* ============================================================
   DRAWER / SIDEBAR
   NavMenu.razor.css handles nav link styling via CSS isolation.
   Only structural drawer styles here.
============================================================ */

.amato-drawer {
  background: transparent !important;
  border-right: none !important;
  box-shadow: none !important;
}

.amato-drawer .mud-divider {
  background: rgba(255, 255, 255, 0.07);
  margin: 0.5rem 1rem;
}

/* Scrollbar for dark drawer content */
.amato-drawer .mud-drawer-content ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
}

.amato-drawer .mud-drawer-content ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ============================================================
    TABLES
  ============================================================ */

.mud-table .mud-table-head .mud-table-cell {
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--brand-neutral-500) !important;
    background: var(--brand-neutral-50);
    border-bottom: 2px solid var(--brand-border) !important;
    white-space: nowrap;
    padding: 0.55rem 0.75rem !important;
}

.mud-table .mud-table-cell {
    font-size: 0.82rem;
    border-bottom: 1px solid var(--brand-border-light);
    padding: 0.55rem 0.75rem !important;
}

.mud-table-hover .mud-table-row:hover {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.04) 0%, rgba(37, 99, 235, 0.01) 100%) !important;
}

.mud-table-hover .mud-table-row:hover td {
    color: var(--brand-neutral-800) !important;
}

.mud-table-row:last-child .mud-table-cell {
    border-bottom: none;
}

.mud-table .mud-table-head .mud-table-cell:first-child {
    border-top-left-radius: var(--brand-radius-sm);
}

.mud-table .mud-table-head .mud-table-cell:last-child {
    border-top-right-radius: var(--brand-radius-sm);
}

/* ============================================================
   CARDS & PAPER
============================================================ */

.mud-card {
    border-radius: var(--brand-radius-lg);
}

.mud-card .mud-card-content {
    padding: 1rem;
}

.mud-card .mud-card-header {
    padding: 0.6rem 1rem;
}

/* ============================================================
    DIALOGS
  ============================================================ */

.mud-dialog {
    border-radius: var(--brand-radius-lg) !important;
    box-shadow: var(--brand-shadow-lg) !important;
}

.mud-dialog-title {
    font-weight: 700 !important;
    font-size: 1rem !important;
    color: var(--brand-neutral-900) !important;
    letter-spacing: -0.3px;
    padding: 0.85rem 1.25rem !important;
}

.mud-dialog-content {
    font-size: 0.85rem;
    padding: 0 !important;
}

.mud-dialog .mud-dialog-content .mud-stack {
    padding: 0;
}

.mud-dialog-actions {
    padding: 0.75rem 1.25rem !important;
    gap: 0.5rem !important;
}

/* ============================================================
   BUTTONS
============================================================ */

.mud-button-filled {
  text-transform: none;
  font-weight: 600 !important;
  letter-spacing: 0.01em;
}

.mud-button-root {
  text-transform: none;
}

/* ============================================================
   SNACKBAR
============================================================ */

.mud-snackbar {
  border-radius: var(--brand-radius-sm) !important;
  font-family: var(--brand-font) !important;
  font-weight: 600;
}

/* ============================================================
   CHIPS / BADGES
============================================================ */

.mud-chip {
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--brand-radius-full);
}

/* ============================================================
   MENU VISIBILITY TOGGLES
============================================================ */

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.menu-toggle-container {
    display: flex;
    align-items: center;
}

.menu-toggle-btn {
    color: rgba(255, 255, 255, 0.7) !important;
    padding: 0.25rem !important;
}

.menu-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
}

.nav-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.section-toggle-btn {
    color: rgba(255, 255, 255, 0.5) !important;
    padding: 0.125rem !important;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.section-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: white !important;
}

.nav-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 0.5rem;
    display: block;
}

.nav-section {
    padding: 0 1rem 1rem 1rem;
}

.nav-menu {
    padding-top: 0.5rem;
}

/* ============================================================
   HEADER DROPDOWNS — alignés sous l'entête (4.75rem)
============================================================ */

.notification-dropdown,
.user-profile-dropdown {
  top: calc(4.75rem + 0.5rem) !important;
}

@media (max-width: 640.98px) {
  .notification-dropdown,
  .user-profile-dropdown {
    top: calc(4.25rem + 0.5rem) !important;
    right: 0.75rem !important;
    max-width: calc(100vw - 1.5rem);
  }
}

/* ============================================================
   SCROLLBARS MASQUÉES (le défilement reste actif)
============================================================ */

html,
body {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
