/* ============================================
   Le Cockpit v2 — Praticien Bien-etre
   Complete Stylesheet
   ============================================ */

/* ============================================
   SPLASH SCREEN
   ============================================ */
.splash {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(145deg, #0f766e, #0d9488, #14b8a6);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.splash.fade-out {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
}

.splash-content {
    text-align: center;
    color: white;
    animation: splashAppear 0.8s ease-out;
}

@keyframes splashAppear {
    0% { opacity: 0; transform: translateY(20px) scale(0.95); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.splash-icon {
    width: 80px;
    height: 80px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 36px;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    animation: splashPulse 2s ease-in-out infinite;
}

@keyframes splashPulse {
    0%, 100% { box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15); }
    50% { box-shadow: 0 8px 48px rgba(255, 255, 255, 0.2); }
}

.splash-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.splash-sub {
    font-size: 15px;
    font-weight: 400;
    opacity: 0.8;
    letter-spacing: 1px;
}

.splash-loader {
    width: 120px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    margin: 32px auto 0;
    overflow: hidden;
}

.splash-loader-bar {
    height: 100%;
    width: 0%;
    background: white;
    border-radius: 3px;
    animation: splashLoad 1.8s ease-in-out forwards;
}

@keyframes splashLoad {
    0% { width: 0%; }
    30% { width: 40%; }
    60% { width: 70%; }
    90% { width: 95%; }
    100% { width: 100%; }
}

/* ============================================
   RESET & VARIABLES
   ============================================ */
:root {
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-hover: #f1f5f9;
    --bg-active: #f0fdfa;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-200: #99f6e4;
    --teal-400: #2dd4bf;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --coral-500: #f43f5e;
    --blue-500: #3b82f6;
    --amber-500: #f59e0b;
    --green-500: #10b981;
    --red-500: #ef4444;
    --violet-500: #8b5cf6;
    --radius: 14px;
    --radius-sm: 10px;
    --radius-xs: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --shadow: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
    --sidebar-w: 220px;
    --header-h: 60px;
    --transition: 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

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

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: var(--sidebar-w);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 50;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 20px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-brand-icon {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 16px;
    flex-shrink: 0;
}

.sidebar-brand h1 { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.2; }
.sidebar-brand small { font-size: 10px; color: var(--text-muted); display: block; }

.sidebar-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 13px; font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
    border: none; background: none; width: 100%;
    text-align: left;
    margin-bottom: 2px;
    position: relative;
}

.nav-item:hover { background: var(--bg-hover); color: var(--text); }

.nav-item.active {
    background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
    color: white;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.nav-item i { width: 18px; text-align: center; font-size: 14px; }

.nav-badge {
    margin-left: auto;
    background: var(--bg-hover);
    color: var(--text-muted);
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
}

.nav-item.active .nav-badge { background: rgba(255,255,255,0.2); color: white; }

.nav-divider {
    font-size: 9px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 16px 12px 6px;
}

.sidebar-footer {
    padding: 12px 8px;
    border-top: 1px solid var(--border);
}

.sidebar-footer .nav-item { color: var(--text-muted); font-size: 12px; }

/* ============================================
   MAIN
   ============================================ */
.main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
.header {
    height: var(--header-h);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 40;
}

.header-left { display: flex; align-items: center; gap: 12px; }

.menu-btn {
    display: none;
    width: 36px; height: 36px;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-secondary);
    align-items: center; justify-content: center;
    font-size: 14px;
}

.header-title h2 { font-size: 16px; font-weight: 700; }
.header-title p { font-size: 11px; color: var(--text-muted); }

.header-right { display: flex; align-items: center; gap: 8px; }

.header-btn {
    width: 36px; height: 36px;
    border-radius: var(--radius-xs);
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    transition: all var(--transition);
}

.header-btn:hover { border-color: var(--teal-500); color: var(--teal-600); background: var(--teal-50); }

.api-pill {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
    border-radius: 20px;
    color: white; font-size: 11px; font-weight: 600;
    border: none;
}

.api-pill .dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #a3e635;
    animation: pulse 2s infinite;
}

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ============================================
   SECTIONS
   ============================================ */
.section {
    flex: 1;
    display: none;
    flex-direction: column;
}

.section.active { display: flex; }

.section-body { flex: 1; padding: 24px; overflow-y: auto; }

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.card:hover { box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; color: var(--text-muted); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600;
    border: none;
    transition: all var(--transition);
}

.btn-white { background: white; color: var(--teal-700); }
.btn-white:hover { box-shadow: var(--shadow); }
.btn-ghost-white { background: rgba(255,255,255,0.15); color: white; }
.btn-ghost-white:hover { background: rgba(255,255,255,0.25); }
.btn-primary { background: linear-gradient(135deg, var(--teal-600), var(--teal-500)); color: white; }
.btn-primary:hover { box-shadow: 0 4px 12px rgba(13,148,136,0.3); }
.btn-secondary { background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--teal-500); color: var(--teal-600); }
.btn-sm { padding: 7px 12px; font-size: 12px; }
.btn-coral { background: linear-gradient(135deg, var(--coral-500), #fb7185); color: white; }

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard-welcome {
    background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
    border-radius: var(--radius);
    padding: 28px 32px;
    color: white;
    margin-bottom: 20px;
    display: flex; align-items: center; justify-content: space-between;
}

.dashboard-welcome h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.dashboard-welcome p { font-size: 13px; opacity: 0.85; }

.dashboard-welcome-actions { display: flex; gap: 8px; }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}

.kpi-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }

