/**
 * Contrats Éditeur - Styles
 * @package BookConnect
 * @since Mars 2026
 */

/* KPI Cards */
.kpi-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 12px;
}
.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
}
.kpi-card.kpi-alert {
    border: 2px solid #dc3545 !important;
    animation: pulse-border 2s infinite;
}
@keyframes pulse-border {
    0%, 100% { border-color: #dc3545; }
    50% { border-color: #ff6b7a; }
}
.kpi-icon {
    line-height: 1;
}
.kpi-value {
    line-height: 1.2;
}

/* Table */
#tableContrats th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
    color: #6c757d;
    white-space: nowrap;
    border-bottom: 2px solid #dee2e6;
}
#tableContrats td {
    font-size: 0.9rem;
    vertical-align: middle;
}

/* Row expiring alert */
.row-expiring {
    background-color: rgba(220, 53, 69, 0.06) !important;
    border-left: 3px solid #dc3545;
}
.row-expiring:hover {
    background-color: rgba(220, 53, 69, 0.1) !important;
}

/* Avatar placeholder */
.avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 0.85rem;
    flex-shrink: 0;
}

/* Badges type contrat custom purple */
.bg-purple {
    background-color: #7c3aed !important;
    color: #fff !important;
}

/* Filter toolbar */
.card-body .form-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.25rem;
}

/* Modal improvements */
#modalContrat .form-label {
    font-weight: 500;
    font-size: 0.875rem;
}
#modalContrat hr {
    margin: 0.5rem 0;
    opacity: 0.15;
}

/* Auteur suggestions dropdown */
#auteur_suggestions .list-group-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-left: 0;
    border-right: 0;
}
#auteur_suggestions .list-group-item:hover {
    background-color: #f0f4ff;
}

/* View modal field layout */
#viewContratBody .col-md-6 {
    margin-bottom: 0.75rem;
}
#viewContratBody strong {
    font-size: 0.8rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}
#viewContratBody .text-muted {
    font-size: 0.95rem;
    color: #212529 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .kpi-value {
        font-size: 1.5rem !important;
    }
    #tableContrats {
        font-size: 0.8rem;
    }
    .btn-group-sm .btn {
        padding: 0.2rem 0.4rem;
    }
}
