/* ================================================================
   CGP-SaaS V2 — Styles Complémentaires
================================================================ */

/* APP LAYOUT */
.app-layout { display: flex; height: 100vh; overflow: hidden; }

/* SIDEBAR */
.sidebar { width: 240px; min-width: 240px; background: var(--bg-surface); border-right: 1px solid var(--border-color); display: flex; flex-direction: column; transition: width 0.3s cubic-bezier(0.4,0,0.2,1), min-width 0.3s; overflow: hidden; flex-shrink: 0; position: sticky; top: 0; height: 100vh; }
.sidebar.collapsed { width: 64px; min-width: 64px; padding: 20px 0 !important; }
.sidebar.collapsed .brand-text,
.sidebar.collapsed nav span,
.sidebar.collapsed .sidebar-nav .nav-item span,
.sidebar.collapsed .user-details,
.sidebar.collapsed #user-logged-out,
.sidebar.collapsed #user-logged-out * { display: none !important; }
.sidebar.collapsed .sidebar-brand > svg { display: none !important; }
.sidebar.collapsed .sidebar-brand { padding: 20px 0 !important; justify-content: center; }
.sidebar.collapsed .sidebar-nav { padding: 12px 0 !important; overflow-x: hidden !important; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 12px 0 !important; }
.sidebar.collapsed .sidebar-footer { padding: 12px 0 !important; overflow: hidden !important; }
.sidebar.collapsed .user-info { justify-content: center; padding: 12px 0 !important; background: none !important; }

.sidebar-brand { padding: 20px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--border-color); min-height: 64px; }
.brand-text h2 { font-size: 16px; font-weight: 800; letter-spacing: -0.5px; color: #fff; }
.brand-text h2 .accent { color: var(--primary); }
.brand-text p { font-size: 10px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 1px; }

.sidebar-nav { flex: 1; padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13px; font-weight: 500; color: var(--text-secondary); background: none; border: none; cursor: pointer; transition: var(--transition-smooth); text-align: left; width: 100%; white-space: nowrap; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: var(--text-primary); }
.nav-item.active { background: var(--primary-glow); color: var(--primary); font-weight: 600; }
.nav-item svg { flex-shrink: 0; }

.sidebar-footer { padding: 12px 8px; border-top: 1px solid var(--border-color); }
.user-info { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,0.04); }
.user-avatar { width: 32px; height: 32px; background: var(--primary-glow); border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--primary); }
.user-details { flex: 1; overflow: hidden; }
.user-details span:first-child { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-badge { display: inline-block; font-size: 9px; font-weight: 700; text-transform: uppercase; padding: 1px 5px; border-radius: 4px; letter-spacing: 0.5px; }
.role-badge.role-admin { background: var(--primary-glow); color: var(--primary); }
.role-badge.role-user  { background: var(--accent-glow);  color: var(--accent); }
.status-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.status-active   { background: var(--success-glow); color: var(--success); }
.status-disabled { background: var(--error-glow);   color: var(--error); }

/* MAIN CONTENT */
.main-content { flex: 1; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; height: 100vh; }
.tab-content { display: none; flex-direction: column; gap: 20px; padding: 24px 28px; flex: 1; }
.tab-content.active { display: flex; }

/* CONTENT HEADER */
.content-header { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 16px; margin-bottom: 4px; }
.header-left { display: flex; align-items: flex-start; gap: 12px; }
.header-right { display: flex; align-items: center; gap: 10px; }
.content-header h1 { font-size: 22px; font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* KPIS */
.kpis-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 1100px) { .kpis-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .kpis-grid { grid-template-columns: 1fr; } }
.kpi-card { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 14px; padding: 18px 20px; transition: var(--transition-smooth); }
.kpi-card:hover { border-color: var(--border-color-glow); }
.kpi-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); margin-bottom: 8px; }
.kpi-value-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.kpi-value { font-size: 22px; font-weight: 800; color: #fff; font-family: var(--font-mono); letter-spacing: -0.5px; }
.kpi-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 8px; font-family: var(--font-mono); white-space: nowrap; }
.kpi-badge.badge-pos { background: var(--success-glow); color: var(--success); }
.kpi-badge.badge-neg { background: var(--error-glow);   color: var(--error); }
.kpi-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* CHART */
.chart-card { padding: 24px; }
.chart-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.chart-card-header h3 { font-size: 15px; font-weight: 700; }
.chart-legend { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--text-secondary); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; }
.chart-container { position: relative; }

