/* Variables CSS */
:root {
    --primary: #0066CC;
    --primary-dark: #0052a3;
    --secondary: #2E86AB;
    --success: #28A745;
    --danger: #DC3545;
    --warning: #FFC107;
    --info: #17A2B8;
    --light: #F8F9FA;
    --dark: #343A40;
    --gray: #6C757D;
    --gray-light: #E9ECEF;
    --white: #FFFFFF;
    --border: #DEE2E6;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    z-index: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
}

/* ===== LAYOUT PRINCIPAL ===== */
.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;

}

.sidebar {
    background: var(--white);
    min-height: calc(100vh - 56px);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    border-right: 1px solid var(--border);
}

.sidebar .nav-link {
    color: var(--dark);
    padding: 0.75rem 1.5rem;
    margin: 0.25rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.sidebar .nav-link:hover {
    background-color: var(--light);
    color: var(--primary);
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    box-shadow: var(--shadow);
}

.sidebar .nav-link i {
    width: 20px;
    margin-right: 0.75rem;
    font-size: 1.1rem;
}

/* ===== DASHBOARD ===== */
body.dashboard-body {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.dashboard-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 2rem 0;
    margin: -1rem -1rem 2rem -1rem;
    border-radius: 0 0 20px 20px;
}

.stat-card-dashboard {
    background: white;
    border: none;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.stat-card-dashboard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.stat-card-dashboard:nth-child(2)::before {
    background: linear-gradient(135deg, var(--success) 0%, #20c997 100%);
}

.stat-card-dashboard:nth-child(3)::before {
    background: linear-gradient(135deg, var(--warning) 0%, #fd7e14 100%);
}

.stat-card-dashboard:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* ===== CLIENTS ===== */
body.clients-body {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.clients-header {
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    color: white;
    padding: 2rem 0;
    margin: -1rem -1rem 2rem -1rem;
    border-radius: 0 0 20px 20px;
}

.client-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1976d2 0%, #42a5f5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.25rem;
}

/* ===== PRODUITS ===== */
body.produits-body {
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
}

.produits-header {
    background: linear-gradient(135deg, #388e3c 0%, #66bb6a 100%);
    color: white;
    padding: 2rem 0;
    margin: -1rem -1rem 2rem -1rem;
    border-radius: 0 0 20px 20px;
}

.produit-card {
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.produit-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.produit-image {
    height: 120px;
    background: linear-gradient(135deg, #388e3c 0%, #66bb6a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.produit-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #388e3c;
}

.produit-badge {
    background: linear-gradient(135deg, #388e3c 0%, #66bb6a 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===== FACTURES ===== */
body.factures-body {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}

.factures-header {
    background: linear-gradient(135deg, #f57c00 0%, #ffb74d 100%);
    color: white;
    padding: 2rem 0;
    margin: -1rem -1rem 2rem -1rem;
    border-radius: 0 0 20px 20px;
}

.invoice-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.recap-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #0066CC;
}

/* ===== FORMULAIRES ===== */
.form-container {
    max-width: 600px;
    margin: 0 auto;
}

.form-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 2rem;
}

/* ===== TABLEAUX ===== */
.table-actions {
    white-space: nowrap;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.chart-placeholder {
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}