/**
 * NcStatusCheck - Surveillance centralisée et simplifiée d'instances Nextcloud
 * 
 * Feuille de style spécifique à l'interface d'administration.
 * Inclut les styles pour la configuration des versions, la gestion
 * des serveurs, les notifications et les dialogues de confirmation.
 */

/* === SECTIONS D'ADMINISTRATION === */

.admin-section {
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

/* === CONFIGURATION DES VERSIONS === */

/* Grille de configuration des versions */
.version-config {
    display: grid;
    grid-template-columns: 1fr 200px 200px 150px 100px;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid var(--gray-100);
}

.version-config input, 
.version-config select {
    padding: 8px;
    border: 1px solid var(--gray-100);
    border-radius: 4px;
    font-size: 0.875rem;
}

/* En-tête de la grille de configuration */
.config-header {
    display: grid;
    grid-template-columns: 1fr 200px 200px 150px 100px;
    gap: 12px;
    padding: 8px 12px;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.875rem;
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: 16px;
}

/* Bouton d'ajout de version */
.add-version {
    background: none;
    border: 2px dashed var(--gray-100);
    border-radius: 6px;
    padding: 12px;
    color: var(--gray-500);
    cursor: pointer;
    text-align: center;
    font-size: 0.875rem;
}

.add-version:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* === APERÇUS DES STATUTS === */

.status-preview {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
}

.status-dev { 
    background: linear-gradient(135deg, #a855f7, #7c3aed); 
    color: white; 
}

.status-stable { 
    background: #059669; 
    color: white; 
}

.status-oldstable { 
    background: #10b981; 
    color: white; 
}

.status-deprecated { 
    background: #f59e0b; 
    color: white; 
}

.status-eol { 
    background: #ef4444; 
    color: white; 
}

/* === ACTIONS DE FORMULAIRE === */

.form-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
}

/* === GESTION DES SERVEURS === */

.server-add-form {
    margin-bottom: 24px;
}

.input-group {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.input-group input[type="url"] {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--gray-100);
    border-radius: 6px;
    font-size: 0.875rem;
}

.servers-list h3 {
    margin: 16px 0 8px 0;
    font-size: 1rem;
    color: var(--gray-700);
}

.server-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border: 1px solid var(--gray-100);
    border-radius: 6px;
    margin-bottom: 8px;
}

.server-url {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 0.8125rem;
    color: var(--primary-dark);
}

/* === BOUTONS SPÉCIALISÉS === */

.btn-danger {
    background-color: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

/* === RÉSULTATS DE TESTS === */

.test-result {
    padding: 12px;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 0.875rem;
}

.test-result.success {
    background-color: #dcfce7;
    color: #059669;
    border: 1px solid #bbf7d0;
}

.test-result.error {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fca5a5;
}

/* === SYSTÈME DE NOTIFICATIONS === */

#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 350px;
}

.notification {
    background: #10b981;
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.4s ease-out;
    font-size: 0.9rem;
    line-height: 1.4;
    border-left: 4px solid rgba(255, 255, 255, 0.3);
}

.notification.success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.notification.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.notification.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.notification.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.notification.removing {
    animation: slideOut 0.3s ease-in forwards;
}

/* === ANIMATIONS === */

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* === DIALOGUES DE CONFIRMATION === */

.confirm-overlay {
    position: fixed;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-dialog {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.2s ease-out;
}

.confirm-message {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--gray-700);
}

.confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}
