/* ═══════════════════════════════════════════════════════════
   NexoPlanning – Global styles
   ═══════════════════════════════════════════════════════════ */

html, body {
    font-family: 'Inter', 'Roboto', sans-serif;
    height: 100%;
    margin: 0;
    background: #F4F6F9;
}

/* ─── Layout principal ──────────────────────────────────────── */
.main-content {
    background: #F4F6F9;
}

.mud-main-content {
    background: #F4F6F9;
}

/* ─── AppBar ────────────────────────────────────────────────── */
.mud-appbar {
    box-shadow: none !important;
}

/* ─── Drawer ────────────────────────────────────────────────── */
.mud-drawer {
    min-width: 256px;
    display: flex;
    flex-direction: column;
}

.mud-drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Sidebar nav — override MudBlazor qui met color:primary sur .active */
.mud-drawer .mud-nav-link {
    border-radius: 8px !important;
    margin: 1px 8px !important;
    color: rgba(255, 255, 255, 0.88) !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    border-inline-end: none !important;
    transition: background 0.15s ease !important;
}

.mud-drawer .mud-nav-link .mud-nav-link-icon,
.mud-drawer .mud-nav-link .mud-nav-link-text,
.mud-drawer .mud-nav-link .mud-icon-root {
    color: inherit !important;
}

.mud-drawer .mud-nav-link:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

.mud-drawer .mud-nav-link.active,
.mud-drawer .mud-nav-link.active:not(.mud-nav-link-disabled) {
    background-color: rgba(255, 255, 255, 0.22) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    border-inline-end: 3px solid #ffffff !important;
}

/* Forcer blanc sur TOUS les enfants du lien actif (texte custom inclus) */
.mud-drawer .mud-nav-link.active,
.mud-drawer .mud-nav-link.active:not(.mud-nav-link-disabled),
.mud-drawer .mud-nav-link.active *,
.mud-drawer .mud-nav-link.active:not(.mud-nav-link-disabled) * {
    color: #ffffff !important;
}

.mud-drawer .mud-nav-link.active .mud-nav-link-icon,
.mud-drawer .mud-nav-link.active .mud-icon-root {
    fill: #ffffff !important;
    opacity: 1 !important;
}

/* Badge validation heures — garder le rouge même dans un lien actif */
.mud-drawer .mud-nav-link .nav-badge {
    background: #FF5252 !important;
    color: #ffffff !important;
}

/* ─── Cards / Papers ────────────────────────────────────────── */
.mud-card,
.mud-paper {
    border-radius: 12px !important;
}

/* ─── KPI Cards ─────────────────────────────────────────────── */
.kpi-card {
    border-radius: 12px !important;
    position: relative;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08) !important;
}

.kpi-label {
    font-size: 0.72rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.07em !important;
    opacity: 0.55;
    display: block;
}

.kpi-value {
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    line-height: 1.1 !important;
}

.kpi-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kpi-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0.6;
}

/* ─── Mission cards dashboard ───────────────────────────────── */
.mission-card {
    background: #FAFAFA;
    border-radius: 8px;
    padding: 12px 14px;
    border: 1px solid rgba(0,0,0,0.05);
    transition: background 0.15s ease;
}

.mission-card:hover {
    background: #F0F2F5;
}

/* ─── Upcoming missions ─────────────────────────────────────── */
.upcoming-mission-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 4px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.upcoming-mission-row:last-child {
    border-bottom: none;
}

.upcoming-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 36px;
    background: rgba(0,0,0,0.04);
    border-radius: 8px;
    padding: 4px 8px;
}

.upcoming-date-day {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.1;
    color: rgba(0,0,0,0.8);
}

.upcoming-date-month {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(0,0,0,0.45);
}

/* ─── Page de connexion ─────────────────────────────────────── */
.login-background {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
    background: white;
}

.login-left {
    flex: 0 0 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: inherit;
}

.login-left-content {
    position: relative;
    z-index: 1;
}

.login-features {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-feature-item {
    display: flex;
    align-items: center;
}

.login-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 32px;
}

.login-form-wrap {
    width: 100%;
    max-width: 420px;
}

/* ─── Page headers ──────────────────────────────────────────── */
.page-header {
    margin-bottom: 1.5rem;
}

/* ─── Tables ─────────────────────────────────────────────────── */
.mud-table {
    border-radius: 12px !important;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06) !important;
    box-shadow: none !important;
}

.mud-table-head .mud-table-cell {
    background: #F8FAFC !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: rgba(0,0,0,0.5) !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
}

.mud-table-body .mud-table-row:hover td {
    background: rgba(0,0,0,0.015) !important;
}

@media (max-width: 600px) {
    .mud-table-cell[data-label]::before {
        content: attr(data-label) " : ";
        font-weight: 600;
        display: inline-block;
        margin-right: 4px;
    }
}

/* ─── Boutons ────────────────────────────────────────────────── */
.mud-button-root {
    border-radius: 8px !important;
}

.mud-button-filled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

.mud-button-filled:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
}

/* ─── Champs de formulaire ───────────────────────────────────── */
.mud-input-outlined .mud-input-outlined-border {
    border-radius: 8px !important;
}

/* ─── Chips ──────────────────────────────────────────────────── */
.mud-chip {
    border-radius: 6px !important;
}

.statut-chip {
    font-size: 0.72rem;
    font-weight: 600;
}

/* ─── Dialogs ────────────────────────────────────────────────── */
.mud-dialog {
    border-radius: 16px !important;
}

/* ─── FAB mobile ─────────────────────────────────────────────── */
.fab-bottom-right {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 999;
}

/* ─── Utilitaires ────────────────────────────────────────────── */
.fw-semibold { font-weight: 600 !important; }
.fw-bold     { font-weight: 700 !important; }

/* ─── Print ──────────────────────────────────────────────────── */
@media print {
    .mud-appbar,
    .mud-drawer,
    .no-print {
        display: none !important;
    }
}