/* CONFIG BAR */
.config-bar { padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.config-left  { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.config-right { display: flex; align-items: center; gap: 10px; }
.config-field { display: flex; align-items: center; gap: 8px; }
.config-field label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; white-space: nowrap; }
.label-inline { font-size: 12px; color: var(--text-secondary); cursor: pointer; text-transform: none !important; letter-spacing: 0 !important; }
.form-input-inline { background: rgba(255,255,255,0.05); border: 1px solid var(--border-color); color: var(--text-primary); padding: 5px 10px; border-radius: 8px; font-size: 13px; font-family: var(--font-primary); width: 200px; }
.form-input-inline:focus { outline: none; border-color: var(--primary); }
.form-input-small { background: rgba(255,255,255,0.05); border: 1px solid var(--border-color); color: var(--text-primary); padding: 5px 8px; border-radius: 8px; font-size: 13px; width: 58px; text-align: center; }
.config-unit { font-size: 12px; color: var(--text-muted); }
.save-indicator { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); padding: 3px 8px; border-radius: 6px; background: rgba(255,255,255,0.04); }

/* BUTTONS */
.btn-sm { padding: 7px 14px !important; font-size: 12px !important; border-radius: 8px; display: inline-flex !important; align-items: center; gap: 5px; }
.btn-full { width: 100% !important; justify-content: center; }
.btn-success { background: linear-gradient(135deg, #10b981, #059669); color: #fff; border: none; cursor: pointer; font-weight: 600; transition: var(--transition-smooth); border-radius: 10px; }
.btn-success:hover { opacity: 0.85; transform: translateY(-1px); }
.btn-danger { background: var(--error-glow); color: var(--error); border: 1px solid rgba(239,68,68,0.3); cursor: pointer; font-weight: 600; border-radius: 10px; transition: var(--transition-smooth); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-icon-ghost { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 6px; border-radius: 8px; transition: var(--transition-smooth); display: inline-flex; align-items: center; }
.btn-icon-ghost:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }
.btn-toggle-password { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 0; }

/* BOTTOM GRID */
.bottom-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
@media (max-width: 1200px) { .bottom-grid { grid-template-columns: 1fr; } }
.right-column { display: flex; flex-direction: column; gap: 16px; }

/* ASSETS TABLE */
.assets-card { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.assets-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.assets-header h3 { font-size: 14px; font-weight: 700; }
.filter-group { display: flex; gap: 4px; flex-wrap: wrap; }
.filter-btn { background: none; border: 1px solid var(--border-color); color: var(--text-muted); padding: 4px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; cursor: pointer; transition: var(--transition-smooth); }
.filter-btn:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.2); }
.filter-btn.active { background: var(--primary-glow); color: var(--primary); border-color: transparent; }
.table-wrapper { overflow-x: auto; max-height: 480px; overflow-y: auto; }
.assets-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.assets-table th { padding: 8px 6px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; font-size: 10px; letter-spacing: 0.4px; border-bottom: 1px solid var(--border-color); white-space: nowrap; position: sticky; top: 0; background: var(--bg-surface); z-index: 1; }
.assets-table td { padding: 6px 5px; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
.assets-table tbody tr { cursor: pointer; transition: background-color var(--transition-smooth); }
.assets-table tbody tr:hover td { background: rgba(255, 255, 255, 0.03); }
.assets-table tr:last-child td { border-bottom: none; }
.th-group { text-align: center; }
.th-actuel  { color: #ef4444 !important; background: rgba(239,68,68,0.06) !important; }
.th-nouveau { color: #10b981 !important; background: rgba(16,185,129,0.06) !important; }
.thead-sub th { font-size: 9px; font-weight: 600; background: var(--bg-surface); }
.text-right { text-align: right; }
.sep-right { border-right: 1px solid var(--border-color) !important; }
.tbl-input { background: rgba(255,255,255,0.04); border: 1px solid transparent; color: var(--text-primary); padding: 3px 6px; border-radius: 6px; font-size: 11px; width: 80px; text-align: right; transition: border-color 0.2s; font-family: var(--font-mono); }
.tbl-input:focus { outline: none; border-color: var(--primary); background: rgba(201,168,76,0.05); }
.tbl-name { width: 150px !important; text-align: left !important; font-family: var(--font-primary) !important; font-size: 12px !important; }
.tbl-select { background: rgba(255,255,255,0.04); border: 1px solid transparent; color: var(--text-secondary); padding: 3px 4px; border-radius: 6px; font-size: 10px; cursor: pointer; font-family: var(--font-primary); max-width: 90px; }
.tbl-select:focus { outline: none; border-color: var(--primary); }

.cat-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.btn-edit-row {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 12px;
    padding: 4px 6px;
    border-radius: 6px;
    transition: var(--transition-smooth);
    opacity: 0.2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
}
.btn-edit-row:hover {
    opacity: 1 !important;
    color: var(--primary);
    background: var(--primary-glow);
}

.btn-del-row { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: 6px; transition: var(--transition-smooth); opacity: 0.2; }
.btn-del-row:hover { opacity: 1 !important; color: var(--error); background: var(--error-glow); }

.assets-table tr:hover .btn-edit-row,
.assets-table tr:hover .btn-del-row {
    opacity: 0.7;
}

/* COMPARISON */
.comparison-list { display: flex; flex-direction: column; gap: 10px; }
.comp-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: rgba(255,255,255,0.03); border-radius: 8px; border: 1px solid var(--border-color); }
.comp-label { font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.comp-vals { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.comp-new { font-size: 14px; font-weight: 700; color: var(--primary); font-family: var(--font-mono); }
.comp-old { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); text-decoration: line-through; }
.comp-diff { font-size: 11px; font-weight: 700; font-family: var(--font-mono); }
.comp-diff.pos { color: var(--success); }
.comp-diff.neg { color: var(--error); }

/* CLIENTS */
.clients-layout { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; flex: 1; }
@media (max-width: 900px) { .clients-layout { grid-template-columns: 1fr; } }
.client-list-card { padding: 0 !important; overflow: hidden; }
.search-wrapper { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border-color); color: var(--text-muted); }
.search-input { background: none; border: none; color: var(--text-primary); font-size: 13px; width: 100%; font-family: var(--font-primary); }
.search-input:focus { outline: none; }
.search-input::placeholder { color: var(--text-muted); }
.client-list-items { overflow-y: auto; max-height: 600px; }
.client-item { padding: 12px 16px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.04); transition: var(--transition-smooth); }
.client-item:hover { background: rgba(255,255,255,0.04); }
.client-item.active { background: var(--primary-glow); border-left: 2px solid var(--primary); }
.client-item-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.client-item-sub  { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.client-detail-card { padding: 24px; min-height: 400px; }
.detail-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px; }
.detail-header h2 { font-size: 20px; font-weight: 800; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.detail-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 10px; }
.info-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.info-table td { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,0.04); color: var(--text-secondary); }
.info-table td:first-child { color: var(--text-muted); width: 40%; }
.td-money { font-family: var(--font-mono); font-weight: 600; color: var(--text-primary) !important; }
.td-savings { color: var(--success) !important; }
.divider { border: none; border-top: 1px solid var(--border-color); margin: 20px 0; }
.sims-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.sim-link { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(255,255,255,0.04); border-radius: 8px; border: 1px solid var(--border-color); cursor: pointer; font-size: 13px; color: var(--text-secondary); transition: var(--transition-smooth); }
.sim-link:hover { background: var(--primary-glow); color: var(--primary); border-color: var(--border-color-glow); }
.sim-date { margin-left: auto; font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); }

