﻿/* ============================================
   DASHBOARD.CSS - Styles partagés Agence/Agent
   ============================================ */

:root {
    --primary: #667eea;
    --primary-dark: #5a6fd6;
    --secondary: #764ba2;
    --success: #27ae60;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #3498db;
    --dark: #2c3e50;
    --text: #333;
    --text-light: #7f8c8d;
    --bg: #f8f9fa;
    --bg-dark: #1a1a2e;
    --white: #fff;
    --border: #e0e0e0;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 420px;
    padding: 3rem;
}

.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo h1 { font-size: 1.8rem; color: var(--dark); }
.login-logo .domain { color: var(--danger); }
.login-logo p { color: var(--text-light); margin-top: 0.5rem; }

.login-hint {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
}

.navbar-logo span { color: #ffd700; }

.user-badge {
    background: rgba(255,255,255,0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--white);
}

.user-badge.agency { background: rgba(46, 204, 113, 0.3); }
.user-badge.agent { background: rgba(52, 152, 219, 0.3); }

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--white);
}

.user-name { font-weight: 500; }

.btn-logout {
    background: rgba(255,255,255,0.2);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--white);
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
}

.btn-logout:hover { background: rgba(255,255,255,0.3); }

/* ============================================
   LAYOUT
   ============================================ */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 70px);
}

.sidebar {
    width: 260px;
    background: var(--white);
    border-right: 1px solid var(--border);
    padding: 1.5rem 0;
    flex-shrink: 0;
}

.sidebar-menu { list-style: none; }

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--text);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    background: var(--bg);
    color: var(--primary);
}

.sidebar-menu a.active {
    background: linear-gradient(90deg, rgba(102,126,234,0.1) 0%, transparent 100%);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.sidebar-icon { font-size: 1.2rem; width: 24px; text-align: center; }

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 1rem 1.5rem;
}

.sidebar-section-title {
    padding: 0.5rem 1.5rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.badge-new {
    background: var(--danger);
    color: var(--white);
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    margin-left: auto;
}

.main-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* ============================================
   SECTIONS
   ============================================ */
.dashboard-section { display: none; }
.dashboard-section.active { display: block; }

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.75rem;
    color: var(--dark);
}

.header-actions { display: flex; gap: 0.75rem; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102,126,234,0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover { background: var(--bg); }

.btn-success { background: var(--success); color: var(--white); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-warning { background: var(--warning); color: var(--white); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.85rem; }

.btn-login {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102,126,234,0.3);
}

/* ============================================
   CARDS & STATS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-icon.blue { background: rgba(52,152,219,0.15); }
.stat-icon.green { background: rgba(39,174,96,0.15); }
.stat-icon.orange { background: rgba(243,156,18,0.15); }
.stat-icon.purple { background: rgba(155,89,182,0.15); }

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
}

/* ============================================
   TABLES
   ============================================ */
.table-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-title { font-weight: 600; color: var(--dark); }

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text-light);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.data-table tr:hover { background: var(--bg); }

.table-actions { display: flex; gap: 0.5rem; }

.action-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: var(--bg);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover { background: var(--primary); color: var(--white); }

/* ============================================
   FORMS
   ============================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-grid .full { grid-column: 1 / -1; }

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* ============================================
   MODALS
   ============================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active { display: flex; }

.modal-content {
    background: var(--white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

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

.modal-header h2 { font-size: 1.25rem; color: var(--dark); }

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 0.25rem 0.5rem;
}

.modal-close:hover { color: var(--danger); }

.modal-body { padding: 1.5rem; }

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ============================================
   STATUS BADGES
   ============================================ */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge.active { background: rgba(39,174,96,0.15); color: var(--success); }
.status-badge.inactive { background: rgba(231,76,60,0.15); color: var(--danger); }
.status-badge.pending { background: rgba(243,156,18,0.15); color: var(--warning); }

