/* =============================================================================
   Styles personnalisés - Interface web serveur de backup Xcelere
   ============================================================================= */

/* --- Sidebar --- */
.sidebar {
    width: 250px;
    min-height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
}

.sidebar .nav-link {
    padding: 0.6rem 1rem;
    border-radius: 0.375rem;
    margin-bottom: 2px;
    transition: background-color 0.15s;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Contenu principal --- */
.main-content {
    min-height: 100vh;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* --- Cartes --- */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

/* --- Log viewer --- */
.log-viewer {
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.5;
}

.log-viewer .log-error {
    color: #ff6b6b;
}

.log-viewer .log-warning {
    color: #ffd93d;
}

.log-viewer .log-success {
    color: #6bcb77;
}

/* --- Progress bar personnalisée --- */
.progress {
    border-radius: 0.5rem;
    background-color: #e9ecef;
}

/* --- Table --- */
.table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
    border-bottom-width: 1px;
}

/* --- Boutons groupés dans les tableaux --- */
.btn-group .btn {
    padding: 0.25rem 0.5rem;
}

/* --- Badge --- */
.badge {
    font-weight: 500;
    font-size: 0.8rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    body.d-flex {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        position: relative;
    }

    .sidebar .nav {
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0.5rem !important;
    }

    .sidebar .nav-item {
        flex: 0 0 auto;
    }

    .sidebar .nav-link {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }

    .sidebar .nav-link .bi {
        margin-right: 0.25rem !important;
    }

    .sidebar-header {
        text-align: center;
        padding: 0.75rem !important;
    }

    .sidebar-header h5 {
        font-size: 1rem;
    }

    .sidebar-header small {
        display: none;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content {
        padding: 1rem !important;
    }
}

/* --- Animation de chargement --- */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* --- Ligne filtrée (logs) --- */
.log-hidden {
    display: none;
}