/* ADMIN */
.admin-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.users-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.users-table th { padding: 8px 12px; text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; color: var(--text-muted); border-bottom: 1px solid var(--border-color); }
.users-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,0.04); vertical-align: middle; }
.users-table td:last-child { display: flex; gap: 6px; }
.users-table tr:hover td { background: rgba(255,255,255,0.02); }

/* MODALS V2 */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 9000; padding: 20px; }
.modal-box { background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 20px; padding: 28px; width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-main); }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border-color); }
.modal-form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 600px) { .modal-form-2col { grid-template-columns: 1fr; } }
.modal-section-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 14px; }
.auth-header { text-align: center; padding: 20px 0 24px; }
.auth-header svg { margin-bottom: 12px; }
.auth-header h2 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.auth-header p { font-size: 13px; color: var(--text-muted); }
.input-password-wrapper { position: relative; }
.budget-summary { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: rgba(255,255,255,0.04); border-radius: 8px; border: 1px solid var(--border-color); font-size: 13px; margin-top: 8px; color: var(--text-secondary); }
.client-selector { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }

/* TOAST */
.toast { position: fixed; top: 20px; right: 20px; padding: 12px 20px; border-radius: 12px; font-size: 13px; font-weight: 600; z-index: 99999; box-shadow: 0 8px 24px rgba(0,0,0,0.5); animation: toastIn 0.3s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
.toast-success { background: var(--success-glow); color: var(--success); border: 1px solid rgba(16,185,129,0.3); }
.toast-error   { background: var(--error-glow);   color: var(--error);   border: 1px solid rgba(239,68,68,0.3); }
.toast-info    { background: var(--accent-glow);  color: var(--accent);  border: 1px solid rgba(99,102,241,0.3); }

/* MISC */
.empty-state { padding: 32px 16px; text-align: center; color: var(--text-muted); font-size: 13px; }
.empty-state-large { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 200px; color: var(--text-muted); text-align: center; font-size: 13px; }
.empty-state-large svg { opacity: 0.3; }
.alert-box { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; font-size: 13px; }
.alert-error { background: var(--error-glow); color: var(--error); border: 1px solid rgba(239,68,68,0.2); }
.loading-td { text-align: center; color: var(--text-muted); font-size: 13px; padding: 24px !important; }
.text-muted { color: var(--text-muted); }

/* CLIENT DETAIL TABS */
.client-detail-tabs { display: flex; gap: 8px; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; }
.detail-tab-btn { background: none; border: none; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--text-secondary); cursor: pointer; border-radius: 6px; transition: var(--transition-smooth); }
.detail-tab-btn:hover { background: rgba(255,255,255,0.04); color: var(--text-primary); }
.detail-tab-btn.active { background: var(--primary-glow); color: var(--primary); }

