/* ===== ADMIN CSS ===== */
:root {
    --admin-sidebar-width: 260px;
    --admin-primary:        #1a365d;
    --admin-primary-hover:  #153050;
    --admin-sidebar-bg:     #1a202c;
    --admin-sidebar-text:   rgba(255,255,255,0.8);
    --admin-sidebar-active: rgba(255,255,255,0.12);
    --font-header: 'Poppins', sans-serif;
    --font-body:   'Inter', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
body { font-family: var(--font-body); margin: 0; background: #f4f7fa; color: #333; }

/* ===== SIDEBAR ===== */
.sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--admin-sidebar-width);
    background: var(--admin-sidebar-bg);
    display: flex; flex-direction: column;
    z-index: 1000; overflow-y: auto;
    transition: transform 0.3s ease;
}

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

.sidebar-logo {
    font-family: var(--font-header); font-size: 1.2rem; font-weight: 800;
    color: #fff; text-decoration: none;
}
.sidebar-logo span { color: #90cdf4; }

.sidebar-close { display: none; background: none; border: none; color: rgba(255,255,255,0.6); cursor: pointer; font-size: 1.1rem; }

.sidebar-nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }

.sidebar-link {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; border-radius: 8px;
    color: var(--admin-sidebar-text); font-size: 0.92rem; font-weight: 500;
    text-decoration: none; transition: all 0.15s;
}
.sidebar-link:hover, .sidebar-link.active {
    background: var(--admin-sidebar-active); color: #fff;
}
.sidebar-link.text-danger { color: #fc8181 !important; }
.sidebar-link.text-danger:hover { background: rgba(252,129,129,0.1); }
.sidebar-link i { width: 18px; text-align: center; flex-shrink: 0; }
.sidebar-divider { border-color: rgba(255,255,255,0.1); margin: 8px 0; }

.sidebar-user {
    padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
}
.sidebar-user-name { color: #fff; font-weight: 600; }
.sidebar-user-role { color: rgba(255,255,255,0.5); text-transform: capitalize; }

.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 999;
}

/* ===== LAYOUT ===== */
.admin-body { display: flex; min-height: 100vh; }

.admin-content {
    margin-left: var(--admin-sidebar-width);
    flex: 1; display: flex; flex-direction: column; min-height: 100vh;
}

.admin-header {
    background: #fff; border-bottom: 1px solid #e2e8f0;
    padding: 14px 24px; display: flex; align-items: center; gap: 16px;
    position: sticky; top: 0; z-index: 100; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.admin-header-title { font-family: var(--font-header); font-size: 1.1rem; font-weight: 700; color: #2d3748; flex: 1; margin: 0; }
.admin-header-actions { display: flex; gap: 8px; }
.hamburger-btn { display: none; background: none; border: none; cursor: pointer; font-size: 1.2rem; color: #4a5568; padding: 4px; }

.admin-main { padding: 24px; flex: 1; }

/* ===== STATS GRID ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }

.stat-card {
    background: #fff; border-radius: 12px; padding: 22px;
    display: flex; align-items: center; gap: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06); border: 1px solid #e2e8f0;
}
.stat-icon {
    width: 52px; height: 52px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; color: #fff; flex-shrink: 0;
}
.stat-icon.bg-primary { background: var(--admin-primary); }
.stat-icon.bg-warning { background: #d69e2e; }
.stat-icon.bg-success { background: #38a169; }
.stat-icon.bg-info    { background: #3182ce; }
.stat-value { font-size: 1.8rem; font-weight: 800; font-family: var(--font-header); color: #2d3748; }
.stat-label { font-size: 0.85rem; color: #718096; }

/* ===== BADGES STATUS ===== */
.badge { padding: 4px 10px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; }
.status-nouveau   { background: #ebf8ff; color: #2b6cb0; }
.status-contacte  { background: #fffbeb; color: #b7791f; }
.status-qualifie  { background: #f0fff4; color: #276749; }
.status-converti  { background: #f0fdf4; color: #166534; }
.status-perdu     { background: #fff5f5; color: #c53030; }

/* ===== LOGIN PAGE ===== */
.login-page {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; background: linear-gradient(135deg, #E5EEF2, #B8D4E3);
}
.login-container { width: 100%; max-width: 420px; padding: 20px; }
.login-card {
    background: #fff; border-radius: 16px; padding: 40px;
    box-shadow: 0 8px 32px rgba(74,107,124,0.2);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo h1 { font-family: var(--font-header); font-size: 1.8rem; font-weight: 800; color: var(--admin-primary); }
.login-logo h1 span { color: #7FA9BE; }
.login-logo p { color: #718096; margin-top: 4px; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 0.87rem; font-weight: 600; color: #4a5568; }
.form-group input {
    padding: 11px 14px; border: 1.5px solid #dde6ea; border-radius: 8px;
    font-family: var(--font-body); font-size: 0.95rem;
    transition: border-color 0.2s;
}
.form-group input:focus {
    outline: none; border-color: #7FA9BE;
    box-shadow: 0 0 0 3px rgba(127,169,190,0.15);
}
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 8px; font-family: var(--font-header); font-weight: 600; font-size: 0.95rem; cursor: pointer; border: none; transition: all 0.2s; text-decoration: none; }
.btn-primary { background: var(--admin-primary); color: #fff; }
.btn-primary:hover { background: var(--admin-primary-hover); }
.btn-block { width: 100%; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 0.9rem; }
.alert-error { background: #fff5f5; border: 1px solid #fc8181; color: #c53030; }
.alert-success { background: #f0fff4; border: 1px solid #68d391; color: #276749; }

/* ===== CARDS ===== */
.card { background: #fff; border-radius: 12px; border: 1px solid #e2e8f0; box-shadow: 0 1px 4px rgba(0,0,0,0.06); }
.card-header { padding: 14px 20px; border-bottom: 1px solid #e2e8f0; font-family: var(--font-header); font-weight: 600; font-size: 0.95rem; color: #2d3748; }
.card-body { padding: 20px; }

/* ===== TABLE ===== */
.table th { font-family: var(--font-header); font-size: 0.82rem; font-weight: 700; color: #718096; text-transform: uppercase; letter-spacing: 0.03em; background: #f7fafc; }
.table td { font-size: 0.9rem; vertical-align: middle; }
.table-hover tbody tr:hover { background: #f7fafc; }

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-close { display: block; }
    .sidebar-overlay.show { display: block; }
    .admin-content { margin-left: 0; }
    .hamburger-btn { display: block; }
}
@media (max-width: 576px) {
    .admin-main { padding: 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== MODALE NOTES ===== */
.note-item {
    background: #f8fafc;
    border-color: #e2e8f0 !important;
    transition: box-shadow 0.15s;
}
.note-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.modal-header {
    background: var(--admin-primary);
    color: #fff;
    border-radius: 8px 8px 0 0;
}
.modal-title { color: #fff; font-family: var(--font-header); }
.btn-close { filter: invert(1); }


/* ===== IFS CENTRAL — identité visuelle ===== */
.sidebar-logo span { color: #63b3ed; }
.login-logo h1 { color: var(--admin-primary); }
.login-logo h1 span { color: #63b3ed; }