.kpi-icon {
    width: 38px; height: 38px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
}

.kpi-value { font-size: 26px; font-weight: 800; color: var(--text); line-height: 1; }
.kpi-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.dashboard-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Alert items */
.alert-row {
    display: flex; align-items: center; gap: 12px;
    padding: 12px;
    border-radius: var(--radius-xs);
    transition: background var(--transition);
    cursor: pointer;
}

.alert-row:hover { background: var(--bg-hover); }

.alert-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.alert-row-text { flex: 1; }
.alert-row-text strong { font-size: 13px; font-weight: 600; display: block; }
.alert-row-text span { font-size: 11px; color: var(--text-muted); }
.alert-row-action { font-size: 11px; color: var(--teal-600); font-weight: 600; white-space: nowrap; }

/* Task row */
.task-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-xs);
    border-bottom: 1px solid var(--border-light);
}

.task-check {
    width: 20px; height: 20px;
    border-radius: 6px;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: none; color: transparent; font-size: 10px;
}

.task-check:hover { border-color: var(--teal-500); }
.task-check.done { border-color: var(--green-500); background: var(--green-500); color: white; }
.task-row-text { flex: 1; font-size: 13px; }
.task-priority {
    font-size: 9px; font-weight: 700; text-transform: uppercase;
    padding: 2px 8px; border-radius: 10px;
}
.priority-high { background: #fef2f2; color: var(--red-500); }
.priority-medium { background: #fffbeb; color: var(--amber-500); }
.priority-low { background: #f0fdf4; color: var(--green-500); }

/* ============================================
   CLIENTS SECTION
   ============================================ */
.clients-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    flex: 1;
    min-height: 0;
}

.clients-list-panel {
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.clients-list-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.clients-list-header h3 { font-size: 15px; font-weight: 700; margin-bottom: 10px; }

.search-input {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    width: 100%;
}

.search-input:focus-within { border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(20,184,166,0.08); }
.search-input i { color: var(--text-muted); font-size: 12px; }
.search-input input { border: none; background: none; outline: none; width: 100%; font-size: 13px; }

.clients-list-body { flex: 1; overflow-y: auto; }

.client-row {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: all var(--transition);
}

.client-row:hover { background: var(--bg-hover); }
.client-row.active { background: var(--teal-50); border-left: 3px solid var(--teal-500); }

.client-avatar {
    width: 36px; height: 36px;
    border-radius: var(--radius-xs);
    background: linear-gradient(135deg, var(--teal-600), var(--teal-400));
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 12px;
    flex-shrink: 0;
}

.client-row-info { flex: 1; min-width: 0; }
.client-row-name { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-row-meta { font-size: 11px; color: var(--text-muted); }

.clients-list-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
}

/* Client detail */
.client-detail-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.client-detail-header {
    display: flex; align-items: center; gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
}

.client-detail-avatar {
    width: 52px; height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--teal-600), var(--teal-400));
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 18px;
    flex-shrink: 0;
}

.client-detail-name { font-size: 18px; font-weight: 700; }
.client-detail-meta { font-size: 12px; color: var(--text-muted); }
.client-detail-actions { margin-left: auto; display: flex; gap: 8px; }

/* Tabs */
.tabs-bar {
    display: flex; gap: 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    padding: 0 24px;
}

.tab-btn {
    padding: 12px 18px;
    font-size: 13px; font-weight: 600;
    color: var(--text-muted);
    border: none; background: none;
    border-bottom: 2px solid transparent;
    transition: all var(--transition);
    display: flex; align-items: center; gap: 6px;
}

.tab-btn:hover { color: var(--teal-600); }
.tab-btn.active { color: var(--teal-600); border-bottom-color: var(--teal-600); }
.tab-btn i { font-size: 12px; }

.tab-panel { display: none; flex: 1; overflow-y: auto; padding: 20px 24px; }
.tab-panel.active { display: block; }

/* Client fiche fields */
.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.field-item { }
.field-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; color: var(--text-muted); margin-bottom: 3px; }
.field-value { font-size: 13px; color: var(--text); }