/* MARKDOWN STYLING FOR AI RECOMMENDATIONS */
.markdown-body { text-align: left; }
.markdown-body h2 { font-size: 16px; font-weight: 700; color: #fff; margin-top: 18px; margin-bottom: 10px; border-bottom: 1px solid var(--border-color); padding-bottom: 6px; }
.markdown-body h3 { font-size: 14px; font-weight: 600; color: var(--primary); margin-top: 14px; margin-bottom: 8px; }
.markdown-body h4 { font-size: 13px; font-weight: 600; color: #fff; margin-top: 10px; margin-bottom: 6px; }
.markdown-body p { margin-bottom: 10px; font-size: 13px; color: var(--text-secondary); }
.markdown-body ul, .markdown-body ol { margin-bottom: 12px; padding-left: 20px; }
.markdown-body li { margin-bottom: 4px; font-size: 13px; color: var(--text-secondary); }
.markdown-body strong { color: #fff; font-weight: 600; }
.markdown-body blockquote { border-left: 3px solid var(--primary); padding-left: 10px; color: var(--text-muted); margin: 10px 0; font-style: italic; }
.markdown-body hr { border: none; border-top: 1px solid var(--border-color); margin: 16px 0; }

/* LIGHT THEME */
body.light-theme {
    --bg-base: #f3f4f6;
    --bg-surface: #ffffff;
    --bg-surface-glass: rgba(255, 255, 255, 0.85);
    --border-color: #e5e7eb;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --shadow-main: 0 10px 30px rgba(0, 0, 0, 0.08);
}
body.light-theme .markdown-body h2,
body.light-theme .markdown-body h4,
body.light-theme .markdown-body strong,
body.light-theme h1,
body.light-theme h2,
body.light-theme h3,
body.light-theme h4,
body.light-theme .chat-header-title,
body.light-theme .brand-text h2 {
    color: #111827 !important;
}
body.light-theme .nav-item:hover,
body.light-theme .user-info {
    background: rgba(0, 0, 0, 0.04);
}
body.light-theme .tbl-input,
body.light-theme .tbl-select,
body.light-theme .form-input,
body.light-theme .form-select {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #1f2937;
}
body.light-theme .tbl-input:focus,
body.light-theme .tbl-select:focus,
body.light-theme .form-input:focus,
body.light-theme .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-glow);
}
body.light-theme .chat-bubble.ai {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #1f2937;
}
body.light-theme .chat-bubble.user {
    background: #c9a84c;
    color: #ffffff;
    border-color: #b5923b;
}
body.light-theme .chat-chip {
    background: rgba(201, 168, 76, 0.12);
    color: #b5923b;
    border-color: rgba(201, 168, 76, 0.3);
}
body.light-theme .chat-chip:hover {
    background: rgba(201, 168, 76, 0.22);
    border-color: #b5923b;
}

/* COLLAPSED SIDEBAR ADAPTATION */
.sidebar.collapsed #btn-collapse-sidebar svg {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}
.sidebar.collapsed .brand-logo {
    display: none !important;
}
.sidebar.collapsed #btn-collapse-sidebar {
    margin: 0 auto !important;
}
.sidebar.collapsed .user-info #btn-logout {
    display: none !important;
}

