* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #1a3a52;
    color: white;
    padding: 30px 20px;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

.logo h1 {
    font-size: 28px;
    margin-bottom: 40px;
    border-bottom: 2px solid #0084d4;
    padding-bottom: 20px;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-item {
    padding: 12px 15px;
    text-decoration: none;
    color: #ccc;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: block;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background-color: rgba(0, 132, 212, 0.1);
    color: white;
}

.nav-item.active {
    background-color: #0084d4;
    color: white;
    border-left-color: white;
}

/* Main Content */
.main {
    flex: 1;
    padding: 30px;
    background-color: #f5f5f5;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    font-size: 28px;
    color: #1a3a52;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0084d4, #00d4ff);
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #1a3a52;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #666;
}

.stat-badge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 15px auto 0;
}

.stat-badge.client {
    background-color: #0084d4;
}

.stat-badge.prospect {
    background-color: #ff9500;
}

.stat-badge.total {
    background-color: #34c759;
}

.stat-badge.inactive {
    background-color: #999;
}

/* Filters */
.filters {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-form .input {
    flex: 1;
    min-width: 150px;
}

/* Table */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background-color: #f0f0f0;
    border-bottom: 2px solid #ddd;
}

.table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #1a3a52;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.table tbody tr:hover {
    background-color: #fafafa;
}

.text-center {
    text-align: center;
    color: #999;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-client {
    background-color: #e3f2fd;
    color: #0084d4;
}

.badge-prospect {
    background-color: #fff3e0;
    color: #ff9500;
}

.badge-actif {
    background-color: #e8f5e9;
    color: #34c759;
}

.badge-inactif {
    background-color: #f5f5f5;
    color: #999;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: #0084d4;
    color: white;
}

.btn-primary:hover {
    background-color: #0066aa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 132, 212, 0.3);
}

.btn-secondary {
    background-color: #999;
    color: white;
}

.btn-secondary:hover {
    background-color: #777;
}

.btn-danger {
    background-color: #ff3b30;
    color: white;
}

.btn-danger:hover {
    background-color: #cc0000;
}

.btn-warning {
    background-color: #ff9500;
    color: white;
}

.btn-warning:hover {
    background-color: #e68a00;
}

.btn-info {
    background-color: #00bfff;
    color: white;
}

.btn-info:hover {
    background-color: #0099cc;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Forms */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 600px;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #1a3a52;
}

.input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.input:focus {
    outline: none;
    border-color: #0084d4;
    box-shadow: 0 0 0 3px rgba(0, 132, 212, 0.1);
}

.textarea {
    resize: vertical;
    min-height: 120px;
}

/* Details */
.detail-container {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 600px;
}

.detail-card {
    margin-bottom: 30px;
}

.detail-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    align-items: flex-start;
}

.detail-row label {
    font-weight: 600;
    color: #1a3a52;
}

.detail-row span {
    color: #666;
    word-break: break-word;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

.pagination-info {
    color: #666;
    font-size: 14px;
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #e8f5e9;
    border-left-color: #34c759;
    color: #2e7d32;
}

.alert-danger {
    background-color: #ffebee;
    border-left-color: #ff3b30;
    color: #c62828;
}

.alert-info {
    background-color: #e3f2fd;
    border-left-color: #0084d4;
    color: #0066aa;
}

.alert ul {
    margin: 0;
    padding-left: 20px;
}

/* Actions */
.actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        padding: 20px;
    }

    .logo h1 {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .nav {
        flex-direction: row;
        gap: 10px;
        overflow-x: auto;
    }

    .nav-item {
        white-space: nowrap;
    }

    .main {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-form {
        flex-direction: column;
    }

    .filter-form .input,
    .filter-form .btn {
        width: 100%;
    }

    .table {
        font-size: 13px;
    }

    .table th,
    .table td {
        padding: 10px;
    }

    .detail-row {
        grid-template-columns: 1fr;
    }

    .form-container,
    .detail-container {
        max-width: 100%;
    }

    .page-header h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .actions {
        flex-direction: column;
    }

    .actions .btn {
        width: 100%;
    }

    .table {
        font-size: 12px;
    }

    .btn-sm {
        padding: 4px 8px;
        font-size: 11px;
    }
}
