/* Style général pour la page clients */
.columns-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#customers-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#customers-column .card-body {
    flex: 1;
    overflow: auto;
}

/* Liste des clients */
.customers-list {
    padding: 1rem;
}

/* Loading */
#customers-loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #6c757d;
}

#customers-loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #007bff;
}

/* Message d'erreur ou pas de clients */
.no-customers, .error-message {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.no-customers i, .error-message i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.error-message i {
    color: #dc3545;
}

/* Style compact des clients inspiré des notes/tâches */
.customers-list-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.customer-row {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 4px solid #ddd;
    overflow: hidden;
    transition: all 0.2s ease;
}

.customer-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.customer-row.status-active {
    border-left-color: #2ecc71;
}

.customer-row.status-inactive {
    border-left-color: #95a5a6;
}

.customer-row-content {
    display: flex;
    align-items: center;
    padding: 12px;
    gap: 15px;
}

.customer-avatar-small {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.avatar-initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    background-color: #3498db;
    font-size: 16px;
}

.avatar-initials[data-color="1"] { background-color: #3498db; }
.avatar-initials[data-color="2"] { background-color: #2ecc71; }
.avatar-initials[data-color="3"] { background-color: #e74c3c; }
.avatar-initials[data-color="4"] { background-color: #f39c12; }
.avatar-initials[data-color="5"] { background-color: #9b59b6; }
.avatar-initials[data-color="6"] { background-color: #1abc9c; }
.avatar-initials[data-color="7"] { background-color: #e67e22; }
.avatar-initials[data-color="8"] { background-color: #34495e; }

.customer-info-compact {
    flex: 1;
    min-width: 0;
}

.customer-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.customer-contact {
    display: flex;
    gap: 10px;
    font-size: 12px;
    color: #666;
}

.customer-email, .customer-phone {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.customer-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: 15px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.status-active {
    background-color: #2ecc71;
}

.status-dot.status-inactive {
    background-color: #95a5a6;
}

.company-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: bold;
    background-color: #3498db;
    color: white;
}

.customer-address {
    font-size: 11px;
    color: #7f8c8d;
    margin-right: 15px;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 4px;
}

.customer-actions-compact {
    display: flex;
    gap: 5px;
}

.btn-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background-color: #f1f3f5;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    cursor: pointer;
}

.btn-icon:hover {
    background-color: #dee2e6;
    transform: translateY(-2px);
}

.btn-icon i {
    font-size: 12px;
}

/* Détails du client */
.customer-details-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.customer-header {
    display: flex;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.customer-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1.5rem;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.customer-info-main {
    flex: 1;
}

.customer-info-main h3 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
}

.customer-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.customer-status.active {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
}

.customer-status.inactive {
    background-color: rgba(149, 165, 166, 0.1);
    color: #95a5a6;
}

.customer-details-section {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.customer-details-section h4 {
    font-size: 1.1rem;
    margin: 0 0 1rem;
    color: #343a40;
}

.detail-row {
    display: flex;
    margin-bottom: 0.75rem;
}

.detail-label {
    flex: 0 0 35%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #6c757d;
}

.detail-value {
    flex: 0 0 65%;
    color: #343a40;
    word-break: break-word;
}

.customer-actions-section {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Animation de suppression */
@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

/* Chargement des détails */
.loading-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.loading-details i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .customer-row-content {
        flex-wrap: wrap;
    }
    
    .customer-info-compact {
        flex: 0 0 calc(100% - 55px);
        margin-bottom: 10px;
    }
    
    .customer-status-indicator {
        order: 3;
        margin-left: 55px;
    }
    
    .customer-address {
        order: 4;
        margin-left: auto;
        max-width: 100%;
    }
    
    .customer-actions-compact {
        order: 5;
        margin-left: auto;
        margin-top: 10px;
    }
    
    .detail-row {
        flex-direction: column;
    }
    
    .detail-label, .detail-value {
        flex: 0 0 100%;
    }
    
    .detail-label {
        margin-bottom: 0.25rem;
    }
}