/* FLOATING AI CHAT WIDGET */
.ai-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    font-family: var(--font-primary);
}
.btn-chat-toggle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37, #c9a84c);
    color: #0f1117;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(201, 168, 76, 0.4), inset 0 2px 4px rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.2s;
}
.btn-chat-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 32px rgba(201, 168, 76, 0.5);
}
.btn-chat-toggle svg {
    stroke: #0f1117;
}
.chat-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--error);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-base);
}
.chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 380px;
    height: 520px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-main);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: chatOpen 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    transform-origin: bottom right;
}
@keyframes chatOpen {
    from { opacity: 0; transform: scale(0.8) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.chat-header {
    background: rgba(255, 255, 255, 0.02);
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}
.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.chat-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 12.5px;
    line-height: 1.5;
    max-width: 85%;
    word-break: break-word;
}
.chat-bubble.ai {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
}
.chat-bubble.user {
    background: var(--primary-glow);
    color: var(--primary);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    border: 1px solid rgba(201, 168, 76, 0.3);
}
.chat-footer {
    padding: 14px;
    border-top: 1px solid var(--border-color);
    background: rgba(0,0,0,0.1);
}
.chat-chip {
    background: rgba(201, 168, 76, 0.08);
    color: var(--primary);
    border: 1px solid rgba(201, 168, 76, 0.2);
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.chat-chip:hover {
    background: rgba(201, 168, 76, 0.18);
    border-color: var(--primary);
}

/* CREDIT CALCULATOR & BUDGET MODALS */
.credits-list {
    max-height: 200px;
    overflow-y: auto;
    padding-right: 4px;
}
.credit-card-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.credit-card-details h5 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    margin-top: 0;
}
.credit-card-details p {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
}
.credit-card-actions {
    display: flex;
    align-items: center;
}
.budget-results-card {
    background: rgba(201, 168, 76, 0.03) !important;
    border-color: rgba(201, 168, 76, 0.15) !important;
}

/* ================================================================
   CGP-SaaS V3.1 — Évolutions Esthétiques et Ergonomie
   ================================================================ */

/* Supprimer les flèches monter/descendre des inputs numériques */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

/* Style personnalisé des sélecteurs <select> */
select.form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c9a84c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px !important;
}

/* KPIs cliquables */
.kpi-card[data-metric] {
    cursor: pointer;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}
.kpi-card[data-metric]:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 4px 20px var(--primary-glow);
}

/* Lignes de tableau d'actifs cliquables */
#assets-tbody tr {
    cursor: pointer;
    transition: background-color var(--transition-smooth);
}
#assets-tbody tr:hover {
    background-color: rgba(201, 168, 76, 0.05) !important;
}

/* ================================================================
   CGP-SaaS V3.2 — Évolutions Esthétiques et Ergonomie
   ================================================================ */

