/* Bengal Lead Admin Styles */

/* Statistiques */
.bengal-stats {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.stat-box {
    background: white;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    min-width: 120px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.stat-box h3 {
    font-size: 2em;
    margin: 0 0 5px 0;
    color: #1d2327;
}

.stat-box p {
    margin: 0;
    color: #646970;
    font-size: 0.9em;
}

.stat-box.nouveau h3 { color: #007cba; }
.stat-box.contacte h3 { color: #00a32a; }
.stat-box.vendu h3 { color: #d63638; }

/* Filtres */
.bengal-filters {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.bengal-filters select {
    max-width: 200px;
}

/* Score badges */
.score-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: bold;
    color: white;
    text-align: center;
    min-width: 50px;
}

.score-high { background: #00a32a; }
.score-medium { background: #dba617; }
.score-low { background: #d63638; }

/* Statuts des leads */
.lead-row.lead-nouveau {
    background-color: #f0f8ff !important;
    border-left: 4px solid #007cba;
}

.lead-row.lead-contacte {
    background-color: #f0fff0 !important;
    border-left: 4px solid #00a32a;
}

.lead-row.lead-vendu {
    background-color: #fff0f0 !important;
    border-left: 4px solid #d63638;
}

.lead-row.lead-non_interesse {
    background-color: #f8f8f8 !important;
    opacity: 0.7;
}

/* Sélecteur de statut */
.status-select {
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
    color: white;
    cursor: pointer;
}

.status-nouveau { background: #007cba; }
.status-contacte { background: #00a32a; }
.status-interesse { background: #dba617; }
.status-visite { background: #8e44ad; }
.status-vendu { background: #d63638; }
.status-non_interesse { background: #6c757d; }

/* Mobilité */
.mobility-national {
    color: #00a32a;
    font-weight: bold;
}

.mobility-local {
    color: #dba617;
    font-weight: bold;
}

/* Détails des leads */
.lead-details {
    background-color: #f9f9f9 !important;
}

.details-content {
    padding: 20px !important;
}

.lead-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.detail-section {
    background: white;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.detail-section.full-width {
    grid-column: 1 / -1;
}

.detail-section h4 {
    margin: 0 0 10px 0;
    color: #1d2327;
    font-size: 1.1em;
    border-bottom: 2px solid #007cba;
    padding-bottom: 5px;
}

.detail-section p {
    margin: 5px 0;
    color: #646970;
}

.detail-section strong {
    color: #1d2327;
}

/* Boutons d'action */
.view-details {
    background: #007cba !important;
    color: white !important;
    border-color: #007cba !important;
}

.view-details:hover {
    background: #005a87 !important;
    border-color: #005a87 !important;
}

/* Modal (si utilisé) */
.bengal-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    max-height: 80%;
    overflow-y: auto;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
}

.close:hover {
    color: black;
}

/* Timeline styling */
.lead-row td:nth-child(6) {
    white-space: nowrap;
}

/* Responsive */
@media screen and (max-width: 1200px) {
    .bengal-stats {
        justify-content: center;
    }
    
    .stat-box {
        flex: 1;
        min-width: 100px;
    }
}

@media screen and (max-width: 768px) {
    .bengal-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bengal-filters select,
    .bengal-filters .button {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .lead-details-grid {
        grid-template-columns: 1fr;
    }
    
    .bengal-stats {
        flex-direction: column;
    }
}

/* Améliorations UX */
.wp-list-table .lead-row:hover {
    background-color: #f5f5f5 !important;
}

.wp-list-table th a {
    text-decoration: none;
    color: #1d2327;
}

.wp-list-table th a:hover {
    color: #007cba;
}

/* Animation pour les détails */
.lead-details {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Export button styling */
.page-title-action {
    background: #00a32a !important;
    border-color: #00a32a !important;
    color: white !important;
}

.page-title-action:hover {
    background: #008a20 !important;
    border-color: #008a20 !important;
}

/* Amélioration de la lisibilité des emails/téléphones */
.lead-row a[href^="mailto:"],
.lead-row a[href^="tel:"] {
    color: #007cba;
    text-decoration: none;
}

.lead-row a[href^="mailto:"]:hover,
.lead-row a[href^="tel:"]:hover {
    text-decoration: underline;
}

/* Indicateur de nouveau lead */
.lead-row.lead-nouveau::before {
    content: "🆕";
    position: absolute;
    left: -20px;
    font-size: 12px;
}

/* Highlight des leads à fort score */
.lead-row:has(.score-high) {
    box-shadow: 0 0 0 2px #00a32a22;
}

/* Amélioration du contraste */
.lead-row.lead-non_interesse {
    color: #646970;
}

.lead-row.lead-non_interesse strong {
    color: #646970;
}