.lead-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.lead-status.new { background: #e3f2fd; color: #1976d2; }
.lead-status.hot { background: #ffebee; color: #c62828; }
.lead-status.warm { background: #fff3e0; color: #ef6c00; }
.lead-status.cold { background: #eceff1; color: #546e7a; }
.lead-status.converted { background: #e8f5e9; color: #2e7d32; }
.lead-status.lost { background: #fafafa; color: #9e9e9e; }

.lead-tags { display: flex; gap: 0.25rem; flex-wrap: wrap; margin-top: 0.25rem; }

.lead-tag {
    background: var(--bg);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--text-light);
}

/* ============================================
   PROPERTY CARDS
   ============================================ */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.property-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.property-image {
    height: 180px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.property-content { padding: 1.25rem; }

.property-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.property-location {
    color: var(--text-light);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.property-features {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.property-feature {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.property-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* ============================================
   AGENT IA SECTION
   ============================================ */
.ia-config-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.ia-config-card h3 {
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--border);
    border-radius: 26px;
    transition: 0.3s;
}

.toggle-slider:before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--white);
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider { background: var(--success); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(24px); }

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.empty-state-icon { font-size: 4rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state-title { font-size: 1.25rem; color: var(--dark); margin-bottom: 0.5rem; }

/* ============================================
   ALERTS
   ============================================ */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.alert-error, .error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #c00;
}

.alert-success {
    background: #efe;
    border: 1px solid #cfc;
    color: #060;
}

.alert-info {
    background: #eef;
    border: 1px solid #ccf;
    color: #006;
}

/* ============================================
   TRANSCRIPT
   ============================================ */
.transcript-container {
    max-height: 400px;
    overflow-y: auto;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.transcript-message {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    max-width: 85%;
}

.transcript-message.agent {
    background: var(--primary);
    color: var(--white);
    margin-left: auto;
}

.transcript-message.user {
    background: var(--white);
    border: 1px solid var(--border);
}

.transcript-message .role {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-bottom: 0.25rem;
}

/* ============================================
   FILTERS
   ============================================ */
.filters-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.85rem;
    color: var(--text-light);
}

.filter-group select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
}

/* ============================================
   PHOTOS MANAGEMENT
   ============================================ */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg);
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-main-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--warning);
    color: #fff;
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

.photo-item-actions {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.photo-item:hover .photo-item-actions {
    opacity: 1;
}

.photo-action-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    background: rgba(255,255,255,0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.photo-action-btn:hover {
    background: var(--warning);
    color: #fff;
}

.photo-action-btn.delete:hover {
    background: var(--danger);
}

.photos-dropzone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 1rem;
}

.photos-dropzone:hover,
.photos-dropzone.dragover {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

.photos-dropzone-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.photos-dropzone-text {
    color: var(--text);
    font-weight: 500;
}

.photos-dropzone-hint {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.photos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.photos-count {
    background: var(--bg);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* =============================================
   LEADS SECTION - ACCORDION VIEW
   Ajouter à dashboard.css
   ============================================= */

/* Stats mini en header */
.leads-stats-mini {
    display: flex;
    gap: 1.5rem;
}
.stat-mini {
    font-size: 0.9rem;
    color: #7f8c8d;
}
.stat-mini strong {
    color: #2c3e50;
    font-size: 1.1rem;
}

/* Filtres */
.leads-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}
.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.filter-group label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #7f8c8d;
    text-transform: uppercase;
}
.filter-group select {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.9rem;
    min-width: 130px;
    background: white;
}

/* Liste des leads */
.leads-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Ligne principale */
.lead-row {
    border-bottom: 1px solid #eee;
}
.lead-row:last-child {
    border-bottom: none;
}
.lead-row-main {
    display: grid;
    grid-template-columns: 2fr 1.2fr 60px 80px 80px 100px 90px 40px;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: background 0.15s;
}
.lead-row-main:hover {
    background: #f8f9fa;
}
.lead-row.expanded .lead-row-main {
    background: #f0f4f8;
    border-bottom: 1px solid #e0e5ea;
}

/* Colonnes */
.lead-col {
    padding: 0 0.5rem;
}
.lead-contact strong {
    display: block;
    font-size: 0.95rem;
    color: #2c3e50;
}
.lead-phone {
    font-size: 0.8rem;
    color: #7f8c8d;
}
.property-ref {
    font-family: monospace;
    font-size: 0.85rem;
    color: #3498db;
    background: #ecf5fc;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* Interest badges */
.interest-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.1rem;
}
.interest-badge.high { background: #ffe5e5; }
.interest-badge.medium { background: #fff3e0; }
.interest-badge.low { background: #e3f2fd; }

/* Duration */
.duration-value {
    font-size: 0.85rem;
    color: #7f8c8d;
}

/* RDV badge */
.rdv-badge {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}
.rdv-badge.yes {
    background: #d4edda;
    color: #155724;
    font-weight: 600;
}
.rdv-badge.no {
    color: #aaa;
}

/* Lead status */
.lead-status {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    text-transform: uppercase;
}
.lead-status.new { background: #e3f2fd; color: #1565c0; }
.lead-status.contacted { background: #fff3e0; color: #e65100; }
.lead-status.qualified { background: #f3e5f5; color: #7b1fa2; }
.lead-status.converted { background: #d4edda; color: #155724; }
.lead-status.lost { background: #f5f5f5; color: #999; }

/* Date */
.lead-date {
    font-size: 0.85rem;
    color: #7f8c8d;
    text-align: right;
}

/* Expand icon */
.expand-icon {
    display: inline-block;
    font-size: 0.8rem;
    color: #aaa;
    transition: transform 0.2s;
}
.lead-row.expanded .expand-icon {
    transform: rotate(90deg);
    color: #3498db;
}

/* Panneau de détails (accordéon) */
.lead-details {
    background: #fafbfc;
    border-top: 1px solid #e8eaed;
    padding: 1.5rem;
    animation: slideDown 0.2s ease-out;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.lead-details-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

.detail-section {
    margin-bottom: 1.25rem;
}
.detail-section:last-child {
    margin-bottom: 0;
}
.detail-section h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}
.summary-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #2c3e50;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 3px solid #3498db;
}
.looking-for-text {
    font-size: 0.9rem;
    color: #2c3e50;
    background: #fff8e1;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border-left: 3px solid #ffc107;
}
.rdv-notes {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
}

/* Sidebar détails */
.lead-details-side {
    background: white;
    padding: 1.25rem;
    border-radius: 10px;
    border: 1px solid #e8eaed;
}
.lead-details-side .form-group {
    margin-bottom: 1rem;
}
.lead-details-side label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #7f8c8d;
    margin-bottom: 0.3rem;
    display: block;
}
.form-control-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.lead-tags-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.lead-tag {
    font-size: 0.75rem;
    background: #e8f4fc;
    color: #2980b9;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
}

.lead-actions-bar {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* Responsive */
@media (max-width: 1200px) {
    .lead-row-main {
        grid-template-columns: 1.5fr 1fr 50px 70px 70px 90px 80px 35px;
    }
}
@media (max-width: 992px) {
    .lead-details-grid {
        grid-template-columns: 1fr;
    }
    .lead-details-side {
        margin-top: 1rem;
    }
}
@media (max-width: 768px) {
    .lead-row-main {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    .lead-interest, .lead-duration, .lead-status-col {
        display: none;
    }
    .leads-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-group select {
        width: 100%;
    }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .sidebar { width: 220px; }
    .form-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .dashboard-layout { flex-direction: column; }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 1rem 0;
    }
    .sidebar-menu { display: flex; overflow-x: auto; padding: 0 1rem; gap: 0.5rem; }
    .sidebar-menu a { padding: 0.75rem 1rem; white-space: nowrap; border-left: none; border-bottom: 2px solid transparent; }
    .sidebar-menu a.active { border-left: none; border-bottom-color: var(--primary); }
    .sidebar-divider, .sidebar-section-title { display: none; }
    .main-content { padding: 1rem; }
    .page-header { flex-direction: column; gap: 1rem; align-items: flex-start; }
    .navbar { padding: 1rem; }
    .properties-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}