.client-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.client-stat-card {
    text-align: center;
    padding: 14px;
    background: var(--bg);
    border-radius: var(--radius-sm);
}

.client-stat-value { font-size: 24px; font-weight: 700; color: var(--teal-600); }
.client-stat-label { font-size: 10px; color: var(--text-muted); }

/* Workflow steps */
.workflow-step {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    transition: all var(--transition);
    cursor: pointer;
}

.workflow-step:hover { border-color: var(--teal-200); }
.workflow-step.active { border-color: var(--teal-500); background: var(--teal-50); }
.workflow-step.completed { border-color: var(--green-500); }
.workflow-step.locked { opacity: 0.5; cursor: default; }

.workflow-step-num {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: var(--text-muted);
    flex-shrink: 0;
}

.workflow-step.active .workflow-step-num { border-color: var(--teal-500); background: var(--teal-100); color: var(--teal-600); }
.workflow-step.completed .workflow-step-num { border-color: var(--green-500); background: #dcfce7; color: var(--green-500); }

.workflow-step-title { font-size: 14px; font-weight: 600; }
.workflow-step-desc { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.workflow-step-actions {
    display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap;
}

.workflow-action-chip {
    padding: 5px 10px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 11px; font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.workflow-action-chip:hover { border-color: var(--teal-500); color: var(--teal-600); background: var(--teal-50); }

.workflow-progress-bar {
    height: 6px;
    background: var(--border-light);
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}

.workflow-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--teal-500), var(--green-500));
    border-radius: 3px;
    transition: width 0.4s ease;
}

/* ============================================
   ASSISTANT (CHAT)
   ============================================ */
.chat-layout {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 20px 24px;
}

.agent-pills {
    display: flex; gap: 6px; flex-wrap: wrap;
    margin-bottom: 16px;
}

.agent-pill {
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    font-size: 12px; font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    display: flex; align-items: center; gap: 6px;
}

.agent-pill:hover { border-color: var(--teal-500); color: var(--teal-600); }
.agent-pill.active { background: var(--teal-600); color: white; border-color: var(--teal-600); }
.agent-pill i { font-size: 11px; }

.agent-pill-more {
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px dashed var(--border);
    background: none;
    font-size: 12px;
    color: var(--text-muted);
    cursor: pointer;
}

.agent-pill-more:hover { border-color: var(--teal-400); color: var(--teal-600); }

/* Suggestions */
.chat-suggestions {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 16px;
}

.suggestion-chip {
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 12px; color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    display: flex; align-items: center; gap: 6px;
}