/* Landing Page & Marketing presentation */
.landing-page {
    height: 100vh;
    overflow-y: auto;
    background: #090a0f;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    position: relative;
    overflow-x: hidden;
}
.landing-page.hidden {
    display: none !important;
}
.landing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 6%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.landing-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
}
.gold-text {
    color: var(--primary);
}
.landing-nav-btns {
    display: flex;
    gap: 12px;
}
.landing-hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 6%;
    background: radial-gradient(circle at center, rgba(201, 168, 76, 0.08) 0%, transparent 60%);
}
.hero-content {
    max-width: 800px;
}
.hero-badge {
    background: rgba(201, 168, 76, 0.1);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: inline-block;
    margin-bottom: 24px;
}
.hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -1px;
}
.hero-content p {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
}
.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}
.btn-lg {
    padding: 14px 28px;
    font-size: 15px;
}
.landing-features {
    padding: 80px 6%;
    background: rgba(255, 255, 255, 0.01);
    text-align: center;
}
.landing-features h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 50px;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}
.feature-card {
    background: rgba(15, 17, 23, 0.9) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: left;
    transition: transform var(--transition-smooth);
}
.feature-card:hover {
    transform: translateY(-5px);
}
.feature-icon {
    font-size: 36px;
    margin-bottom: 20px;
}
.feature-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}
.feature-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}
.landing-pricing {
    padding: 80px 6%;
    text-align: center;
}
.landing-pricing h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 50px;
}
.pricing-grid {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}
.pricing-card {
    background: rgba(15, 17, 23, 0.9) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 24px;
    padding: 40px;
    width: 320px;
    text-align: left;
    position: relative;
}
.pricing-card.highlighted {
    border-color: var(--primary) !important;
    background: linear-gradient(180deg, rgba(201, 168, 76, 0.12) 0%, rgba(15, 17, 23, 0.95) 100%) !important;
}
.card-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary);
    color: #000;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 12px;
}
.pricing-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
}
.price {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 24px;
}
.price span {
    font-size: 14px;
    color: var(--text-muted);
}
.pricing-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pricing-card li {
    font-size: 13.5px;
    color: var(--text-secondary);
}
.landing-footer {
    padding: 40px 6%;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    font-size: 13px;
}

/* Custom Select Replacement UI */
.custom-select-container {
    position: relative;
    width: 100%;
}
.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
    user-select: none;
}
.custom-select-trigger:hover {
    border-color: var(--primary);
}
.custom-select-chevron {
    color: var(--primary);
    display: flex;
    align-items: center;
    margin-left: 8px;
    transition: transform var(--transition-smooth);
}
.custom-select-options {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    background: #151821; /* Match dark theme */
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 999;
}
.custom-select-options.hidden {
    display: none;
}
.custom-select-option {
    padding: 10px 14px;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
}
.custom-select-option:hover {
    background: rgba(201, 168, 76, 0.08);
    color: var(--primary);
}
.custom-select-option.selected {
    background: var(--primary-glow);
    color: var(--primary);
    font-weight: 600;
}
/* Style adjustments for table inside modal inputs */
.modal-box .custom-select-container {
    margin-top: 4px;
}

/* Assistant IA en Sidebar droite coulissante */
.ai-sidebar {
    width: 0;
    min-width: 0;
    background: var(--bg-surface);
    transition: width 0.3s cubic-bezier(0.4,0,0.2,1), border-color 0.3s;
    overflow: hidden;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
}
.ai-sidebar:not(.collapsed) {
    width: 380px;
    min-width: 380px;
    border-left: 1px solid var(--border-color);
}
.ai-sidebar-inner {
    width: 380px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Ajustements pour le chat dans la sidebar */
.ai-sidebar .chat-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ai-sidebar .chat-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    color: var(--text-primary);
}
.ai-sidebar .chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.ai-sidebar .chat-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: rgba(0,0,0,0.15);
}
.ai-sidebar .chat-quick-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.ai-sidebar .chat-chip {
    background: rgba(201, 168, 76, 0.08);
    color: var(--primary);
    border: 1px solid rgba(201, 168, 76, 0.2);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.ai-sidebar .chat-chip:hover {
    background: rgba(201, 168, 76, 0.18);
    border-color: var(--primary);
}
.btn-chat-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: #000;
    border: none;
    box-shadow: 0 4px 20px rgba(201, 168, 76, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99;
    transition: transform 0.2s, background-color 0.2s;
}
.btn-chat-toggle:hover {
    transform: scale(1.05);
    background: #d4b255;
}
.ai-sidebar:not(.collapsed) ~ .btn-chat-toggle {
    display: none !important;
}
.chat-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Custom Select Disabled Style */
.custom-select-container.disabled .custom-select-trigger {
    opacity: 0.6;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.01);
    border-color: rgba(255, 255, 255, 0.05);
}
.custom-select-container.disabled .custom-select-trigger:hover {
    border-color: rgba(255, 255, 255, 0.05);
}
.custom-select-container.disabled .custom-select-chevron {
    color: var(--text-muted);
}

