/**
 * Nexus-One - Frontend Styles
 */

/* Header utilisateur */
.nexus-one-header {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nexus-one-user-info strong {
    font-size: 16px;
    color: #333;
}

#nexus-one-session-timer {
    transition: color 0.3s ease;
    font-weight: 500;
}

#nexus-one-session-timer:before {
    content: "🔒 ";
}

/* Bouton de déconnexion */
.nexus-one-actions a.button {
    transition: all 0.2s ease;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.nexus-one-actions a.button:hover {
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
    transform: translateY(-1px);
}

.nexus-one-actions a.button:active {
    transform: translateY(0);
}

/* Zone d'upload */
.nexus-one-upload {
    margin-top: 20px;
}

.nexus-one-upload h3 {
    margin-bottom: 16px;
    font-size: 20px;
    color: #333;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 8px;
}

#nexus-one-upload-form {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

#nexus-one-upload-form:hover {
    border-color: #0073aa;
}

#nexus-one-upload-form input[type="file"] {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

#nexus-one-upload-form button {
    white-space: nowrap;
}

/* Table des fichiers */
.nexus-one-upload table {
    margin-top: 16px;
}

.nexus-one-upload table th {
    background: #f1f1f1;
    font-weight: 600;
}

.nexus-one-upload table td {
    vertical-align: middle;
}

.nexus-one-upload table a {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nexus-one-upload table a:hover {
    color: #005177;
    text-decoration: underline;
}

/* Bouton supprimer */
.nexus-one-user-delete {
    background: #db5b16 !important;
    color: #fff !important;
    border-color: #db5b16 !important;
    transition: all 0.2s ease;
}

.nexus-one-user-delete:hover {
    background: #c82333 !important;
    border-color: #bd2130 !important;
    transform: scale(1.05);
}

.nexus-one-user-delete:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Animation fade out pour les lignes supprimées */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nexus-one-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    #nexus-one-upload-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    #nexus-one-upload-form button {
        width: 100%;
        margin-left: 0 !important;
    }
}

/* Message d'alerte session */
.nexus-one-session-warning {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 9999;
    animation: slideInRight 0.3s ease-out;
}

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

/* Formulaire de connexion */
.nexus-one-login-wrap form {
    margin: 0;
}

.nexus-one-login-wrap label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.nexus-one-login-wrap input[type="text"],
.nexus-one-login-wrap input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.nexus-one-login-wrap input[type="text"]:focus,
.nexus-one-login-wrap input[type="password"]:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.nexus-one-login-wrap input[type="submit"] {
    width: 100%;
    padding: 12px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nexus-one-login-wrap input[type="submit"]:hover {
    background: #005177;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.nexus-one-login-wrap input[type="submit"]:active {
    transform: translateY(0);
}

/* Loading state */
.nexus-one-loading {
    opacity: 0.6;
    pointer-events: none;
}

.nexus-one-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}