/* ===================================================
   AXA BANQUE — Thème Corporate Vert v4.0
   Inspiré Desjardins · Professionnel · Accessible
   =================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-color: #F5F7F5;
    --surface-color: #FFFFFF;
    --primary-color: #006B3F;
    --primary-light: #008751;
    --primary-dark: #004D2C;
    --accent-color: #006B3F;
    --accent-light: #E8F5EE;
    --border-color: #D1D9D3;
    --border-light: #E8EDE9;
    --text-color: #1B2E21;
    --text-secondary: #5A6B5E;
    --text-muted: #8A9A8D;
    --success-color: #006B3F;
    --error-color: #C1272D;
    --warning-color: #E68A2E;
    --info-color: #2B6BAE;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 2px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 24px rgba(0,0,0,0.08);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --glass-bg: #FFFFFF;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- HEADER --- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 32px;
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}
.main-header .logo {
    font-size: 1.4em;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}
.main-header .logo span { color: var(--primary-dark); font-weight: 600; }
.main-header .main-nav { display: flex; align-items: center; gap: 20px; }
.main-header .main-nav a {
    color: var(--text-secondary); text-decoration: none; font-size: 0.9em; font-weight: 500;
}
.main-header .main-nav a:hover { color: var(--primary-color); }

/* --- WIDGETS --- */
.widget {
    background: var(--surface-color);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.dashboard-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
    padding: 28px;
    max-width: 1300px;
    margin: 0 auto;
}
.management-container { max-width: 1200px; margin: 28px auto; padding: 0 16px; }

/* --- BOUTONS --- */
.btn-primary, .btn-logout {
    background: var(--primary-color);
    color: #fff !important;
    text-decoration: none;
    display: inline-block;
    border: none;
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    font-family: 'Inter', sans-serif;
    transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--primary-light); transform: translateY(-1px); }
button:disabled { background: #B5C5BA; cursor: not-allowed; color: #fff !important; }
button:disabled:hover { transform: none; }

/* --- FORMULAIRES --- */
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="search"], select, textarea {
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 12px;
    background: var(--surface-color);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    font-size: 0.95em;
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,107,63,0.1);
}
.password-wrapper { position: relative; }
.password-wrapper i { position: absolute; right: 14px; top: 14px; cursor: pointer; color: var(--text-muted); }
.form-container, .login-form { display: flex; flex-direction: column; }
label { font-weight: 600; font-size: 0.85em; color: var(--text-secondary); margin-bottom: 4px; display: block; }

/* --- TABLES --- */
.agents-table, .clients-table { width: 100%; border-collapse: collapse; margin-top: 12px; }
.agents-table th, .clients-table th { 
    background: var(--bg-color); color: var(--text-secondary);
    font-size: 0.78em; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.3px; padding: 10px 14px;
    border-bottom: 2px solid var(--border-color); text-align: left;
}
.agents-table td, .clients-table td { padding: 12px 14px; border-bottom: 1px solid var(--border-light); font-size: 0.9em; }
.agents-table tr:hover td, .clients-table tr:hover td { background: var(--accent-light); }

/* --- MESSAGES & STATUS --- */
.message { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 0.9em; font-weight: 500; }
.message.success { background: #E8F5EE; color: #1B5E3A; border: 1px solid #B8DCC8; }
.message.error { background: #FDEDED; color: #8B1A1A; border: 1px solid #F5C6C6; }
.status-active { color: var(--success-color); font-weight: 600; }
.status-inactive { color: var(--error-color); font-weight: 600; }
.status-pending { color: var(--warning-color); font-weight: 600; }

/* --- STATS --- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { 
    background: var(--surface-color); color: var(--text-color);
    padding: 20px 16px; border-radius: var(--radius-md); text-align: center;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
}
.stat-card .stat-number { font-size: 2.2em; font-weight: 700; letter-spacing: -1px; }
.stat-card .stat-label { font-size: 0.8em; color: var(--text-secondary); font-weight: 500; margin-top: 2px; }

/* --- FILTRES --- */
.filter-bar {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    padding: 12px 16px; background: var(--surface-color); border-radius: var(--radius-md);
    margin-bottom: 16px; border: 1px solid var(--border-light);
}
.filter-bar a, .filter-bar button {
    padding: 6px 14px; border-radius: 20px; text-decoration: none; font-size: 0.85em;
    border: 1px solid var(--border-color); color: var(--text-color);
    background: var(--surface-color); cursor: pointer; font-family: 'Inter', sans-serif;
}
.filter-bar a.active, .filter-bar button:hover { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* --- MISC --- */
h1 { font-size: 1.6em; font-weight: 700; color: var(--text-color); margin-bottom: 6px; }
h2 { font-size: 1.15em; font-weight: 600; color: var(--text-color); margin-bottom: 10px; }
h3 { font-size: 1em; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
p { margin-bottom: 8px; color: var(--text-secondary); }
a { color: var(--primary-color); text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: var(--bg-color); padding: 2px 6px; border-radius: 4px; font-size: 0.9em; color: var(--primary-dark); }
hr { border: none; border-top: 1px solid var(--border-light); margin: 16px 0; }

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .dashboard-container { grid-template-columns: 1fr; padding: 16px; }
    .main-header { flex-direction: column; padding: 12px 16px; gap: 8px; }
    .main-nav { flex-wrap: wrap; justify-content: center; gap: 12px; }
}
@media (max-width: 768px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .widget { padding: 16px; }
}
@media (max-width: 480px) {
    .dashboard-container { padding: 8px; gap: 12px; }
    .stats-grid { grid-template-columns: 1fr; }
    .widget { padding: 12px; border-radius: var(--radius-md); }
}
}