/* ================================================================
   CGP-SaaS V3.3 — Nouveaux Styles (Maintenance, 2FA, Stripe & Harmonisation)
================================================================ */

/* BANDEAU D'ALERTE GLOBAL */
.global-alert-banner {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(90deg, #c9a84c, #e5c060);
    color: #0d0f14;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.global-alert-banner .alert-icon {
    animation: alert-pulse 1.5s infinite;
}
@keyframes alert-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* ÉCRAN DE MAINTENANCE */
.maintenance-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #0d0f14;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.maintenance-box {
    background: #161a23;
    border: 1px solid var(--border-color);
    border-radius: 16px !important;
    padding: 40px;
    max-width: 480px;
    text-align: center;
    box-shadow: var(--shadow-main);
}
.maintenance-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
}
.maintenance-logo h2 {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
}
.maintenance-box h1 {
    font-size: 24px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
}
.maintenance-box p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 30px;
}
.maintenance-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* STRIPE SIMULATOR MODAL & ABONNEMENT */
.stripe-modal-box {
    max-width: 440px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 16px !important;
    border: 1px solid #e3e8ee !important;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4) !important;
}
.stripe-header {
    background: #635bff;
    color: #fff;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.stripe-logo-text {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.stripe-body {
    padding: 28px;
    background: #ffffff;
    color: #333333;
}
.stripe-body label {
    color: #4f5b66;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    text-transform: none;
    letter-spacing: normal;
}
.stripe-input {
    background: #f8f9fa;
    border: 1px solid #e3e8ee;
    color: #333;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    width: 100%;
    margin-bottom: 16px;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}
.stripe-input:focus {
    border-color: #635bff;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.15);
}
.btn-stripe-pay {
    background: #635bff;
    color: #fff;
    font-weight: 600;
    padding: 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: background 0.15s ease;
}
.btn-stripe-pay:hover {
    background: #4f46e5;
}
.stripe-secured {
    text-align: center;
    color: #a3acb9;
    font-size: 11px;
    margin-top: 14px;
}

/* TEXTURAGE ET BADGES POUR NOUVELLES CATÉGORIES */
.row-cat-crypto td { background-color: rgba(244, 63, 94, 0.02); }
.row-cat-crowdlending td { background-color: rgba(132, 204, 22, 0.02); }
.row-cat-metaux_precieux td { background-color: rgba(234, 179, 8, 0.02); }
.row-cat-fonds_euro td { background-color: rgba(6, 182, 212, 0.02); }
.row-cat-startups td { background-color: rgba(236, 72, 153, 0.02); }

/* HOMOGÉNÉISATION FINARY DES ARRONDIS GLOBALE */
.glass-card, .kpi-card, .chart-card, .assets-card, .client-list-card, .client-detail-card, .pricing-card {
    border-radius: 16px !important;
}
.modal-box {
    border-radius: 16px !important;
}
.form-input, .form-select, .search-wrapper, .search-input, .tbl-input, .tbl-select, .form-input-inline, .custom-select-trigger, .custom-select-options, .stripe-input, .btn-stripe-pay {
    border-radius: 12px !important;
}
.btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-lg, .btn-sm {
    border-radius: 12px !important;
}
.nav-item, .user-info, .comp-row, .sim-link, .budget-summary, .alert-box, .toast {
    border-radius: 12px !important;
}
.cat-badge, .status-badge, .kpi-badge, .role-badge, .detail-tab-btn, .filter-btn {
    border-radius: 8px !important;
}

