:root {
    /* Couleur PRIMAIRE - Bleu professionnel */
    --primary: #2563eb;          /* Bleu vif - boutons, liens, accents */
    --primary-hover: #1d4ed8;     /* Bleu plus foncé au survol */
    --primary-light: #dbeafe;     /* Bleu très clair - backgrounds */

    /* Couleurs de FOND */
    --bg-app: #f8fafc;           /* Fond principal - slate très clair */
    --bg-surface: #ffffff;        /* Blanc pur - cartes, surfaces */
    --bg-sidebar: #f1f5f9;       /* Fond sidebar - gris très clair */

    /* Couleurs de TEXTE */
    --text-main: #1e293b;        /* Texte principal - slate foncé */
    --text-muted: #64748b;        /* Texte secondaire - gris */

    /* Bordures */
    --border: #e2e8f0;           /* Bordures discrètes */
    --border-hover: #cbd5e1;      /* Bordures au survol */
    
    /* Couleurs sémantiques */
    --success: #10b981;           /* Vert - succès */
    --warning: #f59e0b;          /* Orange - attention */
    --danger: #ef4444;           /* Rouge - erreur */
    
    /* Utilitaires */
    --radius: 6px;               /* Rayon de bordure modernisé */
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-floating: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: var(--bg-app);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
    font-size: 13px; 
}

/* ==========================================
   LAYOUT PRINCIPAL
   ========================================== */
.app-container { display: flex; flex-direction: column; height: 100vh; }

/* GLOBAL HEADER */
.global-header { height: 50px; background: white; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 2px solid var(--primary); z-index: 20; }
.global-header-left { display: flex; align-items: center; gap: 16px; }
.waffle-icon { color: var(--text-muted); font-size: 18px; cursor: pointer; padding: 8px; }
.waffle-icon:hover { color: var(--primary); }
.brand-zone { display: flex; align-items: center; }
.brand-text { font-weight: 700; font-size: 18px; color: var(--primary); letter-spacing: 0.5px; }

.global-header-search { flex: 1; max-width: 500px; margin: 0 24px; }
.search-bar-wrapper { background: #f3f2f2; border: 1px solid transparent; border-radius: 4px; padding: 6px 12px; display: flex; align-items: center; gap: 8px; color: var(--text-muted); cursor: text; transition: all 0.2s; }
.search-bar-wrapper:hover { background: white; border-color: var(--border); }
.search-bar-wrapper span { font-size: 13px; }

.global-header-right { display: flex; align-items: center; gap: 8px; }
.icon-btn { background: transparent; border: none; color: var(--text-muted); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 16px; display: flex; align-items: center; justify-content: center; transition: background 0.2s; }
.icon-btn:hover { background: #f3f2f2; color: var(--primary); }
.user-profile { cursor: pointer; margin-left: 8px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #38bdf8; color: white; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 14px; }

/* APP NAVIGATION */
.app-nav { height: 40px; background: white; border-bottom: 1px solid var(--border); display: flex; padding: 0 16px; gap: 4px; z-index: 10; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.nav-item { background: transparent; border: none; padding: 0 16px; border-bottom: 3px solid transparent; font-size: 13px; font-weight: 500; color: var(--text-muted); cursor: pointer; transition: all 0.2s; font-family: inherit; }
.nav-item:hover { color: var(--primary); background: #fafaf9; }
.nav-item.active { border-bottom-color: var(--primary); color: var(--text-main); font-weight: 700; background: #fafaf9; }

/* MAIN CONTENT */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 16px; gap: 16px; }
.slds-page-header { background: white; padding: 16px; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); }
.page-container { background: transparent; overflow-y: auto; flex: 1; border-radius: var(--radius); }

/* BOUTONS SLDS */
.btn-primary { background: var(--primary); color: white; border: 1px solid var(--primary); padding: 0 16px; height: 32px; border-radius: var(--radius); font-weight: 400; cursor: pointer; font-size: 13px; transition: background 0.2s;}
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: white; border: 1px solid var(--border); color: var(--primary); padding: 0 16px; height: 32px; border-radius: var(--radius); font-weight: 400; cursor: pointer; transition: background 0.2s;}
.btn-secondary:hover { background: #f3f2f2; }
.btn-danger { background: white; border: 1px solid var(--border); color: #c23934; padding: 0 16px; height: 32px; border-radius: var(--radius); cursor: pointer; font-size: 13px;}
.btn-danger:hover { background: #c23934; color: white; border-color: #c23934; }

/* ETAT VIDE */
.placeholder-card { background: white; border: 1px dashed var(--border); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--text-muted); }

/* SPLIT VIEW (Listes & Détails SLDS) */
.split-view { display: flex; gap: 16px; height: 100%; }
.split-left { width: 340px; background: white; border-radius: var(--radius); border: 1px solid var(--border); display: flex; flex-direction: column; box-shadow: var(--shadow); }
.list-header { padding: 12px; border-bottom: 1px solid var(--border); display: flex; gap: 8px; background: #f3f2f2; border-radius: 4px 4px 0 0; }
.search-wrapper { flex: 1; position: relative; }
.search-wrapper i { position: absolute; left: 10px; top: 10px; color: var(--text-muted); font-size: 12px; }
.search-wrapper input { width: 100%; padding: 8px 8px 8px 30px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; outline: none; }
.search-wrapper input:focus { border-color: var(--primary); box-shadow: 0 0 3px var(--primary); }

.list-content { flex: 1; overflow-y: auto; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.1s; background: white; }
.list-item:hover { background: #f3f2f2; }
.list-item.active { background: #f3f2f2; border-left: 3px solid var(--primary); padding-left: 9px; }

.list-item-avatar { width: 32px; height: 32px; border-radius: 4px; background: #7f8de1; color: white; display: flex; align-items: center; justify-content: center; font-size: 14px; }

.list-item-info { flex: 1; }
.list-item-title { font-weight: 500; color: var(--primary); margin-bottom: 4px; font-size: 13px; }
.list-item-subtitle { font-size: 12px; color: var(--text-muted); display: flex; justify-content: space-between; align-items: center;}

/* Panneau de droite */
.split-right { flex: 1; background: white; border-radius: var(--radius); border: 1px solid var(--border); overflow-y: auto; position: relative; box-shadow: var(--shadow); }
.details-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 16px; background: #f3f2f2; border-radius: 4px 4px 0 0; }
.details-avatar-large { width: 48px; height: 48px; border-radius: 4px; background: #7f8de1; color: white; font-size: 24px; display: flex; align-items: center; justify-content: center; }
.details-title-group h2 { font-size: 18px; margin-bottom: 4px; font-weight: 700; color: var(--text-main); }
.details-actions { display: flex; gap: 8px; margin-left: auto; }

.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 20px; }
.info-block label { font-size: 12px; color: var(--text-muted); margin-bottom: 4px; display: block; }
.info-block div { font-size: 13px; color: var(--text-main); padding-bottom: 4px; border-bottom: 1px solid var(--border); min-height: 24px; }
.details-section { padding: 0 20px 20px 20px; }
.details-section h3 { font-size: 14px; margin-bottom: 12px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }

.badge { padding: 2px 8px; border-radius: 12px; font-size: 11px; background: #f3f2f2; color: var(--text-main); border: 1px solid var(--border); }
.badge.prospect { background: #ffb75d; color: black; border: none; }