/* providers.css - Styles pour la page Providers */

/* Cards de profil Alpaca et LLM - Uniformisation des hauteurs */
#alpaca-profiles-container,
#llm-profiles-container {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

#alpaca-profiles-container > .col-md-6,
#llm-profiles-container > .col-md-6 {
    display: flex;
}

.profile-card {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    border: 1px solid var(--tblr-border-color);
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 220px;
}

.profile-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.profile-card.active {
    border-color: var(--tblr-primary);
    border-width: 2px;
}

.profile-card .card-header {
    padding: 0.75rem 1rem;
    background: transparent;
    flex-shrink: 0;
}

.profile-card .card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Zone d'infos extensible */
.profile-card .profile-info {
    flex-grow: 1;
}

/* Boutons toujours en bas */
.profile-card .btn-group {
    margin-top: auto;
}

/* Espace pour le badge "PROFIL ACTIF" */
.profile-card .profile-active-badge {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-card .profile-status {
    font-size: 0.75rem;
}

/* Provider fields toggle */
.provider-fields {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Status indicators */
.status-configured {
    color: var(--tblr-success);
}

.status-missing {
    color: var(--tblr-warning);
}

/* System secrets table */
#system-secrets-table tr td {
    vertical-align: middle;
}

#system-secrets-table .secret-key {
    font-family: var(--tblr-font-monospace);
    font-size: 0.85rem;
}

/* Toggle password button hover */
.toggle-password:hover {
    background-color: var(--tblr-gray-100);
}

/* Tab badges */
.nav-link .badge {
    font-size: 0.65rem;
    margin-left: 0.5rem;
}

/* Active profile section */
#active-profile-section {
    border-left: 3px solid var(--tblr-primary);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--tblr-muted);
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.5;
    margin-bottom: 1rem;
}

/* Form validation feedback */
.form-control.is-valid {
    border-color: var(--tblr-success);
}

.form-control.is-invalid {
    border-color: var(--tblr-danger);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .btn-group[role="group"] {
        flex-direction: column;
    }
    
    .btn-group .btn {
        border-radius: 0;
    }
    
    .btn-group .btn:first-child {
        border-radius: var(--tblr-border-radius) var(--tblr-border-radius) 0 0;
    }
    
    .btn-group .btn:last-child {
        border-radius: 0 0 var(--tblr-border-radius) var(--tblr-border-radius);
    }
}

/* Loading states */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 0.15rem;
}

/* Card status indicators */
.card .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-dot.configured {
    background-color: var(--tblr-success);
}

.status-dot.missing {
    background-color: var(--tblr-warning);
}