/* GRILLE DE PRIX A 3 COLONNES */
.pricing-grid-three {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

/* STRUCTURE DE PORTEFEUILLE ACCORDÉON (STYLE FINARY) */
.finary-portfolio-headers {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}
.hdr-cat {
    flex-grow: 1;
}
.hdr-share {
    width: 90px;
    text-align: right;
    margin-right: 24px;
}
.hdr-values {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 280px;
}
.finary-accordion-list-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 12px;
}
.finary-accordion-list {
    display: flex;
    flex-direction: column;
}
.finary-accordion {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 12px;
    overflow: hidden;
    background: rgba(15, 17, 23, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}
.finary-accordion:hover {
    border-color: rgba(212, 175, 55, 0.25);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}
.finary-accordion-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    user-select: none;
    transition: background-color var(--transition-smooth);
    background: rgba(255, 255, 255, 0.01);
}
.finary-accordion-header:hover {
    background: rgba(255, 255, 255, 0.03);
}
.finary-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: var(--text-muted);
    transition: transform var(--transition-smooth);
}
.finary-accordion.open .finary-chevron {
    transform: rotate(90deg);
}
.finary-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}
.finary-cat-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    flex-grow: 1;
}
.finary-cat-share {
    font-size: 12px;
    color: var(--text-muted);
    font-family: var(--font-mono);
    width: 90px;
    text-align: right;
    margin-right: 24px;
}
.finary-cat-values {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    width: 280px;
}
.finary-cat-values .val-actuel {
    color: var(--text-muted);
    font-family: var(--font-mono);
    flex: 1;
    text-align: right;
}
.finary-cat-values .val-arrow {
    color: var(--primary);
    font-weight: 700;
    width: 20px;
    text-align: center;
}
.finary-cat-values .val-optimise {
    color: var(--primary);
    font-weight: 600;
    font-family: var(--font-mono);
    flex: 1;
    text-align: right;
}

.finary-accordion-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    background: rgba(15, 17, 23, 0.25);
    border-top: 1px solid var(--border-color);
}
.finary-accordion-content.hidden {
    display: none;
}
.finary-asset-row {
    display: flex;
    align-items: center;
    padding: 12px 16px 12px 62px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 0 !important;
    transition: background-color var(--transition-smooth);
    cursor: pointer;
}
.finary-asset-row:last-child {
    border-bottom: none;
}
.finary-asset-row:hover {
    background: rgba(255, 255, 255, 0.03);
}
.finary-asset-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
}
.finary-asset-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}
.finary-asset-yield {
    font-size: 10px;
    color: var(--text-muted);
    font-family: var(--font-mono);
}
.finary-asset-values {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    width: 280px;
    margin-right: 12px;
}
.finary-asset-values .val-actuel {
    color: var(--text-muted);
    font-family: var(--font-mono);
    flex: 1;
    text-align: right;
}
.finary-asset-values .val-arrow {
    color: var(--primary);
    width: 20px;
    text-align: center;
}
.finary-asset-values .val-optimise {
    color: #ffffff;
    font-weight: 600;
    font-family: var(--font-mono);
    flex: 1;
    text-align: right;
}
.finary-asset-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ================================================================
   SCROLL REVEAL ANIMATIONS (3D FLUID EFFECTS)
   ================================================================ */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.97) rotateX(4deg);
    transform-style: preserve-3d;
    perspective: 1000px;
    transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}
.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
}
/* Stagger delays for child elements in cards grid */
.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }

/* ================================================================
   🖥️ SCROLLBAR SOMBRE PREMIUM
   ================================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(10, 11, 15, 0.5);
    border-radius: 8px;
}
::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.25); /* Or translucide */
    border-radius: 8px;
    border: 1px solid rgba(15, 17, 23, 0.8);
    transition: background var(--transition-smooth);
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5); /* Or plus visible au survol */
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.25) rgba(10, 11, 15, 0.5);
}

/* ================================================================
   💡 TUTO OVERLAY & FOCUS HIGHLIGHT
   ================================================================ */
.tuto-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 9, 13, 0.85);
    z-index: 9998;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: opacity 0.3s ease;
    pointer-events: auto;
}
.tuto-highlight {
    z-index: 9999 !important;
    box-shadow: 0 0 0 4px var(--primary), 0 10px 40px rgba(0, 0, 0, 0.6) !important;
    border-radius: 16px !important;
    background: var(--bg-surface) !important;
    transition: all 0.3s ease;
    pointer-events: none; /* Bloque les clics sur l'élément pendant le tuto */
}