.suggestion-chip:hover { border-color: var(--teal-500); background: var(--teal-50); }
.suggestion-chip.urgent { border-color: var(--coral-500); background: #fff1f2; }
.suggestion-chip.alert { border-color: var(--amber-500); background: #fffbeb; }

/* Chat container */
.chat-box {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 500px;
}

.chat-with-history {
    flex: 1;
    min-height: 0;
}

.chat-messages { flex: 1; padding: 20px; overflow-y: auto; }

.chat-welcome-state {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

.chat-welcome-state i { font-size: 40px; color: var(--teal-400); opacity: 0.4; margin-bottom: 14px; }
.chat-welcome-state h3 { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.chat-welcome-state p { font-size: 13px; }

.chat-msg { display: flex; gap: 10px; margin-bottom: 14px; }
.chat-msg.user { flex-direction: row-reverse; }

.chat-msg-avatar {
    width: 32px; height: 32px;
    border-radius: var(--radius-xs);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; flex-shrink: 0;
}

.chat-msg:not(.user) .chat-msg-avatar { background: linear-gradient(135deg, var(--teal-600), var(--teal-400)); color: white; }
.chat-msg.user .chat-msg-avatar { background: var(--bg-hover); color: var(--text-muted); }

.chat-msg-bubble {
    max-width: 72%;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px; line-height: 1.6;
}

.chat-msg:not(.user) .chat-msg-bubble { background: var(--bg); color: var(--text); border-bottom-left-radius: 4px; }
.chat-msg.user .chat-msg-bubble { background: linear-gradient(135deg, var(--teal-600), var(--teal-500)); color: white; border-bottom-right-radius: 4px; }

.chat-input-area {
    padding: 14px 16px;
    border-top: 1px solid var(--border);
}

.chat-input-row {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
}

.chat-input-row:focus-within { border-color: var(--teal-500); }

.chat-input-row textarea {
    flex: 1; border: none; background: none; outline: none;
    resize: none; font-size: 14px;
    padding: 4px; max-height: 80px;
}

.chat-input-btn {
    width: 36px; height: 36px;
    border-radius: var(--radius-xs);
    border: none;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
}

.chat-input-btn.voice { background: var(--bg-hover); color: var(--text-muted); }
.chat-input-btn.send { background: linear-gradient(135deg, var(--teal-600), var(--teal-500)); color: white; }

/* ============================================
   DOCUMENTS SECTION
   ============================================ */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.doc-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.doc-card:hover { border-color: var(--teal-500); box-shadow: var(--shadow); transform: translateY(-2px); }

.doc-card-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: white;
}

.doc-card-name { font-size: 13px; font-weight: 600; }
.doc-card-desc { font-size: 11px; color: var(--text-muted); margin-top: 3px; }

.docs-section-title {
    font-size: 14px; font-weight: 700; color: var(--text);
    margin: 24px 0 8px;
    display: flex; align-items: center; gap: 8px;
}

.docs-section-title:first-child { margin-top: 0; }

/* ============================================
   KANBAN (ACTIONS)
   ============================================ */
.kanban-filter {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 16px;
}

.filter-chip {
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    font-size: 12px; color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.filter-chip.active { background: var(--teal-600); color: white; border-color: var(--teal-600); }
.filter-chip:hover:not(.active) { border-color: var(--teal-400); }

.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    flex: 1;
}

.kanban-col {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.kanban-col-header {
    padding: 12px 16px;
    font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: space-between;
}

.kanban-col-header.todo { background: #fef3c7; color: #d97706; }
.kanban-col-header.doing { background: #dbeafe; color: #2563eb; }
.kanban-col-header.done { background: #dcfce7; color: #16a34a; }

.kanban-col-body { flex: 1; padding: 10px; overflow-y: auto; min-height: 200px; }

.kanban-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 8px;
    cursor: grab;
    transition: all var(--transition);
}

.kanban-card:hover { box-shadow: var(--shadow); }

.kanban-card-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.kanban-card-meta { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
.kanban-card-client {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 10px;
    background: var(--teal-50); color: var(--teal-600);
    font-size: 10px; font-weight: 600;
}

/* ============================================
   SETTINGS SECTION
   ============================================ */
.settings-layout {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 16px;
}

.settings-card-title {
    font-size: 15px; font-weight: 700; margin-bottom: 4px;
    display: flex; align-items: center; gap: 10px;
}

.settings-card-desc { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }

.form-group { margin-bottom: 14px; }
.form-label { display: block; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.form-input {
    width: 100%; padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px; background: var(--bg);
    color: var(--text);
}
.form-input:focus { outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(20,184,166,0.08); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ============================================
   CALENDLY: Agenda Widget
   ============================================ */
.agenda-widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.agenda-item {
    display: flex; align-items: center; gap: 14px;
    padding: 12px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
}

.agenda-item:last-child { border-bottom: none; }
.agenda-item:hover { background: var(--teal-50); }

.agenda-time {
    text-align: center;
    min-width: 52px;
    flex-shrink: 0;
}

.agenda-time-hour { font-size: 16px; font-weight: 800; color: var(--teal-600); }
.agenda-time-min { font-size: 10px; color: var(--text-muted); }

.agenda-divider {
    width: 3px;
    height: 40px;
    border-radius: 2px;
    flex-shrink: 0;
}

.agenda-info { flex: 1; min-width: 0; }
.agenda-name { font-size: 13px; font-weight: 600; color: var(--text); }
.agenda-type { font-size: 11px; color: var(--text-muted); }

.agenda-status {
    font-size: 10px; font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.agenda-status.confirmed { background: #dcfce7; color: var(--green-500); }
.agenda-status.pending { background: #fef3c7; color: #d97706; }
.agenda-status.new-client { background: rgba(139,92,246,0.1); color: var(--violet-500); }

.agenda-empty {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 13px;
}

.agenda-empty i { font-size: 24px; display: block; margin-bottom: 8px; opacity: 0.4; }

/* Calendly badge sidebar */
.sidebar-agenda {
    padding: 12px 8px;
    border-top: 1px solid var(--border);
}

.sidebar-agenda-title {
    font-size: 9px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 0 12px 8px;
}

.sidebar-rdv {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 12px;
    border-radius: var(--radius-xs);
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 2px;
    transition: background var(--transition);
    cursor: pointer;
}

.sidebar-rdv:hover { background: var(--bg-hover); }

.sidebar-rdv-time {
    font-weight: 700;
    color: var(--teal-600);
    min-width: 40px;
}

.sidebar-rdv-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-rdv-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Calendly connected badge */
.calendly-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 10px; font-weight: 600;
    background: rgba(0, 107, 255, 0.08);
    color: #006bff;
    border: 1px solid rgba(0, 107, 255, 0.15);
}

.calendly-badge .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #006bff;
    animation: pulse 2s infinite;
}

/* Seance from Calendly marker */
.seance-source {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 9px; font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: 8px;
}

.seance-source.calendly { background: rgba(0,107,255,0.08); color: #006bff; }
.seance-source.manual { background: var(--bg-hover); color: var(--text-muted); }

/* Dashboard 3 cols for agenda */
.dashboard-trio {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 1100px) {
    .dashboard-trio { grid-template-columns: 1fr; }
}

/* ============================================
   ONBOARDING OVERLAY
   ============================================ */
.onboarding {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.5);
    backdrop-filter: blur(6px);
    z-index: 200;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
}

.onboarding.hidden { display: none; }

.onboarding-card {
    background: white;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.onboarding-header {
    background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
    padding: 32px 28px;
    text-align: center;
    color: white;
}

.onboarding-header i { font-size: 36px; margin-bottom: 12px; opacity: 0.9; }
.onboarding-header h2 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.onboarding-header p { font-size: 13px; opacity: 0.85; }

.onboarding-body { padding: 28px; }

.onboarding-steps { display: flex; justify-content: center; gap: 8px; margin-bottom: 24px; }

.onboarding-step-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--border);
    transition: all var(--transition);
}

.onboarding-step-dot.active { background: var(--teal-500); width: 28px; border-radius: 5px; }

.onboarding-footer { padding: 0 28px 28px; display: flex; justify-content: space-between; }

/* ============================================
   NOTIFICATION
   ============================================ */
.notif {
    position: fixed; top: 16px; right: 16px;
    padding: 12px 18px;
    border-radius: var(--radius);
    background: white;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 300;
    display: flex; align-items: center; gap: 10px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    font-size: 13px; font-weight: 500;
}

.notif.show { transform: translateX(0); }
.notif.success { border-left: 4px solid var(--green-500); }
.notif.info { border-left: 4px solid var(--blue-500); }
.notif.warning { border-left: 4px solid var(--amber-500); }

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 40px; text-align: center;
    color: var(--text-muted);
}

.empty-state i { font-size: 40px; margin-bottom: 12px; opacity: 0.3; }
.empty-state h4 { font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.empty-state p { font-size: 12px; }

/* ============================================
   MODAL SYSTEM (Generic Reusable)
   ============================================ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.5);
    backdrop-filter: blur(6px);
    z-index: 100;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal-box {
    background: white;
    border-radius: 18px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    transform: scale(0.95);
    transition: transform 0.2s;
}

.modal-overlay.open .modal-box { transform: scale(1); }

.modal-box.sm { max-width: 420px; }
.modal-box.md { max-width: 560px; }
.modal-box.lg { max-width: 750px; }
.modal-box.xl { max-width: 1100px; }

.modal-head {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}

.modal-head h2 {
    font-size: 16px; font-weight: 700;
    display: flex; align-items: center; gap: 10px;
}

.modal-close {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

.modal-body {
    padding: 22px;
    overflow-y: auto;
    max-height: calc(90vh - 130px);
}

.modal-foot {
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; gap: 10px;
}

/* ============================================
   TAGS / BADGES (Clients)
   ============================================ */
.tag {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px; font-weight: 600;
}

.tag-vip { background: #fef3c7; color: #d97706; }
.tag-new { background: rgba(139,92,246,0.1); color: var(--violet-500); }
.tag-pause { background: var(--bg-hover); color: var(--text-muted); }
.tag-active { background: #dcfce7; color: var(--green-500); }

/* ============================================
   SESSION TIMER
   ============================================ */
.session-timer-display {
    font-size: 56px; font-weight: 800;
    font-family: 'Plus Jakarta Sans', monospace;
    color: var(--text);
    text-align: center;
    margin: 20px 0;
    letter-spacing: 2px;
}

.session-timer-display.running { color: var(--teal-600); }

.session-timer-display.paused {
    color: var(--amber-500);
    animation: timer-blink 1s infinite;
}

@keyframes timer-blink { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.session-controls {
    display: flex; gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

/* ============================================
   CHAT HISTORY SIDEBAR
   ============================================ */
.chat-with-history {
    display: flex; flex: 1;
    gap: 0; min-height: 0;
}

.chat-history-panel {
    width: 240px;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius) 0 0 var(--radius);
}

.chat-history-list { flex: 1; overflow-y: auto; }

.chat-history-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: all 0.15s;
}

.chat-history-item:hover { background: var(--bg-hover); }

.chat-history-item.active {
    background: var(--teal-50);
    border-left: 3px solid var(--teal-500);
}

.chat-history-title {
    font-size: 12px; font-weight: 600;
    color: var(--text);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.chat-history-meta {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.chat-main-panel {
    flex: 1;
    display: flex; flex-direction: column;
    overflow: hidden;
    border-radius: 0 var(--radius) var(--radius) 0;
}

@media (max-width: 768px) {
    .chat-history-panel { display: none; }
    .chat-main-panel { border-radius: var(--radius); }
}

/* ============================================
   AGENTS EXPANDED PANEL
   ============================================ */
.agents-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    display: none;
}

.agents-panel.open { display: block; }

.agents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 8px;
}

.agents-grid-card {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
}

.agents-grid-card:hover { border-color: var(--teal-500); background: var(--teal-50); }

.agents-grid-card.selected {
    border-color: var(--teal-500);
    background: var(--teal-50);
    box-shadow: 0 0 0 3px rgba(20,184,166,0.08);
}

.agents-grid-card-name {
    font-size: 12px; font-weight: 600;
    display: flex; align-items: center; gap: 6px;
}

.agents-grid-card-desc {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.agents-category-tabs {
    display: flex; gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.agents-cat-tab {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: none;
    font-size: 11px; font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
}

.agents-cat-tab.active {
    background: var(--teal-600);
    color: white;
    border-color: var(--teal-600);
}

/* ============================================
   FORM BUILDER / ATELIER (Documents)
   ============================================ */
.atelier-layout {
    display: grid;
    grid-template-columns: 200px 1fr 260px;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 500px;
    background: white;
}

.atelier-palette {
    background: var(--bg);
    border-right: 1px solid var(--border);
    padding: 14px;
    overflow-y: auto;
}

.atelier-canvas {
    padding: 20px;
    overflow-y: auto;
    background: linear-gradient(180deg, #fff, var(--bg));
}

.atelier-properties {
    background: var(--bg);
    border-left: 1px solid var(--border);
    padding: 14px;
    overflow-y: auto;
}

.atelier-field {
    position: relative;
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    cursor: pointer;
    transition: all 0.15s;
}

.atelier-field:hover { border-color: var(--teal-200); }

.atelier-field.selected {
    border-color: var(--teal-500);
    box-shadow: 0 4px 12px rgba(20,184,166,0.15);
}

.atelier-field-actions {
    position: absolute;
    top: -8px; right: -8px;
    display: flex; gap: 3px;
}

.atelier-field-btn {
    width: 22px; height: 22px;
    border-radius: 6px;
    background: white;
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 9px;
    color: var(--text-muted);
}

.atelier-field-btn:hover { border-color: var(--teal-500); color: var(--teal-600); }
.atelier-field-btn.delete:hover { border-color: var(--red-500); color: var(--red-500); }

.palette-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    font-size: 11px;
    color: var(--text-secondary);
    transition: all 0.15s;
    margin-bottom: 3px;
    border: none; background: none;
    width: 100%; text-align: left;
}

.palette-item:hover { background: white; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

.palette-icon {
    width: 28px; height: 28px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 11px;
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .atelier-layout { grid-template-columns: 1fr; }
    .atelier-palette, .atelier-properties { display: none; }
}

/* ============================================
   CONFIRM DIALOG
   ============================================ */
.confirm-overlay {
    position: fixed; inset: 0;
    background: rgba(15,23,42,0.4);
    backdrop-filter: blur(4px);
    z-index: 150;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}

.confirm-overlay.open { opacity: 1; pointer-events: all; }

.confirm-box {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.confirm-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    margin: 0 auto 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}

.confirm-title { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.confirm-text { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }

.confirm-actions {
    display: flex; gap: 10px;
    justify-content: center;
}

/* ============================================
   SEARCH DROPDOWN
   ============================================ */
.search-dropdown {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: var(--shadow-lg);
    max-height: 300px;
    overflow-y: auto;
    z-index: 50;
    display: none;
}

.search-dropdown.open { display: block; }

.search-result {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}

.search-result:hover { background: var(--bg-hover); }

.search-result-type {
    font-size: 9px; font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg);
    color: var(--text-muted);
}

/* ============================================
   SPARKLINE CHART PLACEHOLDER
   ============================================ */
.sparkline {
    height: 40px;
    display: flex; align-items: flex-end;
    gap: 2px;
}

.sparkline-bar {
    flex: 1;
    background: var(--teal-200);
    border-radius: 2px 2px 0 0;
    transition: height 0.3s;
    min-width: 4px;
}

.sparkline-bar:last-child { background: var(--teal-500); }

/* ============================================
   TRANSITIONS & ANIMATIONS
   ============================================ */
.fade-in { animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-right { animation: slideRight 0.3s ease; }

@keyframes slideRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
    .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 49;
}

.sidebar-overlay.open { display: block; }

.sidebar-close {
    display: none;
    position: absolute;
    top: 12px; left: calc(var(--sidebar-w) + 10px);
    width: 36px; height: 36px;
    border-radius: 50%;
    background: white;
    border: none;
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    align-items: center;
    justify-content: center;
    z-index: 51;
}

@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); z-index: 50; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-close { display: flex; }
    .main { margin-left: 0; }
    .menu-btn { display: flex; }
    .dashboard-trio { grid-template-columns: 1fr; }
    .dashboard-cols { grid-template-columns: 1fr; }
    .dashboard-welcome { flex-direction: column; gap: 12px; text-align: center; padding: 20px; }
    .dashboard-welcome h2 { font-size: 18px; }
    .dashboard-welcome-actions { justify-content: center; }
    .kanban-board { grid-template-columns: 1fr; }
    /* Clients: show list as overlay on mobile */
    .clients-layout { grid-template-columns: 1fr; }
    .clients-list-panel { display: none; }
    .client-detail-panel { min-height: 100%; }
    .client-detail-header { flex-wrap: wrap; gap: 10px; }
    .client-detail-actions { margin-left: 0; width: 100%; justify-content: flex-start; }
    /* Chat */
    .chat-layout { padding: 12px; }
    .chat-history-panel { display: none; }
    .chat-main-panel { border-radius: var(--radius); }
    .chat-with-history { border-radius: var(--radius); }
    /* Tabs */
    .tabs-bar { overflow-x: auto; padding: 0 12px; }
    .tab-btn { white-space: nowrap; padding: 10px 12px; font-size: 12px; }
    /* Settings */
    .settings-layout { padding: 0; }
    .form-row { grid-template-columns: 1fr; }
    /* Header */
    .header { gap: 8px; }
    .header .search-input { display: none; }
    .header-title h2 { font-size: 14px; }
    .api-pill span:last-child { display: none; }
    .api-pill { padding: 6px 8px; }
    /* Modals */
    .modal-box { width: 95%; border-radius: 14px; }
    .modal-box.lg, .modal-box.xl { max-width: 95%; }
    .modal-head { padding: 14px 16px; }
    .modal-body { padding: 16px; }
    /* Agents panel */
    .agents-panel { padding: 12px; }
    .agents-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .field-grid { grid-template-columns: 1fr; }
    .client-stats-row { grid-template-columns: repeat(2, 1fr); }
    .agent-pills { gap: 3px; }
    .agent-pill { padding: 5px 8px; font-size: 10px; }
    .agent-pill i { display: none; }
    .agent-pill-more { font-size: 10px; padding: 5px 8px; }
    .section-body { padding: 12px; }
    .header { padding: 0 12px; }
    .kpi-card { padding: 12px; }
    .kpi-value { font-size: 20px; }
    .card { padding: 14px; }
    .btn { padding: 8px 12px; font-size: 12px; }
    .btn-sm { padding: 6px 10px; font-size: 11px; }
    .suggestion-chip { font-size: 11px; padding: 6px 10px; }
    .chat-suggestions { gap: 4px; }
    .sidebar-agenda { display: none; }
    .agenda-item { padding: 8px; gap: 10px; }
    .agenda-time-hour { font-size: 14px; }
    .docs-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .doc-card { padding: 14px; }
    .doc-card-icon { width: 40px; height: 40px; font-size: 16px; }
    .confirm-box { padding: 20px; }
    .splash-title { font-size: 26px; }
    .splash-sub { font-size: 13px; }
}

/* ============================================
   FICHE CONTENT (inside modal)
   ============================================ */
.fiche-content { font-size: 14px; line-height: 1.7; color: var(--text); }
.fiche-content h2 { font-size: 18px; font-weight: 700; color: var(--teal-600); border-bottom: 2px solid var(--teal-200); padding-bottom: 8px; margin-bottom: 16px; }
.fiche-content h3 { font-size: 14px; font-weight: 700; color: var(--teal-700); margin: 18px 0 8px; }
.fiche-content p { margin: 6px 0; }
.fiche-content em { color: var(--text-muted); }
.fiche-content strong { color: var(--text); }
.fiche-content table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.fiche-content td, .fiche-content th { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.fiche-content th { background: var(--teal-50); color: var(--teal-600); font-weight: 600; }
.fiche-content td:first-child { font-weight: 500; background: var(--bg); min-width: 140px; }

@media print {
    .sidebar, .header, .modal-head, .modal-foot { display: none !important; }
    .modal-overlay { position: static; background: none; }
    .modal-box { max-width: 100%; box-shadow: none; }
    body { background: white; }
}
